meshToMesh Class Reference

Class to calculate the cell-addressing between two overlapping meshes. More...

Public Member Functions

 TypeName ("meshToMesh")
 Run-time type information. More...
 
 meshToMesh (const polyMesh &src, const polyMesh &tgt, const word &methodName, const bool interpAllPatches=true)
 Construct from source and target meshes, generic mapping methods. More...
 
 meshToMesh (const polyMesh &src, const polyMesh &tgt, const word &methodName, const HashTable< word > &patchMap, const wordList &cuttingPatches)
 Construct from source and target meshes, generic mapping methods. More...
 
 meshToMesh (const meshToMesh &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~meshToMesh ()
 Destructor. More...
 
const polyMeshsrcRegion () const
 Return const access to the source mesh. More...
 
const polyMeshtgtRegion () const
 Return const access to the target mesh. More...
 
const labelListListsrcToTgtCellAddr () const
 Return const access to the source to target cell addressing. More...
 
const labelListListtgtToSrcCellAddr () const
 Return const access to the target to source cell addressing. More...
 
const scalarListListsrcToTgtCellWght () const
 Return const access to the source to target cell weights. More...
 
const scalarListListtgtToSrcCellWght () const
 Return const access to the target to source cell weights. More...
 
scalar V () const
 Return const access to the overlap volume. More...
 
template<class Type >
void mapSrcToTgt (const UList< Type > &srcFld, List< Type > &result) const
 Map field from src to tgt mesh with defined operation. More...
 
template<class Type >
tmp< Field< Type > > mapSrcToTgt (const Field< Type > &srcFld) const
 Return the src field mapped to the tgt mesh with a defined. More...
 
template<class Type >
tmp< Field< Type > > mapSrcToTgt (const tmp< Field< Type >> &tsrcFld) const
 Convenience function to map a tmp field to the tgt mesh. More...
 
template<class Type >
void mapTgtToSrc (const UList< Type > &tgtFld, List< Type > &result) const
 Map field from tgt to src mesh with defined operation. More...
 
template<class Type >
tmp< Field< Type > > mapTgtToSrc (const Field< Type > &tgtFld) const
 Return the tgt field mapped to the src mesh with a defined. More...
 
template<class Type >
tmp< Field< Type > > mapTgtToSrc (const tmp< Field< Type >> &ttgtFld) const
 Convenience function to map a tmp field to the src mesh. More...
 
template<class Type >
void mapSrcToTgt (const GeometricField< Type, fvPatchField, volMesh > &field, GeometricField< Type, fvPatchField, volMesh > &result) const
 Interpolate a field with a defined operation. Values. More...
 
template<class Type >
tmp< GeometricField< Type, fvPatchField, volMesh > > mapSrcToTgt (const GeometricField< Type, fvPatchField, volMesh > &field) const
 Interpolate a field with a defined operation. The initial. More...
 
template<class Type >
tmp< GeometricField< Type, fvPatchField, volMesh > > mapSrcToTgt (const tmp< GeometricField< Type, fvPatchField, volMesh >> &tfield) const
 Interpolate a tmp field with a defined operation. The. More...
 
template<class Type >
void mapTgtToSrc (const GeometricField< Type, fvPatchField, volMesh > &field, GeometricField< Type, fvPatchField, volMesh > &result) const
 Interpolate a field with a defined operation. Values. More...
 
template<class Type >
tmp< GeometricField< Type, fvPatchField, volMesh > > mapTgtToSrc (const GeometricField< Type, fvPatchField, volMesh > &field) const
 Interpolate a field with a defined operation. The initial. More...
 
template<class Type >
tmp< GeometricField< Type, fvPatchField, volMesh > > mapTgtToSrc (const tmp< GeometricField< Type, fvPatchField, volMesh >> &tfield) const
 Interpolate a tmp field with a defined operation. The. More...
 
void operator= (const meshToMesh &)=delete
 Disallow default bitwise assignment. More...
 
template<>
void mapAndOpSrcToTgt (const AMIInterpolation &AMI, const Field< scalar > &srcField, Field< scalar > &tgtField) const
 
template<>
void mapAndOpSrcToTgt (const AMIInterpolation &AMI, const Field< vector > &srcField, Field< vector > &tgtField) const
 
template<>
void mapAndOpSrcToTgt (const AMIInterpolation &AMI, const Field< sphericalTensor > &srcField, Field< sphericalTensor > &tgtField) const
 
template<>
void mapAndOpSrcToTgt (const AMIInterpolation &AMI, const Field< symmTensor > &srcField, Field< symmTensor > &tgtField) const
 
template<>
void mapAndOpSrcToTgt (const AMIInterpolation &AMI, const Field< tensor > &srcField, Field< tensor > &tgtField) const
 
template<>
void mapAndOpTgtToSrc (const AMIInterpolation &AMI, Field< scalar > &srcField, const Field< scalar > &tgtField) const
 
template<>
void mapAndOpTgtToSrc (const AMIInterpolation &AMI, Field< vector > &srcField, const Field< vector > &tgtField) const
 
template<>
void mapAndOpTgtToSrc (const AMIInterpolation &AMI, Field< sphericalTensor > &srcField, const Field< sphericalTensor > &tgtField) const
 
template<>
void mapAndOpTgtToSrc (const AMIInterpolation &AMI, Field< symmTensor > &srcField, const Field< symmTensor > &tgtField) const
 
template<>
void mapAndOpTgtToSrc (const AMIInterpolation &AMI, Field< tensor > &srcField, const Field< tensor > &tgtField) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > mapSrcToTgt (const Field< Type > &srcField) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > mapSrcToTgt (const tmp< Field< Type >> &tsrcField) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > mapTgtToSrc (const Field< Type > &tgtField) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > mapTgtToSrc (const tmp< Field< Type >> &ttgtField) const
 
template<class Type >
Foam::tmp< Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > > mapSrcToTgt (const GeometricField< Type, fvPatchField, volMesh > &field) const
 
template<class Type >
Foam::tmp< Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > > mapSrcToTgt (const tmp< GeometricField< Type, fvPatchField, volMesh >> &tfield) const
 
template<class Type >
Foam::tmp< Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > > mapTgtToSrc (const GeometricField< Type, fvPatchField, volMesh > &field) const
 
template<class Type >
Foam::tmp< Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > > mapTgtToSrc (const tmp< GeometricField< Type, fvPatchField, volMesh >> &tfield) const
 

Detailed Description

Class to calculate the cell-addressing between two overlapping meshes.

Mapping is performed using a run-time selectable interpolation mothod

See also
meshToMeshMethod
Source files

Definition at line 60 of file meshToMesh.H.

Constructor & Destructor Documentation

◆ meshToMesh() [1/3]

meshToMesh ( const polyMesh src,
const polyMesh tgt,
const word methodName,
const bool  interpAllPatches = true 
)

Construct from source and target meshes, generic mapping methods.

Definition at line 585 of file meshToMesh.C.

Referenced by meshToMesh::mapAndOpTgtToSrc().

Here is the caller graph for this function:

◆ meshToMesh() [2/3]

meshToMesh ( const polyMesh src,
const polyMesh tgt,
const word methodName,
const HashTable< word > &  patchMap,
const wordList cuttingPatches 
)

Construct from source and target meshes, generic mapping methods.

Definition at line 612 of file meshToMesh.C.

◆ meshToMesh() [3/3]

meshToMesh ( const meshToMesh )
delete

Disallow default bitwise copy construction.

◆ ~meshToMesh()

~meshToMesh ( )
virtual

Destructor.

Definition at line 646 of file meshToMesh.C.

Member Function Documentation

◆ TypeName()

TypeName ( "meshToMesh"  )

Run-time type information.

◆ srcRegion()

const Foam::polyMesh & srcRegion ( ) const
inline

Return const access to the source mesh.

Definition at line 30 of file meshToMeshI.H.

Referenced by Foam::MapVolFields(), Foam::MeshToMeshMapVolFields(), and Foam::NaNGeometricFields().

Here is the caller graph for this function:

◆ tgtRegion()

const Foam::polyMesh & tgtRegion ( ) const
inline

Return const access to the target mesh.

Definition at line 36 of file meshToMeshI.H.

Referenced by Foam::MapVolFields().

Here is the caller graph for this function:

◆ srcToTgtCellAddr()

const Foam::labelListList & srcToTgtCellAddr ( ) const
inline

Return const access to the source to target cell addressing.

Definition at line 43 of file meshToMeshI.H.

◆ tgtToSrcCellAddr()

const Foam::labelListList & tgtToSrcCellAddr ( ) const
inline

Return const access to the target to source cell addressing.

Definition at line 50 of file meshToMeshI.H.

◆ srcToTgtCellWght()

const Foam::scalarListList & srcToTgtCellWght ( ) const
inline

Return const access to the source to target cell weights.

Definition at line 57 of file meshToMeshI.H.

◆ tgtToSrcCellWght()

const Foam::scalarListList & tgtToSrcCellWght ( ) const
inline

Return const access to the target to source cell weights.

Definition at line 64 of file meshToMeshI.H.

◆ V()

Foam::scalar V ( ) const
inline

Return const access to the overlap volume.

Definition at line 70 of file meshToMeshI.H.

◆ mapSrcToTgt() [1/10]

void mapSrcToTgt ( const UList< Type > &  srcFld,
List< Type > &  result 
) const

Map field from src to tgt mesh with defined operation.

Values passed in via 'result' are used to initialise the return value

Definition at line 82 of file meshToMeshTemplates.C.

References Foam::abort(), distributionMap::distribute(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::nl, List< T >::size(), and Foam::sum().

Referenced by interRegionModel::interpolate(), meshToMesh::mapSrcToTgt(), meshToMesh::mapTgtToSrc(), Foam::MapVolFields(), Foam::MeshToMeshMapVolFields(), and ListPlusEqOp< T, Size >::operator()().

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

◆ mapSrcToTgt() [2/10]

tmp<Field<Type> > mapSrcToTgt ( const Field< Type > &  srcFld) const

Return the src field mapped to the tgt mesh with a defined.

operation. Initial values of the result are set to zero

◆ mapSrcToTgt() [3/10]

tmp<Field<Type> > mapSrcToTgt ( const tmp< Field< Type >> &  tsrcFld) const

Convenience function to map a tmp field to the tgt mesh.

with a defined operation

◆ mapTgtToSrc() [1/10]

void mapTgtToSrc ( const UList< Type > &  tgtFld,
List< Type > &  result 
) const

Map field from tgt to src mesh with defined operation.

Values passed in via 'result' are used to initialise the return value

Definition at line 172 of file meshToMeshTemplates.C.

References Foam::abort(), distributionMap::distribute(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::nl, List< T >::size(), and Foam::sum().

Referenced by meshToMesh::mapSrcToTgt(), and meshToMesh::mapTgtToSrc().

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

◆ mapTgtToSrc() [2/10]

tmp<Field<Type> > mapTgtToSrc ( const Field< Type > &  tgtFld) const

Return the tgt field mapped to the src mesh with a defined.

operation. Initial values of the result are set to zero

◆ mapTgtToSrc() [3/10]

tmp<Field<Type> > mapTgtToSrc ( const tmp< Field< Type >> &  ttgtFld) const

Convenience function to map a tmp field to the src mesh.

with a defined operation

◆ mapSrcToTgt() [4/10]

void mapSrcToTgt ( const GeometricField< Type, fvPatchField, volMesh > &  field,
GeometricField< Type, fvPatchField, volMesh > &  result 
) const

◆ mapSrcToTgt() [5/10]

tmp<GeometricField<Type, fvPatchField, volMesh> > mapSrcToTgt ( const GeometricField< Type, fvPatchField, volMesh > &  field) const

Interpolate a field with a defined operation. The initial.

values of the result are set to zero

◆ mapSrcToTgt() [6/10]

tmp<GeometricField<Type, fvPatchField, volMesh> > mapSrcToTgt ( const tmp< GeometricField< Type, fvPatchField, volMesh >> &  tfield) const

Interpolate a tmp field with a defined operation. The.

initial values of the result are set to zero

◆ mapTgtToSrc() [4/10]

void mapTgtToSrc ( const GeometricField< Type, fvPatchField, volMesh > &  field,
GeometricField< Type, fvPatchField, volMesh > &  result 
) const

◆ mapTgtToSrc() [5/10]

tmp<GeometricField<Type, fvPatchField, volMesh> > mapTgtToSrc ( const GeometricField< Type, fvPatchField, volMesh > &  field) const

Interpolate a field with a defined operation. The initial.

values of the result are set to zero

◆ mapTgtToSrc() [6/10]

tmp<GeometricField<Type, fvPatchField, volMesh> > mapTgtToSrc ( const tmp< GeometricField< Type, fvPatchField, volMesh >> &  tfield) const

Interpolate a tmp field with a defined operation. The.

initial values of the result are set to zero

◆ operator=()

void operator= ( const meshToMesh )
delete

Disallow default bitwise assignment.

◆ mapAndOpSrcToTgt() [1/5]

void mapAndOpSrcToTgt ( const AMIInterpolation AMI,
const Field< scalar > &  srcField,
Field< scalar > &  tgtField 
) const

Definition at line 44 of file meshToMesh.C.

◆ mapAndOpSrcToTgt() [2/5]

void mapAndOpSrcToTgt ( const AMIInterpolation AMI,
const Field< vector > &  srcField,
Field< vector > &  tgtField 
) const

Definition at line 54 of file meshToMesh.C.

◆ mapAndOpSrcToTgt() [3/5]

void mapAndOpSrcToTgt ( const AMIInterpolation AMI,
const Field< sphericalTensor > &  srcField,
Field< sphericalTensor > &  tgtField 
) const

Definition at line 64 of file meshToMesh.C.

◆ mapAndOpSrcToTgt() [4/5]

void mapAndOpSrcToTgt ( const AMIInterpolation AMI,
const Field< symmTensor > &  srcField,
Field< symmTensor > &  tgtField 
) const

Definition at line 74 of file meshToMesh.C.

◆ mapAndOpSrcToTgt() [5/5]

void mapAndOpSrcToTgt ( const AMIInterpolation AMI,
const Field< tensor > &  srcField,
Field< tensor > &  tgtField 
) const

Definition at line 84 of file meshToMesh.C.

◆ mapAndOpTgtToSrc() [1/5]

void mapAndOpTgtToSrc ( const AMIInterpolation AMI,
Field< scalar > &  srcField,
const Field< scalar > &  tgtField 
) const

Definition at line 94 of file meshToMesh.C.

◆ mapAndOpTgtToSrc() [2/5]

void mapAndOpTgtToSrc ( const AMIInterpolation AMI,
Field< vector > &  srcField,
const Field< vector > &  tgtField 
) const

Definition at line 104 of file meshToMesh.C.

◆ mapAndOpTgtToSrc() [3/5]

void mapAndOpTgtToSrc ( const AMIInterpolation AMI,
Field< sphericalTensor > &  srcField,
const Field< sphericalTensor > &  tgtField 
) const

Definition at line 114 of file meshToMesh.C.

◆ mapAndOpTgtToSrc() [4/5]

void mapAndOpTgtToSrc ( const AMIInterpolation AMI,
Field< symmTensor > &  srcField,
const Field< symmTensor > &  tgtField 
) const

Definition at line 124 of file meshToMesh.C.

◆ mapAndOpTgtToSrc() [5/5]

◆ mapSrcToTgt() [7/10]

Foam::tmp<Foam::Field<Type> > mapSrcToTgt ( const Field< Type > &  srcField) const

Definition at line 141 of file meshToMeshTemplates.C.

References meshToMesh::mapSrcToTgt(), tmp< T >::ref(), and Foam::Zero.

Here is the call graph for this function:

◆ mapSrcToTgt() [8/10]

Foam::tmp<Foam::Field<Type> > mapSrcToTgt ( const tmp< Field< Type >> &  tsrcField) const

Definition at line 162 of file meshToMeshTemplates.C.

References meshToMesh::mapTgtToSrc().

Here is the call graph for this function:

◆ mapTgtToSrc() [7/10]

Foam::tmp<Foam::Field<Type> > mapTgtToSrc ( const Field< Type > &  tgtField) const

Definition at line 231 of file meshToMeshTemplates.C.

References meshToMesh::mapTgtToSrc(), tmp< T >::ref(), and Foam::Zero.

Here is the call graph for this function:

◆ mapTgtToSrc() [8/10]

Foam::tmp<Foam::Field<Type> > mapTgtToSrc ( const tmp< Field< Type >> &  ttgtField) const

Definition at line 252 of file meshToMeshTemplates.C.

References AMIInterpolation::interpolateToTarget(), and meshToMesh::mapSrcToTgt().

Here is the call graph for this function:

◆ mapSrcToTgt() [9/10]

◆ mapSrcToTgt() [10/10]

Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > mapSrcToTgt ( const tmp< GeometricField< Type, fvPatchField, volMesh >> &  tfield) const

Definition at line 433 of file meshToMeshTemplates.C.

References AMIInterpolation::interpolateToSource(), and meshToMesh::mapTgtToSrc().

Here is the call graph for this function:

◆ mapTgtToSrc() [9/10]

◆ mapTgtToSrc() [10/10]

Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > mapTgtToSrc ( const tmp< GeometricField< Type, fvPatchField, volMesh >> &  tfield) const

Definition at line 613 of file meshToMeshTemplates.C.


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