|
| template<int n_components, typename TensorType , typename Container > |
| TensorType | tvd_minmod (const Container &values) |
| |
| template<typename number , int n_components, typename TensorType , typename Container > |
| TensorType | tvb_minmod (const Container &values, const std::vector< number > &tvb_constant, const number cell_size) |
| |
| template<int dim, int n_components, typename number > |
| std::array< dealii::Tensor< 1, n_components, number >, dim > | compute_minmod_type_limited_slopes (const std::vector< std::pair< dealii::Tensor< 1, n_components, number >, dealii::Tensor< 1, n_components, dealii::Tensor< 1, dim, number > > > > &cell_average_values, const typename dealii::Triangulation< dim >::active_cell_iterator &cell, const LimiterData< number > &limiter_data) |
| |
| template<int dim, int n_components, typename number , typename VectorizedArrayType = dealii::VectorizedArray<number>, typename VectorType = dealii::LinearAlgebra::distributed::Vector<number>> |
| void | apply_minmod_type_limiter (const MatrixFreeContext< dim, number > &mf_context, VectorType &dst, const VectorType &src, const LimiterData< number > &limiter_data) |
| |
template<int dim, int n_components, typename number , typename VectorizedArrayType = dealii::VectorizedArray<number>, typename VectorType = dealii::LinearAlgebra::distributed::Vector<number>>
| void MeltPoolDG::Utilities::apply_minmod_type_limiter |
( |
const MatrixFreeContext< dim, number > & |
mf_context, |
|
|
VectorType & |
dst, |
|
|
const VectorType & |
src, |
|
|
const LimiterData< number > & |
limiter_data |
|
) |
| |
This function applies a minmod-type limiter to the solution vector in a cell-wise manner using the provided matrix-free context. It basically iterates over each cell to compute the limited solution based on the specified limiter type in the limiter data struct. For more details see Cockburn and Shu, "The Runge-Kutta Discontinuous Galerkin Method for
Conservation Laws V: Multidimensional Systems", Journal of Computational Physics, 141(2):199–224, 1998.
- Parameters
-
| mf_context | Context containing a reference to the matrix-free object and relevant indices for dofs and quadrature. |
| dst | The destination vector where the limited solution will be stored. |
| src | The source vector containing the current solution values to be limited. |
| limiter_data | Struct containing the limiter type and relevant parameters for the limiter. |
template<int dim, int n_components, typename number >
| std::array< dealii::Tensor< 1, n_components, number >, dim > MeltPoolDG::Utilities::compute_minmod_type_limited_slopes |
( |
const std::vector< std::pair< dealii::Tensor< 1, n_components, number >, dealii::Tensor< 1, n_components, dealii::Tensor< 1, dim, number > > > > & |
cell_average_values, |
|
|
const typename dealii::Triangulation< dim >::active_cell_iterator & |
cell, |
|
|
const LimiterData< number > & |
limiter_data |
|
) |
| |
This function computes the limited slopes for a given cell using a minmod-type limiter. It computes the finite difference slopes with respect to the cell averages of the current cell and its neighbors in all direction separately and passes them together with the average cell gradient to the appropriate minmod-type limiter function (TVD or TVB) based on the specified limiter type in the limiter data struct. The resulting limited slopes are returned as an array of tensors, where each tensor corresponds to a spatial direction.
- Parameters
-
| cell_average_values | A vector containing the cell average values for all cells in the domain. |
| cell | The active cell iterator for the current cell for which the limited slopes are being computed. |
| average_cell_gradient | The average cell gradient for the current cell, i.e. a linearized representation of the solution gradient in the cell. |
| limiter_data | Struct containing the limiter type and relevant parameters for the limiter. |
- Returns
- An array of tensors containing the limited slopes for each spatial direction.
template<typename number , int n_components, typename TensorType , typename Container >
| TensorType MeltPoolDG::Utilities::tvb_minmod |
( |
const Container & |
values, |
|
|
const std::vector< number > & |
tvb_constant, |
|
|
const number |
cell_size |
|
) |
| |
Computes the Total Variation Bounded (TVB) modified minmod of a container of tensors. The TVB minmod variant relaxes the strict TVD minmod criteria near smooth extrema to avoid unnecessary clipping of physical peaks. For each component, if the initial candidate slope (values[0]) is bounded by the threshold $M \cdot \Delta x^2$ (where $M$ is tvb_constant and $\Delta x$ is cell_size), the slope is considered smooth and left entirely unmodified. If it exceeds this threshold, the function falls back to the standard tvd_minmod routine for that component.
- Template Parameters
-
| number | The numeric type used int the computations. |
| n_components | The number of components in the solution vector which are being limited. |
| TensorType | The type of the tensor representing the solution values. This should be a dealii::Tensor type with the first template parameter equal to 1 and the second template parameter equal to n_components. |
| Container | The type of the container holding the values. This can be any standard container (e.g., std::vector, std::array, boost::container::small_vector) that supports iterating over it and contains elements of type TensorType. |
- Parameters
-
| values | The container of tensors to evaluate. The first element (values[0]) represents the current cell slope on the cell of interest. |
| tvb_constant | The tuning constant $M > 0$ determining the strictness of the bound. |
| cell_size | The characteristic mesh size of the local cell block, e.g. the mesh size in the direction of the slope being limited. |
- Returns
- A tensor containing the component-wise TVB limited slopes.