Finite Volume Solver  prototype
A framework to build finite volume solvers for the AG Klein at the Freie Universität Berlin.
Classes | Typedefs | Functions
fub::samrai Namespace Reference

Classes

struct  CoordinatesRange
 
struct  HierarchyOptions
 
struct  CartesianPatchCoordinates
 
class  CompleteFromConsCalculation
 
class  FluxMethodAdapter
 This is a wrapper class which dispatches a given base method object and dispatches SAMRAI typed patches. More...
 
class  GriddingAlgorithm
 
struct  HyperbolicTimeIntegrator
 
class  IntegratorContext
 This class is used by the HypebrolicSplitLevelIntegrator and delegates AMR related tasks to the AMReX library. More...
 
struct  PatchHierarchyOptions
 
struct  CoordinateRange
 
class  PatchHierarchy
 
struct  DataDescription
 
struct  ScopeGuard
 Initialises and finalizes the required SAMRAI routines for an application. More...
 
class  ConstantBox
 
class  GradientDetector
 

Typedefs

using AnyBoundaryCondition = ::fub::AnyBoundaryCondition< GriddingAlgorithm >
 
using AnyInitialData = ::fub::AnyInitialData< GriddingAlgorithm >
 
using AnyTaggingMethod = ::fub::AnyTaggingMethod< GriddingAlgorithm >
 
using HyperbolicMethod = ::fub::HyperbolicMethod< IntegratorContext >
 

Functions

std::shared_ptr< SAMRAI::hier::PatchHierarchy > CartesianPatchHierarchy (const SAMRAI::hier::Box &box, const CoordinatesRange &x_up, const HierarchyOptions &options)
 
SAMRAI::geom::CartesianPatchGeometry * GetCartesianPatchGeometry (const SAMRAI::hier::Patch &patch)
 
CartesianCoordinates GetCartesianCoordinates (const SAMRAI::hier::Patch &patch)
 
SAMRAI::hier::ComponentSelector SelectComponents (const SAMRAI::hier::PatchDescriptor &desc)
 
SAMRAI::hier::ComponentSelector SelectComponents (span< const int > data_ids)
 
template<typename I , std::size_t Rank>
std::enable_if_t< std::is_integral_v< I >, std::shared_ptr< SAMRAI::geom::CartesianGridGeometry > > MakeCartesianGridGeometry (const std::array< I, Rank > &n_cells, const CoordinateRange< Rank > &coordinates)
 
template<typename... Is>
std::array< double, sizeof...(Is)> GetCellCenter (const SAMRAI::geom::CartesianGridGeometry &geom, Is... is)
 
template<typename Equation >
DataDescription RegisterVariables (const Equation &equation, std::string prefix=std::string())
 This function registers all neccessary variables and contexts with SAMRAI. More...
 
template<int Rank, typename T >
mdspan< T, Rank > MakeMdSpan (SAMRAI::pdat::ArrayData< T > &array)
 
template<int Rank, typename T >
mdspan< const T, Rank > MakeMdSpan (const SAMRAI::pdat::ArrayData< T > &array)
 
template<int Rank>
IndexBox< Rank > AsIndexBox (const SAMRAI::hier::Box &box)
 
template<int Rank, typename T >
PatchDataView< const T, Rank > MakePatchDataView (const SAMRAI::pdat::ArrayData< T > &array)
 
template<int Rank, typename T >
PatchDataView< T, Rank > MakePatchDataView (SAMRAI::pdat::ArrayData< T > &array)
 
template<typename PatchData >
std::enable_if_t< std::is_pointer_v< PatchData >, void > GetPatchData (span< PatchData > patch_datas, SAMRAI::hier::Patch &patch, span< const int > data_ids)
 
template<typename PatchData >
std::enable_if_t< std::is_pointer_v< PatchData >, void > GetPatchData (span< PatchData > patch_datas, const SAMRAI::hier::Patch &patch, span< const int > data_ids)
 
template<typename State >
BasicView< State > MakeView (span< SAMRAI::pdat::SideData< double > * > span, const typename State::Equation &, Direction dir)
 
template<typename State >
BasicView< State > MakeView (span< SAMRAI::pdat::CellData< double > * > span, const typename State::Equation &)
 
template<typename State >
BasicView< const State > MakeView (span< SAMRAI::pdat::CellData< double > const * > span, const typename State::Equation &)
 
template<typename State , typename Range >
View< State > MakeView (Range &&span, const typename State::Equation &equation, const IndexBox< State::Equation::Rank()> &box)
 
template<typename State , typename Range >
View< State > MakeView (Range &&span, const typename State::Equation &equation, Direction dir, const IndexBox< State::Equation::Rank()> &box)
 
int GetDirection (const SAMRAI::hier::IntVector &directions)
 
template<typename Eq , typename... Ps>
 GradientDetector (const Eq &eq, const std::pair< Ps, double > &... ps) -> GradientDetector< Eq, Ps... >
 

Typedef Documentation

◆ AnyBoundaryCondition

◆ AnyInitialData

◆ AnyTaggingMethod

◆ HyperbolicMethod

Function Documentation

◆ AsIndexBox()

template<int Rank>
IndexBox<Rank> fub::samrai::AsIndexBox ( const SAMRAI::hier::Box &  box)

◆ CartesianPatchHierarchy()

std::shared_ptr<SAMRAI::hier::PatchHierarchy> fub::samrai::CartesianPatchHierarchy ( const SAMRAI::hier::Box &  box,
const CoordinatesRange x_up,
const HierarchyOptions options 
)

◆ GetCartesianCoordinates()

CartesianCoordinates fub::samrai::GetCartesianCoordinates ( const SAMRAI::hier::Patch &  patch)

◆ GetCartesianPatchGeometry()

SAMRAI::geom::CartesianPatchGeometry* fub::samrai::GetCartesianPatchGeometry ( const SAMRAI::hier::Patch &  patch)

◆ GetCellCenter()

template<typename... Is>
std::array<double, sizeof...(Is)> fub::samrai::GetCellCenter ( const SAMRAI::geom::CartesianGridGeometry &  geom,
Is...  is 
)

◆ GetDirection()

int fub::samrai::GetDirection ( const SAMRAI::hier::IntVector &  directions)

◆ GetPatchData() [1/2]

template<typename PatchData >
std::enable_if_t<std::is_pointer_v<PatchData>, void> fub::samrai::GetPatchData ( span< PatchData >  patch_datas,
const SAMRAI::hier::Patch &  patch,
span< const int >  data_ids 
)

◆ GetPatchData() [2/2]

template<typename PatchData >
std::enable_if_t<std::is_pointer_v<PatchData>, void> fub::samrai::GetPatchData ( span< PatchData >  patch_datas,
SAMRAI::hier::Patch &  patch,
span< const int >  data_ids 
)

◆ GradientDetector()

template<typename Eq , typename... Ps>
fub::samrai::GradientDetector ( const Eq &  eq,
const std::pair< Ps, double > &...  ps 
) -> GradientDetector< Eq, Ps... >

◆ MakeCartesianGridGeometry()

template<typename I , std::size_t Rank>
std::enable_if_t<std::is_integral_v<I>, std::shared_ptr<SAMRAI::geom::CartesianGridGeometry> > fub::samrai::MakeCartesianGridGeometry ( const std::array< I, Rank > &  n_cells,
const CoordinateRange< Rank > &  coordinates 
)

◆ MakeMdSpan() [1/2]

template<int Rank, typename T >
mdspan<const T, Rank> fub::samrai::MakeMdSpan ( const SAMRAI::pdat::ArrayData< T > &  array)

◆ MakeMdSpan() [2/2]

template<int Rank, typename T >
mdspan<T, Rank> fub::samrai::MakeMdSpan ( SAMRAI::pdat::ArrayData< T > &  array)

◆ MakePatchDataView() [1/2]

template<int Rank, typename T >
PatchDataView<const T, Rank> fub::samrai::MakePatchDataView ( const SAMRAI::pdat::ArrayData< T > &  array)

◆ MakePatchDataView() [2/2]

template<int Rank, typename T >
PatchDataView<T, Rank> fub::samrai::MakePatchDataView ( SAMRAI::pdat::ArrayData< T > &  array)

◆ MakeView() [1/5]

template<typename State , typename Range >
View<State> fub::samrai::MakeView ( Range &&  span,
const typename State::Equation &  equation,
const IndexBox< State::Equation::Rank()> &  box 
)

◆ MakeView() [2/5]

template<typename State , typename Range >
View<State> fub::samrai::MakeView ( Range &&  span,
const typename State::Equation &  equation,
Direction  dir,
const IndexBox< State::Equation::Rank()> &  box 
)

◆ MakeView() [3/5]

template<typename State >
BasicView<State> fub::samrai::MakeView ( span< SAMRAI::pdat::CellData< double > * >  span,
const typename State::Equation &   
)

◆ MakeView() [4/5]

template<typename State >
BasicView<const State> fub::samrai::MakeView ( span< SAMRAI::pdat::CellData< double > const * >  span,
const typename State::Equation &   
)

◆ MakeView() [5/5]

template<typename State >
BasicView<State> fub::samrai::MakeView ( span< SAMRAI::pdat::SideData< double > * >  span,
const typename State::Equation &  ,
Direction  dir 
)

◆ RegisterVariables()

template<typename Equation >
DataDescription fub::samrai::RegisterVariables ( const Equation &  equation,
std::string  prefix = std::string() 
)

This function registers all neccessary variables and contexts with SAMRAI.

The returned DataDescription shall be passed to solver classes.

Note
It is currently assumed, that state and scratch variables are cell centered and flux and coarse_fine_interfaces are face centered.
Parameters
[in]equationThe equation describes shape and size for each variable.
[in]prefixAn optional prefix which will be prepend to all variable names.
Returns
Returns the patch data ids for all registered variables.

◆ SelectComponents() [1/2]

SAMRAI::hier::ComponentSelector fub::samrai::SelectComponents ( const SAMRAI::hier::PatchDescriptor &  desc)

◆ SelectComponents() [2/2]

SAMRAI::hier::ComponentSelector fub::samrai::SelectComponents ( span< const int >  data_ids)