Engine and base class for poly patches which provides interpolative mapping between two globally conforming poly patches. More...


Public Member Functions | |
| TypeName ("mappedPatchBase") | |
| Runtime type information. More... | |
| mappedPatchBase (const polyPatch &) | |
| Construct from patch. More... | |
| mappedPatchBase (const polyPatch &pp, const word &nbrRegionName, const word &nbrPatchName, const cyclicTransform &transform) | |
| Construct from components. More... | |
| mappedPatchBase (const polyPatch &pp, const dictionary &dict, const transformType tt) | |
| Construct from dictionary. More... | |
| mappedPatchBase (const polyPatch &, const mappedPatchBase &) | |
| Construct as copy, resetting patch. More... | |
| virtual | ~mappedPatchBase () |
| Destructor. More... | |
| void | clearOut (const bool move) |
| Clear out data on mesh change. More... | |
| template<class Type > | |
| tmp< Field< Type > > | fromNeighbour (const Field< Type > &nbrFld) const |
| Map/interpolate the neighbour patch field to this patch. More... | |
| template<class Type > | |
| tmp< Field< Type > > | fromNeighbour (const tmp< Field< Type >> &nbrFld) const |
| Map/interpolate the neighbour patch field to this patch. More... | |
| template<class Type > | |
| tmp< Field< Type > > | toNeighbour (const Field< Type > &fld) const |
| Map/interpolate patch field to the neighbour patch. More... | |
| template<class Type > | |
| tmp< Field< Type > > | toNeighbour (const tmp< Field< Type >> &fld) const |
| Map/interpolate patch field to the neighbour patch. More... | |
| virtual void | write (Ostream &) const |
| Write as a dictionary. More... | |
| template<class Type > | |
| Foam::tmp< Foam::Field< Type > > | fromNeighbour (const Field< Type > &nbrFld) const |
| template<class Type > | |
| Foam::tmp< Foam::Field< Type > > | fromNeighbour (const tmp< Field< Type >> &nbrFld) const |
| template<class Type > | |
| Foam::tmp< Foam::Field< Type > > | toNeighbour (const Field< Type > &fld) const |
| template<class Type > | |
| Foam::tmp< Foam::Field< Type > > | toNeighbour (const tmp< Field< Type >> &fld) const |
Public Member Functions inherited from mappedPatchBaseBase | |
| TypeName ("mappedPatchBaseBase") | |
| Runtime type information. More... | |
| mappedPatchBaseBase (const polyPatch &) | |
| Construct from patch. More... | |
| mappedPatchBaseBase (const polyPatch &pp, const word &nbrRegionName, const word &nbrPatchName, const cyclicTransform &transform) | |
| Construct from components. More... | |
| mappedPatchBaseBase (const polyPatch &pp, const dictionary &dict, const transformType tt) | |
| Construct from dictionary. More... | |
| mappedPatchBaseBase (const polyPatch &, const mappedPatchBaseBase &) | |
| Construct as copy, resetting patch. More... | |
| virtual | ~mappedPatchBaseBase () |
| Destructor. More... | |
| const word & | nbrRegionName () const |
| Name of the region to map from. More... | |
| const word & | nbrPatchName () const |
| Name of the patch to map from. More... | |
| const transformer & | transform () const |
| The transformation between the patches. More... | |
| bool | sameRegion () const |
| Is the neighbour region the same as for this patch? More... | |
| bool | samePatch () const |
| Is the neighbour patch the same as this patch? More... | |
| bool | sameUntransformedPatch () const |
| Is the neighbour patch the same as this patch with no transform? More... | |
| bool | haveNbr () const |
| Is the neighbour available? More... | |
| const polyMesh & | nbrMesh () const |
| Get the mesh for the region to map from. More... | |
| const polyPatch & | nbrPolyPatch () const |
| Get the patch to map from. More... | |
| template<class PatchField , class FieldType > | |
| void | validateForField (const PatchField &field, const FieldType &iF, const dictionary &context, const label froms=from::any) const |
| Validate that the map is appropriate for the given. More... | |
| template<class PatchFieldType , class FieldType > | |
| void | validateMapForField (const PatchFieldType &field, const FieldType &iF, const dictionary &context, const label froms) |
| template<class PatchFieldType , class FieldType > | |
| void | validateForField (const PatchFieldType &field, const FieldType &iF, const dictionary &context, const label froms) const |
Static Public Member Functions | |
| static const mappedPatchBase & | getMap (const polyPatch &patch) |
| Cast the given polyPatch to a mappedPatchBase. Handle errors. More... | |
Static Public Member Functions inherited from mappedPatchBaseBase | |
| template<class PatchField , class FieldType > | |
| static void | validateMapForField (const PatchField &field, const FieldType &iF, const dictionary &context, const label froms=from::any) |
| Validate that the map exists and is appropriate for the given. More... | |
| static bool | moving (const polyPatch &patch, const polyPatch &nbrPatch) |
| Return whether or not the patches have moved. More... | |
| static bool | specified (const dictionary &dict) |
| Return whether or not the given dictionary contains a. More... | |
Protected Member Functions | |
| virtual tmp< vectorField > | patchFaceAreas () const |
| Get the face-areas for this patch. More... | |
| virtual tmp< pointField > | patchFaceCentres () const |
| Get the face-centres for this patch. More... | |
| virtual tmp< pointField > | patchLocalPoints () const |
| Get the local points for this patch. More... | |
| tmp< vectorField > | nbrPatchFaceAreas () const |
| Get the face-areas for the neighbour patch. More... | |
| tmp< pointField > | nbrPatchFaceCentres () const |
| Get the face-centres for the neighbour patch. More... | |
| tmp< pointField > | nbrPatchLocalPoints () const |
| Get the local points for the neighbour patch. More... | |
| bool | mappingIsValid () const |
| Return whether or not the mapping is valid. More... | |
| void | calcMapping () const |
| Calculate mapping. More... | |
| virtual void | clearOut () const |
| Clear out data on mesh change. More... | |
| bool | nbrPatchIsMapped () const |
| Return whether or not the neighbour patch is of mapped type. More... | |
| const mappedPatchBase & | nbrMappedPatch () const |
| Get the mapped neighbouring patch. More... | |
| bool | symmetric () const |
| Determine whether the neighbouring patch maps from this patch in. More... | |
Protected Attributes | |
| const bool | usingTree_ |
| Are we using the tree mapping method, or a patch-to-patch. More... | |
| autoPtr< distributionMap > | treeMapPtr_ |
| Distributor (if using tree) More... | |
| labelList | treeNbrPatchFaceIndices_ |
| Indices of the neighbouring patch faces who's values. More... | |
| autoPtr< patchToPatch > | patchToPatchPtr_ |
| Patch-to-patch intersection engine (if using patch-to-patch) More... | |
| const scalar | matchTol_ |
| Matching tolerance. More... | |
| label | mappingIsValid_ |
| Is the mapping engine up to date? Zero if out of date. One if out. More... | |
| label | nbrMappingIsValid_ |
| If the neighbour's mapping engine (if there is one) up to date? More... | |
Protected Attributes inherited from mappedPatchBaseBase | |
| const polyPatch & | patch_ |
| Patch to map to. More... | |
| const coupleGroupIdentifier | coupleGroup_ |
| Couple group for the region/patch to map from. More... | |
| word | nbrRegionName_ |
| Name of the region to map from. More... | |
| word | nbrPatchName_ |
| Name of the patch to map from. More... | |
| cyclicTransform | transform_ |
| The transformation between the patches. More... | |
| const moveUpdate | moveUpdate_ |
| The condition that triggers re-calculation following motion. More... | |
Static Protected Attributes | |
| static const scalar | defaultMatchTol_ = 1e-4 |
| Default Matching tolerance. More... | |
Additional Inherited Members | |
Public Types inherited from mappedPatchBaseBase | |
| enum class | transformType { none , defaultNone , specified } |
| The type of the transformation permitted/required by this patch. More... | |
| enum class | moveUpdate { always , detect , never } |
| Enumeration for the condition that triggers re-calculation of the. More... | |
Static Public Attributes inherited from mappedPatchBaseBase | |
| static const NamedEnum< moveUpdate, 3 > | moveUpdateNames_ {"always", "detect", "never"} |
| Names of the move-update conditions. More... | |
Engine and base class for poly patches which provides interpolative mapping between two globally conforming poly patches.
Example:
// (Settings inherited from mappedPatchBaseBase to identify the
// neighbouring region and patch)
...
// Patch-to-patch mapping method. How the interpolation addressing and
// weights are constructed. Likely to be "matching" if the patches are
// conformal, or "intersection" if they are not. Optional. If omitted,
// then it will be assumed that the patches are conformal, and an
// octree-based method will be used to construct the connections.
method matching; // nearest, intersection, inverseDistance
// Tolerance used to check the patches' global conformance (i.e., the
// conformance of the patches' entire surfaces, not of each pair of
// faces). Optional. Defaults to a small value.
matchTol 1e-4;
Definition at line 72 of file mappedPatchBase.H.
| mappedPatchBase | ( | const polyPatch & | pp | ) |
Construct from patch.
Definition at line 417 of file mappedPatchBase.C.
| mappedPatchBase | ( | const polyPatch & | pp, |
| const word & | nbrRegionName, | ||
| const word & | nbrPatchName, | ||
| const cyclicTransform & | transform | ||
| ) |
Construct from components.
Definition at line 430 of file mappedPatchBase.C.
| mappedPatchBase | ( | const polyPatch & | pp, |
| const dictionary & | dict, | ||
| const transformType | tt | ||
| ) |
Construct from dictionary.
Definition at line 449 of file mappedPatchBase.C.
| mappedPatchBase | ( | const polyPatch & | pp, |
| const mappedPatchBase & | mpb | ||
| ) |
Construct as copy, resetting patch.
Definition at line 476 of file mappedPatchBase.C.
|
virtual |
Destructor.
Definition at line 500 of file mappedPatchBase.C.
|
protectedvirtual |
Get the face-areas for this patch.
Reimplemented in mappedExtrudedPatchBase.
Definition at line 47 of file mappedPatchBase.C.
References mappedPatchBaseBase::patch_.
Referenced by mappedExtrudedPatchBase::patchFaceAreas().

|
protectedvirtual |
Get the face-centres for this patch.
Reimplemented in mappedExtrudedPatchBase.
Definition at line 53 of file mappedPatchBase.C.
Referenced by mappedExtrudedPatchBase::patchFaceCentres().

|
protectedvirtual |
Get the local points for this patch.
Reimplemented in mappedExtrudedPatchBase.
Definition at line 59 of file mappedPatchBase.C.
Referenced by mappedExtrudedPatchBase::patchLocalPoints().

|
protected |
Get the face-areas for the neighbour patch.
Definition at line 65 of file mappedPatchBase.C.
References PrimitivePatch< SubList< face >, const pointField & >::faceAreas().

|
protected |
Get the face-centres for the neighbour patch.
Definition at line 74 of file mappedPatchBase.C.
References PrimitivePatch< SubList< face >, const pointField & >::faceCentres().

|
protected |
Get the local points for the neighbour patch.
Definition at line 83 of file mappedPatchBase.C.
|
protected |
Return whether or not the mapping is valid.
Definition at line 92 of file mappedPatchBase.C.
References Foam::min(), and mappedPatchBaseBase::moving().
Referenced by mappedPatchBase::fromNeighbour().


|
protected |
Calculate mapping.
Definition at line 112 of file mappedPatchBase.C.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), UList< T >::data(), Foam::e, Foam::exit(), PrimitivePatch< FaceList, PointField >::faceCentres(), Foam::FatalError, FatalErrorInFunction, forAll, Pstream::gatherList(), PointIndexHit< Point >::hit(), PointIndexHit< Point >::index(), Pstream::listCombineGather(), Pstream::listCombineScatter(), Foam::magSqr(), UPstream::myProcNo(), Foam::name(), UPstream::nProcs(), p, PrimitivePatch< FaceList, PointField >::pointNormals(), Pstream::scatterList(), globalIndex::size(), List< T >::size(), boundBox::span(), Foam::sqr(), globalIndex::toGlobal(), and List< T >::transfer().
Referenced by mappedPatchBase::fromNeighbour().


|
protectedvirtual |
Clear out data on mesh change.
Reimplemented in mappedExtrudedPatchBase.
Definition at line 408 of file mappedPatchBase.C.
Referenced by mappedFilmSurfacePolyPatch::calcGeometry(), mappedFilmWallPolyPatch::calcGeometry(), mappedExtrudedWallPolyPatch::calcGeometry(), mappedPolyPatch::calcGeometry(), mappedWallPolyPatch::calcGeometry(), mappedExtrudedPatchBase::clearOut(), mappedFilmSurfacePolyPatch::movePoints(), mappedFilmWallPolyPatch::movePoints(), mappedExtrudedWallPolyPatch::movePoints(), mappedPolyPatch::movePoints(), mappedWallPolyPatch::movePoints(), mappedFilmSurfacePolyPatch::topoChange(), mappedFilmWallPolyPatch::topoChange(), mappedExtrudedWallPolyPatch::topoChange(), mappedPolyPatch::topoChange(), and mappedWallPolyPatch::topoChange().

|
inlineprotected |
Return whether or not the neighbour patch is of mapped type.
Definition at line 30 of file mappedPatchBaseI.H.
References mappedPatchBaseBase::nbrPolyPatch().

|
inlineprotected |
Get the mapped neighbouring patch.
Definition at line 37 of file mappedPatchBaseI.H.
Referenced by mappedPatchBase::fromNeighbour().

|
inlineprotected |
Determine whether the neighbouring patch maps from this patch in.
the same way as this patch maps from its neighbour
Definition at line 43 of file mappedPatchBaseI.H.
Referenced by mappedPatchBase::fromNeighbour().

| TypeName | ( | "mappedPatchBase" | ) |
Runtime type information.
|
static |
Cast the given polyPatch to a mappedPatchBase. Handle errors.
Definition at line 506 of file mappedPatchBase.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and patchIdentifier::name().

| void clearOut | ( | const bool | move | ) |
Clear out data on mesh change.
Definition at line 522 of file mappedPatchBase.C.
References Foam::min().

Map/interpolate the neighbour patch field to this patch.
Referenced by mappedFvPatchBase::fromNeighbour().

Map/interpolate the neighbour patch field to this patch.
Map/interpolate patch field to the neighbour patch.
Map/interpolate patch field to the neighbour patch.
|
virtual |
Write as a dictionary.
Reimplemented from mappedPatchBaseBase.
Reimplemented in mappedWallPolyPatch, mappedPolyPatch, mappedExtrudedWallPolyPatch, mappedExtrudedPatchBase, mappedFilmWallPolyPatch, and mappedFilmSurfacePolyPatch.
Definition at line 542 of file mappedPatchBase.C.
References mappedPatchBaseBase::write(), Foam::writeEntry(), and Foam::writeEntryIfDifferent().
Referenced by mappedFilmWallPolyPatch::write(), mappedExtrudedPatchBase::write(), mappedPolyPatch::write(), and mappedWallPolyPatch::write().


| Foam::tmp<Foam::Field<Type> > fromNeighbour | ( | const Field< Type > & | nbrFld | ) | const |
Definition at line 32 of file mappedPatchBaseTemplates.C.
References mappedPatchBase::calcMapping(), mappedPatchBase::mappingIsValid(), mappedPatchBase::nbrMappedPatch(), mappedPatchBase::patchToPatchPtr_, tmp< T >::ref(), mappedPatchBaseBase::sameUntransformedPatch(), mappedPatchBase::symmetric(), cyclicTransform::transform(), transformer::transform(), mappedPatchBaseBase::transform_, mappedPatchBase::treeMapPtr_, mappedPatchBase::treeNbrPatchFaceIndices_, and mappedPatchBase::usingTree_.

| Foam::tmp<Foam::Field<Type> > fromNeighbour | ( | const tmp< Field< Type >> & | nbrFld | ) | const |
Definition at line 77 of file mappedPatchBaseTemplates.C.
| Foam::tmp<Foam::Field<Type> > toNeighbour | ( | const Field< Type > & | fld | ) | const |
Definition at line 87 of file mappedPatchBaseTemplates.C.
References fld(), and tmp< T >::ref().

| Foam::tmp<Foam::Field<Type> > toNeighbour | ( | const tmp< Field< Type >> & | fld | ) | const |
Definition at line 131 of file mappedPatchBaseTemplates.C.
References fld().

|
protected |
Are we using the tree mapping method, or a patch-to-patch.
intersection engine? The former is typically faster on small, pairs of patches with identical meshes. The latter is better parallelised and provides options for connecting patches with differing surface meshes.
Definition at line 85 of file mappedPatchBase.H.
Referenced by mappedPatchBase::fromNeighbour().
|
mutableprotected |
Distributor (if using tree)
Definition at line 88 of file mappedPatchBase.H.
Referenced by mappedPatchBase::fromNeighbour().
|
mutableprotected |
Indices of the neighbouring patch faces who's values.
have to be supplied to the distribution map (if using tree)
Definition at line 92 of file mappedPatchBase.H.
Referenced by mappedPatchBase::fromNeighbour().
|
mutableprotected |
Patch-to-patch intersection engine (if using patch-to-patch)
Definition at line 95 of file mappedPatchBase.H.
Referenced by mappedPatchBase::fromNeighbour().
|
staticprotected |
Default Matching tolerance.
Definition at line 98 of file mappedPatchBase.H.
|
protected |
Matching tolerance.
Definition at line 101 of file mappedPatchBase.H.
|
mutableprotected |
Is the mapping engine up to date? Zero if out of date. One if out.
of date (or potentially not out of date) because of motion. Two if up to date.
Definition at line 106 of file mappedPatchBase.H.
|
mutableprotected |
If the neighbour's mapping engine (if there is one) up to date?
Definition at line 109 of file mappedPatchBase.H.