preCICE v3.1.2
|
A partition that is computed from a mesh received from another participant. More...
#include <ReceivedPartition.hpp>
Public Types | |
enum | GeometricFilter { UNDEFINED , NO_FILTER , ON_PRIMARY_RANK , ON_SECONDARY_RANKS } |
Defines the type of geometric filter used. More... | |
Public Member Functions | |
ReceivedPartition (const mesh::PtrMesh &mesh, GeometricFilter geometricFilter, double safetyFactor, bool allowDirectAccess=false) | |
Constructor. | |
virtual | ~ReceivedPartition () |
void | communicate () override |
The mesh is communicated between both primary ranks (if required) | |
void | compute () override |
The partition is computed, i.e. the mesh re-partitioned if required and all data structures are set up. | |
void | compareBoundingBoxes () override |
Intersections between bounding boxes around each rank are computed. | |
Public Member Functions inherited from precice::partition::Partition | |
Partition (mesh::PtrMesh mesh) | |
Constructor. | |
Partition & | operator= (Partition &&)=delete |
virtual | ~Partition () |
void | addFromMapping (mapping::PtrMapping fromMapping) |
void | addToMapping (mapping::PtrMapping toMapping) |
void | addM2N (m2n::PtrM2N m2n) |
Private Member Functions | |
m2n::M2N & | m2n () |
return the one m2n, a ReceivedPartition can only have one m2n | |
void | filterByBoundingBox () |
void | prepareBoundingBox () |
Sets _bb to the union with the mesh from fromMapping resp. toMapping, also enlage by _safetyFactor. | |
bool | isAnyProvidedMeshNonEmpty () const |
bool | hasAnyMapping () const |
Returns whether any mapping is defined. | |
void | tagMeshFirstRound () |
Tag mesh in first round according to all mappings. | |
void | tagMeshSecondRound () |
Tag mesh in second round according to all mappings. | |
void | createOwnerInformation () |
void | setOwnerInformation (const std::vector< int > &ownerVec) |
Helper function for 'createOwnerFunction' to set local owner information. | |
Private Attributes | |
bool | _boundingBoxPrepared = false |
Is the local other (i.e. provided) bounding box already prepared (i.e. has prepareBoundingBox() been called) | |
GeometricFilter | _geometricFilter |
mesh::BoundingBox | _bb |
int | _dimensions |
double | _safetyFactor |
bool | _allowDirectAccess |
logging::Logger | _log {"partition::ReceivedPartition"} |
std::vector< int > | _remoteMaxGlobalVertexIDs |
Max global vertex IDs of remote connected ranks. | |
std::vector< int > | _remoteMinGlobalVertexIDs |
Min global vertex IDs of remote connected ranks. | |
Friends | |
struct | ReceivedPartitionFixture |
Make the fixture friend of this class. | |
Additional Inherited Members | |
Protected Attributes inherited from precice::partition::Partition | |
mesh::PtrMesh | _mesh |
std::vector< mapping::PtrMapping > | _fromMappings |
std::vector< mapping::PtrMapping > | _toMappings |
std::vector< m2n::PtrM2N > | _m2ns |
m2n connection to each connected participant | |
A partition that is computed from a mesh received from another participant.
A mesh is received by the primary rank and re-partitioned among all secondary ranks. Afterwards necessary distribution data structures are set up.
Definition at line 25 of file ReceivedPartition.hpp.
Defines the type of geometric filter used.
Definition at line 31 of file ReceivedPartition.hpp.
precice::partition::ReceivedPartition::ReceivedPartition | ( | const mesh::PtrMesh & | mesh, |
GeometricFilter | geometricFilter, | ||
double | safetyFactor, | ||
bool | allowDirectAccess = false ) |
Constructor.
Definition at line 32 of file ReceivedPartition.cpp.
|
inlinevirtual |
Definition at line 45 of file ReceivedPartition.hpp.
|
overridevirtual |
The mesh is communicated between both primary ranks (if required)
Implements precice::partition::Partition.
Definition at line 43 of file ReceivedPartition.cpp.
|
overridevirtual |
Intersections between bounding boxes around each rank are computed.
Implements precice::partition::Partition.
Definition at line 378 of file ReceivedPartition.cpp.
|
overridevirtual |
The partition is computed, i.e. the mesh re-partitioned if required and all data structures are set up.
Implements precice::partition::Partition.
Definition at line 90 of file ReceivedPartition.cpp.
|
private |
|
private |
|
private |
Returns whether any mapping is defined.
Definition at line 894 of file ReceivedPartition.cpp.
|
private |
Checks whether provided meshes are empty.
Empty provided meshes mean that the re-partitioning completely filtered out the mesh received on this rank at the coupling interface.
Definition at line 879 of file ReceivedPartition.cpp.
|
private |
return the one m2n, a ReceivedPartition can only have one m2n
Definition at line 941 of file ReceivedPartition.cpp.
|
private |
Sets _bb to the union with the mesh from fromMapping resp. toMapping, also enlage by _safetyFactor.
Definition at line 476 of file ReceivedPartition.cpp.
|
private |
Helper function for 'createOwnerFunction' to set local owner information.
Definition at line 930 of file ReceivedPartition.cpp.
|
private |
Tag mesh in first round according to all mappings.
Definition at line 899 of file ReceivedPartition.cpp.
|
private |
Tag mesh in second round according to all mappings.
Definition at line 915 of file ReceivedPartition.cpp.
|
friend |
Make the fixture friend of this class.
Definition at line 27 of file ReceivedPartition.hpp.
|
private |
Definition at line 94 of file ReceivedPartition.hpp.
|
private |
Definition at line 88 of file ReceivedPartition.hpp.
|
private |
Is the local other (i.e. provided) bounding box already prepared (i.e. has prepareBoundingBox() been called)
Definition at line 84 of file ReceivedPartition.hpp.
|
private |
Definition at line 90 of file ReceivedPartition.hpp.
|
private |
Definition at line 86 of file ReceivedPartition.hpp.
|
private |
Definition at line 96 of file ReceivedPartition.hpp.
|
private |
Max global vertex IDs of remote connected ranks.
Definition at line 99 of file ReceivedPartition.hpp.
|
private |
Min global vertex IDs of remote connected ranks.
Definition at line 102 of file ReceivedPartition.hpp.
|
private |
Definition at line 92 of file ReceivedPartition.hpp.