|
Finite Volume Solver
prototype
A framework to build finite volume solvers for the AG Klein at the Freie Universität Berlin.
|
#include <MultiBlockIntegratorContext2.hpp>
Public Member Functions | |
| template<typename TubeEquation , typename PlenumEquation > | |
| MultiBlockIntegratorContext2 (const TubeEquation &tube_equation, const PlenumEquation &plenum_equation, std::vector< IntegratorContext > tubes, std::vector< cutcell::IntegratorContext > plena, std::vector< BlockConnection > connectivity) | |
| MultiBlockBoundary & | GetBoundaryCondition (int level) |
| Returns the current boundary condition for the specified level. More... | |
| MPI_Comm | GetMpiCommunicator () const noexcept |
| const std::shared_ptr< CounterRegistry > & | GetCounterRegistry () const noexcept |
| Returns a shared pointer to the counter registry. More... | |
Member Accessors | |
| span< IntegratorContext > | Tubes () noexcept |
| Returns the current time level for data at the specified refinement level and direction. More... | |
| span< const IntegratorContext > | Tubes () const noexcept |
| Returns the current time level for data at the specified refinement level and direction. More... | |
| span< cutcell::IntegratorContext > | Plena () noexcept |
| Returns the current time level for data at the specified refinement level and direction. More... | |
| span< const cutcell::IntegratorContext > | Plena () const noexcept |
| Returns the current time level for data at the specified refinement level and direction. More... | |
| const std::shared_ptr< MultiBlockGriddingAlgorithm2 > & | GetGriddingAlgorithm () const noexcept |
| Returns the current time level for data at the specified refinement level and direction. More... | |
| Duration | GetTimePoint (int level=0) const |
| Returns the current time level for data at the specified refinement level and direction. More... | |
| std::ptrdiff_t | GetCycles (int level=0) const |
| Returns the current number of cycles for data at the specified refinement level and direction. More... | |
Observers | |
| bool | LevelExists (int level) const noexcept |
| Returns true if the data exists for the specified level number. More... | |
| int | GetRatioToCoarserLevel (int level, Direction dir) const noexcept |
| Returns the refinement ratio in the specified direction. More... | |
| ::amrex::IntVect | GetRatioToCoarserLevel (int level) const noexcept |
| Returns the refinement ratio for all directions. More... | |
Modifiers | |
| void | CopyDataToScratch (int level) |
| Replaces the underlying gridding algorithm with the specified one. More... | |
| void | CopyScratchToData (int level) |
| Replaces the underlying gridding algorithm with the specified one. More... | |
| void | ResetHierarchyConfiguration (std::shared_ptr< MultiBlockGriddingAlgorithm2 > gridding) |
| Replaces the underlying gridding algorithm with the specified one. More... | |
| void | ResetHierarchyConfiguration (int level=0) |
| Whenever the gridding algorithm changes the data hierarchy this function will regrid all distributed helper variables managed by the context. More... | |
| void | SetCycles (std::ptrdiff_t cycle, int level) |
| Sets the cycle count for a specific level number and direction. More... | |
| void | SetTimePoint (Duration t, int level) |
| Sets the time point for a specific level number and direction. More... | |
Member functions relevant for the level integrator algorithm. | |
| void | PreAdvanceHierarchy () |
| On each first subcycle this will regrid the data if neccessary. More... | |
| void | PostAdvanceHierarchy () |
| On each first subcycle this will regrid the data if neccessary. More... | |
| int | PreAdvanceLevel (int level_num, Duration dt, std::pair< int, int > subcycle) |
| On each first subcycle this will regrid the data if neccessary. More... | |
| 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. More... | |
| void | ApplyBoundaryCondition (int level, Direction dir) |
Applies the boundary condition for the scratch space on level level in direcition dir. More... | |
| void | FillGhostLayerTwoLevels (int level, int coarse) |
| Fills the ghost layer of the scratch data and interpolates in the coarse fine layer. More... | |
| void | FillGhostLayerSingleLevel (int level) |
| Fills the ghost layer of the scratch data and does nothing in the coarse fine layer. More... | |
| Duration | ComputeStableDt (int level, Direction dir) |
| Returns a estimate for a stable time step size which can be taken for specified level number in direction dir. More... | |
| void | ComputeNumericFluxes (int level, Duration dt, Direction dir) |
| Fill the flux MultiFab with numeric fluxes based on current states in scratch. More... | |
| void | UpdateConservatively (int level, Duration dt, Direction dir) |
| Apply a conservative time update for each conservative variable on the specified level number and direction. More... | |
| void | CompleteFromCons (int level, Duration dt) |
| Reconstruct complete state variables from conservative ones. More... | |
| void | AccumulateCoarseFineFluxes (int level, double time_scale, Direction dir) |
| Accumulate fluxes on the coarse fine interfaces for a specified fine level number. More... | |
| void | ApplyFluxCorrection (int fine, int coarse, Duration dt) |
| Replace the coarse fluxes by accumulated fine fluxes on the coarse fine interfaces. More... | |
| void | ResetCoarseFineFluxes (int fine, int coarse) |
| Resets all accumulates fluxes to zero. More... | |
| void | CoarsenConservatively (int fine, int coarse) |
| Coarsen scratch data from a fine level number to a coarse level number. More... | |
Private Attributes | |
| std::vector< IntegratorContext > | tubes_ |
| std::vector< cutcell::IntegratorContext > | plena_ |
| std::shared_ptr< MultiBlockGriddingAlgorithm2 > | gridding_ |
| fub::amrex::MultiBlockIntegratorContext2::MultiBlockIntegratorContext2 | ( | const TubeEquation & | tube_equation, |
| const PlenumEquation & | plenum_equation, | ||
| std::vector< IntegratorContext > | tubes, | ||
| std::vector< cutcell::IntegratorContext > | plena, | ||
| std::vector< BlockConnection > | connectivity | ||
| ) |
| void fub::amrex::MultiBlockIntegratorContext2::AccumulateCoarseFineFluxes | ( | int | level, |
| double | time_scale, | ||
| Direction | dir | ||
| ) |
Accumulate fluxes on the coarse fine interfaces for a specified fine level number.
| void fub::amrex::MultiBlockIntegratorContext2::ApplyBoundaryCondition | ( | int | level, |
| Direction | dir | ||
| ) |
Applies the boundary condition for the scratch space on level level in direcition dir.
| level | The refinement level on which the boundary condition shall be used. |
| void fub::amrex::MultiBlockIntegratorContext2::ApplyFluxCorrection | ( | int | fine, |
| int | coarse, | ||
| Duration | dt | ||
| ) |
Replace the coarse fluxes by accumulated fine fluxes on the coarse fine interfaces.
| void fub::amrex::MultiBlockIntegratorContext2::CoarsenConservatively | ( | int | fine, |
| int | coarse | ||
| ) |
Coarsen scratch data from a fine level number to a coarse level number.
| void fub::amrex::MultiBlockIntegratorContext2::CompleteFromCons | ( | int | level, |
| Duration | dt | ||
| ) |
Reconstruct complete state variables from conservative ones.
| void fub::amrex::MultiBlockIntegratorContext2::ComputeNumericFluxes | ( | int | level, |
| Duration | dt, | ||
| Direction | dir | ||
| ) |
Fill the flux MultiFab with numeric fluxes based on current states in scratch.
Returns a estimate for a stable time step size which can be taken for specified level number in direction dir.
| void fub::amrex::MultiBlockIntegratorContext2::CopyDataToScratch | ( | int | level | ) |
Replaces the underlying gridding algorithm with the specified one.
| void fub::amrex::MultiBlockIntegratorContext2::CopyScratchToData | ( | int | level | ) |
Replaces the underlying gridding algorithm with the specified one.
| void fub::amrex::MultiBlockIntegratorContext2::FillGhostLayerSingleLevel | ( | int | level | ) |
Fills the ghost layer of the scratch data and does nothing in the coarse fine layer.
| void fub::amrex::MultiBlockIntegratorContext2::FillGhostLayerTwoLevels | ( | int | level, |
| int | coarse | ||
| ) |
Fills the ghost layer of the scratch data and interpolates in the coarse fine layer.
| MultiBlockBoundary& fub::amrex::MultiBlockIntegratorContext2::GetBoundaryCondition | ( | int | level | ) |
Returns the current boundary condition for the specified level.
|
noexcept |
Returns a shared pointer to the counter registry.
| std::ptrdiff_t fub::amrex::MultiBlockIntegratorContext2::GetCycles | ( | int | level = 0 | ) | const |
Returns the current number of cycles for data at the specified refinement level and direction.
|
noexcept |
Returns the current time level for data at the specified refinement level and direction.
|
noexcept |
|
noexcept |
Returns the refinement ratio for all directions.
|
noexcept |
Returns the refinement ratio in the specified direction.
| Duration fub::amrex::MultiBlockIntegratorContext2::GetTimePoint | ( | int | level = 0 | ) | const |
Returns the current time level for data at the specified refinement level and direction.
|
noexcept |
Returns true if the data exists for the specified level number.
|
noexcept |
Returns the current time level for data at the specified refinement level and direction.
|
noexcept |
Returns the current time level for data at the specified refinement level and direction.
| void fub::amrex::MultiBlockIntegratorContext2::PostAdvanceHierarchy | ( | ) |
On each first subcycle this will regrid the data if neccessary.
| Result<void, TimeStepTooLarge> fub::amrex::MultiBlockIntegratorContext2::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.
| void fub::amrex::MultiBlockIntegratorContext2::PreAdvanceHierarchy | ( | ) |
On each first subcycle this will regrid the data if neccessary.
| int fub::amrex::MultiBlockIntegratorContext2::PreAdvanceLevel | ( | int | level_num, |
| Duration | dt, | ||
| std::pair< int, int > | subcycle | ||
| ) |
On each first subcycle this will regrid the data if neccessary.
| void fub::amrex::MultiBlockIntegratorContext2::ResetCoarseFineFluxes | ( | int | fine, |
| int | coarse | ||
| ) |
Resets all accumulates fluxes to zero.
| void fub::amrex::MultiBlockIntegratorContext2::ResetHierarchyConfiguration | ( | int | level = 0 | ) |
Whenever the gridding algorithm changes the data hierarchy this function will regrid all distributed helper variables managed by the context.
| [in] | level | The level number of the coarsest level which changed its shape. Regrid all levels finer than level. |
| void fub::amrex::MultiBlockIntegratorContext2::ResetHierarchyConfiguration | ( | std::shared_ptr< MultiBlockGriddingAlgorithm2 > | gridding | ) |
Replaces the underlying gridding algorithm with the specified one.
| void fub::amrex::MultiBlockIntegratorContext2::SetCycles | ( | std::ptrdiff_t | cycle, |
| int | level | ||
| ) |
Sets the cycle count for a specific level number and direction.
| void fub::amrex::MultiBlockIntegratorContext2::SetTimePoint | ( | Duration | t, |
| int | level | ||
| ) |
Sets the time point for a specific level number and direction.
|
noexcept |
Returns the current time level for data at the specified refinement level and direction.
|
noexcept |
Returns the current time level for data at the specified refinement level and direction.
| void fub::amrex::MultiBlockIntegratorContext2::UpdateConservatively | ( | int | level, |
| Duration | dt, | ||
| Direction | dir | ||
| ) |
Apply a conservative time update for each conservative variable on the specified level number and direction.
|
private |
|
private |
|
private |