TciStatus.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <cstddef>
7 #include <deque>
8 
10 #include "Evolution/DgSubcell/ActiveGrid.hpp"
11 
12 /// \cond
13 class DataVector;
14 template <size_t Dim>
15 class Mesh;
16 namespace gsl {
17 template <typename T>
18 class not_null;
19 } // namespace gsl
20 /// \endcond
21 
22 namespace evolution::dg::subcell {
23 /// @{
24 /// Set `status` to `1` if the cell is marked as needing subcell, otherwise set
25 /// `status` to `0`. `status` has grid points on the currently active mesh.
26 ///
27 /// \note It is possible to encounter a `status` of `0`, indicating a smooth
28 /// solution, even though the active mesh is the subcell mesh. This can occur
29 /// when using a multistep time integration method like Adams Bashforth, where
30 /// the FD/FV scheme is used as long as _any_ of the timestepper history is
31 /// flagged for FD/FV subcell evolution. An example of this would be just after
32 /// a shock leaves the cell: the solution is now smooth (`status` takes value
33 /// `0`), but the multistep method continues to take FD timesteps (`status` is
34 /// defined on the subcell mesh) until the entire history is flagged as smooth.
35 /// Thus, `tci_history.front()` (which corresponds to the most recent TCI
36 /// status) is used to set the status when using multistep time integrators,
37 /// while the `active_grid` is used when using other time steppers.
38 template <size_t Dim>
40  const Mesh<Dim>& dg_mesh, const Mesh<Dim>& subcell_mesh,
41  subcell::ActiveGrid active_grid,
42  const std::deque<subcell::ActiveGrid>& tci_history) noexcept;
43 
44 template <size_t Dim>
46  const Mesh<Dim>& dg_mesh, const Mesh<Dim>& subcell_mesh,
47  subcell::ActiveGrid active_grid,
48  const std::deque<subcell::ActiveGrid>& tci_history) noexcept;
49 /// @}
50 } // namespace evolution::dg::subcell
evolution::dg::subcell::ActiveGrid
ActiveGrid
Definition: ActiveGrid.hpp:11
cstddef
deque
DataVector
Stores a collection of function values.
Definition: DataVector.hpp:46
Mesh
Holds the number of grid points, basis, and quadrature in each direction of the computational grid.
Definition: Mesh.hpp:49
evolution::dg::subcell
Implementation of a generic finite volume/conservative finite difference subcell limiter.
Definition: Actions.hpp:6
Scalar
Tensor< T, Symmetry<>, index_list<> > Scalar
Definition: TypeAliases.hpp:21
TypeAliases.hpp
evolution::dg::subcell::tci_status
void tci_status(gsl::not_null< Scalar< DataVector > * > status, const Mesh< Dim > &dg_mesh, const Mesh< Dim > &subcell_mesh, subcell::ActiveGrid active_grid, const std::deque< subcell::ActiveGrid > &tci_history) noexcept
Set status to 1 if the cell is marked as needing subcell, otherwise set status to 0....
gsl
Implementations from the Guideline Support Library.
Definition: ReadSpecPiecewisePolynomial.hpp:11
gsl::not_null
Require a pointer to not be a nullptr
Definition: ReadSpecPiecewisePolynomial.hpp:13