28 #include <boost/mp11/algorithm.hpp> 
   29 #include <boost/mp11/tuple.hpp> 
   39 template <
typename Depths> 
struct Rank;
 
   44 template <std::size_t I, 
typename... Ts> constexpr 
auto ZipNested(Ts&&... ts) {
 
   45   return std::make_tuple(std::get<I>(ts)...);
 
   48 template <std::size_t... Is, 
typename... Ts>
 
   49 constexpr 
auto ZipHelper(std::index_sequence<Is...>, Ts&&... ts) {
 
   50   return std::make_tuple(ZipNested<Is>(std::forward<Ts>(ts)...)...);
 
   53 template <std::size_t I, 
typename... Ts>
 
   54 constexpr 
auto UnzipNested(
const std::tuple<Ts...>& ts) {
 
   55   return std::apply([](
const auto& t) { 
return std::get<I>(t); }, ts);
 
   58 template <std::size_t... Is, 
typename... Ts>
 
   59 constexpr 
auto UnzipHelper(std::index_sequence<Is...>,
 
   60                            const std::tuple<Ts...>& ts) {
 
   61   return std::make_tuple(UnzipNested<Is>(ts)...);
 
   65 template <
typename... Ts> constexpr 
auto Zip(Ts&&... ts) {
 
   67       std::decay_t<boost::mp11::mp_front<boost::mp11::mp_list<Ts...>>>;
 
   68   return detail::ZipHelper(
 
   70       std::forward<Ts>(ts)...);
 
   73 template <
typename... Ts>
 
   74 constexpr 
auto Unzip(
const std::tuple<Ts...>& zipped) {
 
   76       std::decay_t<boost::mp11::mp_front<boost::mp11::mp_list<Ts...>>>;
 
   77   return detail::UnzipHelper(
 
   81 template <std::
size_t I, 
typename State>
 
   82 constexpr decltype(
auto) 
get(State&& x) {
 
   84   constexpr 
auto& pointers_to_member = S::Traits::pointers_to_member;
 
   85   return x.*std::get<I>(pointers_to_member);
 
   88 template <
typename F, 
typename... Ts>
 
   90   constexpr 
auto pointers =
 
   92   const auto xs = std::make_tuple(std::addressof(states)...);
 
   93   boost::mp11::tuple_for_each(pointers, [&
function, &xs](
const auto& ps) {
 
   94     boost::mp11::tuple_apply(
 
   95         [&
function](
auto... ys) {
 
   96           function((*std::get<0>(ys)).*std::get<1>(ys)...);
 
  102 template <
typename T>
 
  104     : std::integral_constant<
 
  106           std::tuple_size_v<std::decay_t<decltype(T::Traits::names)>>> {};
 
  112 template <
int Depth> 
struct VectorDepth : std::integral_constant<int, Depth> {};
 
  118 template <
typename Depth>
 
  121 template <
typename Depths>
 
  128 template <
typename T, 
int W
idth> 
struct DepthToStateValueTypeImpl;
 
  131 template <> 
struct DepthToStateValueTypeImpl<
ScalarDepth, 1> {
 
  136 template <
int W
idth> 
struct DepthToStateValueTypeImpl<
ScalarDepth, Width> {
 
  141 template <
int Depth, 
int W
idth>
 
  142 struct DepthToStateValueTypeImpl<
VectorDepth<Depth>, Width> {
 
  147 template <
typename T>
 
  148 using DepthToStateValueType = 
typename DepthToStateValueTypeImpl<T, 1>::type;
 
  151 template <
typename T, 
typename Eq>
 
  154 template <
typename T, 
typename Eq> 
struct DepthsImpl {
 
  156   operator()(
const Eq&) 
const noexcept {
 
  162 template <
typename T> 
struct Type {
 
  167   template <
typename Eq, 
typename State>
 
  176       detail::DepthsImpl<State, Eq> default_depths;
 
  177       return default_depths(eq);
 
  187 template <
typename T>
 
  192 template <
typename Depths>
 
  194     boost::mp11::mp_transform<detail::DepthToStateValueType, Depths>;
 
  202   template <
typename Equation>
 
  208             [&](
auto&& ids, 
auto depth) {
 
  209               if constexpr (std::is_same_v<std::decay_t<decltype(depth)>,
 
  213                 ids = 
Array<double, 1, decltype(depth)::value>::Zero();
 
  221     ForEachVariable([](
auto&& that, 
auto&& other) { that += other; }, *
this,
 
  227     ForEachVariable([](
auto&& that, 
auto&& other) { that -= other; }, *
this,
 
  238 template <
typename Depths>
 
  244 template <
typename Equation>
 
  246     boost::mp11::mp_transform<detail::DepthToStateValueType,
 
  247                               typename Equation::ConservativeDepths>;
 
  266             [&](
double& id, ScalarDepth) { 
id = 0.0; },
 
  267             [&](
auto&& ids, 
auto depth) {
 
  268               if constexpr (std::is_same_v<std::decay_t<decltype(depth)>,
 
  270                 ids = Array<double, 1, Eigen::Dynamic>::Zero(1, depth);
 
  272                 ids = 
Array<double, 1, decltype(depth)::value>::Zero();
 
  280     ForEachVariable([](
auto&& that, 
auto&& other) { that += other; }, *
this,
 
  286 template <
typename Eq>
 
  289 template <
typename Eq>
 
  296 template <
typename Eq>
 
  298     : 
StateTraits<ScalarStateBase<typename Eq::PrimitiveDepths>> {};
 
  300 template <
typename Eq>
 
  307 template <
typename Eq>
 
  309     : 
StateTraits<ScalarStateBase<typename Eq::KineticStateDepths>> {};
 
  311 template <
typename Eq>
 
  318 template <
typename Eq>
 
  320     : 
StateTraits<ScalarStateBase<typename Eq::CharacteristicsDepths>> {};
 
  323   return boost::mp11::tuple_apply(
 
  324       [&x](
auto... pointer) { 
return std::make_tuple((x.*pointer)...); },
 
  328 template <
typename Equation>
 
  330     boost::mp11::mp_transform<detail::DepthToStateValueType,
 
  331                               typename Equation::CompleteDepths>;
 
  349             [&](
double& id, ScalarDepth) { 
id = 0.0; },
 
  350             [&](
auto&& ids, 
auto depth) {
 
  351               if constexpr (std::is_same_v<std::decay_t<decltype(depth)>,
 
  353                 ids = Array<double, 1, Eigen::Dynamic>::Zero(1, depth);
 
  355                 ids = 
Array<double, 1, decltype(depth)::value>::Zero();
 
  363     ForEachVariable([](
auto&& that, 
auto&& other) { that += other; }, *
this,
 
  369 template <
typename Eq>
 
  374 template <
typename Depth, 
typename T, 
int Rank, 
typename Layout>
 
  375 struct DepthToViewValueType {
 
  379 template <
typename T, 
int Rank, 
typename Layout>
 
  380 struct DepthToViewValueType<ScalarDepth, T, Rank, Layout> {
 
  381   using type = PatchDataView<T, Rank, Layout>;
 
  384 template <
typename State, 
typename Layout, 
int Rank> 
struct ViewBaseImpl {
 
  385   template <
typename Depth>
 
  386   using fn = 
typename DepthToViewValueType<Depth, double, Rank, Layout>::type;
 
  387   using type = boost::mp11::mp_transform<fn, meta::Depths<State>>;
 
  390 template <
typename State, 
typename Layout, 
int Rank>
 
  391 struct ViewBaseImpl<const State, Layout, Rank> {
 
  392   template <
typename Depth>
 
  394       typename DepthToViewValueType<Depth, const double, Rank, Layout>::type;
 
  395   using type = boost::mp11::mp_transform<fn, meta::Depths<State>>;
 
  399 template <
typename State, 
typename Layout, 
int Rank>
 
  400 using ViewBase = 
typename detail::ViewBaseImpl<State, Layout, Rank>::type;
 
  402 template <
typename S, 
typename L = layout_left, 
int R = S::Equation::Rank()>
 
  408       std::conditional_t<std::is_const<S>::value, 
const double, 
double>;
 
  410   using Depths = 
typename Equation::ConservativeDepths;
 
  413   static constexpr 
int rank() noexcept { 
return Rank; }
 
  423 template <
typename S, 
typename L, 
int R>
 
  426 template <
typename S, 
typename L, 
int R>
 
  429 template <
typename State, 
typename Layout, 
int Rank>
 
  437 template <
typename Eq>
 
  446 template <
typename Eq>
 
  455 template <
typename State, 
typename L, 
int R>
 
  457   using T = std::remove_const_t<State>;
 
  462     using Cons = std::conditional_t<std::is_const<State>::value,
 
  470 template <
typename State, 
int Rank = State::Equation::Rank()>
 
  473 template <
typename T> 
struct IsView : std::false_type {};
 
  475 template <
typename State, 
typename Layout, 
int Rank>
 
  478 template <
int N, 
typename State, 
typename Layout, 
int Rank>
 
  481   static_assert(N >= 0, 
"N has to be greater than 0!");
 
  482   return get<static_cast<std::size_t>(N)>(view).
Extents();
 
  485 template <
int N, 
typename State, 
typename Layout, 
int Rank>
 
  487   static_assert(N >= 0, 
"N has to be greater than 0!");
 
  488   return get<static_cast<std::size_t>(N)>(view).
Box();
 
  491 template <
int N, 
typename State, 
typename Layout, 
int Rank>
 
  492 typename Layout::template mapping<
 
  493     dynamic_extents<static_cast<std::size_t>(Rank)>>
 
  495   static_assert(N >= 0, 
"N has to be greater than 0!");
 
  496   return get<static_cast<std::size_t>(N)>(view).
Mapping();
 
  501 template <
typename State, 
typename Layout, 
int Rank, 
typename Eq>
 
  502 struct DepthsImpl<
BasicView<State, Layout, Rank>, Eq> {
 
  503   constexpr 
auto operator()(
const Eq& eq) 
const noexcept {
 
  504     DepthsImpl<std::remove_const_t<State>, Eq> depths{};
 
  509 template <
typename T> 
struct GetNumberOfComponentsImpl {
 
  510   int_constant<1> operator()(
double) 
const noexcept { 
return {}; }
 
  511   int_constant<1> operator()(
int) 
const noexcept { 
return {}; }
 
  513   template <std::
size_t N>
 
  514   int_constant<static_cast<int>(N)>
 
  515   operator()(
const std::array<int, N>&) 
const noexcept {
 
  519   template <
int N, 
int M, 
int O, 
int MR, 
int MC>
 
  521   operator()(
const Eigen::Array<double, N, M, O, MR, MC>&) 
const noexcept {
 
  525   template <
int M, 
int O, 
int MR, 
int MC>
 
  526   int operator()(
const Eigen::Array<double, Eigen::Dynamic, M, O, MR, MC>& x)
 
  528     return static_cast<int>(x.rows());
 
  531   int operator()(
const std::vector<int>& x) 
const noexcept {
 
  532     return static_cast<int>(x.size());
 
  536 template <
typename S, 
typename Layout, 
int Rank>
 
  537 struct GetNumberOfComponentsImpl<
BasicView<S, Layout, Rank>> {
 
  539   operator()(
const PatchDataView<double, Rank, Layout>&) 
const noexcept {
 
  543       const PatchDataView<double, Rank + 1, Layout>& pdv) 
const noexcept {
 
  544     return static_cast<int>(pdv.Extent(Rank));
 
  548 template <
typename T>
 
  549 static constexpr GetNumberOfComponentsImpl<T> GetNumberOfComponents{};
 
  551 template <
typename T> 
struct AtComponentImpl {
 
  552   template <
typename FP>
 
  553   std::enable_if_t<std::is_floating_point<remove_cvref_t<FP>>::value, FP>
 
  554   operator()(FP&& x, 
int) 
const noexcept {
 
  559   double& operator()(Eigen::Array<double, N, 1>& x, 
int n) 
const noexcept {
 
  564   const double& operator()(
const Eigen::Array<double, N, 1>& x,
 
  565                            int n) 
const noexcept {
 
  569   template <
int N, 
int M, 
int O, 
int MR, 
int MC>
 
  570   auto operator()(Eigen::Array<double, N, M, O, MR, MC>& x,
 
  571                   int n) 
const noexcept {
 
  575   template <
int N, 
int M, 
int O, 
int MR, 
int MC>
 
  576   auto operator()(
const Eigen::Array<double, N, M, O, MR, MC>& x,
 
  577                   int n) 
const noexcept {
 
  582 template <
typename S, 
typename Layout, 
int Rank>
 
  583 struct AtComponentImpl<
BasicView<S, Layout, Rank>> {
 
  586   const PatchDataView<ValueType, Rank, Layout>&
 
  587   operator()(
const PatchDataView<ValueType, Rank, Layout>& x,
 
  588              int) 
const noexcept {
 
  592   PatchDataView<ValueType, Rank, Layout>
 
  593   operator()(
const PatchDataView<ValueType, Rank + 1, Layout>& x,
 
  594              int n) 
const noexcept {
 
  595     constexpr std::size_t sRank = Rank;
 
  596     std::array<std::ptrdiff_t, sRank + 1> 
index{};
 
  598     std::array<std::ptrdiff_t, sRank> extents;
 
  599     for (std::size_t r = 0; r < sRank; ++r) {
 
  600       extents[r] = x.Extent(r);
 
  602     std::array<std::ptrdiff_t, sRank> strides;
 
  603     for (std::size_t r = 0; r < sRank; ++r) {
 
  604       strides[r] = x.Stride(r);
 
  606     std::array<std::ptrdiff_t, sRank> origin;
 
  607     std::copy_n(x.Origin().begin(), Rank, origin.begin());
 
  608     if constexpr (std::is_same_v<Layout, layout_stride>) {
 
  609       layout_stride::mapping<dynamic_extents<sRank>> mapping{
 
  610           dynamic_extents<sRank>(extents), strides};
 
  611       mdspan<ValueType, sRank, Layout> mds(&x.MdSpan()(
index), mapping);
 
  612       return PatchDataView<ValueType, Rank, Layout>(mds, origin);
 
  614       mdspan<ValueType, sRank, Layout> mds(&x.MdSpan()(
index), extents);
 
  615       return PatchDataView<ValueType, Rank, Layout>(mds, origin);
 
  620 template <
typename State> constexpr 
static AtComponentImpl<State> AtComponent{};
 
  623 template <
typename F, 
typename... Ts>
 
  626       [&](
auto&&... variables) {
 
  627         const auto vs = std::make_tuple(std::addressof(variables)...);
 
  629             remove_cvref_t<boost::mp11::mp_first<boost::mp11::mp_list<Ts...>>>;
 
  630         const int n_components =
 
  631             detail::GetNumberOfComponents<T>(*std::get<0>(vs));
 
  632         for (
int i = 0; i < n_components; ++i) {
 
  633           function(detail::AtComponent<remove_cvref_t<Ts>>(variables, i)...);
 
  636       std::forward<Ts>(states)...);
 
  639 template <
typename State, 
typename Layout, 
int Rank>
 
  641           const std::array<std::ptrdiff_t, State::Equation::Rank()>& 
index) {
 
  643       [&](
double& component,
 
  646         component = pdv(
index);
 
  651 template <
typename State, 
typename Layout, 
int Rank>
 
  653           const std::array<std::ptrdiff_t, State::Equation::Rank()>& 
index) {
 
  655       [&](
double& component, 
const auto& pdv) {
 
  657         component = pdv(
index);
 
  662 template <
typename Eq, 
typename Layout>
 
  665            const std::array<std::ptrdiff_t, Eq::Rank()>& 
index) {
 
  667       [&](
auto data, 
auto block) {
 
  674 template <
typename Eq, 
typename Layout>
 
  677            const std::array<std::ptrdiff_t, Eq::Rank()>& 
index) {
 
  679       [&](
auto data, 
auto block) {
 
  686 template <
Direction dir, 
typename T, 
typename L, 
int Rank,
 
  687           typename SliceSpecifier>
 
  695 template <
typename State, 
int Rank, 
typename Layout>
 
  697                          Direction dir, std::array<std::ptrdiff_t, 2> offsets) {
 
  701   using T = std::conditional_t<std::is_const_v<State>, 
const double, 
double>;
 
  706             dest = src.
Subview(shrinked_box);
 
  712                 shrinked_box, {src_box.
lower[Rank], src_box.
upper[Rank]});
 
  713             dest = src.
Subview(embed_shrinked_box);
 
  715       shrinked_view, view);
 
  716   return shrinked_view;
 
  720   bool any_nan = 
false;
 
  721   ForEachComponent([&any_nan](
double x) { any_nan |= std::isnan(x); }, state);
 
  726 template <
typename T, 
typename Depth> 
struct DepthToPointerType {
 
  727   using type = std::pair<T*, std::ptrdiff_t>;
 
  730 template <
typename T> 
struct DepthToPointerType<T, ScalarDepth> {
 
  734 template <
typename State> 
struct ViewPointerBaseImpl {
 
  735   template <
typename Depth>
 
  736   using fn = 
typename DepthToPointerType<double, Depth>::type;
 
  737   using type = boost::mp11::mp_transform<fn, meta::Depths<State>>;
 
  740 template <
typename State> 
struct ViewPointerBaseImpl<const State> {
 
  741   template <
typename Depth>
 
  742   using fn = 
typename DepthToPointerType<const double, Depth>::type;
 
  743   using type = boost::mp11::mp_transform<fn, meta::Depths<State>>;
 
  747 template <
typename State>
 
  754 template <
typename State>
 
  757 template <
typename State>
 
  760 template <
typename State>
 
  768 template <
typename State, 
typename Layout, 
int Rank>
 
  772       overloaded{[&](
double*& p, 
auto pdv) { p = pdv.Span().begin(); },
 
  773                  [&](
const double*& p, 
auto pdv) { p = pdv.Span().begin(); },
 
  774                  [&](
auto& p, 
auto pdv) {
 
  775                    p = std::pair{pdv.Span().begin(), pdv.Stride(Rank)};
 
  781 template <
typename State, 
typename Layout, 
int Rank>
 
  785       overloaded{[&](
double*& p, 
auto pdv) { p = pdv.Span().end(); },
 
  786                  [&](
const double*& p, 
auto pdv) { p = pdv.Span().end(); },
 
  787                  [&](
auto& p, 
auto pdv) {
 
  788                    p = std::pair{pdv.Span().end(), pdv.Stride(Rank)};
 
  794 template <
typename Eq>
 
  798       overloaded{[](
double& x, 
const double* p) { x = *p; },
 
  799                  [](
auto& xs, std::pair<const double*, std::ptrdiff_t> ps) {
 
  800                    const double* p = ps.first;
 
  801                    for (std::size_t i = 0; i < xs.size(); ++i) {
 
  809 template <
typename Eq>
 
  813       overloaded{[](
double& x, 
const double* p) { x = *p; },
 
  814                  [](
auto& xs, std::pair<const double*, std::ptrdiff_t> ps) {
 
  815                    const double* p = ps.first;
 
  816                    for (std::size_t i = 0; i < xs.size(); ++i) {
 
  824 template <
typename State>
 
  827                              [n](
const double*& ptr) { ptr += n; },
 
  828                              [n](
auto& ptr) { ptr.first += n; }},
 
  833 template <
typename T> 
struct DepthToIndexMappingTypeImpl;
 
  836 template <> 
struct DepthToIndexMappingTypeImpl<ScalarDepth> {
 
  841 template <
int Depth> 
struct DepthToIndexMappingTypeImpl<VectorDepth<Depth>> {
 
  842   using type = std::array<int, static_cast<std::size_t>(Depth)>;
 
  846 template <> 
struct DepthToIndexMappingTypeImpl<VectorDepth<
dynamic_extent>> {
 
  847   using type = std::vector<int>;
 
  850 template <
typename T>
 
  851 using DepthToIndexMappingType = 
typename DepthToIndexMappingTypeImpl<T>::type;
 
  854 template <
typename Equation>
 
  856     boost::mp11::mp_transform<detail::DepthToIndexMappingType,
 
  857                               typename Equation::CompleteDepths>;
 
  867             [&](
auto&& ids, 
auto depth) {
 
  868               if constexpr (std::is_same_v<std::decay_t<decltype(depth)>,
 
  872               std::iota(ids.begin(), ids.end(), counter);
 
  880 template <
typename Eq>
 
  883 template <
typename Equation>
 
  887       [&comp, &buffer](
auto&& var) {
 
  894 template <
typename Equation>
 
  898       [&comp, &buffer](
auto&& var) {
 
  905 template <
typename Equation>
 
  909       [&comp, buffer](
auto&& var) {
 
#define FUB_ASSERT(x)
Definition: assert.hpp:39
 
A span is a view over a contiguous sequence of objects, the storage of which is owned by some other o...
Definition: span.hpp:81
 
The fub namespace.
Definition: AnyBoundaryCondition.hpp:31
 
auto Shrink(const layout_left::mapping< Extent > &layout, Direction dir, std::ptrdiff_t n=1)
Definition: Equation.hpp:78
 
void CopyToBuffer(span< double > buffer, const Conservative< Equation > &state)
Definition: State.hpp:906
 
std::conditional_t< N==1||M==1, Eigen::Array< T, N, M >, Eigen::Array< T, N, M, Eigen::RowMajor > > Array
Definition: Eigen.hpp:50
 
typename remove_cvref< T >::type remove_cvref_t
Definition: type_traits.hpp:226
 
boost::mp11::mp_transform< detail::DepthToStateValueType, Depths > ScalarStateBase
Definition: State.hpp:194
 
void ForEachVariable(F function, Ts &&... states)
Definition: State.hpp:89
 
bool AnyNaN(const Complete< Equation > &state)
Definition: State.hpp:719
 
typename dynamic_extents_< make_index_sequence< Rank > >::type dynamic_extents
Definition: mdspan.hpp:725
 
make_integer_sequence< std::size_t, N > make_index_sequence
Definition: type_traits.hpp:173
 
typename nodeduce< T >::type nodeduce_t
Definition: type_traits.hpp:47
 
constexpr struct fub::DepthsFn Depths
 
void Load(State &state, const BasicView< const State, Layout, Rank > &view, const std::array< std::ptrdiff_t, State::Equation::Rank()> &index)
Definition: State.hpp:640
 
ViewPointer< State > Begin(const BasicView< State, Layout, Rank > &view)
Definition: State.hpp:769
 
constexpr auto Unzip(const std::tuple< Ts... > &zipped)
Definition: State.hpp:74
 
Layout::template mapping< dynamic_extents< static_cast< std::size_t >Rank)> > Mapping(const BasicView< State, Layout, Rank > &view)
Definition: State.hpp:494
 
void CopyFromBuffer(Complete< Equation > &state, span< const double > buffer)
Definition: State.hpp:884
 
typename detail::ViewPointerBaseImpl< State >::type ViewPointerBase
Definition: State.hpp:748
 
boost::mp11::mp_transform< detail::DepthToStateValueType, typename Equation::CompleteDepths > CompleteBase
Definition: State.hpp:331
 
Direction
This is a type safe type to denote a dimensional split direction.
Definition: Direction.hpp:30
 
ViewPointer(const ViewPointer< State > &) -> ViewPointer< State >
 
void Advance(ViewPointer< State > &pointer, std::ptrdiff_t n) noexcept
Definition: State.hpp:825
 
typename ToConcreteDepthImpl< Depth >::type ToConcreteDepth
Definition: State.hpp:119
 
constexpr auto Zip(Ts &&... ts)
Definition: State.hpp:65
 
const Conservative< Eq > & AsCons(const Conservative< Eq > &x)
Definition: State.hpp:438
 
typename detail::ViewBaseImpl< State, Layout, Rank >::type ViewBase
Definition: State.hpp:400
 
BasicView(const BasicView< S, L, R > &) -> BasicView< S, L, R >
 
static constexpr std::ptrdiff_t dynamic_extent
This is a magic value to denote runtime-known extents.
Definition: dynamic_extent.hpp:28
 
boost::mp11::mp_transform< ToConcreteDepth, Depths > ToConcreteDepths
Definition: State.hpp:122
 
bool Contains(const IndexBox< Rank > &b1, const IndexBox< Rank > &b2)
Definition: PatchDataView.hpp:73
 
constexpr decltype(auto) get(State &&x)
Definition: State.hpp:82
 
void Store(const BasicView< Conservative< Eq >, Layout, Eq::Rank()> &view, const Conservative< Eq > &state, const std::array< std::ptrdiff_t, Eq::Rank()> &index)
Definition: State.hpp:663
 
ViewPointer< State > End(const BasicView< State, Layout, Rank > &view)
Definition: State.hpp:782
 
dynamic_extents< static_cast< std::size_t >Rank)> Extents(const BasicView< State, Layout, Rank > &view)
Definition: State.hpp:480
 
boost::mp11::mp_transform< detail::DepthToIndexMappingType, typename Equation::CompleteDepths > IndexMappingBase
Definition: State.hpp:857
 
void ForEachComponent(F function, Ts &&... states)
Definition: State.hpp:624
 
auto StateToTuple(const State &x)
Definition: State.hpp:322
 
auto Slice(const BasicView< T, L, Rank > &view, SliceSpecifier slice)
Definition: State.hpp:688
 
IndexBox< Rank > Box(const BasicView< State, Layout, Rank > &view)
Definition: State.hpp:486
 
overloaded(Ts...) -> overloaded< Ts... >
 
boost::mp11::mp_transform< detail::DepthToStateValueType, typename Equation::ConservativeDepths > ConservativeBase
This type alias transforms state depths into a conservative state associated with a specified equatio...
Definition: State.hpp:247
 
std::ptrdiff_t index
Definition: type_traits.hpp:179
 
BasicView< const State, Layout, Rank > AsConst(const BasicView< State, Layout, Rank > &v)
Definition: State.hpp:431
 
Definition: State.hpp:403
 
typename State::Equation Equation
Definition: State.hpp:409
 
typename Equation::ConservativeDepths Depths
Definition: State.hpp:410
 
S State
Definition: State.hpp:404
 
static constexpr int Rank
Definition: State.hpp:406
 
BasicView & operator=(const ViewBase< S, L, R > &base)
Definition: State.hpp:418
 
static constexpr int rank() noexcept
Definition: State.hpp:413
 
L Layout
Definition: State.hpp:405
 
BasicView(const ViewBase< S, L, R > &base)
Definition: State.hpp:417
 
std::conditional_t< std::is_const< S >::value, const double, double > ValueType
Definition: State.hpp:408
 
Definition: State.hpp:312
 
This type has a constructor which takes an equation and might allocate any dynamically sized member v...
Definition: State.hpp:335
 
Eq Equation
Definition: State.hpp:336
 
Complete(const Equation &eq)
Definition: State.hpp:345
 
Complete(const CompleteBase< Eq > &x)
Definition: State.hpp:341
 
Complete & operator+=(const Complete &other)
Definition: State.hpp:362
 
Complete & operator=(const CompleteBase< Eq > &x)
Definition: State.hpp:342
 
double ValueType
Definition: State.hpp:337
 
This type has a constructor which takes an equation and might allocate any dynamically sized member v...
Definition: State.hpp:251
 
Eq Equation
Definition: State.hpp:252
 
Conservative & operator+=(const Conservative &other)
Definition: State.hpp:279
 
Conservative(const Equation &eq)
Definition: State.hpp:262
 
Conservative(const ConservativeBase< Eq > &x)
Definition: State.hpp:257
 
double ValueType
Definition: State.hpp:253
 
Conservative & operator=(const ConservativeBase< Eq > &x)
Definition: State.hpp:258
 
Definition: State.hpp:166
 
constexpr auto operator()(const Eq &eq, [[maybe_unused]] Type< State > state) const noexcept(is_nothrow_tag_invocable< DepthsFn, const Eq &, Type< State >>::value||!is_tag_invocable< DepthsFn, const Eq &, Type< State >>::value)
Definition: State.hpp:168
 
Definition: PatchDataView.hpp:56
 
Index< Rank > lower
Definition: PatchDataView.hpp:57
 
Index< Rank > upper
Definition: PatchDataView.hpp:59
 
Definition: State.hpp:859
 
IndexMapping(const Equation &equation)
Definition: State.hpp:861
 
Definition: State.hpp:473
 
Definition: State.hpp:301
 
Definition: State.hpp:106
 
Definition: PatchDataView.hpp:201
 
IndexBox< R > Box() const noexcept
Definition: PatchDataView.hpp:232
 
PatchDataView< T, R, layout_stride > Subview(const IndexBox< R > &box) const
Definition: PatchDataView.hpp:245
 
Definition: State.hpp:290
 
This type is used to tag scalar quantities.
Definition: State.hpp:109
 
Definition: State.hpp:196
 
ScalarState & operator+=(const Base &other)
Definition: State.hpp:220
 
ScalarState & operator*=(double lambda)
Definition: State.hpp:232
 
ScalarState(const Equation &eq)
Definition: State.hpp:203
 
ScalarStateBase< Depths > Base
Definition: State.hpp:198
 
ScalarState & operator-=(const Base &other)
Definition: State.hpp:226
 
Definition: State.hpp:755
 
int type
Definition: State.hpp:116
 
Definition: State.hpp:114
 
Depth type
Definition: State.hpp:114
 
Definition: State.hpp:162
 
T type
Definition: State.hpp:163
 
This type is used to tag quantities with a depth known at compile time.
Definition: State.hpp:112
 
Definition: State.hpp:750
 
This is std::true_type if Op<Args...> is a valid SFINAE expression.
Definition: type_traits.hpp:92
 
Definition: type_traits.hpp:339
 
Definition: type_traits.hpp:323
 
Definition: type_traits.hpp:291