Loading...
Searching...
No Matches
meshToMesh0 Class Reference

Serial mesh to mesh interpolation class. More...

#include <meshToMesh0.H>

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.
 meshToMesh0 (const fvMesh &fromMesh, const fvMesh &toMesh)
 Construct from the two meshes assuming there is an exact mapping.
 ~meshToMesh0 ()=default
 Destructor.
const fvMeshfromMesh () const
const fvMeshtoMesh () const
const labelListcellAddressing () const
 From toMesh cells to fromMesh cells.
scalar V () const
 Overlap volume.
template<class Type, class CombineOp>
void mapField (Field< Type > &, const Field< Type > &, const labelList &adr, const CombineOp &cop) const
 Map field.
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.
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.
template<class Type, class CombineOp>
void interpolateField (Field< Type > &, const VolumeField< Type > &, const labelList &adr, const vectorField &centres, const CombineOp &cop) const
 Interpolate field using cell-point interpolation.
template<class Type, class CombineOp>
void interpolateInternalField (Field< Type > &, const VolumeField< Type > &, order=INTERPOLATE, const CombineOp &cop=eqOp< Type >()) const
 Interpolate internal volume field.
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.
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.
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

Detailed Description

Serial mesh to mesh interpolation class.

Note
This class is due to be deprecated in favour of meshToMesh
Source files

Definition at line 61 of file meshToMesh0.H.

Member Enumeration Documentation

◆ order

enum order

Enumeration specifying required accuracy.

Enumerator
MAP 
INTERPOLATE 
CELL_POINT_INTERPOLATE 
CELL_VOLUME_WEIGHT 

Definition at line 170 of file meshToMesh0.H.

Constructor & Destructor Documentation

◆ meshToMesh0() [1/2]

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 37 of file meshToMesh0.C.

References Foam::endl(), UList< T >::find(), forAll, Foam::isA(), and WarningInFunction.

Here is the call graph for this function:

◆ meshToMesh0() [2/2]

meshToMesh0 ( const fvMesh & fromMesh,
const fvMesh & toMesh )

Construct from the two meshes assuming there is an exact mapping.

between the patches

Definition at line 108 of file meshToMesh0.C.

References forAll, and if().

Here is the call graph for this function:

◆ ~meshToMesh0()

~meshToMesh0 ( )
default

Destructor.

Member Function Documentation

◆ ClassName()

ClassName ( "meshToMesh0" )

◆ fromMesh()

const fvMesh & fromMesh ( ) const
inline

Definition at line 270 of file meshToMesh0.H.

Referenced by Foam::MapConsistentVolFields(), and Foam::MapVolFields().

Here is the caller graph for this function:

◆ toMesh()

const fvMesh & toMesh ( ) const
inline

Definition at line 275 of file meshToMesh0.H.

Referenced by Foam::MapConsistentVolFields(), Foam::MapLagrangianFields(), and Foam::MapVolFields().

Here is the caller graph for this function:

◆ cellAddressing()

const labelList & cellAddressing ( ) const
inline

From toMesh cells to fromMesh cells.

Definition at line 283 of file meshToMesh0.H.

◆ V()

scalar V ( ) const
inline

Overlap volume.

Definition at line 291 of file meshToMesh0.H.

◆ mapField()

template<class Type, class CombineOp>
void mapField ( Field< Type > & toF,
const Field< Type > & fromVf,
const labelList & adr,
const CombineOp & cop ) const

Map field.

Definition at line 31 of file meshToMesh0Templates.C.

References forAll.

Referenced by interpolate(), and interpolateInternalField().

Here is the caller graph for this function:

◆ interpolateField() [1/3]

template<class Type, class CombineOp>
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 81 of file meshToMesh0Templates.C.

References f(), forAll, and UList< T >::size().

Referenced by interpolate(), and interpolateInternalField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ interpolateField() [2/3]

template<class Type, class CombineOp>
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 54 of file meshToMesh0Templates.C.

References f(), forAll, and Foam::Zero.

Here is the call graph for this function:

◆ interpolateField() [3/3]

template<class Type, class CombineOp>
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 116 of file meshToMesh0Templates.C.

References forAll, and interpolationCellPoint< Type >::interpolate().

Here is the call graph for this function:

◆ interpolateInternalField() [1/2]

template<class Type, class CombineOp>
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 147 of file meshToMesh0Templates.C.

References CELL_POINT_INTERPOLATE, CELL_VOLUME_WEIGHT, Foam::exit(), Foam::FatalError, FatalErrorInFunction, INTERPOLATE, interpolateField(), MAP, mapField(), DimensionedField< Type, GeoMesh >::mesh(), and UList< T >::size().

Referenced by interpolate(), interpolate(), and interpolateInternalField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ interpolateInternalField() [2/2]

template<class Type, class CombineOp>
void interpolateInternalField ( Field< Type > & toF,
const tmp< VolumeField< Type > > & tfromVf,
meshToMesh0::order ord = INTERPOLATE,
const CombineOp & cop = eqOp<Type>() ) const

Definition at line 228 of file meshToMesh0Templates.C.

References interpolateInternalField().

Here is the call graph for this function:

◆ interpolate() [1/6]

template<class Type, class CombineOp>
void interpolate ( VolumeField< Type > & toVf,
const VolumeField< Type > & fromVf,
meshToMesh0::order ord = INTERPOLATE,
const CombineOp & cop = eqOp<Type>() ) const

◆ interpolate() [2/6]

template<class Type, class CombineOp>
void interpolate ( VolumeField< Type > & toVf,
const tmp< VolumeField< Type > > & tfromVf,
meshToMesh0::order ord = INTERPOLATE,
const CombineOp & cop = eqOp<Type>() ) const

Definition at line 340 of file meshToMesh0Templates.C.

References Foam::interpolate().

Here is the call graph for this function:

◆ interpolate() [3/6]

template<class Type, class CombineOp>
tmp< VolumeField< Type > > interpolate ( const VolumeField< Type > & ,
order = INTERPOLATE,
const CombineOp & cop = eqOp< Type >() ) const

Interpolate volume field.

References INTERPOLATE.

◆ interpolate() [4/6]

template<class Type, class CombineOp>
tmp< VolumeField< Type > > interpolate ( const tmp< VolumeField< Type > > & ,
order = INTERPOLATE,
const CombineOp & cop = eqOp< Type >() ) const

References INTERPOLATE.

◆ interpolate() [5/6]

◆ interpolate() [6/6]

template<class Type, class CombineOp>
Foam::tmp< Foam::VolumeField< Type > > interpolate ( const tmp< VolumeField< Type > > & tfromVf,
meshToMesh0::order ord,
const CombineOp & cop ) const

Definition at line 423 of file meshToMesh0Templates.C.

References Foam::interpolate().

Here is the call graph for this function:

The documentation for this class was generated from the following files: