Class for parallel communication in a narrow band. It either provides a Map with the neighbouring values of the selected region or returns a Map of the required values in global addressing. Also holds a reference to the stencil Before the data transfer the communication has to be set up: exchangeFields_.setUpCommforZone(interfaceCell_); Is used in the plicRDF. More...
Public Member Functions | |
TypeName ("zoneDistribute") | |
Runtime information. More... | |
zoneDistribute (const fvMesh &) | |
Construct from fvMesh. More... | |
virtual | ~zoneDistribute ()=default |
Destructor. More... | |
void | setUpCommforZone (const boolList &zone, bool updateStencil=true) |
Update stencil with boolList the size has to match mesh nCells. More... | |
void | updateStencil (const boolList &zone) |
Updates stencil with boolList the size has to match mesh nCells. More... | |
const labelListList & | getStencil () noexcept |
Stencil reference. More... | |
const globalIndex & | globalNumbering () const noexcept |
Addressing reference. More... | |
template<typename Type > | |
Type | getValue (const VolumeField< Type > &phi, const Map< Type > &valuesFromOtherProc, const label gblIdx) const |
template<typename Type > | |
Map< Field< Type > > | getFields (const boolList &zone, const VolumeField< Type > &phi) |
Returns stencil and provides a Map with globalNumbering. More... | |
template<typename Type > | |
Map< Type > | getDatafromOtherProc (const boolList &zone, const VolumeField< Type > &phi) |
Returns stencil and provides a Map with globalNumbering. More... | |
template<typename Type > | |
Foam::Map< Foam::Field< Type > > | getFields (const boolList &zone, const VolumeField< Type > &phi) |
template<typename Type > | |
Foam::Map< Type > | getDatafromOtherProc (const boolList &zone, const VolumeField< Type > &phi) |
![]() | |
MeshObject (const fvMesh &mesh) | |
Construct on Mesh type. More... | |
virtual | ~MeshObject ()=default |
Destructor. More... | |
const fvMesh & | mesh () const |
virtual bool | writeData (Ostream &os) const |
Static Public Member Functions | |
static zoneDistribute & | New (const fvMesh &) |
Selector. More... | |
![]() | |
static const zoneDistribute & | New (const fvMesh &mesh, Args &&... args) |
Get existing or create a new MeshObject. More... | |
static bool | Delete (const fvMesh &mesh) |
Static destructor. More... | |
Additional Inherited Members | |
![]() | |
const fvMesh & | mesh_ |
Class for parallel communication in a narrow band. It either provides a Map with the neighbouring values of the selected region or returns a Map of the required values in global addressing. Also holds a reference to the stencil Before the data transfer the communication has to be set up: exchangeFields_.setUpCommforZone(interfaceCell_); Is used in the plicRDF.
Original code supplied by Henning Scheufler, DLR (2019)
Additional optimization of processor communication provided by Tetsuo AOYAGI, RIST (2022), to use a more compact exchange of sizes with an updated version of PstreamBuffers. This optimization uses additional sendTo/recvFrom member data to track the topological connectivity, acting like an on-the-fly sub-communicator, and respects corner connectivity.
Definition at line 80 of file zoneDistribute.H.
|
explicit |
Construct from fvMesh.
Definition at line 41 of file zoneDistribute.C.
References Foam::New().
|
virtualdefault |
Destructor.
TypeName | ( | "zoneDistribute" | ) |
Runtime information.
|
static |
Selector.
Definition at line 52 of file zoneDistribute.C.
References objectRegistry::getObjectPtr(), mesh, regIOobject::store(), and fvMesh::thisDb().
Update stencil with boolList the size has to match mesh nCells.
Definition at line 74 of file zoneDistribute.C.
References PstreamBuffers::allProcs(), PstreamBuffers::finishedSends(), processorFaPatch::myProcNo(), Time::New(), UPstream::nonBlocking, PstreamBuffers::nProcs(), UPstream::parRun(), and PstreamBuffers::recvDataCount().
Referenced by reconstructedDistanceFunction::constructRDF().
void updateStencil | ( | const boolList & | zone | ) |
Updates stencil with boolList the size has to match mesh nCells.
Definition at line 68 of file zoneDistribute.C.
References Time::New().
|
inlinenoexcept |
Stencil reference.
Definition at line 153 of file zoneDistribute.H.
Referenced by reconstructedDistanceFunction::constructRDF().
|
inlinenoexcept |
Addressing reference.
Definition at line 159 of file zoneDistribute.H.
Type getValue | ( | const VolumeField< Type > & | phi, |
const Map< Type > & | valuesFromOtherProc, | ||
const label | gblIdx | ||
) | const |
Gives patchNumber and patchFaceNumber for a given Geometric volume field
Definition at line 79 of file zoneDistributeI.H.
References phi.
Referenced by reconstructedDistanceFunction::constructRDF().
Map< Field< Type > > getFields | ( | const boolList & | zone, |
const VolumeField< Type > & | phi | ||
) |
Returns stencil and provides a Map with globalNumbering.
Map< Type > getDatafromOtherProc | ( | const boolList & | zone, |
const VolumeField< Type > & | phi | ||
) |
Returns stencil and provides a Map with globalNumbering.
Referenced by reconstructedDistanceFunction::constructRDF().
Foam::Map< Foam::Field< Type > > getFields | ( | const boolList & | zone, |
const VolumeField< Type > & | phi | ||
) |
Definition at line 100 of file zoneDistributeI.H.
References DynamicField< T, SizeMin >::append(), DynamicField< T, SizeMin >::clear(), HashTable< T, Key, Hash >::emplace(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, phi, and UList< T >::size().
Foam::Map< Type > getDatafromOtherProc | ( | const boolList & | zone, |
const VolumeField< Type > & | phi | ||
) |
Definition at line 143 of file zoneDistributeI.H.
References PstreamBuffers::allProcs(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, PstreamBuffers::finishedSends(), HashTable< T, Key, Hash >::insert(), processorFaPatch::myProcNo(), UPstream::nonBlocking, UPstream::parRun(), phi, PstreamBuffers::recvDataCount(), UList< T >::size(), and WarningInFunction.