Base class for a specialization of the RigidBodyTrait class template for MPI parallel solvers.
This class adds functionality to track which process owns the rigid body and which processes have remote copies of the body in case it is owned by this process.
#include <MPIRigidBodyTrait.h>
Public Types | |
using | ShadowOwnersIterator = ShadowOwners::iterator |
Iterator over the connected processes. More... | |
using | ConstShadowOwnersIterator = ShadowOwners::const_iterator |
ConstIterator over the connected processes. More... | |
using | SizeType = size_t |
Public Member Functions | |
Constructor | |
MPIRigidBodyTrait () | |
Default implementation of the MPIRigidBodyTrait constructor. More... | |
Destructor | |
virtual | ~MPIRigidBodyTrait ()=default |
Get functions | |
Owner & | getOwner () |
Returns the rank of the owner process. More... | |
const Owner & | getOwner () const |
void | setOwner (const Owner &owner) |
Returns the rank of the owner process. More... | |
shadow owners functions | |
void | registerShadowOwner (const Owner &owner) |
Registering a new remote process the rigid body is contained in. More... | |
void | deregisterShadowOwner (const Owner &owner) |
Deregistering a remote process from the rigid body. More... | |
bool | isShadowOwnerRegistered (const Owner &owner) const |
Checks whether the given remote process is registered with the rigid body. More... | |
bool | hasShadowOwners () const |
Returns whether any processes are registered with the rigid body. More... | |
ShadowOwnersIterator | beginShadowOwners () |
Returns an iterator to the first remote process the rigid body is contained in. More... | |
ConstShadowOwnersIterator | beginShadowOwners () const |
ShadowOwnersIterator | endShadowOwners () |
Returns an iterator just past the last process the rigid body is contained in. More... | |
ConstShadowOwnersIterator | endShadowOwners () const |
SizeType | sizeShadowOwners () const |
Returns the number of registered processes. More... | |
void | clearShadowOwners () |
Removing all registered remote processes from the rigid body. More... | |
cache information functions | |
void | setBlockState (const BlockID &id) |
void | unsetBlockState (const BlockID &id) |
bool | getBlockState (const BlockID &id) const |
size_t | getBlockStateSize () const |
void | clearBlockStates () |
Protected Types | |
using | ShadowOwners = std::vector< Owner > |
Vector for remote MPI processes the rigid body is contained in. More... | |
using | BlockStates = std::set< BlockID > |
Stores the information if neighbor block knows about object. More... | |
Private Attributes | |
Member variables | |
ShadowOwners | shadowOwners_ |
Vector of all processes the rigid body intersects with. More... | |
BlockStates | blockStates_ |
Owner | owner_ |
Rank of the process owning the rigid body. More... | |
|
protected |
Stores the information if neighbor block knows about object.
using walberla::pe::MPIRigidBodyTrait::ConstShadowOwnersIterator = ShadowOwners::const_iterator |
ConstIterator over the connected processes.
|
protected |
Vector for remote MPI processes the rigid body is contained in.
using walberla::pe::MPIRigidBodyTrait::ShadowOwnersIterator = ShadowOwners::iterator |
Iterator over the connected processes.
|
inlineexplicit |
Default implementation of the MPIRigidBodyTrait constructor.
body | The body ID of this rigid body. |
|
virtualdefault |
|
inline |
Returns an iterator to the first remote process the rigid body is contained in.
|
inline |
|
inline |
|
inline |
Removing all registered remote processes from the rigid body.
This function clears all references to remote processes the rigid body may be contained in.
|
inline |
Deregistering a remote process from the rigid body.
owner | The remote process to be deregistered from the rigid body. |
This function deregisters the given remote process from the rigid body. This call has linear complexity.
|
inline |
Returns an iterator just past the last process the rigid body is contained in.
|
inline |
|
inline |
|
inline |
|
inline |
Returns the rank of the owner process.
If not yet set by the collision system this function returns -1.
|
inline |
|
inline |
Returns whether any processes are registered with the rigid body.
|
inline |
Checks whether the given remote process is registered with the rigid body.
owner | The remote process that possibly registered with the rigid body. |
This call has linear complexity.
|
inline |
Registering a new remote process the rigid body is contained in.
owner | The remote process to be registered with the rigid body. |
This function registers the given remote process with the rigid body. In case the process is already registered, it is not registered again. This call has linear complexity.
|
inline |
|
inline |
Returns the rank of the owner process.
If not yet set by the collision system this function returns -1.
|
inline |
Returns the number of registered processes.
|
inline |
|
private |
|
private |
Rank of the process owning the rigid body.
|
private |
Vector of all processes the rigid body intersects with.