SpECTRE
v2022.05.05
|
Variable and flux vector splitting reconstruction schemes for finite difference methods. More...
Functions | |
template<size_t NonlinearWeightExponent, size_t Dim> | |
void | aoweno_53 (const gsl::not_null< std::array< gsl::span< double >, Dim > * > reconstructed_upper_side_of_face_vars, const gsl::not_null< std::array< gsl::span< double >, Dim > * > reconstructed_lower_side_of_face_vars, const gsl::span< const double > &volume_vars, const DirectionMap< Dim, gsl::span< const double > > &ghost_cell_vars, const Index< Dim > &volume_extents, const size_t number_of_variables, const double gamma_hi, const double gamma_lo, const double epsilon) |
Performs an adaptive order (AO) WENO reconstruction using a single 5th order stencil and a 3rd-order CWENO scheme. More... | |
template<size_t Dim> | |
std::tuple< void(*)(gsl::not_null< std::array< gsl::span< double >, Dim > * >, gsl::not_null< std::array< gsl::span< double >, Dim > * >, const gsl::span< const double > &, const DirectionMap< Dim, gsl::span< const double > > &, const Index< Dim > &, size_t, double, double, double), void(*)(gsl::not_null< DataVector * >, const DataVector &, const DataVector &, const Index< Dim > &, const Index< Dim > &, const Direction< Dim > &, const double &, const double &, const double &), void(*)(gsl::not_null< DataVector * >, const DataVector &, const DataVector &, const Index< Dim > &, const Index< Dim > &, const Direction< Dim > &, const double &, const double &, const double &)> | aoweno_53_function_pointers (size_t nonlinear_weight_exponent) |
Returns function pointers to the aoweno_53 function, lower neighbor reconstruction, and upper neighbor reconstruction. More... | |
template<size_t Dim> | |
void | minmod (const gsl::not_null< std::array< gsl::span< double >, Dim > * > reconstructed_upper_side_of_face_vars, const gsl::not_null< std::array< gsl::span< double >, Dim > * > reconstructed_lower_side_of_face_vars, const gsl::span< const double > &volume_vars, const DirectionMap< Dim, gsl::span< const double > > &ghost_cell_vars, const Index< Dim > &volume_extents, const size_t number_of_variables) |
Performs minmod reconstruction on the volume_vars in each direction. More... | |
template<size_t Dim> | |
void | monotised_central (const gsl::not_null< std::array< gsl::span< double >, Dim > * > reconstructed_upper_side_of_face_vars, const gsl::not_null< std::array< gsl::span< double >, Dim > * > reconstructed_lower_side_of_face_vars, const gsl::span< const double > &volume_vars, const DirectionMap< Dim, gsl::span< const double > > &ghost_cell_vars, const Index< Dim > &volume_extents, const size_t number_of_variables) |
Performs monotised central-difference reconstruction on the vars in each direction. More... | |
template<Side LowerOrUpperSide, typename Reconstructor , size_t Dim, typename... ArgsForReconstructor> | |
void | reconstruct_neighbor (gsl::not_null< DataVector * > face_data, const DataVector &volume_data, const DataVector &neighbor_data, const Index< Dim > &volume_extents, const Index< Dim > &ghost_data_extents, const Direction< Dim > &direction_to_reconstruct, const ArgsForReconstructor &... args_for_reconstructor) |
In a given direction, reconstruct the cells in the neighboring Element (or cluster of cells) nearest to the shared boundary between the current and neighboring Element (or cluster of cells). More... | |
template<size_t Degree, size_t Dim> | |
void | unlimited (const gsl::not_null< std::array< gsl::span< double >, Dim > * > reconstructed_upper_side_of_face_vars, const gsl::not_null< std::array< gsl::span< double >, Dim > * > reconstructed_lower_side_of_face_vars, const gsl::span< const double > &volume_vars, const DirectionMap< Dim, gsl::span< const double > > &ghost_cell_vars, const Index< Dim > &volume_extents, const size_t number_of_variables) |
Performs unlimited reconstruction on the vars in each direction. More... | |
Variable and flux vector splitting reconstruction schemes for finite difference methods.
Implementations of reconstruction methods must call the function fd::reconstruction::detail::reconstruct
to perform the reconstruction. This function performs the actual loops taking into account strides and ghost zones for the reconstruction method. The reconstruct
function has the following signature:
The type of reconstruction done is specified with the Reconstructor
explicit template parameter. Parameters for the reconstruction scheme, such as the linear weights and the epsilon tolerance in a CWENO reconstruction scheme, are forwarded along using the args_for_reconstruction
parameter pack.
Reconstructor
classes must define:
static constexpr size_t stencil_width()
function that returns the size of the stencil, e.g. 3 for minmod, and 5 for 5-point reconstruction.u
are the cell-centered values to reconstruct. The value \(u_i\) in the current FD cell is located at u[0]
, the value at neighbor cell \(u_{i+1}\) is at u[stride]
, and the value at neighbor cell \(u_{i-1}\) is at u[-stride]
. The returned values are the reconstructed solution on the lower and upper side of the cell.stride
parameter in the reconstruction schemes to make testing performance easier in the future.Here is an ASCII illustration of the names of various quantities and where in the cells they are:
Notice that the reconstructed_upper_side_of_face_vars
are actually on the lower side of the cells, while the reconstructed_lower_side_of_face_vars
are on the upper side of the cells. The upper
and lower
here refers to which side of the interface the quantity is on, not from the perspective of each cells.
std::tuple< void(*)(gsl::not_null< std::array< gsl::span< double >, Dim > * >, gsl::not_null< std::array< gsl::span< double >, Dim > * >, const gsl::span< const double > &, const DirectionMap< Dim, gsl::span< const double > > &, const Index< Dim > &, size_t, double, double, double), void(*)(gsl::not_null< DataVector * >, const DataVector &, const DataVector &, const Index< Dim > &, const Index< Dim > &, const Direction< Dim > &, const double &, const double &, const double &), void(*)(gsl::not_null< DataVector * >, const DataVector &, const DataVector &, const Index< Dim > &, const Index< Dim > &, const Direction< Dim > &, const double &, const double &, const double &)> fd::reconstruction::aoweno_53_function_pointers | ( | size_t | nonlinear_weight_exponent | ) |
Returns function pointers to the aoweno_53
function, lower neighbor reconstruction, and upper neighbor reconstruction.
This is useful for controlling template parameters like the NonlinearWeightExponent
from an input file by setting a function pointer. Note that the reason the reconstruction functions instead of say the pointwise
member function is returned is to avoid function pointers inside tight loops.