Base class Eulerian communicator for the Eulerian-Lagrangian coupling. More...
#include <EulerianComm.h>
Public Member Functions | |
Constructors etc. | |
EulerianComm (const MPI_Comm comm, const MPI_Comm eulerian, const int lagrangianSize, const int lagrangianRoot, VertexIdentifierStyle vertexIdentifierStyle) | |
Construct from the communicators and Lagrangian info. | |
virtual | ~EulerianComm () |
Destructor. Free the duplicated communicator. | |
Accessors. | |
int | getNumberOfNodes () const |
Return the number of nodes. | |
int | getNumberOfFaces () const |
Return the number of faces. | |
const ads::Array< 1, Point > & | getPositions () const |
Return a const reference to the array of node positions. | |
const Number * | getPositionsData () const |
Return a const pointer to the node positions data. | |
const ads::Array< 1, Point > & | getVelocities () const |
Return a const reference to the array of node velocities. | |
const Number * | getVelocitiesData () const |
Return a const pointer to the node velocities data. | |
const ads::Array < 1, IndexedFace > & | getConnectivities () const |
Return a const reference to the array of node connectivities. | |
const int * | getConnectivitiesData () const |
Return a const pointer to the node connectivities data. | |
Face Centroid/Normal Accessors. | |
const ads::Array< 1, Point > & | getFaceNormals () const |
Return a const reference to the array of face normals. | |
const Number * | getFaceNormalsData () const |
Return a const pointer to the face normals data. | |
const Point & | getFaceNormal (const int n) const |
Return a const reference to the n_th face normal. | |
const Number * | getFaceNormalData (const int n) const |
Return a const pointer to the n_th face normal data. | |
const ads::Array< 1, Point > & | getFaceCentroids () const |
Return a const reference to the array of face centroids. | |
const Number * | getFaceCentroidsData () const |
Return a const pointer to the face centroids data. | |
const Point & | getFaceCentroid (const int n) const |
Return a const reference to the n_th face centroid. | |
const Number * | getFaceCentroidData (const int n) const |
Return a const pointer to the n_th face centroid data. | |
Manipulators. | |
ads::Array< 1, Number > & | getPressures () |
Return a reference to the array of node pressures. | |
Number * | getPressuresData () |
Return a pointer to the node pressures data. | |
Communication. | |
void | receiveMesh (const BBox &domain) |
Post receives for the relevant portions of the mesh from the solid processors. | |
void | receiveMesh (const Number *domain) |
Post receives for the relevant portions of the mesh from the solid processors. | |
void | waitForMesh () |
Wait for the receives to complete. Build the assembled mesh. | |
virtual void | sendPressure ()=0 |
Start sending the pressure to the relevant solid processors. | |
virtual void | waitForPressure ()=0 |
Wait for the pressure sends to be copied into communication buffers. | |
void | computeFaceNormals () |
Compute the face normals. | |
void | computeFaceCentroids () |
Compute the face centroids. | |
virtual void | initializePressure ()=0 |
Initialize the pressure at the nodes or the faces. | |
Protected Types | |
typedef Base::Number | Number |
The number type. | |
typedef Base::Point | Point |
A Cartesian point. | |
typedef Base::BBox | BBox |
A bounding box. | |
typedef Base::MpiRequest | MpiRequest |
An MPI request. | |
typedef Base::MpiStatus | MpiStatus |
Status for an MPI request. | |
typedef ads::FixedArray< N, int > | IndexedFace |
An indexed face type. | |
Protected Attributes | |
MPI_Comm | _eulerianCommunicator |
The Eulerian communicator. | |
int | _lagrangianRoot |
The Lagrangian root. | |
std::vector< ads::Array< 1, int > > | _identifiers |
The node identifiers from Lagrangian processors. | |
std::vector< ads::Array < 1, Point > > | _positions |
The node positions from Lagrangian processors. | |
std::vector< ads::Array < 1, Point > > | _velocities |
The node velocities from Lagrangian processors. | |
std::vector< ads::Array < 1, IndexedFace > > | _connectivities |
The node connectivities from Lagrangian processors. | |
std::vector< ads::Array < 1, Number > > | _pressures |
The node pressures to be sent to Lagrangian processors. | |
std::map< int, int > | _identifierToIndex |
The mapping from node identifiers to node indices in the assembled boundary. | |
ads::Array< 1, Point > | _assembledPositions |
The assembled positions. | |
ads::Array< 1, Point > | _assembledVelocities |
The assembled velocities. | |
ads::Array< 1, IndexedFace > | _assembledConnectivities |
The assembled connectivities. | |
ads::Array< 1, Number > | _assembledPressures |
The assembled pressures. | |
concurrent::PtToPt2Grp1Dom< N, T, int, ads::FixedArray < 3, int > > | _pointToPoint |
Class for computing the point-to-point communication scheme. | |
std::vector< ads::FixedArray < 3, int > > | _lagrangianData |
Data from the Lagrangian processors with which we communicate. | |
ads::Array< 1, Point > | _faceNormals |
The face normals. | |
ads::Array< 1, Point > | _faceCentroids |
The face centroids. |
Base class Eulerian communicator for the Eulerian-Lagrangian coupling.
N | is the space dimension. 2 and 3 are supported. | |
T | is the floating point number type. |
Implements the common functionality for boundaries and shells.
EulerianComm< N, T >::EulerianComm | ( | const MPI_Comm | comm, | |
const MPI_Comm | eulerian, | |||
const int | lagrangianSize, | |||
const int | lagrangianRoot, | |||
VertexIdentifierStyle | vertexIdentifierStyle | |||
) | [inline] |
Construct from the communicators and Lagrangian info.
comm | is the communicator that contains the Eulerian and Lagrangian processors. | |
eulerian | is the Eulerian communicator. It is duplicated to avoid message conflicts. | |
lagrangianSize | is the number of Lagrangian processors. | |
lagrangianRoot | is the rank of the Lagrangian root in comm . | |
vertexIdentifierStyle | is either LocalIndices or GlobalIdentifiers. |
void EulerianComm< N, T >::computeFaceCentroids | ( | ) |
Compute the face centroids.
Call this after wait_mesh() if you will use the face centroids.
void EulerianComm< N, T >::computeFaceNormals | ( | ) |
Compute the face normals.
Call this after wait_mesh() if you will use the face normals.
virtual void EulerianComm< N, T >::initializePressure | ( | ) | [pure virtual] |
Initialize the pressure at the nodes or the faces.
This function should be called after wait_mesh() and before accessing the pressures.
This function is implemented in the derived classes.
Implemented in EulerianCommBoundary< N, T >, and EulerianCommShell< N, T >.
void EulerianComm< N, T >::receiveMesh | ( | const Number * | domain | ) | [inline] |
Post receives for the relevant portions of the mesh from the solid processors.
domain | is the region of interest for this fluid processor. |
This function just calls the above receive_mesh(const BBox& domain)
.
void EulerianComm< N, T >::receiveMesh | ( | const BBox & | domain | ) |
Post receives for the relevant portions of the mesh from the solid processors.
domain | is the region of interest for this fluid processor. |
virtual void EulerianComm< N, T >::sendPressure | ( | ) | [pure virtual] |
Start sending the pressure to the relevant solid processors.
Call this function after the pressures have been set.
Implemented in EulerianCommBoundary< N, T >, and EulerianCommShell< N, T >.
void EulerianComm< N, T >::waitForMesh | ( | ) |
Wait for the receives to complete. Build the assembled mesh.
This function must be called before accessing the mesh.
virtual void EulerianComm< N, T >::waitForPressure | ( | ) | [pure virtual] |
Wait for the pressure sends to be copied into communication buffers.
This function must be called after send_pressure().
Implemented in EulerianCommBoundary< N, T >, and EulerianCommShell< N, T >.