EulerianComm< N, T > Class Template Reference

Base class Eulerian communicator for the Eulerian-Lagrangian coupling. More...

#include <EulerianComm.h>

Inheritance diagram for EulerianComm< N, T >:
ELComm< N, T > EulerianCommBoundary< N, T > EulerianCommShell< N, T >

List of all members.

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 NumbergetPositionsData () 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 NumbergetVelocitiesData () 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 NumbergetFaceNormalsData () const
 Return a const pointer to the face normals data.
const PointgetFaceNormal (const int n) const
 Return a const reference to the n_th face normal.
const NumbergetFaceNormalData (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 NumbergetFaceCentroidsData () const
 Return a const pointer to the face centroids data.
const PointgetFaceCentroid (const int n) const
 Return a const reference to the n_th face centroid.
const NumbergetFaceCentroidData (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.
NumbergetPressuresData ()
 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.

Detailed Description

template<int N, typename T>
class EulerianComm< N, T >

Base class Eulerian communicator for the Eulerian-Lagrangian coupling.

Parameters:
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.


Constructor & Destructor Documentation

template<int N, typename T >
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.

Parameters:
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.

Member Function Documentation

template<int N, typename T >
void EulerianComm< N, T >::computeFaceCentroids (  ) 

Compute the face centroids.

Call this after wait_mesh() if you will use the face centroids.

template<int N, typename T >
void EulerianComm< N, T >::computeFaceNormals (  ) 

Compute the face normals.

Call this after wait_mesh() if you will use the face normals.

template<int N, typename T >
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 >.

template<int N, typename T >
void EulerianComm< N, T >::receiveMesh ( const Number domain  )  [inline]

Post receives for the relevant portions of the mesh from the solid processors.

Parameters:
domain is the region of interest for this fluid processor.

This function just calls the above receive_mesh(const BBox& domain).

template<int N, typename T >
void EulerianComm< N, T >::receiveMesh ( const BBox domain  ) 

Post receives for the relevant portions of the mesh from the solid processors.

Parameters:
domain is the region of interest for this fluid processor.
template<int N, typename T >
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 >.

template<int N, typename 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.

template<int N, typename T >
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 >.


The documentation for this class was generated from the following file:
Generated on Thu Jun 30 02:14:53 2016 for Eulerian-Lagrangian Coupling by  doxygen 1.6.3