SpECTRE  2021.08.02
Neighbors< VolumeDim > Class Template Reference

Information about the neighbors of a host Element in a particular direction. More...

#include <Neighbors.hpp>

Public Member Functions

 Neighbors (std::unordered_set< ElementId< VolumeDim > > ids, OrientationMap< VolumeDim > orientation) noexcept
 Construct with the ids and orientation of the neighbors relative to the host. More...
 
 Neighbors ()=default
 Default constructor for Charm++ serialization.
 
 Neighbors (const Neighbors< VolumeDim > &neighbor)=default
 
 Neighbors (Neighbors< VolumeDim > &&) noexcept=default
 
Neighborsoperator= (const Neighbors &rhs)=default
 
Neighborsoperator= (Neighbors &&) noexcept=default
 
const std::unordered_set< ElementId< VolumeDim > > & ids () const noexcept
 
const OrientationMap< VolumeDim > & orientation () const noexcept
 
void set_ids_to (const std::unordered_set< ElementId< VolumeDim > > new_ids) noexcept
 Reset the ids of the neighbors.
 
void add_ids (const std::unordered_set< ElementId< VolumeDim > > &additional_ids) noexcept
 Add ids of neighbors. Adding an existing neighbor is allowed.
 
void pup (PUP::er &p) noexcept
 Serialization for Charm++.
 
size_t size () const noexcept
 The number of neighbors.
 
std::unordered_set< ElementId< VolumeDim > >::iterator begin () noexcept
 
std::unordered_set< ElementId< VolumeDim > >::iterator end () noexcept
 
std::unordered_set< ElementId< VolumeDim > >::const_iterator begin () const noexcept
 
std::unordered_set< ElementId< VolumeDim > >::const_iterator end () const noexcept
 
std::unordered_set< ElementId< VolumeDim > >::const_iterator cbegin () const noexcept
 
std::unordered_set< ElementId< VolumeDim > >::const_iterator cend () const noexcept
 

Detailed Description

template<size_t VolumeDim>
class Neighbors< VolumeDim >

Information about the neighbors of a host Element in a particular direction.

Template Parameters
VolumeDimthe volume dimension.

Constructor & Destructor Documentation

◆ Neighbors()

template<size_t VolumeDim>
Neighbors< VolumeDim >::Neighbors ( std::unordered_set< ElementId< VolumeDim > >  ids,
OrientationMap< VolumeDim >  orientation 
)
noexcept

Construct with the ids and orientation of the neighbors relative to the host.

Parameters
idsthe ids of the neighbors.
orientationThis OrientationMap takes objects in the logical coordinate frame of the host Element and maps them to the logical coordinate frame of the neighbor Element.