21 #ifndef FUB_AMREX_MultiBlock_INTEGRATOR_CONTEXT_HPP
22 #define FUB_AMREX_MultiBlock_INTEGRATOR_CONTEXT_HPP
38 std::vector<IntegratorContext> tubes,
39 std::vector<cutcell::IntegratorContext> plena,
40 std::vector<BlockConnection> connectivity);
44 std::vector<cutcell::IntegratorContext> plena,
45 std::vector<BlockConnection> connectivity,
46 std::vector<std::shared_ptr<PressureValve>> valves);
65 [[nodiscard]] std::ptrdiff_t
GetCycles(
int level = 0) const;
74 [[nodiscard]] const std::shared_ptr<CounterRegistry>&
128 std::pair<
int,
int> subcycle);
A class mimicking the IdealGasMix / Reactor / ReactorNet interface of Cantera, but with FlameMaster c...
Definition: FlameMasterReactor.hpp:159
This class is used by the HypebrolicSplitLevelIntegrator and delegates AMR related tasks to the AMReX...
Definition: AMReX/IntegratorContext.hpp:49
Definition: MultiBlockBoundary.hpp:64
Definition: MultiBlockGriddingAlgorithm.hpp:39
Definition: MultiBlockIntegratorContext.hpp:35
void ComputeNumericFluxes(int level, Duration dt, Direction dir)
Fill the flux MultiFab with numeric fluxes based on current states in scratch.
void ApplyFluxCorrection(int fine, int coarse, Duration dt)
Replace the coarse fluxes by accumulated fine fluxes on the coarse fine interfaces.
void ApplyBoundaryCondition(int level, Direction dir)
Applies the boundary condition for the scratch space on level level in direcition dir.
void FillGhostLayerSingleLevel(int level)
Fills the ghost layer of the scratch data and does nothing in the coarse fine layer.
Duration ComputeStableDt(int level, Direction dir)
Returns a estimate for a stable time step size which can be taken for specified level number in direc...
MPI_Comm GetMpiCommunicator() const noexcept
void PreAdvanceHierarchy()
On each first subcycle this will regrid the data if neccessary.
span< IntegratorContext > Tubes() noexcept
Returns the current time level for data at the specified refinement level and direction.
std::vector< cutcell::IntegratorContext > plena_
Definition: MultiBlockIntegratorContext.hpp:178
Duration GetTimePoint(int level=0) const
Returns the current time level for data at the specified refinement level and direction.
std::ptrdiff_t GetCycles(int level=0) const
Returns the current number of cycles for data at the specified refinement level and direction.
void CopyDataToScratch(int level)
Replaces the underlying gridding algorithm with the specified one.
void PostAdvanceHierarchy()
On each first subcycle this will regrid the data if neccessary.
bool LevelExists(int level) const noexcept
Returns true if the data exists for the specified level number.
void SetTimePoint(Duration t, int level)
Sets the time point for a specific level number and direction.
const std::shared_ptr< MultiBlockGriddingAlgorithm > & GetGriddingAlgorithm() const noexcept
Returns the current time level for data at the specified refinement level and direction.
void CopyScratchToData(int level)
Replaces the underlying gridding algorithm with the specified one.
MultiBlockBoundary & GetBoundaryCondition(int level)
Returns the current boundary condition for the specified level.
void SetCycles(std::ptrdiff_t cycle, int level)
Sets the cycle count for a specific level number and direction.
std::vector< IntegratorContext > tubes_
Definition: MultiBlockIntegratorContext.hpp:177
int GetRatioToCoarserLevel(int level, Direction dir) const noexcept
Returns the refinement ratio in the specified direction.
void AccumulateCoarseFineFluxes(int level, double time_scale, Direction dir)
Accumulate fluxes on the coarse fine interfaces for a specified fine level number.
void ResetHierarchyConfiguration(std::shared_ptr< MultiBlockGriddingAlgorithm > gridding)
Replaces the underlying gridding algorithm with the specified one.
Result< void, TimeStepTooLarge > PostAdvanceLevel(int level_num, Duration dt, std::pair< int, int > subcycle)
Increases the internal time stamps and cycle counters for the specified level number and direction.
std::shared_ptr< MultiBlockGriddingAlgorithm > gridding_
Definition: MultiBlockIntegratorContext.hpp:179
const std::shared_ptr< CounterRegistry > & GetCounterRegistry() const noexcept
Returns a shared pointer to the counter registry.
void CoarsenConservatively(int fine, int coarse)
Coarsen scratch data from a fine level number to a coarse level number.
MultiBlockIntegratorContext(FlameMasterReactor reactor, std::vector< IntegratorContext > tubes, std::vector< cutcell::IntegratorContext > plena, std::vector< BlockConnection > connectivity, std::vector< std::shared_ptr< PressureValve >> valves)
void UpdateConservatively(int level, Duration dt, Direction dir)
Apply a conservative time update for each conservative variable on the specified level number and dir...
int PreAdvanceLevel(int level_num, Duration dt, std::pair< int, int > subcycle)
On each first subcycle this will regrid the data if neccessary.
void ResetCoarseFineFluxes(int fine, int coarse)
Resets all accumulates fluxes to zero.
void CompleteFromCons(int level, Duration dt)
Reconstruct complete state variables from conservative ones.
span< cutcell::IntegratorContext > Plena() noexcept
Returns the current time level for data at the specified refinement level and direction.
MultiBlockIntegratorContext(FlameMasterReactor reactor, std::vector< IntegratorContext > tubes, std::vector< cutcell::IntegratorContext > plena, std::vector< BlockConnection > connectivity)
void FillGhostLayerTwoLevels(int level, int coarse)
Fills the ghost layer of the scratch data and interpolates in the coarse fine layer.
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 amrex namespace.
Definition: AverageState.hpp:33
std::chrono::duration< double > Duration
Definition: Duration.hpp:31
Direction
This is a type safe type to denote a dimensional split direction.
Definition: Direction.hpp:30
boost::outcome_v2::result< T, E > Result
Definition: outcome.hpp:32