mappedPatchBase Class Reference

Determines a mapping between patch face centres and mesh cell or face centres and processors they're on. More...

Inheritance diagram for mappedPatchBase:
[legend]
Collaboration diagram for mappedPatchBase:
[legend]

Classes

class  maxProcEqOp
 
class  nearestEqOp
 
class  nearestWorldEqOp
 

Public Types

enum  sampleMode {
  NEARESTCELL, NEARESTPATCHFACE, NEARESTPATCHFACEAMI, NEARESTPATCHPOINT,
  NEARESTFACE, NEARESTONLYCELL
}
 Mesh items to sample. More...
 
enum  offsetMode { UNIFORM, NONUNIFORM, NORMAL }
 How to project face centres. More...
 
typedef Tuple2< pointIndexHit, Tuple2< scalar, label > > nearInfo
 Helper class for finding nearest. More...
 
typedef Tuple2< nearInfo, label > nearInfoWorld
 nearest + world More...
 

Public Member Functions

 TypeName ("mappedPatchBase")
 Runtime type information. More...
 
 mappedPatchBase (const polyPatch &)
 Construct from patch. More...
 
 mappedPatchBase (const polyPatch &pp, const word &sampleRegion, const sampleMode sampleMode, const word &samplePatch, const vectorField &offsets)
 Construct with offsetMode=non-uniform. More...
 
 mappedPatchBase (const polyPatch &pp, const word &sampleRegion, const sampleMode sampleMode, const word &samplePatch, const vector &uniformOffset)
 Construct from offsetMode=uniform. More...
 
 mappedPatchBase (const polyPatch &pp, const word &sampleRegion, const sampleMode sampleMode, const word &samplePatch, const scalar normalDistance)
 Construct from offsetMode=normal and distance. More...
 
 mappedPatchBase (const polyPatch &, const dictionary &)
 Construct from dictionary. More...
 
 mappedPatchBase (const polyPatch &, const sampleMode, const dictionary &)
 Construct from dictionary and (collocated) sample mode. More...
 
 mappedPatchBase (const polyPatch &, const mappedPatchBase &)
 Construct as copy, resetting patch. More...
 
 mappedPatchBase (const polyPatch &, const mappedPatchBase &, const labelUList &mapAddressing)
 Construct as copy, resetting patch, map original data. More...
 
virtual ~mappedPatchBase ()
 Destructor. More...
 
void clearOut ()
 
void setOffset (const scalar normalDist)
 Change to normal offset with given distance. More...
 
void setOffset (const vector &uniformOffset)
 Change to uniform offset with value. More...
 
void setOffset (const vectorField &offsets)
 Change to non-uniform offsets. More...
 
sampleMode mode () const noexcept
 What to sample. More...
 
const wordsampleWorld () const noexcept
 World to sample. More...
 
const wordsampleRegion () const
 Region to sample. More...
 
const wordsamplePatch () const
 Patch (only if NEARESTPATCHFACE) More...
 
const wordcoupleGroup () const
 PatchGroup (only if NEARESTPATCHFACE) More...
 
label sampleSize () const
 Return size of mapped mesh/patch/boundary. More...
 
const vectoroffset () const noexcept
 Offset vector (from patch faces to destination mesh objects) More...
 
const vectorFieldoffsets () const noexcept
 Offset vectors (from patch faces to destination mesh objects) More...
 
label getCommunicator () const
 Get the communicator (worldComm or world-to-world) More...
 
label comm () const
 Identical to getCommunicator() More...
 
bool sameWorld () const
 Is sample world the local world? More...
 
bool masterWorld () const
 Is my world ordered before the sampleWorld? More...
 
bool sameRegion () const noexcept
 Cached sampleRegion != mesh.name() More...
 
const mapDistributemap () const
 Return reference to the parallel distribution map. More...
 
const AMIPatchToPatchInterpolationAMI (const bool forceUpdate=false) const
 Return reference to the AMI interpolator. More...
 
bool owner () const
 Is it owner. More...
 
const autoPtr< Foam::searchableSurface > & surfPtr () const
 Return a pointer to the AMI projection surface. More...
 
const polyMeshsampleMesh () const
 Get the region mesh. More...
 
const polyPatchsamplePolyPatch () const
 Get the patch on the region. More...
 
tmp< pointFieldsamplePoints () const
 Get the sample points. More...
 
const fileNamesampleDatabasePath () const
 
bool sampleDatabase () const
 
virtual fileName sendPath (const label proci) const
 
virtual fileName receivePath (const label proci) const
 
template<class Type >
void distribute (List< Type > &lst) const
 Wrapper around map/interpolate data distribution. More...
 
template<class Type , class CombineOp >
void distribute (List< Type > &lst, const CombineOp &cop) const
 Wrapper around map/interpolate data distribution with operation. More...
 
template<class Type >
void reverseDistribute (List< Type > &lst) const
 Wrapper around map/interpolate data distribution. More...
 
template<class Type , class CombineOp >
void reverseDistribute (List< Type > &lst, const CombineOp &cop) const
 Wrapper around map/interpolate data distribution with operation. More...
 
virtual void write (Ostream &os) const
 Write as a dictionary. More...
 

Static Public Member Functions

static pointIndexHit facePoint (const polyMesh &, const label facei, const polyMesh::cellDecomposition)
 Get a point on the face given a face decomposition method: More...
 
static fileName sendPath (const fileName &root, const label proci)
 Helper: return path to store data to be sent to processor i. More...
 
static fileName receivePath (const fileName &root, const label proci)
 
static const objectRegistrysubRegistry (const objectRegistry &obr, const fileName &path)
 
template<class Type >
static void storeField (objectRegistry &obr, const word &fieldName, const Field< Type > &values)
 Store an IOField on the objectRegistry relative to obr. More...
 
static void writeDict (const objectRegistry &obr, dictionary &dict)
 Convert objectRegistry contents into dictionary. More...
 
static void readDict (const dictionary &d, objectRegistry &obr)
 (recursively) construct and register IOFields from dictionary More...
 

Static Public Attributes

static const Enum< sampleModesampleModeNames_
 
static const Enum< offsetModeoffsetModeNames_
 

Protected Member Functions

bool addWorldConnection ()
 Add a world-world connection. More...
 
label getWorldCommunicator () const
 Get the communicator for the world-world connection. More...
 
const polyMeshlookupMesh (const word &region) const
 Lookup mesh. More...
 
const polyPatchlookupPatch (const word &sampleRegion, const word &samplePatch) const
 Lookup patch. More...
 
tmp< pointFieldfacePoints (const polyPatch &) const
 
void collectSamples (const label mySampleWorld, const pointField &facePoints, pointField &samples, labelList &patchFaceWorlds, labelList &patchFaceProcs, labelList &patchFaces, pointField &patchFc) const
 
void findLocalSamples (const sampleMode mode, const label sampleWorld, const word &sampleRegion, const word &samplePatch, const pointField &samplePoints, List< nearInfoWorld > &nearest) const
 Find (local) cells/faces containing samples. More...
 
void findSamples (const sampleMode mode, const label myWorldIndex, const pointField &, const labelList &wantedWorlds, const labelList &origProcs, labelList &sampleProcs, labelList &sampleIndices, pointField &sampleLocations) const
 Find (global) cells/faces containing samples. More...
 
tmp< pointFieldsamplePoints (const pointField &) const
 Get the sample points given the face points. More...
 
void calcMapping () const
 Calculate mapping. More...
 
void calcAMI () const
 Calculate AMI interpolator. More...
 

Static Protected Member Functions

static autoPtr< fileNamereadDatabase (const dictionary &dict)
 Read optional database name from dictionary. More...
 
static const objectRegistrysubRegistry (const objectRegistry &obr, const wordList &names, const label index)
 
template<class Type >
static bool writeIOField (const regIOobject &obj, dictionary &dict)
 Attempt to detect an IOField<Type> and write to dictionary. More...
 
template<class Type >
static bool constructIOField (const word &name, token &tok, Istream &is, objectRegistry &obr)
 Attempt to read an IOField<Type> and store on objectRegistry. More...
 

Protected Attributes

const polyPatchpatch_
 Patch to sample. More...
 
word sampleWorld_
 World to sample. More...
 
word sampleRegion_
 Region to sample. More...
 
const sampleMode mode_
 What to sample. More...
 
word samplePatch_
 Patch (if in sampleMode NEARESTPATCH*) More...
 
const coupleGroupIdentifier coupleGroup_
 PatchGroup (if in sampleMode NEARESTPATCH*) More...
 
const autoPtr< fileNamesampleDatabasePtr_
 Empty or location of database. More...
 
offsetMode offsetMode_
 How to obtain samples. More...
 
vector offset_
 Offset vector (uniform) More...
 
vectorField offsets_
 Offset vector (nonuniform) More...
 
scalar distance_
 Offset distance (normal) More...
 
label communicator_
 Communicator. More...
 
bool sameRegion_
 Same region. More...
 
autoPtr< mapDistributemapPtr_
 Communication schedule: More...
 
const bool AMIReverse_
 Flag to indicate that slave patch should be reversed for AMI. More...
 
autoPtr< AMIPatchToPatchInterpolationAMIPtr_
 Pointer to AMI interpolator. More...
 
autoPtr< searchableSurfacesurfPtr_
 Pointer to projection surface employed by AMI interpolator. More...
 
dictionary surfDict_
 Dictionary storing projection surface description. More...
 

Detailed Description

Determines a mapping between patch face centres and mesh cell or face centres and processors they're on.

If constructed from dictionary:

    // Optional world to sample (default is all)
    //sampleWorld solidSim;

    // Optional explicit coupling (requires functionObject to synchronise
    // databases. Default is close coupling (bc to bc)
    //sampleDatabase true;

    // Region to sample (default is region0)
    sampleRegion region0;

    // What to sample:
    // - nearestCell         : sample cell containing point
    // - nearestOnlyCell     : nearest sample cell (even if not containing
    //                         point)
    // - nearestPatchFace    : nearest face on selected patch
    // - nearestPatchFaceAMI : nearest face on selected patch
                               - patches need not conform
                               - uses AMI interpolation
    // - nearestFace         : nearest boundary face on any patch
    // - nearestPatchPoint   : nearest patch point (for coupled points
    //                         this might be any of the points so you have
    //                         to guarantee the point data is synchronised
    //                         beforehand)
    sampleMode nearestCell;

    // If sampleMode is nearestPatchFace : patch to find faces of
    samplePatch movingWall;

    // If sampleMode is nearestPatchFace : specify patchgroup to find
    // samplePatch and sampleRegion (if not provided)
    coupleGroup baffleGroup;

    // How to supply offset (w.r.t. my patch face centres):
    // - uniform : single offset vector
    // - nonuniform : per-face offset vector
    // - normal : using supplied distance and face normal
    offsetMode uniform;

    // According to offsetMode (see above) supply one of
    // offset, offsets or distance
    offset  (1 0 0);

Note: if offsetMode is normal it uses outwards pointing normals. So supply a negative distance if sampling inside the domain.

Note
Storage is not optimal. It temporary collects all (patch)face centres on all processors to keep the addressing calculation simple.
Source files

Definition at line 112 of file mappedPatchBase.H.

Member Typedef Documentation

◆ nearInfo

typedef Tuple2<pointIndexHit, Tuple2<scalar, label> > nearInfo

Helper class for finding nearest.

Nearest:

  • point+local index
  • sqr(distance)
  • processor

Definition at line 147 of file mappedPatchBase.H.

◆ nearInfoWorld

typedef Tuple2<nearInfo, label> nearInfoWorld

nearest + world

Used to only look at entries from same world

Definition at line 192 of file mappedPatchBase.H.

Member Enumeration Documentation

◆ sampleMode

enum sampleMode

Mesh items to sample.

Enumerator
NEARESTCELL 

nearest cell containing sample

NEARESTPATCHFACE 

nearest face on selected patch

NEARESTPATCHFACEAMI 

nearest patch face + AMI interpolation

NEARESTPATCHPOINT 

nearest point on selected patch

NEARESTFACE 

nearest face

NEARESTONLYCELL 

nearest cell (even if not containing cell)

Definition at line 119 of file mappedPatchBase.H.

◆ offsetMode

enum offsetMode

How to project face centres.

Enumerator
UNIFORM 

single offset vector

NONUNIFORM 

per-face offset vector

NORMAL 

use face normal + distance

Definition at line 130 of file mappedPatchBase.H.

Constructor & Destructor Documentation

◆ mappedPatchBase() [1/8]

mappedPatchBase ( const polyPatch pp)
explicit

Construct from patch.

Definition at line 1215 of file mappedPatchBase.C.

◆ mappedPatchBase() [2/8]

mappedPatchBase ( const polyPatch pp,
const word sampleRegion,
const sampleMode  sampleMode,
const word samplePatch,
const vectorField offsets 
)

Construct with offsetMode=non-uniform.

Definition at line 1241 of file mappedPatchBase.C.

References mappedPatchBase::setOffset().

Here is the call graph for this function:

◆ mappedPatchBase() [3/8]

mappedPatchBase ( const polyPatch pp,
const word sampleRegion,
const sampleMode  sampleMode,
const word samplePatch,
const vector uniformOffset 
)

Construct from offsetMode=uniform.

Definition at line 1263 of file mappedPatchBase.C.

References mappedPatchBase::setOffset().

Here is the call graph for this function:

◆ mappedPatchBase() [4/8]

mappedPatchBase ( const polyPatch pp,
const word sampleRegion,
const sampleMode  sampleMode,
const word samplePatch,
const scalar  normalDistance 
)

Construct from offsetMode=normal and distance.

Definition at line 1285 of file mappedPatchBase.C.

◆ mappedPatchBase() [5/8]

mappedPatchBase ( const polyPatch pp,
const dictionary dict 
)

Construct from dictionary.

Definition at line 1321 of file mappedPatchBase.C.

References dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::found(), dictionary::readEntry(), and dictionary::readIfPresent().

Here is the call graph for this function:

◆ mappedPatchBase() [6/8]

mappedPatchBase ( const polyPatch pp,
const sampleMode  mode,
const dictionary dict 
)

Construct from dictionary and (collocated) sample mode.

(only for nearestPatchFace, nearestPatchFaceAMI, nearestPatchPoint) Assumes zero offset.

Definition at line 1423 of file mappedPatchBase.C.

References dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, and Foam::mode().

Here is the call graph for this function:

◆ mappedPatchBase() [7/8]

mappedPatchBase ( const polyPatch pp,
const mappedPatchBase mpb 
)

Construct as copy, resetting patch.

Definition at line 1496 of file mappedPatchBase.C.

◆ mappedPatchBase() [8/8]

mappedPatchBase ( const polyPatch pp,
const mappedPatchBase mpb,
const labelUList mapAddressing 
)

Construct as copy, resetting patch, map original data.

Definition at line 1528 of file mappedPatchBase.C.

◆ ~mappedPatchBase()

~mappedPatchBase ( )
virtual

Destructor.

Definition at line 1567 of file mappedPatchBase.C.

Member Function Documentation

◆ addWorldConnection()

bool addWorldConnection ( )
protected

Add a world-world connection.

Definition at line 123 of file mappedPatchBase.C.

References polyPatch::boundaryMesh(), polyBoundaryMesh::mesh(), multiWorldConnections::New(), mappedPatchBase::patch_, runTime, mappedPatchBase::sameWorld(), mappedPatchBase::sampleWorld_, and objectRegistry::time().

Here is the call graph for this function:

◆ getWorldCommunicator()

Foam::label getWorldCommunicator ( ) const
protected

Get the communicator for the world-world connection.

Definition at line 138 of file mappedPatchBase.C.

References multiWorldConnections::getCommByName(), multiWorldConnections::New(), runTime, objectRegistry::time(), and UPstream::worldComm.

Here is the call graph for this function:

◆ lookupMesh()

const Foam::polyMesh & lookupMesh ( const word region) const
protected

Lookup mesh.

Definition at line 1614 of file mappedPatchBase.C.

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

Here is the call graph for this function:

◆ lookupPatch()

const Foam::polyPatch & lookupPatch ( const word sampleRegion,
const word samplePatch 
) const
protected

Lookup patch.

Definition at line 1629 of file mappedPatchBase.C.

References polyMesh::boundaryMesh(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and polyBoundaryMesh::findPatchID().

Referenced by mappedPolyPatch::nbrCells(), mappedWallPolyPatch::nbrCells(), mappedPolyPatch::neighbPolyPatchID(), mappedWallPolyPatch::neighbPolyPatchID(), mappedPolyPatch::newInternalProcFaces(), and mappedWallPolyPatch::newInternalProcFaces().

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

◆ facePoints()

Foam::tmp< Foam::pointField > facePoints ( const polyPatch pp) const
protected

Get the points from face-centre-decomposition face centres and project them onto the face-diagonal-decomposition triangles.

Definition at line 152 of file mappedPatchBase.C.

References polyPatch::boundaryMesh(), polyMesh::FACE_DIAG_TRIS, Foam::facePoint(), forAll, mesh, polyBoundaryMesh::mesh(), tmp< T >::New(), polyPatch::start(), and polyMesh::tetBasePtIs().

Here is the call graph for this function:

◆ collectSamples()

void collectSamples ( const label  mySampleWorld,
const pointField facePoints,
pointField samples,
labelList patchFaceWorlds,
labelList patchFaceProcs,
labelList patchFaces,
pointField patchFc 
) const
protected

Collect single list of samples and originating processor+face + wanted world

Definition at line 180 of file mappedPatchBase.C.

References Foam::expressions::patchExpr::debug, DebugInFunction, Foam::endl(), forAll, Pstream::gatherList(), Foam::identity(), UPstream::msgType(), UPstream::myProcNo(), OSstream::name(), Foam::nl, UPstream::nProcs(), Foam::Perr, samples(), Pstream::scatterList(), List< T >::setSize(), and UPstream::warnComm.

Here is the call graph for this function:

◆ findLocalSamples()

void findLocalSamples ( const sampleMode  mode,
const label  sampleWorld,
const word sampleRegion,
const word samplePatch,
const pointField samplePoints,
List< nearInfoWorld > &  nearest 
) const
protected

◆ findSamples()

void findSamples ( const sampleMode  mode,
const label  myWorldIndex,
const pointField samples,
const labelList wantedWorlds,
const labelList origProcs,
labelList sampleProcs,
labelList sampleIndices,
pointField sampleLocations 
) const
protected

◆ samplePoints() [1/2]

Foam::tmp< Foam::pointField > samplePoints ( const pointField fc) const
protected

Get the sample points given the face points.

Definition at line 1682 of file mappedPatchBase.C.

References fld, Foam::mag(), n, and tmp< T >::New().

Here is the call graph for this function:

◆ calcMapping()

◆ calcAMI()

void calcAMI ( ) const
protected

Calculate AMI interpolator.

Definition at line 1093 of file mappedPatchBase.C.

References Foam::expressions::patchExpr::debug, DebugInFunction, Foam::endl(), PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), Foam::nl, os(), UPstream::warnComm, UPstream::worldComm, and Foam::meshTools::writeOBJ().

Here is the call graph for this function:

◆ readDatabase()

Foam::autoPtr< Foam::fileName > readDatabase ( const dictionary dict)
staticprotected

Read optional database name from dictionary.

Definition at line 90 of file mappedPatchBase.C.

References dict, and autoPtr< T >::set().

Here is the call graph for this function:

◆ subRegistry() [1/2]

const Foam::objectRegistry & subRegistry ( const objectRegistry obr,
const wordList names,
const label  index 
)
staticprotected

Lookup (sub)objectRegistry by following names of sub registries. Creates non-existing intermediate ones.

Definition at line 1195 of file mappedPatchBase.C.

References Foam::PtrListOps::names(), and objectRegistry::subRegistry().

Referenced by syncObjects::sync().

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

◆ writeIOField()

bool writeIOField ( const regIOobject obj,
dictionary dict 
)
staticprotected

Attempt to detect an IOField<Type> and write to dictionary.

Definition at line 225 of file mappedPatchBaseTemplates.C.

References dict, fld, and dictionary::set().

Here is the call graph for this function:

◆ constructIOField()

bool constructIOField ( const word name,
token tok,
Istream is,
objectRegistry obr 
)
staticprotected

Attempt to read an IOField<Type> and store on objectRegistry.

Definition at line 260 of file mappedPatchBaseTemplates.C.

References token::compoundToken(), Foam::dynamicCast(), objectRegistry::findObject(), token::isCompound(), Foam::name(), IOobject::NO_READ, IOobject::NO_WRITE, regIOobject::store(), and token::transferCompoundToken().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "mappedPatchBase"  )

Runtime type information.

◆ clearOut()

◆ setOffset() [1/3]

void setOffset ( const scalar  normalDist)

Change to normal offset with given distance.

Definition at line 1583 of file mappedPatchBase.C.

References Foam::Zero.

Referenced by mappedPatchBase::mappedPatchBase().

Here is the caller graph for this function:

◆ setOffset() [2/3]

void setOffset ( const vector uniformOffset)

Change to uniform offset with value.

Definition at line 1593 of file mappedPatchBase.C.

References Foam::Zero.

◆ setOffset() [3/3]

void setOffset ( const vectorField offsets)

Change to non-uniform offsets.

Definition at line 1603 of file mappedPatchBase.C.

References Foam::Zero.

◆ mode()

Foam::mappedPatchBase::sampleMode mode ( ) const
inlinenoexcept

What to sample.

Definition at line 30 of file mappedPatchBaseI.H.

References mappedPatchBase::mode_.

Referenced by mappedVelocityFluxFixedValueFvPatchField::mappedVelocityFluxFixedValueFvPatchField(), mappedVelocityFluxFixedValueFvPatchField::updateCoeffs(), and mappedFixedInternalValueFvPatchField< Type >::updateCoeffs().

Here is the caller graph for this function:

◆ sampleWorld()

const Foam::word & sampleWorld ( ) const
inlinenoexcept

World to sample.

Definition at line 36 of file mappedPatchBaseI.H.

◆ sampleRegion()

const Foam::word & sampleRegion ( ) const
inline

Region to sample.

Definition at line 42 of file mappedPatchBaseI.H.

References Foam::exit(), Foam::FatalError, and FatalErrorInFunction.

Referenced by turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs(), and turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs().

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

◆ samplePatch()

const Foam::word & samplePatch ( ) const
inline

Patch (only if NEARESTPATCHFACE)

Definition at line 68 of file mappedPatchBaseI.H.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.

Referenced by regionModel::nbrCoupledPatchID(), mappedVelocityFluxFixedValueFvPatchField::updateCoeffs(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs(), and turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs().

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

◆ coupleGroup()

const Foam::word & coupleGroup ( ) const
inline

PatchGroup (only if NEARESTPATCHFACE)

Definition at line 94 of file mappedPatchBaseI.H.

◆ sampleSize()

Foam::label sampleSize ( ) const
inline

Return size of mapped mesh/patch/boundary.

Definition at line 100 of file mappedPatchBaseI.H.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, mesh, and primitiveMesh::nBoundaryFaces().

Here is the call graph for this function:

◆ offset()

const Foam::vector & offset ( ) const
inlinenoexcept

Offset vector (from patch faces to destination mesh objects)

Definition at line 135 of file mappedPatchBaseI.H.

◆ offsets()

const Foam::vectorField & offsets ( ) const
inlinenoexcept

Offset vectors (from patch faces to destination mesh objects)

Definition at line 141 of file mappedPatchBaseI.H.

◆ getCommunicator()

Foam::label getCommunicator ( ) const
inline

Get the communicator (worldComm or world-to-world)

Definition at line 147 of file mappedPatchBaseI.H.

Referenced by mappedPatchBase::distribute().

Here is the caller graph for this function:

◆ comm()

Foam::label comm ( ) const
inline

Identical to getCommunicator()

Definition at line 158 of file mappedPatchBaseI.H.

◆ sameWorld()

bool sameWorld ( ) const
inline

Is sample world the local world?

Definition at line 169 of file mappedPatchBaseI.H.

References UPstream::allWorlds(), and UPstream::myWorld().

Referenced by mappedPatchBase::addWorldConnection(), mappedPatchBase::distribute(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs(), and turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs().

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

◆ masterWorld()

bool masterWorld ( ) const
inline

Is my world ordered before the sampleWorld?

Definition at line 180 of file mappedPatchBaseI.H.

References UPstream::allWorlds(), and UPstream::myWorldID().

Referenced by mappedPatchBase::distribute().

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

◆ sameRegion()

bool sameRegion ( ) const
inlinenoexcept

Cached sampleRegion != mesh.name()

Definition at line 193 of file mappedPatchBaseI.H.

◆ map()

const Foam::mapDistribute & map ( ) const
inline

Return reference to the parallel distribution map.

Definition at line 199 of file mappedPatchBaseI.H.

References polyMesh::boundaryMesh(), polyBoundaryMesh::mesh(), and polyMesh::topoChanging().

Referenced by mappedPatchBase::distribute(), mappedPolyPatch::mapCollocatedFaces(), mappedWallPolyPatch::mapCollocatedFaces(), semiPermeableBaffleMassFractionFvPatchScalarField::phiY(), and thermalBaffle1DFvPatchScalarField< solidType >::updateCoeffs().

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

◆ AMI()

const Foam::AMIPatchToPatchInterpolation & AMI ( const bool  forceUpdate = false) const
inline

Return reference to the AMI interpolator.

Definition at line 221 of file mappedPatchBaseI.H.

References polyMesh::boundaryMesh(), polyBoundaryMesh::mesh(), and polyMesh::topoChanging().

Referenced by mappedPatchBase::distribute().

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

◆ owner()

bool owner ( ) const
inline

Is it owner.

Definition at line 241 of file mappedPatchBaseI.H.

Referenced by mappedPolyPatch::masterImplicit(), and mappedWallPolyPatch::masterImplicit().

Here is the caller graph for this function:

◆ surfPtr()

const Foam::autoPtr< Foam::searchableSurface > & surfPtr ( ) const

Return a pointer to the AMI projection surface.

Definition at line 1061 of file mappedPatchBase.C.

References polyMesh::boundaryMesh(), TimePaths::constant(), mesh, polyBoundaryMesh::mesh(), IOobject::MUST_READ, searchableSurface::New(), IOobject::NO_WRITE, and fvMesh::time().

Here is the call graph for this function:

◆ sampleMesh()

const Foam::polyMesh & sampleMesh ( ) const

Get the region mesh.

Definition at line 1649 of file mappedPatchBase.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and UPstream::myWorld().

Referenced by mappedVelocityFluxFixedValueFvPatchField::updateCoeffs(), mappedFixedInternalValueFvPatchField< Type >::updateCoeffs(), mappedFlowRateFvPatchVectorField::updateCoeffs(), filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs(), turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs(), and humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs().

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

◆ samplePolyPatch()

const Foam::polyPatch & samplePolyPatch ( ) const

Get the patch on the region.

Definition at line 1662 of file mappedPatchBase.C.

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

Referenced by semiPermeableBaffleMassFractionFvPatchScalarField::phiY(), mappedFixedInternalValueFvPatchField< Type >::updateCoeffs(), mappedFlowRateFvPatchVectorField::updateCoeffs(), filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs(), turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs(), and humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs().

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

◆ samplePoints() [2/2]

Foam::tmp< Foam::pointField > samplePoints ( ) const

Get the sample points.

Definition at line 1716 of file mappedPatchBase.C.

◆ facePoint()

Foam::pointIndexHit facePoint ( const polyMesh mesh,
const label  facei,
const polyMesh::cellDecomposition  decompMode 
)
static

Get a point on the face given a face decomposition method:

face-centre-tet : face centre. Returns index of face. face-planes : face centre. Returns index of face. face-diagonal : intersection of ray from cellcentre to facecentre with any of the triangles. Returns index (0..size-2) of triangle.

Definition at line 1723 of file mappedPatchBase.C.

References Foam::abort(), polyMesh::CELL_TETS, primitiveMesh::cellCentres(), PointHit< PointType >::distance(), f(), polyMesh::FACE_CENTRE_TRIS, polyMesh::FACE_DIAG_TRIS, polyMesh::FACE_PLANES, primitiveMesh::faceCentres(), polyMesh::faceOwner(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, intersection::HALF_RAY, PointHit< PointType >::hit(), PointHit< PointType >::hitPoint(), triangle< Point, PointRef >::intersection(), mesh, p, polyMesh::points(), and polyMesh::tetBasePtIs().

Referenced by nearWallFields::calcAddressing().

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

◆ sampleDatabasePath()

const fileName& sampleDatabasePath ( ) const
inline

Definition at line 560 of file mappedPatchBase.H.

References mappedPatchBase::sampleDatabasePtr_.

◆ sampleDatabase()

bool sampleDatabase ( ) const
inline

Definition at line 565 of file mappedPatchBase.H.

References bool, and mappedPatchBase::sampleDatabasePtr_.

◆ sendPath() [1/2]

Foam::fileName sendPath ( const fileName root,
const label  proci 
)
static

Helper: return path to store data to be sent to processor i.

Definition at line 1828 of file mappedPatchBase.C.

References Foam::name().

Referenced by syncObjects::sync().

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

◆ sendPath() [2/2]

Foam::fileName sendPath ( const label  proci) const
virtual

Definition at line 1838 of file mappedPatchBase.C.

◆ receivePath() [1/2]

Foam::fileName receivePath ( const fileName root,
const label  proci 
)
static

Helper: return path to store data to be received from processor i

Definition at line 1845 of file mappedPatchBase.C.

References Foam::name().

Referenced by syncObjects::sync().

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

◆ receivePath() [2/2]

Foam::fileName receivePath ( const label  proci) const
virtual

Definition at line 1855 of file mappedPatchBase.C.

◆ subRegistry() [2/2]

const Foam::objectRegistry & subRegistry ( const objectRegistry obr,
const fileName path 
)
static

Lookup (sub)objectRegistry from '/' separated path (relative to objectRegistry). Creates non-existing intermediate ones.

Definition at line 1804 of file mappedPatchBase.C.

References fileName::clean(), fileName::components(), Foam::PtrListOps::names(), and path().

Here is the call graph for this function:

◆ storeField()

void storeField ( objectRegistry obr,
const word fieldName,
const Field< Type > &  values 
)
static

Store an IOField on the objectRegistry relative to obr.

Definition at line 315 of file mappedPatchBaseTemplates.C.

References objectRegistry::findObject(), IOobject::NO_READ, IOobject::NO_WRITE, regIOobject::store(), and Foam::HashTableOps::values().

Here is the call graph for this function:

◆ writeDict()

void writeDict ( const objectRegistry obr,
dictionary dict 
)
static

Convert objectRegistry contents into dictionary.

Definition at line 1862 of file mappedPatchBase.C.

References dictionary::add(), dict, forAllIters, IOobject::name(), os(), dictionary::subDictOrAdd(), and regIOobject::writeData().

Referenced by syncObjects::sync().

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

◆ readDict()

void readDict ( const dictionary d,
objectRegistry obr 
)
static

(recursively) construct and register IOFields from dictionary

Definition at line 1901 of file mappedPatchBase.C.

References Foam::constant::electromagnetic::e, Foam::exit(), Foam::FatalError, FatalErrorInFunction, and objectRegistry::subRegistry().

Referenced by syncObjects::sync().

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

◆ distribute() [1/2]

◆ distribute() [2/2]

void distribute ( List< Type > &  lst,
const CombineOp &  cop 
) const

Wrapper around map/interpolate data distribution with operation.

Definition at line 103 of file mappedPatchBaseTemplates.C.

References UPstream::defaultCommsType, mapDistributeBase::distribute(), UPstream::msgType(), UPstream::warnComm, UPstream::worldComm, and Foam::Zero.

Here is the call graph for this function:

◆ reverseDistribute() [1/2]

void reverseDistribute ( List< Type > &  lst) const

Wrapper around map/interpolate data distribution.

Definition at line 148 of file mappedPatchBaseTemplates.C.

References UPstream::warnComm, and UPstream::worldComm.

Referenced by regionModel::toPrimary().

Here is the caller graph for this function:

◆ reverseDistribute() [2/2]

void reverseDistribute ( List< Type > &  lst,
const CombineOp &  cop 
) const

Wrapper around map/interpolate data distribution with operation.

Definition at line 177 of file mappedPatchBaseTemplates.C.

References UPstream::defaultCommsType, mapDistributeBase::distribute(), UPstream::msgType(), UPstream::warnComm, UPstream::worldComm, and Foam::Zero.

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write as a dictionary.

Reimplemented in mappedWallPolyPatch, mappedPolyPatch, thermalBaffle1DFvPatchScalarField< solidType >, mappedFieldFvPatchField< Type >, mappedMixedFieldFvPatchField< Type >, mappedVariableThicknessWallPolyPatch, and semiPermeableBaffleMassFractionFvPatchScalarField.

Definition at line 1942 of file mappedPatchBase.C.

References Switch::name(), word::null, fileName::null, os(), Ostream::write(), Ostream::writeEntry(), Ostream::writeEntryIfDifferent(), and VectorSpace< Vector< scalar >, scalar, 3 >::zero.

Referenced by semiPermeableBaffleMassFractionFvPatchScalarField::write(), thermalBaffle1DFvPatchScalarField< solidType >::write(), mappedPolyPatch::write(), and mappedWallPolyPatch::write().

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

Member Data Documentation

◆ sampleModeNames_

const Foam::Enum< Foam::mappedPatchBase::sampleMode > sampleModeNames_
static

Definition at line 137 of file mappedPatchBase.H.

◆ offsetModeNames_

const Foam::Enum< Foam::mappedPatchBase::offsetMode > offsetModeNames_
static

Definition at line 139 of file mappedPatchBase.H.

◆ patch_

◆ sampleWorld_

word sampleWorld_
mutableprotected

World to sample.

Definition at line 229 of file mappedPatchBase.H.

Referenced by mappedPatchBase::addWorldConnection().

◆ sampleRegion_

◆ mode_

const sampleMode mode_
protected

What to sample.

Definition at line 235 of file mappedPatchBase.H.

Referenced by mappedPatchBase::distribute(), and mappedPatchBase::mode().

◆ samplePatch_

◆ coupleGroup_

const coupleGroupIdentifier coupleGroup_
protected

PatchGroup (if in sampleMode NEARESTPATCH*)

Definition at line 241 of file mappedPatchBase.H.

◆ sampleDatabasePtr_

const autoPtr<fileName> sampleDatabasePtr_
protected

Empty or location of database.

Definition at line 244 of file mappedPatchBase.H.

Referenced by mappedPatchBase::sampleDatabase(), and mappedPatchBase::sampleDatabasePath().

◆ offsetMode_

offsetMode offsetMode_
protected

How to obtain samples.

Definition at line 247 of file mappedPatchBase.H.

◆ offset_

vector offset_
protected

Offset vector (uniform)

Definition at line 250 of file mappedPatchBase.H.

◆ offsets_

vectorField offsets_
protected

Offset vector (nonuniform)

Definition at line 253 of file mappedPatchBase.H.

◆ distance_

scalar distance_
protected

Offset distance (normal)

Definition at line 256 of file mappedPatchBase.H.

◆ communicator_

label communicator_
protected

Communicator.

Definition at line 259 of file mappedPatchBase.H.

◆ sameRegion_

bool sameRegion_
mutableprotected

Same region.

Definition at line 262 of file mappedPatchBase.H.

◆ mapPtr_

autoPtr<mapDistribute> mapPtr_
mutableprotected

Communication schedule:

  • Cells/faces to sample per processor
  • Patch faces to receive per processor
  • schedule

Definition at line 272 of file mappedPatchBase.H.

◆ AMIReverse_

const bool AMIReverse_
protected

Flag to indicate that slave patch should be reversed for AMI.

Definition at line 278 of file mappedPatchBase.H.

◆ AMIPtr_

autoPtr<AMIPatchToPatchInterpolation> AMIPtr_
mutableprotected

Pointer to AMI interpolator.

Definition at line 281 of file mappedPatchBase.H.

◆ surfPtr_

autoPtr<searchableSurface> surfPtr_
mutableprotected

Pointer to projection surface employed by AMI interpolator.

Definition at line 284 of file mappedPatchBase.H.

◆ surfDict_

dictionary surfDict_
protected

Dictionary storing projection surface description.

Definition at line 287 of file mappedPatchBase.H.


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