preCICE v3.1.2
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
precice::partition::ReceivedPartition Class Reference

A partition that is computed from a mesh received from another participant. More...

#include <ReceivedPartition.hpp>

Inheritance diagram for precice::partition::ReceivedPartition:
[legend]
Collaboration diagram for precice::partition::ReceivedPartition:
[legend]

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.
 
Partitionoperator= (Partition &&)=delete
 
virtual ~Partition ()
 
void addFromMapping (mapping::PtrMapping fromMapping)
 
void addToMapping (mapping::PtrMapping toMapping)
 
void addM2N (m2n::PtrM2N m2n)
 

Private Member Functions

m2n::M2Nm2n ()
 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
 

Detailed Description

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.

Member Enumeration Documentation

◆ GeometricFilter

Defines the type of geometric filter used.

Enumerator
UNDEFINED 

undefined

NO_FILTER 

No geometric filter used (e.g. for RBF mappings)

ON_PRIMARY_RANK 

Filter at primary rank and communicate only filtered mesh.

ON_SECONDARY_RANKS 

Filter after communication on all secondary ranks.

Definition at line 31 of file ReceivedPartition.hpp.

Constructor & Destructor Documentation

◆ ReceivedPartition()

precice::partition::ReceivedPartition::ReceivedPartition ( const mesh::PtrMesh & mesh,
GeometricFilter geometricFilter,
double safetyFactor,
bool allowDirectAccess = false )

Constructor.

Definition at line 32 of file ReceivedPartition.cpp.

◆ ~ReceivedPartition()

virtual precice::partition::ReceivedPartition::~ReceivedPartition ( )
inlinevirtual

Definition at line 45 of file ReceivedPartition.hpp.

Member Function Documentation

◆ communicate()

void precice::partition::ReceivedPartition::communicate ( )
overridevirtual

The mesh is communicated between both primary ranks (if required)

Implements precice::partition::Partition.

Definition at line 43 of file ReceivedPartition.cpp.

Here is the call graph for this function:

◆ compareBoundingBoxes()

void precice::partition::ReceivedPartition::compareBoundingBoxes ( )
overridevirtual

Intersections between bounding boxes around each rank are computed.

Implements precice::partition::Partition.

Definition at line 378 of file ReceivedPartition.cpp.

Here is the call graph for this function:

◆ compute()

void precice::partition::ReceivedPartition::compute ( )
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.

Here is the call graph for this function:

◆ createOwnerInformation()

void precice::partition::ReceivedPartition::createOwnerInformation ( )
private

Definition at line 524 of file ReceivedPartition.cpp.

Here is the call graph for this function:

◆ filterByBoundingBox()

void precice::partition::ReceivedPartition::filterByBoundingBox ( )
private

Definition at line 283 of file ReceivedPartition.cpp.

Here is the call graph for this function:

◆ hasAnyMapping()

bool precice::partition::ReceivedPartition::hasAnyMapping ( ) const
private

Returns whether any mapping is defined.

Definition at line 894 of file ReceivedPartition.cpp.

◆ isAnyProvidedMeshNonEmpty()

bool precice::partition::ReceivedPartition::isAnyProvidedMeshNonEmpty ( ) const
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.

◆ m2n()

m2n::M2N & precice::partition::ReceivedPartition::m2n ( )
private

return the one m2n, a ReceivedPartition can only have one m2n

Definition at line 941 of file ReceivedPartition.cpp.

◆ prepareBoundingBox()

void precice::partition::ReceivedPartition::prepareBoundingBox ( )
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.

Here is the call graph for this function:

◆ setOwnerInformation()

void precice::partition::ReceivedPartition::setOwnerInformation ( const std::vector< int > & ownerVec)
private

Helper function for 'createOwnerFunction' to set local owner information.

Definition at line 930 of file ReceivedPartition.cpp.

Here is the call graph for this function:

◆ tagMeshFirstRound()

void precice::partition::ReceivedPartition::tagMeshFirstRound ( )
private

Tag mesh in first round according to all mappings.

Definition at line 899 of file ReceivedPartition.cpp.

◆ tagMeshSecondRound()

void precice::partition::ReceivedPartition::tagMeshSecondRound ( )
private

Tag mesh in second round according to all mappings.

Definition at line 915 of file ReceivedPartition.cpp.

Friends And Related Symbol Documentation

◆ ReceivedPartitionFixture

friend struct ReceivedPartitionFixture
friend

Make the fixture friend of this class.

Definition at line 27 of file ReceivedPartition.hpp.

Member Data Documentation

◆ _allowDirectAccess

bool precice::partition::ReceivedPartition::_allowDirectAccess
private

Definition at line 94 of file ReceivedPartition.hpp.

◆ _bb

mesh::BoundingBox precice::partition::ReceivedPartition::_bb
private

Definition at line 88 of file ReceivedPartition.hpp.

◆ _boundingBoxPrepared

bool precice::partition::ReceivedPartition::_boundingBoxPrepared = false
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.

◆ _dimensions

int precice::partition::ReceivedPartition::_dimensions
private

Definition at line 90 of file ReceivedPartition.hpp.

◆ _geometricFilter

GeometricFilter precice::partition::ReceivedPartition::_geometricFilter
private

Definition at line 86 of file ReceivedPartition.hpp.

◆ _log

logging::Logger precice::partition::ReceivedPartition::_log {"partition::ReceivedPartition"}
private

Definition at line 96 of file ReceivedPartition.hpp.

◆ _remoteMaxGlobalVertexIDs

std::vector<int> precice::partition::ReceivedPartition::_remoteMaxGlobalVertexIDs
private

Max global vertex IDs of remote connected ranks.

Definition at line 99 of file ReceivedPartition.hpp.

◆ _remoteMinGlobalVertexIDs

std::vector<int> precice::partition::ReceivedPartition::_remoteMinGlobalVertexIDs
private

Min global vertex IDs of remote connected ranks.

Definition at line 102 of file ReceivedPartition.hpp.

◆ _safetyFactor

double precice::partition::ReceivedPartition::_safetyFactor
private

Definition at line 92 of file ReceivedPartition.hpp.


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