ThunderEgg  1.0.0
ThunderEgg::FineNbrInfo< D > Class Template Reference

Represents neighbors that are at a finer refinement level. More...

#include <FineNbrInfo.h>

Inheritance diagram for ThunderEgg::FineNbrInfo< D >:
Collaboration diagram for ThunderEgg::FineNbrInfo< D >:

Public Member Functions

 FineNbrInfo ()
 Construct a new empty FineNbrInfo object.
 
 FineNbrInfo (std::array< int, Orthant< D >::num_orthants > ids)
 Construct a new FineNbrInfo object. More...
 
NbrType getNbrType () const override
 Get the NbrType.
 
void getNbrIds (std::deque< int > &nbr_ids) const override
 Add to a deque of neighbor ids.
 
void getNbrRanks (std::deque< int > &nbr_ranks) const override
 Add to a deque of neighbor ranks.
 
void setGlobalIndexes (const std::map< int, int > &id_to_global_index_map) override
 Set the local indexes in the NbrInfo objects. More...
 
void setLocalIndexes (const std::map< int, int > &id_to_local_index_map) override
 Set the global indexes in the NbrInfo objects. More...
 
int serialize (char *buffer) const override
 Serialize object into buffer. More...
 
int deserialize (char *buffer) override
 Deserialize an object. More...
 
std::unique_ptr< NbrInfoBaseclone () const override
 get a clone of this object (equivalent to copy constructor) More...
 
- Public Member Functions inherited from ThunderEgg::NbrInfoBase
virtual ~NbrInfoBase ()=default
 Destroy the NbrInfo object.
 
- Public Member Functions inherited from ThunderEgg::Serializable
virtual ~Serializable ()=default
 Destroy the Serializable object.
 

Public Attributes

std::array< int, Orthant< D >::num_orthants > ranks
 The mpi rank that the neighbor resides on.
 
std::array< int, Orthant< D >::num_orthants > ids
 The ids of the neighbors.
 
std::array< int, Orthant< D >::num_orthants > global_indexes
 The global indexes of the neighbors.
 
std::array< int, Orthant< D >::num_orthants > local_indexes
 The local indexes of the neighbors.
 

Detailed Description

template<int D>
class ThunderEgg::FineNbrInfo< D >

Represents neighbors that are at a finer refinement level.

Template Parameters
Dthe number of Cartesian dimensions.

Constructor & Destructor Documentation

◆ FineNbrInfo()

template<int D>
ThunderEgg::FineNbrInfo< D >::FineNbrInfo ( std::array< int, Orthant< D >::num_orthants >  ids)
inline

Construct a new FineNbrInfo object.

Parameters
idsthe ids of the neighbors

Member Function Documentation

◆ clone()

template<int D>
std::unique_ptr<NbrInfoBase> ThunderEgg::FineNbrInfo< D >::clone ( ) const
inlineoverridevirtual

get a clone of this object (equivalent to copy constructor)

Returns
std::unique_ptr<NbrInfo> the cloned object

Implements ThunderEgg::NbrInfoBase.

◆ deserialize()

template<int D>
int ThunderEgg::FineNbrInfo< D >::deserialize ( char *  buffer)
inlineoverridevirtual

Deserialize an object.

Parameters
bufferthe buffer
Returns
int the size of object that was deserialized

Implements ThunderEgg::Serializable.

◆ serialize()

template<int D>
int ThunderEgg::FineNbrInfo< D >::serialize ( char *  buffer) const
inlineoverridevirtual

Serialize object into buffer.

Parameters
bufferthe buffer. Can be set to nullptr if you just want the size
Returns
int the size of the serialized object

Implements ThunderEgg::Serializable.

◆ setGlobalIndexes()

template<int D>
void ThunderEgg::FineNbrInfo< D >::setGlobalIndexes ( const std::map< int, int > &  rev_map)
inlineoverridevirtual

Set the local indexes in the NbrInfo objects.

Parameters
rev_mapmap from id to local_index

Implements ThunderEgg::NbrInfoBase.

◆ setLocalIndexes()

template<int D>
void ThunderEgg::FineNbrInfo< D >::setLocalIndexes ( const std::map< int, int > &  rev_map)
inlineoverridevirtual

Set the global indexes in the NbrInfo objects.

Parameters
rev_mapmap from local_index to global_index

Implements ThunderEgg::NbrInfoBase.


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