Serial mesh to mesh interpolation class. More...
Classes | |
class | patchFieldInterpolator |
Patch-field interpolation class. More... | |
Public Types | |
enum | order { MAP , INTERPOLATE , CELL_POINT_INTERPOLATE , CELL_VOLUME_WEIGHT } |
Enumeration specifying required accuracy. More... | |
Public Member Functions | |
ClassName ("meshToMesh0") | |
meshToMesh0 (const fvMesh &fromMesh, const fvMesh &toMesh, const HashTable< word > &patchMap, const wordList &cuttingPatchNames) | |
Construct from the two meshes, the patch name map for the patches. More... | |
meshToMesh0 (const fvMesh &fromMesh, const fvMesh &toMesh) | |
Construct from the two meshes assuming there is an exact mapping. More... | |
~meshToMesh0 ()=default | |
Destructor. More... | |
const fvMesh & | fromMesh () const |
const fvMesh & | toMesh () const |
const labelList & | cellAddressing () const |
From toMesh cells to fromMesh cells. More... | |
scalar | V () const |
Overlap volume. More... | |
template<class Type , class CombineOp > | |
void | mapField (Field< Type > &, const Field< Type > &, const labelList &adr, const CombineOp &cop) const |
Map field. More... | |
template<class Type , class CombineOp > | |
void | interpolateField (Field< Type > &, const VolumeField< Type > &, const labelList &adr, const scalarListList &weights, const CombineOp &cop) const |
Interpolate field using inverse-distance weights. More... | |
template<class Type , class CombineOp > | |
void | interpolateField (Field< Type > &, const VolumeField< Type > &, const labelListList &adr, const scalarListList &weights, const CombineOp &cop) const |
Interpolate field using inverse-volume weights. More... | |
template<class Type , class CombineOp > | |
void | interpolateField (Field< Type > &, const VolumeField< Type > &, const labelList &adr, const vectorField ¢res, const CombineOp &cop) const |
Interpolate field using cell-point interpolation. More... | |
template<class Type , class CombineOp > | |
void | interpolateInternalField (Field< Type > &, const VolumeField< Type > &, order=INTERPOLATE, const CombineOp &cop=eqOp< Type >()) const |
Interpolate internal volume field. More... | |
template<class Type , class CombineOp > | |
void | interpolateInternalField (Field< Type > &, const tmp< VolumeField< Type > > &, order=INTERPOLATE, const CombineOp &cop=eqOp< Type >()) const |
template<class Type , class CombineOp > | |
void | interpolate (VolumeField< Type > &, const VolumeField< Type > &, order=INTERPOLATE, const CombineOp &cop=eqOp< Type >()) const |
Interpolate volume field. More... | |
template<class Type , class CombineOp > | |
void | interpolate (VolumeField< Type > &, const tmp< VolumeField< Type > > &, order=INTERPOLATE, const CombineOp &cop=eqOp< Type >()) const |
template<class Type , class CombineOp > | |
tmp< VolumeField< Type > > | interpolate (const VolumeField< Type > &, order=INTERPOLATE, const CombineOp &cop=eqOp< Type >()) const |
Interpolate volume field. More... | |
template<class Type , class CombineOp > | |
tmp< VolumeField< Type > > | interpolate (const tmp< VolumeField< Type > > &, order=INTERPOLATE, const CombineOp &cop=eqOp< Type >()) const |
template<class Type , class CombineOp > | |
Foam::tmp< Foam::VolumeField< Type > > | interpolate (const VolumeField< Type > &fromVf, meshToMesh0::order ord, const CombineOp &cop) const |
template<class Type , class CombineOp > | |
Foam::tmp< Foam::VolumeField< Type > > | interpolate (const tmp< VolumeField< Type > > &tfromVf, meshToMesh0::order ord, const CombineOp &cop) const |
Serial mesh to mesh interpolation class.
Definition at line 65 of file meshToMesh0.H.
enum order |
Enumeration specifying required accuracy.
Enumerator | |
---|---|
MAP | |
INTERPOLATE | |
CELL_POINT_INTERPOLATE | |
CELL_VOLUME_WEIGHT |
Definition at line 147 of file meshToMesh0.H.
meshToMesh0 | ( | const fvMesh & | fromMesh, |
const fvMesh & | toMesh, | ||
const HashTable< word > & | patchMap, | ||
const wordList & | cuttingPatchNames | ||
) |
Construct from the two meshes, the patch name map for the patches.
to be interpolated and the names of the toMesh-patches which cut the fromMesh
Definition at line 44 of file meshToMesh0.C.
References polyMesh::boundaryMesh(), Foam::endl(), HashTable< T, Key, Hash >::find(), forAll, HashTable< T, Key, Hash >::found(), HashTable< T, Key, Hash >::insert(), IOobject::name(), and WarningInFunction.
meshToMesh0 | ( | const fvMesh & | fromMesh, |
const fvMesh & | toMesh | ||
) |
Construct from the two meshes assuming there is an exact mapping.
between the patches
Definition at line 115 of file meshToMesh0.C.
References fvMesh::boundary(), polyMesh::boundaryMesh(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, HashTable< T, Key, Hash >::insert(), IOobject::name(), and UPtrList< T >::size().
|
default |
Destructor.
ClassName | ( | "meshToMesh0" | ) |
|
inline |
Definition at line 233 of file meshToMesh0.H.
Referenced by Foam::MapConsistentVolFields(), and Foam::MapVolFields().
|
inline |
Definition at line 238 of file meshToMesh0.H.
Referenced by Foam::MapConsistentVolFields(), Foam::MapLagrangianFields(), and Foam::MapVolFields().
|
inline |
From toMesh cells to fromMesh cells.
Definition at line 244 of file meshToMesh0.H.
|
inline |
Overlap volume.
Definition at line 250 of file meshToMesh0.H.
void interpolateField | ( | Field< Type > & | toF, |
const VolumeField< Type > & | fromVf, | ||
const labelList & | adr, | ||
const scalarListList & | weights, | ||
const CombineOp & | cop | ||
) | const |
Interpolate field using inverse-distance weights.
Definition at line 88 of file meshToMesh0Templates.C.
References f(), forAll, and UList< T >::size().
void interpolateField | ( | Field< Type > & | toF, |
const VolumeField< Type > & | fromVf, | ||
const labelListList & | adr, | ||
const scalarListList & | weights, | ||
const CombineOp & | cop | ||
) | const |
Interpolate field using inverse-volume weights.
Definition at line 61 of file meshToMesh0Templates.C.
References f(), forAll, and Foam::Zero.
void interpolateField | ( | Field< Type > & | toF, |
const VolumeField< Type > & | fromVf, | ||
const labelList & | adr, | ||
const vectorField & | centres, | ||
const CombineOp & | cop | ||
) | const |
Interpolate field using cell-point interpolation.
Definition at line 123 of file meshToMesh0Templates.C.
References forAll, and interpolationCellPoint< Type >::interpolate().
void interpolateInternalField | ( | Field< Type > & | toF, |
const VolumeField< Type > & | fromVf, | ||
meshToMesh0::order | ord = INTERPOLATE , |
||
const CombineOp & | cop = eqOp<Type>() |
||
) | const |
Interpolate internal volume field.
Definition at line 154 of file meshToMesh0Templates.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, DimensionedField< Type, GeoMesh >::mesh(), and UList< T >::size().
void interpolateInternalField | ( | Field< Type > & | toF, |
const tmp< VolumeField< Type > > & | tfromVf, | ||
meshToMesh0::order | ord = INTERPOLATE , |
||
const CombineOp & | cop = eqOp<Type>() |
||
) | const |
Definition at line 235 of file meshToMesh0Templates.C.
void interpolate | ( | VolumeField< Type > & | toVf, |
const VolumeField< Type > & | fromVf, | ||
meshToMesh0::order | ord = INTERPOLATE , |
||
const CombineOp & | cop = eqOp<Type>() |
||
) | const |
Interpolate volume field.
Definition at line 249 of file meshToMesh0Templates.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), fvPatch::Cf(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::isA(), and fvPatch::name().
Referenced by Foam::MapConsistentVolFields(), and Foam::MapVolFields().
void interpolate | ( | VolumeField< Type > & | toVf, |
const tmp< VolumeField< Type > > & | tfromVf, | ||
meshToMesh0::order | ord = INTERPOLATE , |
||
const CombineOp & | cop = eqOp<Type>() |
||
) | const |
Definition at line 347 of file meshToMesh0Templates.C.
References Foam::interpolate().
tmp< VolumeField< Type > > interpolate | ( | const VolumeField< Type > & | , |
order | = INTERPOLATE , |
||
const CombineOp & | cop = eqOp< Type >() |
||
) | const |
Interpolate volume field.
tmp< VolumeField< Type > > interpolate | ( | const tmp< VolumeField< Type > > & | , |
order | = INTERPOLATE , |
||
const CombineOp & | cop = eqOp< Type >() |
||
) | const |
Foam::tmp< Foam::VolumeField< Type > > interpolate | ( | const VolumeField< Type > & | fromVf, |
meshToMesh0::order | ord, | ||
const CombineOp & | cop | ||
) | const |
Definition at line 362 of file meshToMesh0Templates.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), DimensionedField< Type, GeoMesh >::dimensions(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, IOobject::name(), Foam::New(), IOobject::NO_READ, IOobject::NO_WRITE, and PtrList< T >::set().
Foam::tmp< Foam::VolumeField< Type > > interpolate | ( | const tmp< VolumeField< Type > > & | tfromVf, |
meshToMesh0::order | ord, | ||
const CombineOp & | cop | ||
) | const |
Definition at line 430 of file meshToMesh0Templates.C.
References Foam::interpolate().