|
| Minmod (MinmodType minmod_type, double tvb_constant, bool disable_for_debugging=false) |
| Constuct a Minmod slope limiter. More...
|
|
| Minmod (const Minmod &)=default |
|
Minmod & | operator= (const Minmod &)=default |
|
| Minmod (Minmod &&)=default |
|
Minmod & | operator= (Minmod &&)=default |
|
void | pup (PUP::er &p) |
|
void | package_data (gsl::not_null< PackagedData * > packaged_data, const typename Tags::type &... tensors, const Mesh< VolumeDim > &mesh, const std::array< double, VolumeDim > &element_size, const OrientationMap< VolumeDim > &orientation_map) const |
| Package data for sending to neighbor elements. More...
|
|
bool | operator() (const gsl::not_null< std::add_pointer_t< typename Tags::type > >... tensors, const Mesh< VolumeDim > &mesh, const Element< VolumeDim > &element, const tnsr::I< DataVector, VolumeDim, Frame::ElementLogical > &logical_coords, const std::array< double, VolumeDim > &element_size, const std::unordered_map< DirectionalId< VolumeDim >, PackagedData, boost::hash< DirectionalId< VolumeDim > > > &neighbor_data) const |
| Limits the solution on the element. More...
|
|
|
template<size_t LocalDim, typename LocalTagList > |
bool | operator== (const Minmod< LocalDim, LocalTagList > &lhs, const Minmod< LocalDim, LocalTagList > &rhs) |
|
◆ Minmod()
template<size_t VolumeDim, typename... Tags>
Limiters::Minmod< VolumeDim, tmpl::list< Tags... > >::Minmod |
( |
MinmodType |
minmod_type, |
|
|
double |
tvb_constant, |
|
|
bool |
disable_for_debugging = false |
|
) |
| |
|
explicit |
Constuct a Minmod slope limiter.
- Parameters
-
minmod_type | The type of Minmod slope limiter. |
tvb_constant | The value of the TVB constant. |
disable_for_debugging | Switch to turn the limiter off. |
◆ operator()()
template<size_t VolumeDim, typename... Tags>
bool Limiters::Minmod< VolumeDim, tmpl::list< Tags... > >::operator() |
( |
const gsl::not_null< std::add_pointer_t< typename Tags::type > >... |
tensors, |
|
|
const Mesh< VolumeDim > & |
mesh, |
|
|
const Element< VolumeDim > & |
element, |
|
|
const tnsr::I< DataVector, VolumeDim, Frame::ElementLogical > & |
logical_coords, |
|
|
const std::array< double, VolumeDim > & |
element_size, |
|
|
const std::unordered_map< DirectionalId< VolumeDim >, PackagedData, boost::hash< DirectionalId< VolumeDim > > > & |
neighbor_data |
|
) |
| const |
Limits the solution on the element.
For each component of each tensor, the limiter will (in general) linearize the data, then possibly reduce its slope, dimension-by-dimension, until it no longer looks oscillatory.
- Parameters
-
tensors | The tensors to be limited. |
mesh | The mesh on which the tensor values are measured. |
element | The element on which the tensors to limit live. |
logical_coords | The element logical coordinates of the mesh gridpoints. |
element_size | The size of the element, in the inertial coordinates. |
neighbor_data | The data from each neighbor. |
Returns: whether the limiter modified the solution or not.
- Note
- The return value is false if the limiter knows it has not modified the solution. True return values can indicate:
- The solution was limited to reduce the slope, whether by a large factor or by a factor only roundoff away from unity.
- The solution was linearized but not limited.
- The solution is identical to the input, if the input was a linear function on a higher-order mesh, so that the limiter cannot know that the linearization step did not actually modify the data. This is somewhat contrived and is unlikely to occur outside of code tests or test cases with very clean initial data.
◆ package_data()
template<size_t VolumeDim, typename... Tags>
void Limiters::Minmod< VolumeDim, tmpl::list< Tags... > >::package_data |
( |
gsl::not_null< PackagedData * > |
packaged_data, |
|
|
const typename Tags::type &... |
tensors, |
|
|
const Mesh< VolumeDim > & |
mesh, |
|
|
const std::array< double, VolumeDim > & |
element_size, |
|
|
const OrientationMap< VolumeDim > & |
orientation_map |
|
) |
| const |
Package data for sending to neighbor elements.
The following quantities are stored in PackagedData
and communicated between neighboring elements:
- the cell-averaged mean of each tensor component, and
- the size of the cell along each logical coordinate direction.
- Parameters
-
packaged_data | The data package to fill with this element's values. |
tensors | The tensors to be averaged and packaged. |
mesh | The mesh on which the tensor values are measured. |
element_size | The size of the element in inertial coordinates, along each dimension of logical coordinates. |
orientation_map | The orientation of the neighbor |
◆ help
template<size_t VolumeDim, typename... Tags>
Initial value:= {
"A minmod-based generalized slope limiter.\n"
"The different types of minmod are more or less aggressive in trying\n"
"to reduce slopes. The TVB correction allows the limiter to ignore\n"
"'small' slopes, and helps to avoid limiting of smooth extrema in the\n"
"solution.\n"}
The documentation for this class was generated from the following file:
- src/Evolution/DiscontinuousGalerkin/Limiters/Minmod.hpp