mappedInternalPatchBase Class Reference

Engine which provides mapping from cells to patch faces. More...

Inheritance diagram for mappedInternalPatchBase:
Collaboration diagram for mappedInternalPatchBase:

Public Types

enum  offsetMode { NORMAL , DIRECTION }
 How to project face centres. More...
 

Public Member Functions

 TypeName ("mappedInternalPatchBase")
 Runtime type information. More...
 
 mappedInternalPatchBase (const polyPatch &)
 Construct from patch. More...
 
 mappedInternalPatchBase (const polyPatch &pp, const word &nbrRegion)
 Construct with no offset. More...
 
 mappedInternalPatchBase (const polyPatch &, const dictionary &)
 Construct from dictionary. More...
 
 mappedInternalPatchBase (const polyPatch &, const mappedInternalPatchBase &)
 Construct as copy, resetting patch. More...
 
virtual ~mappedInternalPatchBase ()
 Destructor. More...
 
const wordnbrRegionName () const
 Name of the region to map from. More...
 
bool sameRegion () const
 Is the neighbour region the same as for this patch? More...
 
const distributionMapmap () const
 Return reference to the parallel distribution map. More...
 
const labelListcellIndices () const
 Return the indices of the cells who's values have to be. More...
 
const polyMeshnbrMesh () const
 Get the region mesh. More...
 
tmp< pointFieldsamplePoints () const
 Get the sample points. More...
 
void clearOut ()
 Clear out data on mesh change. More...
 
template<class Type >
tmp< Field< Type > > distribute (const Field< Type > &fld) const
 Wrapper around map/interpolate data distribution. More...
 
template<class Type >
tmp< Field< Type > > distribute (const tmp< Field< Type >> &fld) const
 Wrapper around map/interpolate data distribution. More...
 
virtual void write (Ostream &) const
 Write as a dictionary. More...
 
template<class Type >
Foam::tmp< Foam::Field< Type > > distribute (const Field< Type > &fld) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > distribute (const tmp< Field< Type >> &fld) const
 

Static Public Member Functions

static bool specified (const dictionary &dict)
 Return whether or not the given dictionary contains a. More...
 

Static Public Attributes

static const NamedEnum< offsetMode, 2 > offsetModeNames_
 

Protected Member Functions

offsetMode readOffsetMode (const dictionary &dict) const
 Read the offset mode from a dictionary. More...
 
void calcMapping () const
 Calculate mapping. More...
 

Protected Attributes

const polyPatchpatch_
 Patch to map to. More...
 
word nbrRegionName_
 Name of the region to map from. More...
 
offsetMode offsetMode_
 How to offset the patch face centres to the sampling locations. More...
 
scalar distance_
 Offset distance. More...
 
vector offset_
 Offset vector. More...
 
autoPtr< distributionMapmapPtr_
 Distributor. More...
 
labelList cellIndices_
 Indices of the cells who's values have to be supplied to the. More...
 

Detailed Description

Engine which provides mapping from cells to patch faces.

Example:

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

    // How to offset the patch face centres to the sampling locations.
    // Optional. This will be inferred if there is a single entry of either
    // "distance" or "offset".
    // - normal              : distance along the patch face normals
    // - direction           : specified offset vector
    offsetMode direction;

    // If offsetMode is normal : The normal distance to offset
    distance 1;

    // If offsetMode is direction : The offset vector
    offset (1 0 0);

Note that patch normals point outward, so if offsetMode is normal then a negative distance will be required in order to map values from inside the region.

Source files

Definition at line 73 of file mappedInternalPatchBase.H.

Member Enumeration Documentation

◆ offsetMode

enum offsetMode

How to project face centres.

Enumerator
NORMAL 
DIRECTION 

Definition at line 80 of file mappedInternalPatchBase.H.

Constructor & Destructor Documentation

◆ mappedInternalPatchBase() [1/4]

Construct from patch.

Definition at line 289 of file mappedInternalPatchBase.C.

◆ mappedInternalPatchBase() [2/4]

mappedInternalPatchBase ( const polyPatch pp,
const word nbrRegion 
)

Construct with no offset.

Definition at line 304 of file mappedInternalPatchBase.C.

◆ mappedInternalPatchBase() [3/4]

mappedInternalPatchBase ( const polyPatch pp,
const dictionary dict 
)

Construct from dictionary.

Definition at line 320 of file mappedInternalPatchBase.C.

◆ mappedInternalPatchBase() [4/4]

mappedInternalPatchBase ( const polyPatch pp,
const mappedInternalPatchBase mpb 
)

Construct as copy, resetting patch.

Definition at line 353 of file mappedInternalPatchBase.C.

◆ ~mappedInternalPatchBase()

Destructor.

Definition at line 371 of file mappedInternalPatchBase.C.

Member Function Documentation

◆ readOffsetMode()

Foam::mappedInternalPatchBase::offsetMode readOffsetMode ( const dictionary dict) const
protected

Read the offset mode from a dictionary.

Definition at line 63 of file mappedInternalPatchBase.C.

References dict, mappedInternalPatchBase::DIRECTION, mappedInternalPatchBase::NORMAL, mappedInternalPatchBase::offsetModeNames_, and NamedEnum< Enum, nEnum >::read().

Here is the call graph for this function:

◆ calcMapping()

◆ TypeName()

TypeName ( "mappedInternalPatchBase"  )

Runtime type information.

◆ nbrRegionName()

const Foam::word & nbrRegionName ( ) const
inline

Name of the region to map from.

Definition at line 30 of file mappedInternalPatchBaseI.H.

References mappedInternalPatchBase::nbrRegionName_.

◆ sameRegion()

bool sameRegion ( ) const
inline

Is the neighbour region the same as for this patch?

Definition at line 36 of file mappedInternalPatchBaseI.H.

◆ map()

const Foam::distributionMap & map ( ) const
inline

Return reference to the parallel distribution map.

Definition at line 42 of file mappedInternalPatchBaseI.H.

◆ cellIndices()

const Foam::labelList & cellIndices ( ) const
inline

Return the indices of the cells who's values have to be.

supplied to the distribution map

Definition at line 53 of file mappedInternalPatchBaseI.H.

◆ nbrMesh()

const Foam::polyMesh & nbrMesh ( ) const

Get the region mesh.

Definition at line 377 of file mappedInternalPatchBase.C.

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

Here is the call graph for this function:

◆ samplePoints()

◆ clearOut()

void clearOut ( )

Clear out data on mesh change.

Definition at line 460 of file mappedInternalPatchBase.C.

Referenced by mappedInternalPolyPatch::calcGeometry(), mappedInternalPolyPatch::movePoints(), and mappedInternalPolyPatch::topoChange().

Here is the caller graph for this function:

◆ distribute() [1/4]

tmp<Field<Type> > distribute ( const Field< Type > &  fld) const

Wrapper around map/interpolate data distribution.

◆ distribute() [2/4]

tmp<Field<Type> > distribute ( const tmp< Field< Type >> &  fld) const

Wrapper around map/interpolate data distribution.

◆ specified()

bool specified ( const dictionary dict)
static

Return whether or not the given dictionary contains a.

mappedInternalPatchBase specification

Definition at line 467 of file mappedInternalPatchBase.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 mappedInternalPolyPatch.

Definition at line 477 of file mappedInternalPatchBase.C.

References IOstream::name(), Foam::writeEntry(), and Foam::writeEntryIfDifferent().

Referenced by mappedInternalPolyPatch::write().

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

◆ distribute() [3/4]

Foam::tmp<Foam::Field<Type> > distribute ( const Field< Type > &  fld) const

◆ distribute() [4/4]

Foam::tmp<Foam::Field<Type> > distribute ( const tmp< Field< Type >> &  fld) const

Definition at line 46 of file mappedInternalPatchBaseTemplates.C.

References fld().

Here is the call graph for this function:

Member Data Documentation

◆ offsetModeNames_

const Foam::NamedEnum< Foam::mappedInternalPatchBase::offsetMode, 2 > offsetModeNames_
static

Definition at line 86 of file mappedInternalPatchBase.H.

Referenced by mappedInternalPatchBase::readOffsetMode().

◆ patch_

const polyPatch& patch_
protected

Patch to map to.

Definition at line 94 of file mappedInternalPatchBase.H.

◆ nbrRegionName_

word nbrRegionName_
protected

Name of the region to map from.

Definition at line 97 of file mappedInternalPatchBase.H.

Referenced by mappedInternalPatchBase::nbrRegionName().

◆ offsetMode_

offsetMode offsetMode_
protected

How to offset the patch face centres to the sampling locations.

Definition at line 100 of file mappedInternalPatchBase.H.

◆ distance_

scalar distance_
protected

Offset distance.

Definition at line 103 of file mappedInternalPatchBase.H.

◆ offset_

vector offset_
protected

Offset vector.

Definition at line 106 of file mappedInternalPatchBase.H.

◆ mapPtr_

autoPtr<distributionMap> mapPtr_
mutableprotected

Distributor.

Definition at line 109 of file mappedInternalPatchBase.H.

Referenced by mappedInternalPatchBase::distribute().

◆ cellIndices_

labelList cellIndices_
mutableprotected

Indices of the cells who's values have to be supplied to the.

distribution map

Definition at line 113 of file mappedInternalPatchBase.H.

Referenced by mappedInternalPatchBase::distribute().


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