Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
meshToMesh Class Reference

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

Collaboration diagram for meshToMesh:
Collaboration graph
[legend]

Public Types

enum  interpolationMethod { imDirect, imMapNearest, imCellVolumeWeight }
 Enumeration specifying interpolation method. More...
 

Public Member Functions

 TypeName ("meshToMesh")
 Run-time type information. More...
 
 meshToMesh (const polyMesh &src, const polyMesh &tgt, const interpolationMethod &method, const bool interpAllPatches=true)
 Construct from source and target meshes. More...
 
 meshToMesh (const polyMesh &src, const polyMesh &tgt, const word &methodName, const word &AMIMethodName, const bool interpAllPatches=true)
 Construct from source and target meshes, generic mapping methods. More...
 
 meshToMesh (const polyMesh &src, const polyMesh &tgt, const interpolationMethod &method, const HashTable< word > &patchMap, const wordList &cuttingPatches)
 Construct from source and target meshes. More...
 
 meshToMesh (const polyMesh &src, const polyMesh &tgt, const word &methodName, const word &AMIMethodName, const HashTable< word > &patchMap, const wordList &cuttingPatches)
 Construct from source and target meshes, generic mapping methods. 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 , class CombineOp >
void mapSrcToTgt (const UList< Type > &srcFld, const CombineOp &cop, List< Type > &result) const
 Map field from src to tgt mesh with defined operation. More...
 
template<class Type , class CombineOp >
tmp< Field< Type > > mapSrcToTgt (const Field< Type > &srcFld, const CombineOp &cop) const
 Return the src field mapped to the tgt mesh with a defined. More...
 
template<class Type , class CombineOp >
tmp< Field< Type > > mapSrcToTgt (const tmp< Field< Type > > &tsrcFld, const CombineOp &cop) const
 Convenience function to map a tmp field to the tgt mesh. More...
 
template<class Type >
tmp< Field< Type > > mapSrcToTgt (const Field< Type > &srcFld) const
 Convenience function to map a field to the tgt mesh with a. 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 , class CombineOp >
void mapTgtToSrc (const UList< Type > &tgtFld, const CombineOp &cop, List< Type > &result) const
 Map field from tgt to src mesh with defined operation. More...
 
template<class Type , class CombineOp >
tmp< Field< Type > > mapTgtToSrc (const Field< Type > &tgtFld, const CombineOp &cop) const
 Return the tgt field mapped to the src mesh with a defined. More...
 
template<class Type , class CombineOp >
tmp< Field< Type > > mapTgtToSrc (const tmp< Field< Type > > &ttgtFld, const CombineOp &cop) const
 Convenience function to map a tmp field to the src mesh. More...
 
template<class Type >
tmp< Field< Type > > mapTgtToSrc (const Field< Type > &tgtFld) const
 Convenience function to map a field to the src mesh with a. 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 , class CombineOp >
void mapSrcToTgt (const GeometricField< Type, fvPatchField, volMesh > &field, const CombineOp &cop, GeometricField< Type, fvPatchField, volMesh > &result) const
 Interpolate a field with a defined operation. Values. More...
 
template<class Type , class CombineOp >
tmp< GeometricField< Type, fvPatchField, volMesh > > mapSrcToTgt (const GeometricField< Type, fvPatchField, volMesh > &field, const CombineOp &cop) const
 Interpolate a field with a defined operation. The initial. More...
 
template<class Type , class CombineOp >
tmp< GeometricField< Type, fvPatchField, volMesh > > mapSrcToTgt (const tmp< GeometricField< Type, fvPatchField, volMesh > > &tfield, const CombineOp &cop) const
 Interpolate a tmp field with a defined operation. The. More...
 
template<class Type >
tmp< GeometricField< Type, fvPatchField, volMesh > > mapSrcToTgt (const GeometricField< Type, fvPatchField, volMesh > &field) const
 Convenience function to map a field with a default. More...
 
template<class Type >
tmp< GeometricField< Type, fvPatchField, volMesh > > mapSrcToTgt (const tmp< GeometricField< Type, fvPatchField, volMesh > > &tfield) const
 Convenience function to map a tmp field with a default. More...
 
template<class Type , class CombineOp >
void mapTgtToSrc (const GeometricField< Type, fvPatchField, volMesh > &field, const CombineOp &cop, GeometricField< Type, fvPatchField, volMesh > &result) const
 Interpolate a field with a defined operation. Values. More...
 
template<class Type , class CombineOp >
tmp< GeometricField< Type, fvPatchField, volMesh > > mapTgtToSrc (const GeometricField< Type, fvPatchField, volMesh > &field, const CombineOp &cop) const
 Interpolate a field with a defined operation. The initial. More...
 
template<class Type , class CombineOp >
tmp< GeometricField< Type, fvPatchField, volMesh > > mapTgtToSrc (const tmp< GeometricField< Type, fvPatchField, volMesh > > &tfield, const CombineOp &cop) const
 Interpolate a tmp field with a defined operation. The. More...
 
template<class Type >
tmp< GeometricField< Type, fvPatchField, volMesh > > mapTgtToSrc (const GeometricField< Type, fvPatchField, volMesh > &field) const
 Convenience function to map a field with a default. More...
 
template<class Type >
tmp< GeometricField< Type, fvPatchField, volMesh > > mapTgtToSrc (const tmp< GeometricField< Type, fvPatchField, volMesh > > &tfield) const
 Convenience function to map a tmp field with a default. More...
 
template<class Type , class CombineOp >
Foam::tmp< Foam::Field< Type > > mapSrcToTgt (const Field< Type > &srcField, const CombineOp &cop) const
 
template<class Type , class CombineOp >
Foam::tmp< Foam::Field< Type > > mapSrcToTgt (const tmp< Field< Type > > &tsrcField, const CombineOp &cop) 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 , class CombineOp >
Foam::tmp< Foam::Field< Type > > mapTgtToSrc (const Field< Type > &tgtField, const CombineOp &cop) const
 
template<class Type , class CombineOp >
Foam::tmp< Foam::Field< Type > > mapTgtToSrc (const tmp< Field< Type > > &ttgtField, const CombineOp &cop) 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 , class CombineOp >
Foam::tmp< Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > > mapSrcToTgt (const GeometricField< Type, fvPatchField, volMesh > &field, const CombineOp &cop) const
 
template<class Type , class CombineOp >
Foam::tmp< Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > > mapSrcToTgt (const tmp< GeometricField< Type, fvPatchField, volMesh > > &tfield, const CombineOp &cop) 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 , class CombineOp >
Foam::tmp< Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > > mapTgtToSrc (const GeometricField< Type, fvPatchField, volMesh > &field, const CombineOp &cop) const
 
template<class Type , class CombineOp >
Foam::tmp< Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > > mapTgtToSrc (const tmp< GeometricField< Type, fvPatchField, volMesh > > &tfield, const CombineOp &cop) 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
 

Static Public Member Functions

static AMIPatchToPatchInterpolation::interpolationMethod interpolationMethodAMI (const interpolationMethod method)
 Conversion between mesh and patch interpolation methods. More...
 

Static Public Attributes

static const NamedEnum< interpolationMethod, 3 > interpolationMethodNames_
 

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.

Member Enumeration Documentation

Enumeration specifying interpolation method.

Enumerator
imDirect 
imMapNearest 
imCellVolumeWeight 

Definition at line 67 of file meshToMesh.H.

Constructor & Destructor Documentation

meshToMesh ( const polyMesh src,
const polyMesh tgt,
const interpolationMethod method,
const bool  interpAllPatches = true 
)

Construct from source and target meshes.

Definition at line 532 of file meshToMesh.C.

References AMIInterpolation< SourcePatch, TargetPatch >::interpolationMethodToWord().

Here is the call graph for this function:

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

Construct from source and target meshes, generic mapping methods.

Definition at line 567 of file meshToMesh.C.

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

Construct from source and target meshes.

Definition at line 595 of file meshToMesh.C.

References AMIInterpolation< SourcePatch, TargetPatch >::interpolationMethodToWord().

Here is the call graph for this function:

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

Construct from source and target meshes, generic mapping methods.

Definition at line 632 of file meshToMesh.C.

~meshToMesh ( )
virtual

Destructor.

Definition at line 668 of file meshToMesh.C.

Member Function Documentation

TypeName ( "meshToMesh"  )

Run-time type information.

const Foam::polyMesh & srcRegion ( ) const
inline

Return const access to the source mesh.

Definition at line 30 of file meshToMeshI.H.

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

Here is the caller graph for this function:

const Foam::polyMesh & tgtRegion ( ) const
inline

Return const access to the target mesh.

Definition at line 36 of file meshToMeshI.H.

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

Here is the caller graph for this function:

const Foam::labelListList & srcToTgtCellAddr ( ) const
inline

Return const access to the source to target cell addressing.

Definition at line 43 of file meshToMeshI.H.

const Foam::labelListList & tgtToSrcCellAddr ( ) const
inline

Return const access to the target to source cell addressing.

Definition at line 50 of file meshToMeshI.H.

const Foam::scalarListList & srcToTgtCellWght ( ) const
inline

Return const access to the source to target cell weights.

Definition at line 57 of file meshToMeshI.H.

const Foam::scalarListList & tgtToSrcCellWght ( ) const
inline

Return const access to the target to source cell weights.

Definition at line 64 of file meshToMeshI.H.

Foam::scalar V ( ) const
inline

Return const access to the overlap volume.

Definition at line 70 of file meshToMeshI.H.

Foam::AMIPatchToPatchInterpolation::interpolationMethod interpolationMethodAMI ( const interpolationMethod  method)
static
void mapSrcToTgt ( const UList< Type > &  srcFld,
const CombineOp &  cop,
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(), mapDistribute::distribute(), Foam::FatalError, FatalErrorIn, forAll, Foam::nl, List< T >::size(), and Foam::sum().

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

Here is the call graph for this function:

Here is the caller graph for this function:

tmp<Field<Type> > mapSrcToTgt ( const Field< Type > &  srcFld,
const CombineOp &  cop 
) const

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

operation. Initial values of the result are set to zero

tmp<Field<Type> > mapSrcToTgt ( const tmp< Field< Type > > &  tsrcFld,
const CombineOp &  cop 
) const

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

with a defined operation

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

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

default operation (plusEqOp)

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

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

with a default operation (plusEqOp)

void mapTgtToSrc ( const UList< Type > &  tgtFld,
const CombineOp &  cop,
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 210 of file meshToMeshTemplates.C.

References Foam::abort(), mapDistribute::distribute(), Foam::FatalError, FatalErrorIn, 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:

tmp<Field<Type> > mapTgtToSrc ( const Field< Type > &  tgtFld,
const CombineOp &  cop 
) const

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

operation. Initial values of the result are set to zero

tmp<Field<Type> > mapTgtToSrc ( const tmp< Field< Type > > &  ttgtFld,
const CombineOp &  cop 
) const

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

with a defined operation

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

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

default operation (plusEqOp)

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

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

with a default operation (plusEqOp)

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

Interpolate a field with a defined operation. The initial.

values of the result are set to zero

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

Interpolate a tmp field with a defined operation. The.

initial values of the result are set to zero

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

Convenience function to map a field with a default.

operation (plusEqOp)

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

Convenience function to map a tmp field with a default.

operation (plusEqOp)

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

Interpolate a field with a defined operation. The initial.

values of the result are set to zero

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

Interpolate a tmp field with a defined operation. The.

initial values of the result are set to zero

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

Convenience function to map a field with a default.

operation (plusEqOp)

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

Convenience function to map a tmp field with a default.

operation (plusEqOp)

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

Definition at line 157 of file meshToMeshTemplates.C.

References meshToMesh::mapSrcToTgt().

Here is the call graph for this function:

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

Definition at line 179 of file meshToMeshTemplates.C.

References meshToMesh::mapSrcToTgt().

Here is the call graph for this function:

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

Definition at line 190 of file meshToMeshTemplates.C.

References meshToMesh::mapSrcToTgt().

Here is the call graph for this function:

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

Definition at line 200 of file meshToMeshTemplates.C.

References meshToMesh::mapTgtToSrc().

Here is the call graph for this function:

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

Definition at line 283 of file meshToMeshTemplates.C.

References meshToMesh::mapTgtToSrc().

Here is the call graph for this function:

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

Definition at line 305 of file meshToMeshTemplates.C.

References meshToMesh::mapTgtToSrc().

Here is the call graph for this function:

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

Definition at line 316 of file meshToMeshTemplates.C.

References meshToMesh::mapTgtToSrc().

Here is the call graph for this function:

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

Definition at line 326 of file meshToMeshTemplates.C.

References meshToMesh::mapSrcToTgt().

Here is the call graph for this function:

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

Definition at line 492 of file meshToMeshTemplates.C.

References meshToMesh::mapSrcToTgt().

Here is the call graph for this function:

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

Definition at line 504 of file meshToMeshTemplates.C.

References meshToMesh::mapSrcToTgt().

Here is the call graph for this function:

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

Definition at line 515 of file meshToMeshTemplates.C.

References meshToMesh::mapTgtToSrc().

Here is the call graph for this function:

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

Definition at line 681 of file meshToMeshTemplates.C.

References meshToMesh::mapTgtToSrc().

Here is the call graph for this function:

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

Definition at line 693 of file meshToMeshTemplates.C.

References meshToMesh::mapTgtToSrc().

Here is the call graph for this function:

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

Definition at line 704 of file meshToMeshTemplates.C.

Member Data Documentation

const NamedEnum< meshToMesh::interpolationMethod, 3 > interpolationMethodNames_
static

Definition at line 75 of file meshToMesh.H.

Referenced by NamedEnum< Enum, nEnum >::names(), and interRegionOption::setMapper().


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