METHOD
ParallelBcs Class Reference

#include <parallelBoundaryConds.h>

Inheritance diagram for ParallelBcs:
Collaboration diagram for ParallelBcs:

Public Member Functions

 ParallelBcs (Data *data, ParallelEnv *env)
 
virtual ~ParallelBcs ()
 
void swapGhostBuffers (double *sendToLeftBuf, double *sendToRightBuf, double *recvFromLeftBuf, double *recvFromRightBuf, int leftNeighbour, int rightNeighbour, int numCellsSent)
 
void packXBuffer (double *sendToLeftBuf, double *sendToRightBuf, double *stateVector, int nVars)
 
void unpackXBuffer (double *recvFromLeftBuf, double *recfFromRightBuf, double *stateVector, int nVars)
 
void packYBuffer (double *sendToLeftBuf, double *sendToRightBuf, double *stateVector, int nVars)
 
void unpackYBuffer (double *recvFromLeftBuf, double *recfFromRightBuf, double *stateVector, int nVars)
 
void packZBuffer (double *sendToLeftBuf, double *sendToRightBuf, double *stateVector, int nVars)
 
void unpackZBuffer (double *recvFromLeftBuf, double *recfFromRightBuf, double *stateVector, int nVars)
 
- Public Member Functions inherited from Bcs
virtual void apply (double *cons, double *prims=NULL, double *aux=NULL)=0
 

Public Attributes

ParallelEnvenv
 

Additional Inherited Members

- Protected Member Functions inherited from Bcs
 Bcs (Data *data)
 
virtual ~Bcs ()
 
- Protected Attributes inherited from Bcs
Datadata
 

Detailed Description

Boundary Conditions for a data structure that has been distributed across ranks

Base class for implementations of different boundary conditions across a distributed data structure. Contains common functions used by more than one Boundary Condition type. The fields to which the boundary conditions are applied are those passed into the function apply, not those in the SimData class.

Definition at line 16 of file parallelBoundaryConds.h.

Constructor & Destructor Documentation

◆ ParallelBcs()

ParallelBcs::ParallelBcs ( Data data,
ParallelEnv env 
)
inline

Constructor.

Stores the pointer to the Data class and ParallelEnv class.

Parameters
[in]*datapointer to Data class
[in]*envpointer to ParallelEnv class
See also
Bcs::Bcs

Definition at line 31 of file parallelBoundaryConds.h.

◆ ~ParallelBcs()

virtual ParallelBcs::~ParallelBcs ( )
inlinevirtual

Destructor.

Definition at line 35 of file parallelBoundaryConds.h.

Member Function Documentation

◆ packXBuffer()

void ParallelBcs::packXBuffer ( double *  sendToLeftBuf,
double *  sendToRightBuf,
double *  stateVector,
int  nVars 
)

For a particular state vector (cons, prims, aux) copies cells along the left and right faces of the physical (non-ghost) cells in a subdomain and packs them into buffers for MPI communication to another process.

Parameters
[out]*sendToLeftBufpointer to the buffer to pack with cells at the left face, to be sent to the left neighbour process
[out]*sendToRightBufpointer to the buffer to pack with cells at the right face, to be sent to the right neighbour process
[in]*stateVectorpointer to cons, prims or aux array
[in]nVarsnumber of variables in the cons, prims or aux array

◆ packYBuffer()

void ParallelBcs::packYBuffer ( double *  sendToLeftBuf,
double *  sendToRightBuf,
double *  stateVector,
int  nVars 
)

For a particular state vector (cons, prims, aux) copies cells along the front and back faces of the physical (non-ghost) cells in a subdomain and packs them into buffers for MPI communication to another process.

Parameters
[out]*sendToLeftBufpointer to the buffer to pack with cells at the front face, to be sent to the front neighbour process
[out]*sendToRightBufpointer to the buffer to pack with cells at the back face, to be sent to the back neighbour process
[in]*stateVectorpointer to cons, prims or aux array
[in]nVarsnumber of variables in the cons, prims or aux array

◆ packZBuffer()

void ParallelBcs::packZBuffer ( double *  sendToLeftBuf,
double *  sendToRightBuf,
double *  stateVector,
int  nVars 
)

For a particular state vector (cons, prims, aux) copies cells received from a neighbour process into the ghost cell region at the bottom and top faces of a subdomain.

Parameters
[out]*sendToLeftBufpointer to the buffer to pack with cells at the bottom face, to be sent to the bottom neighbour process
[out]*sendToRightBufpointer to the buffer to pack with cells at the top face, to be sent to the top neighbour process
[in]*stateVectorpointer to cons, prims or aux array
[in]nVarsnumber of variables in the cons, prims or aux array

◆ swapGhostBuffers()

void ParallelBcs::swapGhostBuffers ( double *  sendToLeftBuf,
double *  sendToRightBuf,
double *  recvFromLeftBuf,
double *  recvFromRightBuf,
int  leftNeighbour,
int  rightNeighbour,
int  numCellsSent 
)

Exchanges buffers packed with ghost cells with neighbouring subdomains using MPI.

Parameters
[in]*sendToLeftBufpointer to the buffer contaning ghost cells at the left (front, bottom) face, to be sent to the left (front, bottom) neighbour process
[in]*sendToRightBufpointer to the buffer contaning ghost cells at the right (back, top) face, to be sent to the right (back, top) neighbour process
[out]*recvFromLeftBufbuffer for receiving ghost cells from the left (front, bottom) process
[out]*recvFromRightBufbuffer for receiving ghost cells from the right (back, top) process
[in]leftNeighbourid of the left (front, bottom) process in the global MPI communicator
[in]rightNeighbourid of the right (back, top) process in the global MPI communicator
[in]numCellsSentnumber of cells in the ghost region

◆ unpackXBuffer()

void ParallelBcs::unpackXBuffer ( double *  recvFromLeftBuf,
double *  recfFromRightBuf,
double *  stateVector,
int  nVars 
)

For a particular state vector (cons, prims, aux) copies cells received from a neighbour process into the ghost cell region at the left and right faces of a subdomain.

Parameters
[out]*sendToLeftBufpointer to the buffer to pack with cells at the left face, to be sent to the left neighbour process
[out]*sendToRightBufpointer to the buffer to pack with cells at the right face, to be sent to the right neighbour process
[in]*stateVectorpointer to cons, prims or aux array
[in]nVarsnumber of variables in the cons, prims or aux array

◆ unpackYBuffer()

void ParallelBcs::unpackYBuffer ( double *  recvFromLeftBuf,
double *  recfFromRightBuf,
double *  stateVector,
int  nVars 
)

For a particular state vector (cons, prims, aux) copies cells received from a neighbour process into the ghost cell region at the front and back faces of a subdomain.

Parameters
[out]*sendToLeftBufpointer to the buffer to pack with cells at the front face, to be sent to the front neighbour process
[out]*sendToRightBufpointer to the buffer to pack with cells at the back face, to be sent to the back neighbour process
[in]*stateVectorpointer to cons, prims or aux array
[in]nVarsnumber of variables in the cons, prims or aux array

◆ unpackZBuffer()

void ParallelBcs::unpackZBuffer ( double *  recvFromLeftBuf,
double *  recfFromRightBuf,
double *  stateVector,
int  nVars 
)

For a particular state vector (cons, prims, aux) copies cells received from a neighbour process into the ghost cell region at the bottom and top faces of a subdomain.

Parameters
[out]*sendToLeftBufpointer to the buffer to pack with cells at the bottom face, to be sent to the bottom neighbour process
[out]*sendToRightBufpointer to the buffer to pack with cells at the top face, to be sent to the top neighbour process
[in]*stateVectorpointer to cons, prims or aux array
[in]nVarsnumber of variables in the cons, prims or aux array

Member Data Documentation

◆ env

ParallelEnv* ParallelBcs::env

Pointer to ParallelEnv class containing platform specific info such as MPI details.

Definition at line 21 of file parallelBoundaryConds.h.


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