ThunderEgg
1.0.0
|
Facilitates communication between a finer domain and a coarser domain. More...
#include <InterLevelComm.h>
Public Member Functions | |
InterLevelComm (const Domain< D > &coarser_domain, const Domain< D > &finer_domain) | |
Create a new InterLevelComm object. More... | |
~InterLevelComm () | |
Destroy the InterLevelComm object. | |
Vector< D > | getNewGhostVector (int num_components) const |
Allocate a new vector for ghost patch values. More... | |
const std::vector< std::pair< int, std::reference_wrapper< const PatchInfo< D > > > > & | getPatchesWithLocalParent () const |
Get the vector of finer patches that have a local parent. More... | |
const std::vector< std::pair< int, std::reference_wrapper< const PatchInfo< D > > > > & | getPatchesWithGhostParent () const |
Get the vector of finer patches that have a ghost parent. More... | |
void | sendGhostPatchesStart (Vector< D > &vector, const Vector< D > &ghost_vector) |
Start the communication for sending ghost values. More... | |
void | sendGhostPatchesFinish (Vector< D > &vector, const Vector< D > &ghost_vector) |
Finish the communication for sending ghost values. More... | |
void | getGhostPatchesStart (const Vector< D > &vector, Vector< D > &ghost_vector) |
Start the communication for getting ghost values. More... | |
void | getGhostPatchesFinish (const Vector< D > &vector, Vector< D > &ghost_vector) |
Finish the communication for getting ghost values. More... | |
const Domain< D > & | getCoarserDomain () const |
Get the coarser Domain. More... | |
const Domain< D > & | getFinerDomain () const |
Get the finer Domain. More... | |
Facilitates communication between a finer domain and a coarser domain.
This class will determine the following things:
Which patches in the finer domain have a parent patch in the coarser domain on the same rank?
Which patches in the finer domain have a parent patch in the coarser domain on a different rank?
Scatter functions are provided for scattering to and from the coarse vector to the coarse ghost vector.
|
inline |
Create a new InterLevelComm object.
coarse_domain | the coarser DomainCollection. |
fine_domain | the finer DomainCollection. |
|
inline |
|
inline |
|
inline |
Finish the communication for getting ghost values.
This will send the values in the vector to the ghost vector, and will overwrite the values in the ghost vector. This is essentially a forward scatter.
This function is seperated into a Start and Finish function, this allows for other computations to happen while communicating.
vector | the vector |
ghost_vector | the associated ghost vector |
|
inline |
Start the communication for getting ghost values.
This will send the values in the vector to the ghost vector, and will overwrite the values in the ghost vector. This is essentially a forward scatter.
This function is seperated into a Start and Finish function, this allows for other computations to happen while the communicating.
vector | the vector |
ghost_vector | the associated ghost vector |
|
inline |
Allocate a new vector for ghost patch values.
num_components | the number of components |
|
inline |
Get the vector of finer patches that have a ghost parent.
The vector will consist of pair values:
|
inline |
Get the vector of finer patches that have a local parent.
The vector will consist of pair values:
|
inline |
Finish the communication for sending ghost values.
This will send the values in the ghost vector and will add them to the values in the vector. This is essentially a reverse scatter.
This function is seperated into a Start and Finish function, this allows for other computations to happen while the communicating.
vector | the vector |
ghost_vector | the associated ghost vector |
|
inline |
Start the communication for sending ghost values.
This will send the values in the ghost vector and will add them to the values in the vector. This is essentially a reverse scatter.
This function is seperated into a Start and Finish function, this allows for other computations to happen while the communicating.
vector | the vector |
ghost_vector | the associated ghost vector |