Finite Volume Solver  prototype
A framework to build finite volume solvers for the AG Klein at the Freie Universität Berlin.
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes | List of all members
fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction > Class Template Reference

#include <MyStabilisation.hpp>

Public Types

using Equation = EquationT
 
using Conservative = ::fub::Conservative< Equation >
 
using ConservativeArray = ::fub::ConservativeArray< Equation >
 
using Complete = ::fub::Complete< Equation >
 
using CompleteArray = ::fub::CompleteArray< Equation >
 
template<typename T >
using DataView = PatchDataView< T, Rank, layout_stride >
 

Public Member Functions

 MyCutCellMethod (const Equation &equation)
 Constructs a CutCell method from a given base flux method. More...
 
 MyCutCellMethod (const Equation &equation, const FluxMethod &flux_method)
 
double ComputeStableDt (const View< const Complete > &states, const CutCellData< Rank > &cutcell_data, double dx, Direction dir)
 
void ComputeRegularFluxes (const View< Conservative > &regular_fluxes, const View< const Complete > &states, const CutCellData< Rank > &cutcell_data, Duration dt, double dx, Direction dir)
 
void ComputeCutCellFluxes (const View< Conservative > &stabilised_fluxes, const View< Conservative > &shielded_left_fluxes, const View< Conservative > &shielded_right_fluxes, const View< Conservative > &doubly_shielded_fluxes, const View< Conservative > &regular_fluxes, const View< Conservative > &boundary_fluxes, const View< const Conservative > &gradient_x, const View< const Conservative > &gradient_y, const View< const Conservative > &gradient_z, const View< const Complete > &states, const CutCellData< Rank > &geom, Duration dt, const Eigen::Matrix< double, Rank, 1 > &dx, Direction dir)
 
void ComputeGradients (const View< Conservative > &gradient_x, const View< Conservative > &gradient_y, const View< Conservative > &gradient_z, const View< const Conservative > &states, const StridedDataView< const char, Rank > &flags, const CutCellData< Rank > &geom, const Coordinates< Rank > &dx)
 
double ComputeStableDt (const View< const Complete > &states, double dx, Direction dir)
 This function computes a time step size such that no signal will leave any cell covered by this view. More...
 
double ComputeStableDt (execution::SequentialTag, const View< const Complete > &states, double dx, Direction dir)
 
double ComputeStableDt (execution::SimdTag, const View< const Complete > &states, double dx, Direction dir)
 
double ComputeStableDt (execution::OpenMpTag, const View< const Complete > &states, double dx, Direction dir)
 
double ComputeStableDt (execution::OpenMpSimdTag, const View< const Complete > &states, double dx, Direction dir)
 
const BaseMethod & Base () const noexcept
 Returns the Implementation class which will be used to compute single fluxes. More...
 
BaseMethod & Base () noexcept
 Returns the Implementation class which will be used to compute single fluxes. More...
 
void ComputeNumericFluxes (const View< Conservative > &fluxes, const View< const Complete > &states, Duration dt, double dx, Direction dir)
 This function computes numerical fluxes. More...
 
void ComputeNumericFluxes (execution::SequentialTag, const View< Conservative > &fluxes, const View< const Complete > &states, Duration dt, double dx, Direction dir)
 This function computes numerical fluxes. More...
 
void ComputeNumericFluxes (execution::SimdTag, const View< Conservative > &fluxes, const View< const Complete > &states, Duration dt, double dx, Direction dir)
 This function computes numerical fluxes. More...
 
void ComputeNumericFluxes (execution::OpenMpTag, const View< Conservative > &fluxes, const View< const Complete > &states, Duration dt, double dx, Direction dir)
 This function computes numerical fluxes. More...
 
void ComputeNumericFluxes (execution::OpenMpSimdTag, const View< Conservative > &fluxes, const View< const Complete > &states, Duration dt, double dx, Direction dir)
 This function computes numerical fluxes. More...
 
double ComputeStableDt (const View< const Complete > &states, double dx, Direction dir)
 This function computes a time step size such that no signal will leave any cell covered by this view. More...
 
double ComputeStableDt (execution::SequentialTag, const View< const Complete > &states, double dx, Direction dir)
 This function computes a time step size such that no signal will leave any cell covered by this view. More...
 
double ComputeStableDt (execution::SimdTag, const View< const Complete > &states, double dx, Direction dir)
 This function computes a time step size such that no signal will leave any cell covered by this view. More...
 
double ComputeStableDt (execution::OpenMpTag, const View< const Complete > &states, double dx, Direction dir)
 This function computes a time step size such that no signal will leave any cell covered by this view. More...
 
double ComputeStableDt (execution::OpenMpSimdTag, const View< const Complete > &states, double dx, Direction dir)
 This function computes a time step size such that no signal will leave any cell covered by this view. More...
 

Static Public Member Functions

static constexpr int GetStencilWidth () noexcept
 Returns the stencil width of this flux method. More...
 
static constexpr int GetStencilSize () noexcept
 Returns the number of elements in a stencil of this flux method. More...
 

Public Attributes

std::array< Complete, StencilSizestencil_
 
Conservative numeric_flux_
 

Static Public Attributes

static constexpr int Rank
 
static constexpr std::size_t sRank
 
static constexpr int StencilWidth
 
static constexpr std::size_t StencilSize
 

Private Attributes

Equation equation_
 
HGridReconstruction h_grid_reconstruction_
 
std::array< Complete, 2 > h_grid_eb_
 
std::array< Conservative, 2 > h_grid_eb_gradients_
 
std::array< Complete, 2 > h_grid_singly_shielded_
 
std::array< Conservative, 2 > h_grid_singly_shielded_gradients_
 
std::array< Complete, 2 > h_grid_regular_
 
std::array< Conservative, 2 > h_grid_regular_gradients_
 
Conservative boundary_flux_
 
Conservative singly_shielded_flux_
 
Conservative regular_flux_
 
std::array< CompleteArray, StencilSizestencil_array_
 
ConservativeArray numeric_flux_array_
 

Member Typedef Documentation

◆ Complete

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
using fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::Complete = ::fub::Complete<Equation>

◆ CompleteArray

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
using fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::CompleteArray = ::fub::CompleteArray<Equation>

◆ Conservative

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
using fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::Conservative = ::fub::Conservative<Equation>

◆ ConservativeArray

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
using fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::ConservativeArray = ::fub::ConservativeArray<Equation>

◆ DataView

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
template<typename T >
using fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::DataView = PatchDataView<T, Rank, layout_stride>

◆ Equation

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
using fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::Equation = EquationT

Constructor & Destructor Documentation

◆ MyCutCellMethod() [1/2]

template<typename Equation , typename FluxMethod , typename HGridReconstruction >
fub::MyCutCellMethod< Equation, FluxMethod, HGridReconstruction >::MyCutCellMethod ( const Equation equation)
explicit

Constructs a CutCell method from a given base flux method.

This constructor uses a default constructed riemann problem solver.

◆ MyCutCellMethod() [2/2]

template<typename Equation , typename FluxMethod , typename HGridReconstruction >
fub::MyCutCellMethod< Equation, FluxMethod, HGridReconstruction >::MyCutCellMethod ( const Equation equation,
const FluxMethod flux_method 
)

Member Function Documentation

◆ Base() [1/2]

template<typename BaseMethod >
const BaseMethod& fub::FluxMethod< BaseMethod >::Base ( ) const
noexceptinherited

Returns the Implementation class which will be used to compute single fluxes.

◆ Base() [2/2]

template<typename BaseMethod >
BaseMethod& fub::FluxMethod< BaseMethod >::Base ( )
noexceptinherited

Returns the Implementation class which will be used to compute single fluxes.

◆ ComputeCutCellFluxes()

template<typename Equation , typename FluxMethod , typename HGridReconstruction >
void fub::MyCutCellMethod< Equation, FluxMethod, HGridReconstruction >::ComputeCutCellFluxes ( const View< Conservative > &  stabilised_fluxes,
const View< Conservative > &  shielded_left_fluxes,
const View< Conservative > &  shielded_right_fluxes,
const View< Conservative > &  doubly_shielded_fluxes,
const View< Conservative > &  regular_fluxes,
const View< Conservative > &  boundary_fluxes,
const View< const Conservative > &  gradient_x,
const View< const Conservative > &  gradient_y,
const View< const Conservative > &  gradient_z,
const View< const Complete > &  states,
const CutCellData< Rank > &  geom,
Duration  dt,
const Eigen::Matrix< double, Rank, 1 > &  dx,
Direction  dir 
)

◆ ComputeGradients()

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
void fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::ComputeGradients ( const View< Conservative > &  gradient_x,
const View< Conservative > &  gradient_y,
const View< Conservative > &  gradient_z,
const View< const Conservative > &  states,
const StridedDataView< const char, Rank > &  flags,
const CutCellData< Rank > &  geom,
const Coordinates< Rank > &  dx 
)
inline

◆ ComputeNumericFluxes() [1/5]

template<typename BaseMethod >
void fub::FluxMethod< BaseMethod >::ComputeNumericFluxes ( const View< Conservative > &  fluxes,
const View< const Complete > &  states,
Duration  dt,
double  dx,
Direction  dir 
)
inherited

This function computes numerical fluxes.

Parameters
[out]fluxesThe destination view where numeric fluxes will be stored at.
[in]statesA view over cell states which will be used to fill the stencil for this method.
[in]dirThe direction parameter specifies which directional flux method to use.
[in]dtThe time step size which will be used to compute the numerical flux.
[in]dxThe cell width size which will be used to compute the numerical flux.

◆ ComputeNumericFluxes() [2/5]

template<typename BaseMethod >
void fub::FluxMethod< BaseMethod >::ComputeNumericFluxes ( execution::OpenMpSimdTag  ,
const View< Conservative > &  fluxes,
const View< const Complete > &  states,
Duration  dt,
double  dx,
Direction  dir 
)
inherited

This function computes numerical fluxes.

Parameters
[out]fluxesThe destination view where numeric fluxes will be stored at.
[in]statesA view over cell states which will be used to fill the stencil for this method.
[in]dirThe direction parameter specifies which directional flux method to use.
[in]dtThe time step size which will be used to compute the numerical flux.
[in]dxThe cell width size which will be used to compute the numerical flux.

◆ ComputeNumericFluxes() [3/5]

template<typename BaseMethod >
void fub::FluxMethod< BaseMethod >::ComputeNumericFluxes ( execution::OpenMpTag  ,
const View< Conservative > &  fluxes,
const View< const Complete > &  states,
Duration  dt,
double  dx,
Direction  dir 
)
inherited

This function computes numerical fluxes.

Parameters
[out]fluxesThe destination view where numeric fluxes will be stored at.
[in]statesA view over cell states which will be used to fill the stencil for this method.
[in]dirThe direction parameter specifies which directional flux method to use.
[in]dtThe time step size which will be used to compute the numerical flux.
[in]dxThe cell width size which will be used to compute the numerical flux.

◆ ComputeNumericFluxes() [4/5]

template<typename BaseMethod >
void fub::FluxMethod< BaseMethod >::ComputeNumericFluxes ( execution::SequentialTag  ,
const View< Conservative > &  fluxes,
const View< const Complete > &  states,
Duration  dt,
double  dx,
Direction  dir 
)
inherited

This function computes numerical fluxes.

Parameters
[out]fluxesThe destination view where numeric fluxes will be stored at.
[in]statesA view over cell states which will be used to fill the stencil for this method.
[in]dirThe direction parameter specifies which directional flux method to use.
[in]dtThe time step size which will be used to compute the numerical flux.
[in]dxThe cell width size which will be used to compute the numerical flux.

◆ ComputeNumericFluxes() [5/5]

template<typename BaseMethod >
void fub::FluxMethod< BaseMethod >::ComputeNumericFluxes ( execution::SimdTag  ,
const View< Conservative > &  fluxes,
const View< const Complete > &  states,
Duration  dt,
double  dx,
Direction  dir 
)
inherited

This function computes numerical fluxes.

Parameters
[out]fluxesThe destination view where numeric fluxes will be stored at.
[in]statesA view over cell states which will be used to fill the stencil for this method.
[in]dirThe direction parameter specifies which directional flux method to use.
[in]dtThe time step size which will be used to compute the numerical flux.
[in]dxThe cell width size which will be used to compute the numerical flux.

◆ ComputeRegularFluxes()

template<typename Equation , typename FluxMethod , typename HGridReconstruction >
void fub::MyCutCellMethod< Equation, FluxMethod, HGridReconstruction >::ComputeRegularFluxes ( const View< Conservative > &  regular_fluxes,
const View< const Complete > &  states,
const CutCellData< Rank > &  cutcell_data,
Duration  dt,
double  dx,
Direction  dir 
)

◆ ComputeStableDt() [1/11]

template<typename Equation , typename FluxMethod , typename HGridReconstruction >
double fub::MyCutCellMethod< Equation, FluxMethod, HGridReconstruction >::ComputeStableDt ( const View< const Complete > &  states,
const CutCellData< Rank > &  geom,
double  dx,
Direction  dir 
)

in the reflection with their boundary state.

in the reflection with their boundary state.

◆ ComputeStableDt() [2/11]

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
double fub::FluxMethod< BaseMethod >::ComputeStableDt

This function computes a time step size such that no signal will leave any cell covered by this view.

Parameters
[in]statesA view over cell states which will be used to fill the stencil for this method.
[in]dirThe direction parameter specifies which directional flux method to use.
[in]dxThe cell width size which will be used to compute the numerical flux.

◆ ComputeStableDt() [3/11]

template<typename BaseMethod >
double fub::FluxMethod< BaseMethod >::ComputeStableDt ( const View< const Complete > &  states,
double  dx,
Direction  dir 
)
inherited

This function computes a time step size such that no signal will leave any cell covered by this view.

Parameters
[in]statesA view over cell states which will be used to fill the stencil for this method.
[in]dirThe direction parameter specifies which directional flux method to use.
[in]dxThe cell width size which will be used to compute the numerical flux.

◆ ComputeStableDt() [4/11]

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
double fub::FluxMethod< BaseMethod >::ComputeStableDt

◆ ComputeStableDt() [5/11]

template<typename BaseMethod >
double fub::FluxMethod< BaseMethod >::ComputeStableDt ( execution::OpenMpSimdTag  ,
const View< const Complete > &  states,
double  dx,
Direction  dir 
)
inherited

This function computes a time step size such that no signal will leave any cell covered by this view.

Parameters
[in]statesA view over cell states which will be used to fill the stencil for this method.
[in]dirThe direction parameter specifies which directional flux method to use.
[in]dxThe cell width size which will be used to compute the numerical flux.

◆ ComputeStableDt() [6/11]

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
double fub::FluxMethod< BaseMethod >::ComputeStableDt

◆ ComputeStableDt() [7/11]

template<typename BaseMethod >
double fub::FluxMethod< BaseMethod >::ComputeStableDt ( execution::OpenMpTag  ,
const View< const Complete > &  states,
double  dx,
Direction  dir 
)
inherited

This function computes a time step size such that no signal will leave any cell covered by this view.

Parameters
[in]statesA view over cell states which will be used to fill the stencil for this method.
[in]dirThe direction parameter specifies which directional flux method to use.
[in]dxThe cell width size which will be used to compute the numerical flux.

◆ ComputeStableDt() [8/11]

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
double fub::FluxMethod< BaseMethod >::ComputeStableDt

◆ ComputeStableDt() [9/11]

template<typename BaseMethod >
double fub::FluxMethod< BaseMethod >::ComputeStableDt ( execution::SequentialTag  ,
const View< const Complete > &  states,
double  dx,
Direction  dir 
)
inherited

This function computes a time step size such that no signal will leave any cell covered by this view.

Parameters
[in]statesA view over cell states which will be used to fill the stencil for this method.
[in]dirThe direction parameter specifies which directional flux method to use.
[in]dxThe cell width size which will be used to compute the numerical flux.

◆ ComputeStableDt() [10/11]

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
double fub::FluxMethod< BaseMethod >::ComputeStableDt

◆ ComputeStableDt() [11/11]

template<typename BaseMethod >
double fub::FluxMethod< BaseMethod >::ComputeStableDt ( execution::SimdTag  ,
const View< const Complete > &  states,
double  dx,
Direction  dir 
)
inherited

This function computes a time step size such that no signal will leave any cell covered by this view.

Parameters
[in]statesA view over cell states which will be used to fill the stencil for this method.
[in]dirThe direction parameter specifies which directional flux method to use.
[in]dxThe cell width size which will be used to compute the numerical flux.

◆ GetStencilSize()

template<typename BaseMethod >
constexpr int fub::FluxMethod< BaseMethod >::GetStencilSize
staticconstexprnoexceptinherited

Returns the number of elements in a stencil of this flux method.

◆ GetStencilWidth()

template<typename BaseMethod >
constexpr int fub::FluxMethod< BaseMethod >::GetStencilWidth
staticconstexprnoexceptinherited

Returns the stencil width of this flux method.

Member Data Documentation

◆ boundary_flux_

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
Conservative fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::boundary_flux_
private

◆ equation_

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
Equation fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::equation_
private

◆ h_grid_eb_

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
std::array<Complete, 2> fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::h_grid_eb_
private

◆ h_grid_eb_gradients_

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
std::array<Conservative, 2> fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::h_grid_eb_gradients_
private

◆ h_grid_reconstruction_

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
HGridReconstruction fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::h_grid_reconstruction_
private

◆ h_grid_regular_

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
std::array<Complete, 2> fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::h_grid_regular_
private

◆ h_grid_regular_gradients_

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
std::array<Conservative, 2> fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::h_grid_regular_gradients_
private

◆ h_grid_singly_shielded_

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
std::array<Complete, 2> fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::h_grid_singly_shielded_
private

◆ h_grid_singly_shielded_gradients_

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
std::array<Conservative, 2> fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::h_grid_singly_shielded_gradients_
private

◆ numeric_flux_

template<typename BaseMethod >
Conservative fub::FluxMethod< BaseMethod >::numeric_flux_
inherited

◆ numeric_flux_array_

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
ConservativeArray fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::numeric_flux_array_
private

◆ Rank

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
constexpr int fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::Rank
staticconstexpr

◆ regular_flux_

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
Conservative fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::regular_flux_
private

◆ singly_shielded_flux_

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
Conservative fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::singly_shielded_flux_
private

◆ sRank

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
constexpr std::size_t fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::sRank
staticconstexpr

◆ stencil_

template<typename BaseMethod >
std::array<Complete, StencilSize> fub::FluxMethod< BaseMethod >::stencil_
inherited

◆ stencil_array_

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
std::array<CompleteArray, StencilSize> fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::stencil_array_
private

◆ StencilSize

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
constexpr std::size_t fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::StencilSize
staticconstexpr

◆ StencilWidth

template<typename EquationT , typename FluxMethod , typename HGridReconstruction = ConservativeHGridReconstruction<EquationT>>
constexpr int fub::MyCutCellMethod< EquationT, FluxMethod, HGridReconstruction >::StencilWidth
staticconstexpr

The documentation for this class was generated from the following file: