ThunderEgg  1.0.0
ThunderEgg::Schur::Interface< D > Class Template Reference

This is a set of PatchIfaceInfo objects for an interface. More...

#include <Interface.h>

Inheritance diagram for ThunderEgg::Schur::Interface< D >:
Collaboration diagram for ThunderEgg::Schur::Interface< D >:

Classes

class  SideTypePiinfo
 A struct for each patch associated with this interface. More...
 

Public Member Functions

 Interface ()=default
 Construct a new Interface object.
 
 Interface (int id)
 Construct a new Interface object. More...
 
void insert (Side< D > s, std::shared_ptr< const PatchIfaceInfo< D >> piinfo)
 Add an associated patch to this interface. More...
 
void merge (Interface< D > ifs)
 Add the patches from the given Interface object to this object. More...
 
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.
 

Static Public Member Functions

static void EnumerateIfacesFromPiinfoVector (std::vector< std::shared_ptr< const PatchIfaceInfo< D >>> piinfos, std::map< int, std::map< int, std::shared_ptr< Interface< D >>>> &rank_id_iface_map, std::vector< std::shared_ptr< PatchIfaceInfo< D >>> &off_proc_piinfos)
 Will enumerate a map from interface id to this rank's interfaces, will also do any neccesary communication to get additional information. This is collective on all processors. More...
 

Public Attributes

int id = -1
 The id of the interface.
 
int local_index = -1
 The local index of the interface.
 
int global_index = -1
 The global index of the interface.
 
std::vector< SideTypePiinfopatches
 SideTypePiinfo structs associated with this interface. More...
 

Detailed Description

template<int D>
class ThunderEgg::Schur::Interface< D >

This is a set of PatchIfaceInfo objects for an interface.

This will contain information from each patch that the interface is on.

Template Parameters
Dthe number of cartesian dimensions on a patch.

Constructor & Destructor Documentation

◆ Interface()

template<int D>
ThunderEgg::Schur::Interface< D >::Interface ( int  id)
inlineexplicit

Construct a new Interface object.

Parameters
idthe id of the interface

Member Function Documentation

◆ deserialize()

template<int D>
int ThunderEgg::Schur::Interface< D >::deserialize ( char *  buffer)
inlinevirtual

Deserialize an object.

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

Implements ThunderEgg::Serializable.

◆ EnumerateIfacesFromPiinfoVector()

template<int D>
static void ThunderEgg::Schur::Interface< D >::EnumerateIfacesFromPiinfoVector ( std::vector< std::shared_ptr< const PatchIfaceInfo< D >>>  piinfos,
std::map< int, std::map< int, std::shared_ptr< Interface< D >>>> &  rank_id_iface_map,
std::vector< std::shared_ptr< PatchIfaceInfo< D >>> &  off_proc_piinfos 
)
inlinestatic

Will enumerate a map from interface id to this rank's interfaces, will also do any neccesary communication to get additional information. This is collective on all processors.

Parameters
piinfosvector of this ranks piinfo objects
rank_id_iface_mapthe map from rank to interface id to interface. The interfaces on this rank will contain PatchIfaceInfo objects from other processors. The interfaces for other ranks will only contain the PatchIfaceInfo objects from this rank.
off_proc_piinfosa vector of piinfo objects received from other processors.

◆ insert()

template<int D>
void ThunderEgg::Schur::Interface< D >::insert ( Side< D >  s,
std::shared_ptr< const PatchIfaceInfo< D >>  piinfo 
)
inline

Add an associated patch to this interface.

Parameters
sthe side of the patch that this interface is on
piinfothe PatchIfaceInfo object for the patch

◆ merge()

template<int D>
void ThunderEgg::Schur::Interface< D >::merge ( Interface< D >  ifs)
inline

Add the patches from the given Interface object to this object.

Parameters
ifsthe Interface object from which to add the patches

◆ serialize()

template<int D>
int ThunderEgg::Schur::Interface< D >::serialize ( char *  buffer) const
inlinevirtual

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.

Member Data Documentation

◆ patches

template<int D>
std::vector<SideTypePiinfo> ThunderEgg::Schur::Interface< D >::patches

SideTypePiinfo structs associated with this interface.

The struct contains the side of the patch that this interface lies on, the IfaceType of this interface on that patch, and the patch.


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