Determines a mapping between patch face centres and mesh cell or face centres and processors they're on. More...
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 word & | sampleWorld () const noexcept |
World to sample. More... | |
const word & | sampleRegion () const |
Region to sample. More... | |
const word & | samplePatch () const |
Patch (only if NEARESTPATCHFACE) More... | |
const word & | coupleGroup () const |
PatchGroup (only if NEARESTPATCHFACE) More... | |
label | sampleSize () const |
Return size of mapped mesh/patch/boundary. More... | |
const vector & | offset () const noexcept |
Offset vector (from patch faces to destination mesh objects) More... | |
const vectorField & | offsets () 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... | |
uniformDimensionedScalarField & | updateSampleMeshTime () const |
Local mesh update time. More... | |
uniformDimensionedScalarField & | updateMeshTime () const |
Sample mesh upate time. More... | |
bool | upToDate () const |
const mapDistribute & | map () const |
Return reference to the parallel distribution map. More... | |
const AMIPatchToPatchInterpolation & | AMI (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 polyMesh & | sampleMesh () const |
Get the region mesh. More... | |
const polyPatch & | samplePolyPatch () const |
Get the patch on the region. More... | |
tmp< pointField > | samplePoints () const |
Get the sample points. More... | |
const fileName & | sampleDatabasePath () 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) |
Helper: return path to store data to be received from processor i. More... | |
static const objectRegistry & | subRegistry (const objectRegistry &obr, const fileName &path) |
Lookup (sub)objectRegistry from '/' separated path (relative to objectRegistry). Creates non-existing intermediate ones. More... | |
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< sampleMode > | sampleModeNames_ |
static const Enum< offsetMode > | offsetModeNames_ |
Protected Member Functions | |
virtual void | initGeometry (PstreamBuffers &) |
Initialise the calculation of the patch geometry. More... | |
virtual void | calcGeometry (PstreamBuffers &) |
Calculate the patch geometry. More... | |
virtual void | initMovePoints (PstreamBuffers &, const pointField &) |
Initialise the patches for moving points. More... | |
virtual void | movePoints (PstreamBuffers &, const pointField &) |
Correct patches after moving points. More... | |
virtual void | initUpdateMesh (PstreamBuffers &) |
Initialise the update of the patch topology. More... | |
virtual void | updateMesh (PstreamBuffers &) |
Update of the patch topology. More... | |
bool | addWorldConnection () |
Add a world-world connection. More... | |
label | getWorldCommunicator () const |
Get the communicator for the world-world connection. More... | |
const polyMesh & | lookupMesh (const word ®ion) const |
Lookup mesh. More... | |
const polyPatch & | lookupPatch (const word &sampleRegion, const word &samplePatch) const |
Lookup patch. More... | |
tmp< pointField > | facePoints (const polyPatch &) const |
Get the points from face-centre-decomposition face centres and project them onto the face-diagonal-decomposition triangles. More... | |
void | collectSamples (const label mySampleWorld, const pointField &facePoints, pointField &samples, labelList &patchFaceWorlds, labelList &patchFaceProcs, labelList &patchFaces, pointField &patchFc) const |
Collect single list of samples and originating processor+face + wanted world. More... | |
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< pointField > | samplePoints (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< fileName > | readDatabase (const dictionary &dict) |
Read optional database name from dictionary. More... | |
static const objectRegistry & | subRegistry (const objectRegistry &obr, const wordList &names, const label index) |
Lookup (sub)objectRegistry by following names of sub registries. Creates non-existing intermediate ones. More... | |
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 polyPatch & | patch_ |
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< fileName > | sampleDatabasePtr_ |
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< mapDistribute > | mapPtr_ |
Communication schedule: More... | |
const bool | AMIReverse_ |
Flag to indicate that slave patch should be reversed for AMI. More... | |
autoPtr< AMIPatchToPatchInterpolation > | AMIPtr_ |
Pointer to AMI interpolator. More... | |
autoPtr< searchableSurface > | surfPtr_ |
Pointer to projection surface employed by AMI interpolator. More... | |
dictionary | surfDict_ |
Dictionary storing projection surface description. More... | |
autoPtr< uniformDimensionedScalarField > | updateMeshTimePtr_ |
Local mesh update time. More... | |
autoPtr< uniformDimensionedScalarField > | updateSampleMeshTimePtr_ |
Sample mesh update time. More... | |
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.
Definition at line 109 of file mappedPatchBase.H.
typedef Tuple2<pointIndexHit, Tuple2<scalar, label> > nearInfo |
Helper class for finding nearest.
Nearest:
Definition at line 151 of file mappedPatchBase.H.
typedef Tuple2<nearInfo, label> nearInfoWorld |
nearest + world
Used to only look at entries from same world
Definition at line 199 of file mappedPatchBase.H.
enum sampleMode |
Mesh items to sample.
Definition at line 118 of file mappedPatchBase.H.
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 131 of file mappedPatchBase.H.
|
explicit |
Construct from patch.
Definition at line 1216 of file mappedPatchBase.C.
mappedPatchBase | ( | const polyPatch & | pp, |
const word & | sampleRegion, | ||
const sampleMode | sampleMode, | ||
const word & | samplePatch, | ||
const vectorField & | offsets | ||
) |
Construct with offsetMode=non-uniform.
Definition at line 1242 of file mappedPatchBase.C.
References mappedPatchBase::setOffset().
mappedPatchBase | ( | const polyPatch & | pp, |
const word & | sampleRegion, | ||
const sampleMode | sampleMode, | ||
const word & | samplePatch, | ||
const vector & | uniformOffset | ||
) |
Construct from offsetMode=uniform.
Definition at line 1264 of file mappedPatchBase.C.
References mappedPatchBase::setOffset().
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 1286 of file mappedPatchBase.C.
mappedPatchBase | ( | const polyPatch & | pp, |
const dictionary & | dict | ||
) |
Construct from dictionary.
Definition at line 1322 of file mappedPatchBase.C.
References dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::found(), Foam::Detail::ListPolicy::NONUNIFORM, dictionary::readEntry(), dictionary::readIfPresent(), and Foam::Detail::ListPolicy::UNIFORM.
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 1424 of file mappedPatchBase.C.
References dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, and Foam::mode().
mappedPatchBase | ( | const polyPatch & | pp, |
const mappedPatchBase & | mpb | ||
) |
Construct as copy, resetting patch.
Definition at line 1497 of file mappedPatchBase.C.
mappedPatchBase | ( | const polyPatch & | pp, |
const mappedPatchBase & | mpb, | ||
const labelUList & | mapAddressing | ||
) |
Construct as copy, resetting patch, map original data.
Definition at line 1529 of file mappedPatchBase.C.
|
virtual |
Destructor.
Definition at line 1568 of file mappedPatchBase.C.
|
inlineprotectedvirtual |
Initialise the calculation of the patch geometry.
Reimplemented in mappedPolyPatch, and mappedWallPolyPatch.
Definition at line 355 of file mappedPatchBase.H.
Referenced by mappedPolyPatch::initGeometry().
|
inlineprotectedvirtual |
Calculate the patch geometry.
Reimplemented in mappedPolyPatch, and mappedWallPolyPatch.
Definition at line 361 of file mappedPatchBase.H.
Referenced by mappedPolyPatch::calcGeometry(), and mappedWallPolyPatch::calcGeometry().
|
inlineprotectedvirtual |
Initialise the patches for moving points.
Reimplemented in mappedPolyPatch, and mappedWallPolyPatch.
Definition at line 367 of file mappedPatchBase.H.
Referenced by mappedPolyPatch::initMovePoints(), and mappedWallPolyPatch::initMovePoints().
|
inlineprotectedvirtual |
Correct patches after moving points.
Reimplemented in mappedPolyPatch, and mappedWallPolyPatch.
Definition at line 373 of file mappedPatchBase.H.
Referenced by mappedPolyPatch::movePoints(), and mappedWallPolyPatch::movePoints().
|
inlineprotectedvirtual |
Initialise the update of the patch topology.
Reimplemented in mappedPolyPatch, and mappedWallPolyPatch.
Definition at line 379 of file mappedPatchBase.H.
Referenced by mappedPolyPatch::initUpdateMesh(), and mappedWallPolyPatch::initUpdateMesh().
|
protectedvirtual |
Update of the patch topology.
Reimplemented in mappedPolyPatch, and mappedWallPolyPatch.
Definition at line 82 of file mappedPatchBase.C.
References mappedPatchBase::clearOut().
Referenced by mappedPolyPatch::updateMesh(), and mappedWallPolyPatch::updateMesh().
|
protected |
Add a world-world connection.
Definition at line 116 of file mappedPatchBase.C.
References multiWorldConnections::New(), runTime, and objectRegistry::time().
|
protected |
Get the communicator for the world-world connection.
Definition at line 131 of file mappedPatchBase.C.
References UPstream::commWorld(), multiWorldConnections::getCommByName(), multiWorldConnections::New(), runTime, and objectRegistry::time().
|
protected |
Lookup mesh.
Definition at line 1616 of file mappedPatchBase.C.
References polyMesh::boundaryMesh(), objectRegistry::lookupObject(), polyBoundaryMesh::mesh(), IOobject::name(), and objectRegistry::time().
|
protected |
Lookup patch.
Definition at line 1631 of file mappedPatchBase.C.
References polyMesh::boundaryMesh(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and polyBoundaryMesh::findPatchID().
Referenced by mappedWallPolyPatch::nbrCells(), mappedPolyPatch::nbrCells(), mappedWallPolyPatch::neighbPolyPatchID(), mappedPolyPatch::neighbPolyPatchID(), mappedPolyPatch::newInternalProcFaces(), and mappedWallPolyPatch::newInternalProcFaces().
|
protected |
Get the points from face-centre-decomposition face centres and project them onto the face-diagonal-decomposition triangles.
Definition at line 145 of file mappedPatchBase.C.
References polyMesh::FACE_DIAG_TRIS, Foam::facePoint(), forAll, mesh, tmp< T >::New(), pp(), and polyMesh::tetBasePtIs().
|
protected |
Collect single list of samples and originating processor+face + wanted world.
Definition at line 173 of file mappedPatchBase.C.
References Pstream::allGatherList(), UPstream::commWarn(), Foam::ensightOutput::debug, DebugInFunction, Foam::endl(), forAll, Foam::identity(), UPstream::msgType(), UPstream::myProcNo(), OSstream::name(), Foam::nl, UPstream::nProcs(), Foam::Perr, List< T >::resize(), samples(), and UList< T >::size().
|
protected |
Find (local) cells/faces containing samples.
Note: face-diagonal decomposition
Note: face-diagonal decomposition
Note: face-diagonal decomposition
Definition at line 270 of file mappedPatchBase.C.
References Foam::abort(), primitiveMesh::cellCentres(), polyMesh::cellTree(), DebugInFunction, Foam::constant::electromagnetic::e, Foam::exit(), primitiveMesh::faceCentres(), Foam::FatalError, FatalErrorInFunction, meshSearch::findNearestFace(), Tuple2< T1, T2 >::first(), forAll, mesh, PrimitivePatch< FaceList, PointField >::meshPoints(), Foam::mode(), UPstream::myProcNo(), MeshObject< polyMesh, GeometricMeshObject, meshSearchMeshObject >::New(), Foam::nl, PrimitivePatch< FaceList, PointField >::points(), polyMesh::points(), pp(), rndGen, samples(), Tuple2< T1, T2 >::second(), List< T >::setSize(), UList< T >::size(), Foam::sqr(), and tree().
|
protected |
Find (global) cells/faces containing samples.
Definition at line 576 of file mappedPatchBase.C.
References Pstream::allGatherList(), UPstream::commWarn(), Foam::ensightOutput::debug, DebugInFunction, Foam::endl(), Tuple2< T1, T2 >::first(), UList< T >::first(), forAll, Pstream::listCombineReduce(), Foam::max(), Foam::mode(), UPstream::msgType(), UPstream::myProcNo(), Foam::nl, UPstream::nProcs(), Foam::Pout, samples(), Tuple2< T1, T2 >::second(), List< T >::setSize(), UList< T >::size(), and Foam::sqr().
|
protected |
Get the sample points given the face points.
Definition at line 1763 of file mappedPatchBase.C.
References fld, Foam::mag(), n, tmp< T >::New(), Foam::Detail::ListPolicy::NONUNIFORM, and Foam::Detail::ListPolicy::UNIFORM.
|
protected |
Calculate mapping.
Definition at line 721 of file mappedPatchBase.C.
References Foam::abort(), UPstream::allWorlds(), DynamicList< T, SizeMin >::append(), Foam::ensightOutput::debug, DebugInFunction, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, UList< T >::find(), forAll, Foam::gAverage(), Foam::mag(), UPstream::master(), UPstream::msgType(), UPstream::myWorld(), UPstream::myWorldID(), OSstream::name(), IOstream::name(), Foam::nl, Foam::Pout, Foam::reduce(), samples(), HashSet< Key, Hash >::set(), UList< T >::size(), HashSet< Key, Hash >::test(), Foam::type(), Foam::HashSetOps::used(), WarningInFunction, and Foam::meshTools::writeOBJ().
|
protected |
Calculate AMI interpolator.
Definition at line 1093 of file mappedPatchBase.C.
References UPstream::commWarn(), UPstream::commWorld(), Foam::ensightOutput::debug, DebugInFunction, Foam::endl(), PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), Foam::nl, os(), and Foam::meshTools::writeOBJ().
|
staticprotected |
Read optional database name from dictionary.
Definition at line 89 of file mappedPatchBase.C.
References dict, dictionary::found(), dictionary::get(), dictionary::getOrDefault(), autoPtr< T >::New(), and fileName::null.
|
staticprotected |
Lookup (sub)objectRegistry by following names of sub registries. Creates non-existing intermediate ones.
Definition at line 1196 of file mappedPatchBase.C.
References Foam::PtrListOps::names(), UList< T >::size(), and objectRegistry::subRegistry().
Referenced by syncObjects::sync().
|
staticprotected |
Attempt to detect an IOField<Type> and write to dictionary.
Definition at line 242 of file mappedPatchBaseTemplates.C.
References dict, fld, and dictionary::set().
|
staticprotected |
Attempt to read an IOField<Type> and store on objectRegistry.
Definition at line 270 of file mappedPatchBaseTemplates.C.
References objectRegistry::getObjectPtr(), token::isCompound(), Foam::name(), IOobjectOption::NO_READ, IOobjectOption::NO_WRITE, IOobjectOption::REGISTER, regIOobject::store(), and token::transferCompoundToken().
TypeName | ( | "mappedPatchBase" | ) |
Runtime type information.
void clearOut | ( | ) |
Definition at line 1574 of file mappedPatchBase.C.
Referenced by thermalBaffle1DFvPatchScalarField< solidType >::autoMap(), and mappedPatchBase::updateMesh().
void setOffset | ( | const scalar | normalDist | ) |
Change to normal offset with given distance.
Definition at line 1585 of file mappedPatchBase.C.
References Foam::Zero.
Referenced by mappedPatchBase::mappedPatchBase().
void setOffset | ( | const vector & | uniformOffset | ) |
Change to uniform offset with value.
Definition at line 1595 of file mappedPatchBase.C.
References Foam::Detail::ListPolicy::UNIFORM, and Foam::Zero.
void setOffset | ( | const vectorField & | offsets | ) |
Change to non-uniform offsets.
Definition at line 1605 of file mappedPatchBase.C.
References Foam::Detail::ListPolicy::NONUNIFORM, and Foam::Zero.
|
inlinenoexcept |
What to sample.
Definition at line 23 of file mappedPatchBaseI.H.
References mappedPatchBase::mode_.
Referenced by mappedVelocityFluxFixedValueFvPatchField::mappedVelocityFluxFixedValueFvPatchField(), mappedVelocityFluxFixedValueFvPatchField::updateCoeffs(), and mappedFixedInternalValueFvPatchField< Type >::updateCoeffs().
|
inlinenoexcept |
World to sample.
Definition at line 29 of file mappedPatchBaseI.H.
|
inline |
Region to sample.
Definition at line 35 of file mappedPatchBaseI.H.
References Foam::exit(), Foam::FatalError, and FatalErrorInFunction.
Referenced by turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs(), and turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs().
|
inline |
Patch (only if NEARESTPATCHFACE)
Definition at line 61 of file mappedPatchBaseI.H.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
Referenced by regionModel::nbrCoupledPatchID(), mappedVelocityFluxFixedValueFvPatchField::updateCoeffs(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs(), and turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs().
|
inline |
PatchGroup (only if NEARESTPATCHFACE)
Definition at line 87 of file mappedPatchBaseI.H.
|
inline |
Return size of mapped mesh/patch/boundary.
Definition at line 93 of file mappedPatchBaseI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, mesh, and primitiveMesh::nBoundaryFaces().
|
inlinenoexcept |
Offset vector (from patch faces to destination mesh objects)
Definition at line 128 of file mappedPatchBaseI.H.
|
inlinenoexcept |
Offset vectors (from patch faces to destination mesh objects)
Definition at line 134 of file mappedPatchBaseI.H.
|
inline |
Get the communicator (worldComm or world-to-world)
Definition at line 140 of file mappedPatchBaseI.H.
Referenced by mappedPatchBase::distribute().
|
inline |
Identical to getCommunicator()
Definition at line 151 of file mappedPatchBaseI.H.
|
inline |
Is sample world the local world?
Definition at line 162 of file mappedPatchBaseI.H.
References UPstream::allWorlds(), UList< T >::empty(), and UPstream::myWorld().
Referenced by mappedPatchBase::distribute(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs(), and turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs().
|
inline |
Is my world ordered before the sampleWorld?
Definition at line 173 of file mappedPatchBaseI.H.
References UPstream::allWorlds(), UList< T >::find(), and UPstream::myWorldID().
Referenced by mappedPatchBase::distribute().
|
inlinenoexcept |
Cached sampleRegion != mesh.name()
Definition at line 186 of file mappedPatchBaseI.H.
|
inline |
Local mesh update time.
Definition at line 193 of file mappedPatchBaseI.H.
References polyMesh::boundaryMesh(), mesh, polyBoundaryMesh::mesh(), IOobjectOption::NO_READ, IOobjectOption::NO_REGISTER, IOobjectOption::NO_WRITE, polyMesh::pointsInstance(), primitiveMesh::reset(), and fvMesh::thisDb().
|
inline |
Sample mesh upate time.
Definition at line 224 of file mappedPatchBaseI.H.
References polyMesh::boundaryMesh(), mesh, polyBoundaryMesh::mesh(), IOobjectOption::NO_READ, IOobjectOption::NO_REGISTER, IOobjectOption::NO_WRITE, polyMesh::pointsInstance(), primitiveMesh::reset(), and fvMesh::thisDb().
bool upToDate | ( | ) | const |
Definition at line 1683 of file mappedPatchBase.C.
References polyMesh::boundaryMesh(), Foam::mag(), mesh, polyBoundaryMesh::mesh(), polyMesh::moving(), polyMesh::oldPoints(), Foam::foamVersion::patch, points, polyMesh::points(), UPstream::reduceAnd(), and polyMesh::upToDatePoints().
|
inline |
Return reference to the parallel distribution map.
Definition at line 251 of file mappedPatchBaseI.H.
Referenced by mappedPatchBase::distribute(), mappedWallPolyPatch::mapCollocatedFaces(), mappedPolyPatch::mapCollocatedFaces(), semiPermeableBaffleMassFractionFvPatchScalarField::phiY(), and thermalBaffle1DFvPatchScalarField< solidType >::updateCoeffs().
|
inline |
Return reference to the AMI interpolator.
Definition at line 273 of file mappedPatchBaseI.H.
References AMIInterpolation::reset().
Referenced by mappedPatchBase::distribute().
|
inline |
Is it owner.
Definition at line 294 of file mappedPatchBaseI.H.
Referenced by mappedWallPolyPatch::masterImplicit(), and mappedPolyPatch::masterImplicit().
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(), IOobjectOption::MUST_READ, searchableSurface::New(), IOobjectOption::NO_WRITE, and fvMesh::time().
const Foam::polyMesh & sampleMesh | ( | ) | const |
Get the region mesh.
Definition at line 1651 of file mappedPatchBase.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and UPstream::myWorld().
Referenced by mappedVelocityFluxFixedValueFvPatchField::updateCoeffs(), mappedFixedInternalValueFvPatchField< Type >::updateCoeffs(), mappedFlowRateFvPatchVectorField::updateCoeffs(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs(), turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs(), and humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs().
const Foam::polyPatch & samplePolyPatch | ( | ) | const |
Get the patch on the region.
Definition at line 1664 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(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs(), turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs(), and humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs().
Foam::tmp< Foam::pointField > samplePoints | ( | ) | const |
Get the sample points.
Definition at line 1797 of file mappedPatchBase.C.
|
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 1804 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, UList< T >::fcIndex(), intersection::HALF_RAY, PointHit< PointType >::hit(), triangle< Point, PointRef >::intersection(), mesh, p, PointHit< PointType >::point(), polyMesh::points(), UList< T >::size(), and polyMesh::tetBasePtIs().
Referenced by nearWallFields::calcAddressing().
|
inline |
Definition at line 768 of file mappedPatchBase.H.
References mappedPatchBase::sampleDatabasePtr_.
|
inline |
Definition at line 773 of file mappedPatchBase.H.
References mappedPatchBase::sampleDatabasePtr_.
|
static |
Helper: return path to store data to be sent to processor i.
Definition at line 1909 of file mappedPatchBase.C.
References Foam::name().
Referenced by syncObjects::sync().
|
virtual |
Definition at line 1919 of file mappedPatchBase.C.
|
static |
Helper: return path to store data to be received from processor i.
Definition at line 1926 of file mappedPatchBase.C.
References Foam::name().
Referenced by syncObjects::sync().
|
virtual |
Definition at line 1936 of file mappedPatchBase.C.
|
static |
Lookup (sub)objectRegistry from '/' separated path (relative to objectRegistry). Creates non-existing intermediate ones.
Definition at line 1885 of file mappedPatchBase.C.
References fileName::clean(), fileName::components(), UList< T >::empty(), Foam::PtrListOps::names(), and path().
|
static |
Store an IOField on the objectRegistry relative to obr.
Definition at line 313 of file mappedPatchBaseTemplates.C.
References objectRegistry::getObjectPtr(), IOobjectOption::NO_READ, IOobjectOption::NO_WRITE, IOobjectOption::REGISTER, regIOobject::store(), and Foam::HashTableOps::values().
|
static |
Convert objectRegistry contents into dictionary.
Definition at line 1943 of file mappedPatchBase.C.
References dictionary::add(), dict, forAllIters, IOobject::name(), os(), dictionary::subDictOrAdd(), and regIOobject::writeData().
Referenced by syncObjects::sync().
|
static |
(recursively) construct and register IOFields from dictionary
Definition at line 1982 of file mappedPatchBase.C.
References Foam::constant::electromagnetic::e, Foam::exit(), Foam::FatalError, FatalErrorInFunction, and objectRegistry::subRegistry().
Referenced by syncObjects::sync().
void distribute | ( | List< Type > & | lst | ) | const |
Wrapper around map/interpolate data distribution.
Definition at line 23 of file mappedPatchBaseTemplates.C.
References mappedPatchBase::AMI(), UPstream::commWarn(), UPstream::commWorld(), mappedPatchBase::getCommunicator(), mappedPatchBase::map(), mappedPatchBase::masterWorld(), mappedPatchBase::mode_, mappedPatchBase::NEARESTPATCHFACEAMI, and mappedPatchBase::sameWorld().
Referenced by solidAbsorption::a(), solidAbsorption::e(), regionModel::toRegion(), mappedVelocityFluxFixedValueFvPatchField::updateCoeffs(), mappedFixedInternalValueFvPatchField< Type >::updateCoeffs(), mappedFlowRateFvPatchVectorField::updateCoeffs(), turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs(), and humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs().
void distribute | ( | List< Type > & | lst, |
const CombineOp & | cop | ||
) | const |
Wrapper around map/interpolate data distribution with operation.
Definition at line 101 of file mappedPatchBaseTemplates.C.
References UPstream::commWarn(), UPstream::commWorld(), UPstream::defaultCommsType, mapDistributeBase::distribute(), UPstream::msgType(), and Foam::Zero.
void reverseDistribute | ( | List< Type > & | lst | ) | const |
Wrapper around map/interpolate data distribution.
Definition at line 152 of file mappedPatchBaseTemplates.C.
References UPstream::commWarn(), and UPstream::commWorld().
Referenced by regionModel::toPrimary().
void reverseDistribute | ( | List< Type > & | lst, |
const CombineOp & | cop | ||
) | const |
Wrapper around map/interpolate data distribution with operation.
Definition at line 187 of file mappedPatchBaseTemplates.C.
References UPstream::commWarn(), UPstream::commWorld(), UPstream::defaultCommsType, mapDistributeBase::distribute(), UPstream::msgType(), and Foam::Zero.
|
virtual |
Write as a dictionary.
Reimplemented in mappedPolyPatch, mappedWallPolyPatch, thermalBaffle1DFvPatchScalarField< solidType >, mappedFieldFvPatchField< Type >, mappedMixedFieldFvPatchField< Type >, mappedVariableThicknessWallPolyPatch, and semiPermeableBaffleMassFractionFvPatchScalarField.
Definition at line 2023 of file mappedPatchBase.C.
References Switch::name(), Foam::Detail::ListPolicy::NONUNIFORM, word::null, fileName::null, os(), Foam::Detail::ListPolicy::UNIFORM, Ostream::write(), Ostream::writeEntry(), and Ostream::writeEntryIfDifferent().
Referenced by semiPermeableBaffleMassFractionFvPatchScalarField::write(), thermalBaffle1DFvPatchScalarField< solidType >::write(), mappedWallPolyPatch::write(), and mappedPolyPatch::write().
|
static |
Definition at line 138 of file mappedPatchBase.H.
|
static |
Definition at line 140 of file mappedPatchBase.H.
|
protected |
Patch to sample.
Definition at line 235 of file mappedPatchBase.H.
Referenced by mappedWallPolyPatch::mapCollocatedFaces(), mappedPolyPatch::mapCollocatedFaces(), mappedPolyPatch::newInternalProcFaces(), and mappedWallPolyPatch::newInternalProcFaces().
|
mutableprotected |
World to sample.
Definition at line 240 of file mappedPatchBase.H.
|
mutableprotected |
Region to sample.
Definition at line 245 of file mappedPatchBase.H.
Referenced by mappedWallPolyPatch::nbrCells(), mappedPolyPatch::nbrCells(), mappedWallPolyPatch::neighbPolyPatchID(), mappedPolyPatch::neighbPolyPatchID(), mappedWallPolyPatch::neighbRegionID(), mappedPolyPatch::neighbRegionID(), mappedPolyPatch::newInternalProcFaces(), and mappedWallPolyPatch::newInternalProcFaces().
|
protected |
What to sample.
Definition at line 250 of file mappedPatchBase.H.
Referenced by mappedPatchBase::distribute(), and mappedPatchBase::mode().
|
mutableprotected |
Patch (if in sampleMode NEARESTPATCH*)
Definition at line 255 of file mappedPatchBase.H.
Referenced by mappedWallPolyPatch::nbrCells(), mappedPolyPatch::nbrCells(), mappedWallPolyPatch::neighbPolyPatchID(), mappedPolyPatch::neighbPolyPatchID(), mappedPolyPatch::newInternalProcFaces(), and mappedWallPolyPatch::newInternalProcFaces().
|
protected |
PatchGroup (if in sampleMode NEARESTPATCH*)
Definition at line 260 of file mappedPatchBase.H.
Empty or location of database.
Definition at line 265 of file mappedPatchBase.H.
Referenced by mappedPatchBase::sampleDatabase(), and mappedPatchBase::sampleDatabasePath().
|
protected |
How to obtain samples.
Definition at line 270 of file mappedPatchBase.H.
|
protected |
Offset vector (uniform)
Definition at line 275 of file mappedPatchBase.H.
|
protected |
Offset vector (nonuniform)
Definition at line 280 of file mappedPatchBase.H.
|
protected |
Offset distance (normal)
Definition at line 285 of file mappedPatchBase.H.
|
protected |
Communicator.
Definition at line 290 of file mappedPatchBase.H.
|
mutableprotected |
Same region.
Definition at line 295 of file mappedPatchBase.H.
|
mutableprotected |
Communication schedule:
Definition at line 308 of file mappedPatchBase.H.
|
protected |
Flag to indicate that slave patch should be reversed for AMI.
Definition at line 316 of file mappedPatchBase.H.
|
mutableprotected |
Pointer to AMI interpolator.
Definition at line 321 of file mappedPatchBase.H.
|
mutableprotected |
Pointer to projection surface employed by AMI interpolator.
Definition at line 326 of file mappedPatchBase.H.
|
protected |
Dictionary storing projection surface description.
Definition at line 331 of file mappedPatchBase.H.
|
mutableprotected |
Local mesh update time.
Definition at line 339 of file mappedPatchBase.H.
|
mutableprotected |
Sample mesh update time.
Definition at line 345 of file mappedPatchBase.H.