mappedPatchBaseBase Class Reference

Base class for engines and poly patches which provide mapping between two poly patches. More...

Inheritance diagram for mappedPatchBaseBase:
Collaboration diagram for mappedPatchBaseBase:

Classes

struct  from
 Restrict use of the mapper to certain configurations. More...
 

Public Types

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...
 

Public Member Functions

 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 wordnbrRegionName () const
 Name of the region to map from. More...
 
const wordnbrPatchName () const
 Name of the patch to map from. More...
 
const transformertransform () 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 polyMeshnbrMesh () const
 Get the mesh for the region to map from. More...
 
const polyPatchnbrPolyPatch () 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...
 
virtual void write (Ostream &) const
 Write as a dictionary. 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

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...
 

Static Public Attributes

static const NamedEnum< moveUpdate, 3 > moveUpdateNames_ {"always", "detect", "never"}
 Names of the move-update conditions. More...
 

Protected Attributes

const polyPatchpatch_
 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...
 

Detailed Description

Base class for engines and poly patches which provide mapping between two poly patches.

Example:

    // The name of the region to map from. Optional. Defaults to the same
    // region as the patch.
    neighbourRegion region0;

    // The name of the patch to map from
    neighbourPatch movingWall;

    // Couple group to specify the region and patch to map from. This is an
    // alternative to specifying neighbourRegion and neighbourPatch
    // directly, as shown above.
    coupleGroup baffleGroup;

    // The condition that triggers re-calculation following motion. Setting
    // 'always' will re-calculate the mapping, 'never' will not, and
    // 'detect' will compare the new and old points and re-calculate if
    // there is any difference.
    moveUpdate always;
Source files

Definition at line 73 of file mappedPatchBaseBase.H.

Member Enumeration Documentation

◆ transformType

enum transformType
strong

The type of the transformation permitted/required by this patch.

Enumerator
none 
defaultNone 
specified 

Definition at line 80 of file mappedPatchBaseBase.H.

◆ moveUpdate

enum moveUpdate
strong

Enumeration for the condition that triggers re-calculation of the.

mapping following mesh motion.

'always' will re-calculate the mapping, 'never' will not, and 'detect' will compare the new and old points and re-calculate if there is any difference.

The comparison that 'detect' does has an expense associated with it, so it should only really be used if the patch is both moving and static at different times. If the patch is always in motion or is fully stationary, then it is more efficient to specify 'always' or 'never'.

'always' is the default, as it is safest to assume that motion always affects the mapping.

Enumerator
always 
detect 
never 

Definition at line 102 of file mappedPatchBaseBase.H.

Constructor & Destructor Documentation

◆ mappedPatchBaseBase() [1/4]

mappedPatchBaseBase ( const polyPatch pp)

Construct from patch.

Definition at line 44 of file mappedPatchBaseBase.C.

◆ mappedPatchBaseBase() [2/4]

mappedPatchBaseBase ( const polyPatch pp,
const word nbrRegionName,
const word nbrPatchName,
const cyclicTransform transform 
)

Construct from components.

Definition at line 55 of file mappedPatchBaseBase.C.

◆ mappedPatchBaseBase() [3/4]

mappedPatchBaseBase ( const polyPatch pp,
const dictionary dict,
const transformType  tt 
)

Construct from dictionary.

Definition at line 72 of file mappedPatchBaseBase.C.

◆ mappedPatchBaseBase() [4/4]

mappedPatchBaseBase ( const polyPatch pp,
const mappedPatchBaseBase mpb 
)

Construct as copy, resetting patch.

Definition at line 157 of file mappedPatchBaseBase.C.

◆ ~mappedPatchBaseBase()

~mappedPatchBaseBase ( )
virtual

Destructor.

Definition at line 174 of file mappedPatchBaseBase.C.

Member Function Documentation

◆ TypeName()

TypeName ( "mappedPatchBaseBase"  )

Runtime type information.

◆ nbrRegionName()

const Foam::word & nbrRegionName ( ) const
inline

Name of the region to map from.

Definition at line 30 of file mappedPatchBaseBaseI.H.

References polyMesh::boundaryMesh(), mappedPatchBaseBase::coupleGroup_, IOobject::name(), mappedPatchBaseBase::nbrMesh(), mappedPatchBaseBase::nbrPatchName_, mappedPatchBaseBase::nbrRegionName_, mappedPatchBaseBase::patch_, and coupleGroupIdentifier::valid().

Referenced by nonConformalMappedPatchBase::calcOwner().

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

◆ nbrPatchName()

const Foam::word & nbrPatchName ( ) const
inline

Name of the patch to map from.

Definition at line 46 of file mappedPatchBaseBaseI.H.

Referenced by nonConformalMappedPatchBase::calcOwner().

Here is the caller graph for this function:

◆ transform()

const Foam::transformer & transform ( ) const
inline

The transformation between the patches.

Definition at line 57 of file mappedPatchBaseBaseI.H.

References transformer::transform().

Here is the call graph for this function:

◆ sameRegion()

bool sameRegion ( ) const
inline

Is the neighbour region the same as for this patch?

Definition at line 63 of file mappedPatchBaseBaseI.H.

◆ samePatch()

bool samePatch ( ) const
inline

Is the neighbour patch the same as this patch?

Definition at line 69 of file mappedPatchBaseBaseI.H.

◆ sameUntransformedPatch()

bool sameUntransformedPatch ( ) const
inline

Is the neighbour patch the same as this patch with no transform?

Definition at line 75 of file mappedPatchBaseBaseI.H.

Referenced by mappedPatchBase::fromNeighbour().

Here is the caller graph for this function:

◆ haveNbr()

bool haveNbr ( ) const

Is the neighbour available?

Definition at line 180 of file mappedPatchBaseBase.C.

References polyMesh::boundaryMesh(), objectRegistry::foundObject(), polyBoundaryMesh::mesh(), mesh, and fvMesh::time().

Here is the call graph for this function:

◆ nbrMesh()

const Foam::polyMesh & nbrMesh ( ) const

Get the mesh for the region to map from.

Definition at line 188 of file mappedPatchBaseBase.C.

References polyMesh::boundaryMesh(), objectRegistry::lookupObject(), polyBoundaryMesh::mesh(), mesh, and fvMesh::time().

Referenced by mappedPatchBaseBase::nbrRegionName().

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

◆ nbrPolyPatch()

const Foam::polyPatch & nbrPolyPatch ( ) const

Get the patch to map from.

Definition at line 196 of file mappedPatchBaseBase.C.

References polyMesh::boundaryMesh(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, polyBoundaryMesh::findIndex(), polyBoundaryMesh::names(), and patchi.

Referenced by nonConformalMappedPatchBase::nbrMappedPatch(), and mappedPatchBase::nbrPatchIsMapped().

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

◆ validateMapForField() [1/2]

static void validateMapForField ( const PatchField &  field,
const FieldType &  iF,
const dictionary context,
const label  froms = from::any 
)
static

◆ validateForField() [1/2]

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.

set of permitted configurations

Referenced by mappedValueFvPatchField< Type >::mappedValueFvPatchField().

Here is the caller graph for this function:

◆ moving()

bool moving ( const polyPatch patch,
const polyPatch nbrPatch 
)
static

◆ specified()

bool specified ( const dictionary dict)
static

Return whether or not the given dictionary contains a.

mappedPatchBaseBase specification

Definition at line 257 of file mappedPatchBaseBase.C.

References dict, and dictionary::found().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write as a dictionary.

Reimplemented in nonConformalMappedWallPolyPatch, nonConformalMappedPatchBase, mappedWallPolyPatch, mappedPolyPatch, mappedPatchBase, mappedExtrudedWallPolyPatch, mappedExtrudedPatchBase, mappedFilmWallPolyPatch, and mappedFilmSurfacePolyPatch.

Definition at line 269 of file mappedPatchBaseBase.C.

References word::null, and Foam::writeEntryIfDifferent().

Referenced by mappedPatchBase::write(), and nonConformalMappedPatchBase::write().

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

◆ validateMapForField() [2/2]

void validateMapForField ( const PatchFieldType &  field,
const FieldType &  iF,
const dictionary context,
const label  froms 
)

◆ validateForField() [2/2]

void validateForField ( const PatchFieldType &  field,
const FieldType &  iF,
const dictionary context,
const label  froms 
) const

Member Data Documentation

◆ moveUpdateNames_

const Foam::NamedEnum< Foam::mappedPatchBaseBase::moveUpdate, 3 > moveUpdateNames_ {"always", "detect", "never"}
static

Names of the move-update conditions.

Definition at line 110 of file mappedPatchBaseBase.H.

◆ patch_

◆ coupleGroup_

const coupleGroupIdentifier coupleGroup_
protected

Couple group for the region/patch to map from.

Definition at line 121 of file mappedPatchBaseBase.H.

Referenced by mappedPatchBaseBase::nbrRegionName().

◆ nbrRegionName_

word nbrRegionName_
mutableprotected

Name of the region to map from.

Definition at line 124 of file mappedPatchBaseBase.H.

Referenced by nonConformalMappedPatchBase::nbrMappedPatch(), and mappedPatchBaseBase::nbrRegionName().

◆ nbrPatchName_

word nbrPatchName_
mutableprotected

Name of the patch to map from.

Definition at line 127 of file mappedPatchBaseBase.H.

Referenced by nonConformalMappedPatchBase::nbrMappedPatch(), and mappedPatchBaseBase::nbrRegionName().

◆ transform_

cyclicTransform transform_
mutableprotected

The transformation between the patches.

Definition at line 130 of file mappedPatchBaseBase.H.

Referenced by mappedPatchBase::fromNeighbour().

◆ moveUpdate_

const moveUpdate moveUpdate_
protected

The condition that triggers re-calculation following motion.

Definition at line 133 of file mappedPatchBaseBase.H.


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