|
ThunderEgg
1.0.0
|
Contains metadata for a patch. More...
#include <PatchInfo.h>


Public Member Functions | |
| PatchInfo () | |
| Construct a new Patch Info object starts, ns, and spacings are all set to 0. | |
| PatchInfo (const PatchInfo< D > &other_pinfo) | |
| Copy constructor. More... | |
| PatchInfo< D > & | operator= (const PatchInfo< D > &other_pinfo) |
| Copy asisgnment. More... | |
| template<int M> | |
| void | setNbrInfo (Face< D, M > f, nullptr_t) |
| template<int M> | |
| void | setNbrInfo (Face< D, M > f, NbrInfo< M > *nbr_info) |
| Set the Nbr Info object on a given face. More... | |
| template<int M> | |
| NbrType | getNbrType (Face< D, M > s) const |
| Get the NbrType for a side. More... | |
| template<int M> | |
| NormalNbrInfo< M > & | getNormalNbrInfo (Face< D, M > s) const |
| Get the NormalNbrInfo object for a side. More... | |
| template<int M> | |
| CoarseNbrInfo< M > & | getCoarseNbrInfo (Face< D, M > s) const |
| Get the CoarseNbrInfo object. More... | |
| template<int M> | |
| FineNbrInfo< M > & | getFineNbrInfo (Face< D, M > s) const |
| Get the FineNbrInfo object. More... | |
| template<int M> | |
| bool | hasNbr (Face< D, M > s) const |
| Return whether the patch has a neighbor. More... | |
| bool | hasNbr () const |
| Return if this patch has a neighbor. | |
| bool | hasCoarseParent () const |
| Return whether the patch has a coarser parent. More... | |
| void | setNeighborLocalIndexes (const std::map< int, int > &id_to_local_index_map) |
| Set the local indexes in the NbrInfo objects. More... | |
| void | setNeighborGlobalIndexes (const std::map< int, int > &id_to_global_index_map) |
| Set the global indexes in the NbrInfo objects. More... | |
| std::deque< int > | getNbrIds () const |
| return a vector of neighbor ids | |
| std::deque< int > | getNbrRanks () const |
| return a vector of neighbor ranks | |
| template<int M> | |
| void | serializeNeighbors (BufferWriter &writer) const |
| template<int M> | |
| void | deserializeNeighbors (BufferReader &reader) |
| int | serialize (char *buffer) const |
| Serialize object into buffer. More... | |
| int | deserialize (char *buffer) |
| Deserialize an object. More... | |
Public Member Functions inherited from ThunderEgg::Serializable | |
| virtual | ~Serializable ()=default |
| Destroy the Serializable object. | |
Public Attributes | |
| int | id = 0 |
| The globally unique ID of the patch This ID only needs to be unique within a Domain. | |
| int | local_index = 0 |
| The local index of the patch in the Domain. | |
| int | global_index = 0 |
| The global index of the patch in the Domain. | |
| int | refine_level = -1 |
| The refinement level. | |
| int | parent_id = -1 |
| The id of the parent patch. More... | |
| int | parent_rank = -1 |
| the rank that the parent patch resides on | |
| std::array< int, Orthant< D >::num_orthants > | child_ids |
| The id's of the children. More... | |
| std::array< int, Orthant< D >::num_orthants > | child_ranks |
| The ranks of the children. More... | |
| int | num_ghost_cells = 0 |
| Number of ghost cells on each side of the patch. | |
| int | rank = -1 |
| MPI rank of this patch. | |
| Orthant< D > | orth_on_parent = Orthant<D>::null() |
| The orthant of the parent that this parent resides on. More... | |
| std::array< int, D > | ns |
| The number of cells in each direction. | |
| std::array< double, D > | starts |
| The lower-left-bottom index of the patch. | |
| std::array< double, D > | spacings |
| The cell spacings in each direction. | |
Friends | |
| bool | operator< (const PatchInfo &l, const PatchInfo &r) |
| Compare the ids of the patches. More... | |
Contains metadata for a patch.
This contains metadata for a specific patch. Information like:
It also contains information for a patch's neighbor:
| D | the number of cartesian dimensions in the patch |
|
inline |
Copy constructor.
| other_pinfo | object to copy |
|
inlinevirtual |
Deserialize an object.
| buffer | the buffer |
Implements ThunderEgg::Serializable.
|
inline |
|
inline |
Get the FineNbrInfo object.
Neighbor must be of Fine type, otherwise behavior is undefined.
| s | the side |
|
inline |
Get the NbrType for a side.
| s | the side |
|
inline |
Get the NormalNbrInfo object for a side.
Neighbor must be of Normal type, otherwise behavior is undefined.
| s | the side |
|
inline |
Return whether the patch has a coarser parent.
|
inline |
Return whether the patch has a neighbor.
| s | the side |
|
inline |
Copy asisgnment.
| other_pinfo | the object to copy |
|
inlinevirtual |
Serialize object into buffer.
| buffer | the buffer. Can be set to nullptr if you just want the size |
Implements ThunderEgg::Serializable.
|
inline |
Set the Nbr Info object on a given face.
| M | the dimensionality of the face |
| s | the face |
| nbr_info | the neighbor info object, this patchinfo will take ownership of it |
|
inline |
Set the global indexes in the NbrInfo objects.
| id_to_global_index_map | map form id to global_index |
|
inline |
Set the local indexes in the NbrInfo objects.
| id_to_local_index_map | map from id to local_index |
Compare the ids of the patches.
| l | left operand |
| r | right operand |
| std::array<int, Orthant<D>::num_orthants> ThunderEgg::PatchInfo< D >::child_ids |
The id's of the children.
Set to -1 if there are no children
| std::array<int, Orthant<D>::num_orthants> ThunderEgg::PatchInfo< D >::child_ranks |
The ranks of the children.
Set to -1 if there are no children
| Orthant<D> ThunderEgg::PatchInfo< D >::orth_on_parent = Orthant<D>::null() |
The orthant of the parent that this parent resides on.
If the parent is the same size, it should be set to Orthant::null
| int ThunderEgg::PatchInfo< D >::parent_id = -1 |
The id of the parent patch.
Set to -1 if there is no parent.