21 #ifndef FUB_SAMRAI_RECONSTRUCTION_HPP
22 #define FUB_SAMRAI_RECONSTRUCTION_HPP
35 static constexpr
int Rank = Equation::Rank();
41 const SAMRAI::hier::Patch& src_patch,
45 [[maybe_unused]]
Duration time_step_size);
51 template <
typename Tag,
typename Equation>
56 std::vector<SAMRAI::pdat::CellData<double>*> dest_data(dest_ids.
size());
58 std::vector<SAMRAI::pdat::CellData<double>*> src_data(src_ids.
size());
60 IndexBox<Rank> box = AsIndexBox<Rank>(dest_data[0]->getGhostBox());
62 MakeView<Complete<Equation>>(
span{dest_data}, equation, box);
64 MakeView<const Conservative<Equation>>(src_data, equation, box);
65 rec_.CompleteFromCons(Tag(), complete, conservative);
68 template <
typename Tag,
typename Equation>
71 [[maybe_unused]]
Duration time_step_size) {
72 SAMRAI::hier::PatchLevel& patch_level = context.
GetPatchLevel(level);
73 const int n_cons =
static_cast<int>(context.
GetFluxIds().size());
74 for (
const std::shared_ptr<SAMRAI::hier::Patch>& patch : patch_level) {
Definition: SAMRAI/CompleteFromCons.hpp:30
CompleteFromConsFn< Equation > rec_
Definition: SAMRAI/CompleteFromCons.hpp:48
void CompleteFromCons(SAMRAI::hier::Patch &dest_patch, span< const int > dest_ids, const SAMRAI::hier::Patch &src_patch, span< const int > src_ids)
Definition: SAMRAI/CompleteFromCons.hpp:52
CompleteFromConsCalculation(Tag, const Equation &eq)
Definition: SAMRAI/CompleteFromCons.hpp:37
static constexpr int Rank
Definition: SAMRAI/CompleteFromCons.hpp:35
Equation_ Equation
Definition: SAMRAI/CompleteFromCons.hpp:32
Tag ExecutionTag
Definition: SAMRAI/CompleteFromCons.hpp:33
This class is used by the HypebrolicSplitLevelIntegrator and delegates AMR related tasks to the AMReX...
Definition: SAMRAI/IntegratorContext.hpp:52
span< const int > GetScratchIds() const
Returns the MultiFab associated with level data on the specifed level number.
SAMRAI::hier::PatchLevel & GetPatchLevel(int level)
Returns the MultiFab associated with level data on the specifed level number.
span< const int > GetFluxIds() const
Returns the MultiFab associated with level data on the specifed level number.
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
constexpr index_type size() const noexcept
Returns the number of elements in the span.
Definition: span.hpp:392
void CompleteFromCons(Equation &&equation, Complete< std::decay_t< Equation >> &complete, const Conservative< std::decay_t< Equation >> &cons)
Definition: CompleteFromCons.hpp:42
Definition: CartesianPatchHierarchy.hpp:41
std::enable_if_t< std::is_pointer_v< PatchData >, void > GetPatchData(span< PatchData > patch_datas, SAMRAI::hier::Patch &patch, span< const int > data_ids)
Definition: ViewPatch.hpp:100
std::chrono::duration< double > Duration
Definition: Duration.hpp:31
Definition: State.hpp:403
Definition: CompleteFromCons.hpp:141
Definition: PatchDataView.hpp:56