AMDiS  0.1
The Adaptive Multi-Dimensional Simulation Toolbox
BoundaryManager< G > Class Template Reference

Manage boundary ids of boundary segments in a grid. More...

#include <BoundaryManager.hpp>

Inherits BoundaryManagerBase.

Public Types

enum  { dim = Grid::dimension }
enum  { dow = Grid::dimensionworld }
using Grid = G
using Segment = typename Grid::LevelGridView::Intersection
using Domain = typename Grid::template Codim< 0 >::Geometry::GlobalCoordinate
template<class I >
using HasBoundaryId = decltype(std::declval< I >().boundaryId())

Public Member Functions

 BoundaryManager (std::shared_ptr< G > const &grid)
void setBoxBoundary (std::array< BoundaryType, 2 *dow > const &ids)
 Set boundary ids [left,right, front,back, bottom,top] for cube domains.
template<class Indicator , REQUIRES(Concepts::Functor< Indicator, int(Domain)>) >
void setIndicator (Indicator const &indicator)
 Set indicator(center) for all boundary intersections.
template<class Predicate , REQUIRES(Concepts::Functor< Predicate, bool(Domain)>) >
void setPredicate (Predicate const &pred, BoundaryType id)
 Set id for all boundary intersections with pred(center) == true.
void setBoundaryId ()
 Set boundary ids as stored in the grid, e.g. read by grid reader.
template<class I >
void setBoundaryIds (std::vector< I > const &ids)
- Public Member Functions inherited from BoundaryManagerBase
 BoundaryManagerBase (std::size_t numBoundarySegments)
template<class Intersection >
BoundaryType boundaryId (Intersection const &intersection) const
 Return the stored boundary id for the given intersection.
std::vector< BoundaryType > const boundaryIds () const

Additional Inherited Members

- Protected Attributes inherited from BoundaryManagerBase
std::vector< BoundaryTypeboundaryIds_

Detailed Description

template<class G>
class AMDiS::BoundaryManager< G >

Manage boundary ids of boundary segments in a grid.

Manager for bounary IDs, that can be initialized from different sources

  • cube domains can be assigned box boundaries, by specifying left-right, front-back, and bottom-top ids
  • An indicator from global coodinates that returns an id. The indicator function is evaluated in the center points of intersections.
  • A predicate that return true/false for a boundary part and sets the given id
  • Read ids from the grid. Those may be initialized by some grid readers. Note: not all grids support intersection.boundaryId(), but e.g. AlbertaGrid and ALUGrid do support this. Can be read by DGF parser and AlbertaGrid constructor from macroFileName.

Constructor & Destructor Documentation

◆ BoundaryManager()

BoundaryManager ( std::shared_ptr< G > const &  grid)

Constructor. Stores a shared pointer to the grid and initializes all boundary IDs to the value stored in the grid

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