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 polyMesh & | srcRegion () const |
Return const access to the source mesh. More... | |
const polyMesh & | tgtRegion () const |
Return const access to the target mesh. More... | |
const labelListList & | srcToTgtCellAddr () const |
Return const access to the source to target cell addressing. More... | |
const labelListList & | tgtToSrcCellAddr () const |
Return const access to the target to source cell addressing. More... | |
const scalarListList & | srcToTgtCellWght () const |
Return const access to the source to target cell weights. More... | |
const scalarListList & | tgtToSrcCellWght () 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 |
Class to calculate the cell-addressing between two overlapping meshes.
Mapping is performed using a run-time selectable interpolation mothod
Definition at line 60 of file meshToMesh.H.
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().
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.
|
delete |
Disallow default bitwise copy construction.
|
virtual |
Destructor.
Definition at line 646 of file meshToMesh.C.
TypeName | ( | "meshToMesh" | ) |
Run-time type information.
|
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().
|
inline |
Return const access to the target mesh.
Definition at line 36 of file meshToMeshI.H.
Referenced by Foam::MapVolFields().
|
inline |
Return const access to the source to target cell addressing.
Definition at line 43 of file meshToMeshI.H.
|
inline |
Return const access to the target to source cell addressing.
Definition at line 50 of file meshToMeshI.H.
|
inline |
Return const access to the source to target cell weights.
Definition at line 57 of file meshToMeshI.H.
|
inline |
Return const access to the target to source cell weights.
Definition at line 64 of file meshToMeshI.H.
|
inline |
Return const access to the overlap volume.
Definition at line 70 of file meshToMeshI.H.
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()().
Return the src field mapped to the tgt mesh with a defined.
operation. Initial values of the result are set to zero
Convenience function to map a tmp field to the tgt mesh.
with a defined operation
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().
Return the tgt field mapped to the src mesh with a defined.
operation. Initial values of the result are set to zero
Convenience function to map a tmp field to the src mesh.
with a defined operation
void mapSrcToTgt | ( | const GeometricField< Type, fvPatchField, volMesh > & | field, |
GeometricField< Type, fvPatchField, volMesh > & | result | ||
) | const |
Interpolate a field with a defined operation. Values.
passed in via 'result' are used to initialise the return value
Definition at line 281 of file meshToMeshTemplates.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), forAll, Foam::identity(), meshToMesh::mapSrcToTgt(), fvPatchField< Type >::patch(), patchi, fvPatchField< Type >::patchInternalField(), GeometricField< Type, PatchField, GeoMesh >::primitiveFieldRef(), fvPatchField< Type >::rmap(), and List< Type >::size().
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
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
void mapTgtToSrc | ( | const GeometricField< Type, fvPatchField, volMesh > & | field, |
GeometricField< Type, fvPatchField, volMesh > & | result | ||
) | const |
Interpolate a field with a defined operation. Values.
passed in via 'result' are used to initialise the return value
Definition at line 462 of file meshToMeshTemplates.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), forAll, Foam::identity(), meshToMesh::mapTgtToSrc(), fvPatchField< Type >::patch(), patchi, fvPatchField< Type >::patchInternalField(), GeometricField< Type, PatchField, GeoMesh >::primitiveFieldRef(), fvPatchField< Type >::rmap(), and List< Type >::size().
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
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
|
delete |
Disallow default bitwise assignment.
void mapAndOpSrcToTgt | ( | const AMIInterpolation & | AMI, |
const Field< scalar > & | srcField, | ||
Field< scalar > & | tgtField | ||
) | const |
Definition at line 44 of file meshToMesh.C.
void mapAndOpSrcToTgt | ( | const AMIInterpolation & | AMI, |
const Field< vector > & | srcField, | ||
Field< vector > & | tgtField | ||
) | const |
Definition at line 54 of file meshToMesh.C.
void mapAndOpSrcToTgt | ( | const AMIInterpolation & | AMI, |
const Field< sphericalTensor > & | srcField, | ||
Field< sphericalTensor > & | tgtField | ||
) | const |
Definition at line 64 of file meshToMesh.C.
void mapAndOpSrcToTgt | ( | const AMIInterpolation & | AMI, |
const Field< symmTensor > & | srcField, | ||
Field< symmTensor > & | tgtField | ||
) | const |
Definition at line 74 of file meshToMesh.C.
void mapAndOpSrcToTgt | ( | const AMIInterpolation & | AMI, |
const Field< tensor > & | srcField, | ||
Field< tensor > & | tgtField | ||
) | const |
Definition at line 84 of file meshToMesh.C.
void mapAndOpTgtToSrc | ( | const AMIInterpolation & | AMI, |
Field< scalar > & | srcField, | ||
const Field< scalar > & | tgtField | ||
) | const |
Definition at line 94 of file meshToMesh.C.
void mapAndOpTgtToSrc | ( | const AMIInterpolation & | AMI, |
Field< vector > & | srcField, | ||
const Field< vector > & | tgtField | ||
) | const |
Definition at line 104 of file meshToMesh.C.
void mapAndOpTgtToSrc | ( | const AMIInterpolation & | AMI, |
Field< sphericalTensor > & | srcField, | ||
const Field< sphericalTensor > & | tgtField | ||
) | const |
Definition at line 114 of file meshToMesh.C.
void mapAndOpTgtToSrc | ( | const AMIInterpolation & | AMI, |
Field< symmTensor > & | srcField, | ||
const Field< symmTensor > & | tgtField | ||
) | const |
Definition at line 124 of file meshToMesh.C.
void mapAndOpTgtToSrc | ( | const AMIInterpolation & | AMI, |
Field< tensor > & | srcField, | ||
const Field< tensor > & | tgtField | ||
) | const |
Definition at line 134 of file meshToMesh.C.
References meshToMeshMethod::AMImethod(), PtrList< T >::append(), List< T >::append(), polyPatch::boundaryMesh(), polyMesh::bounds(), Foam::fvPatchDistWave::calculate(), meshToMeshMethod::calculate(), cells, primitiveMesh::cells(), distributionMapBase::constructMap(), Foam::decrIndent(), distributionMapBase::distribute(), Foam::endl(), Foam::exit(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, polyBoundaryMesh::findPatchID(), forAll, forAllConstIter, Foam::incrIndent(), patchIdentifier::index(), boundBox::inflate(), Foam::Info, Foam::max(), boundBox::max(), meshToMesh::meshToMesh(), Foam::min(), boundBox::min(), UPstream::myProcNo(), OSstream::name(), patchIdentifier::name(), Foam::name(), polyBoundaryMesh::names(), meshToMeshMethod::New(), Foam::nl, IOobject::NO_READ, UPstream::nonBlocking, word::null, boundBox::overlaps(), patches, patchi, points, polyMesh::points(), Foam::Pout, Foam::reduce(), Foam::returnReduce(), s(), UPtrList< T >::size(), List< T >::size(), HashTable< T, Key, Hash >::size(), distributionMapBase::subMap(), Foam::sum(), faceAreaIntersect::tmMesh, meshToMeshMethod::V(), Ostream::write(), and meshToMeshMethod::writeConnectivity().
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.
Foam::tmp<Foam::Field<Type> > mapSrcToTgt | ( | const tmp< Field< Type >> & | tsrcField | ) | const |
Definition at line 162 of file meshToMeshTemplates.C.
References meshToMesh::mapTgtToSrc().
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.
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().
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > mapSrcToTgt | ( | const GeometricField< Type, fvPatchField, volMesh > & | field | ) | const |
Definition at line 344 of file meshToMeshTemplates.C.
References fvMesh::boundary(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), DimensionedField< Type, GeoMesh >::dimensions(), forAll, meshToMesh::mapSrcToTgt(), IOobject::name(), primitiveMesh::nCells(), IOobject::NO_READ, IOobject::NO_WRITE, DimensionedField< Type, GeoMesh >::null(), GeometricField< Type, PatchField, GeoMesh >::ref(), UPtrList< T >::size(), fvMesh::time(), Time::timeName(), Foam::type(), and Foam::Zero.
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().
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > mapTgtToSrc | ( | const GeometricField< Type, fvPatchField, volMesh > & | field | ) | const |
Definition at line 524 of file meshToMeshTemplates.C.
References fvMesh::boundary(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), DimensionedField< Type, GeoMesh >::dimensions(), forAll, meshToMesh::mapTgtToSrc(), IOobject::name(), primitiveMesh::nCells(), IOobject::NO_READ, IOobject::NO_WRITE, DimensionedField< Type, GeoMesh >::null(), GeometricField< Type, PatchField, GeoMesh >::ref(), UPtrList< T >::size(), fvMesh::time(), Time::timeName(), Foam::type(), and Foam::Zero.
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.