|
SpECTRE
2021.08.02
|
Initialize the subcell grid, and switch from DG to subcell if the DG solution is inadmissible. More...
#include <Initialize.hpp>
Public Types | |
| using | const_global_cache_tags = tmpl::list< Tags::SubcellOptions > |
| using | simple_tags = tmpl::list< Tags::Mesh< Dim >, Tags::ActiveGrid, Tags::DidRollback, Tags::Inactive< typename System::variables_tag >, Tags::TciGridHistory, Tags::NeighborDataForReconstructionAndRdmpTci< Dim >, fd::Tags::InverseJacobianLogicalToGrid< Dim >, fd::Tags::DetInverseJacobianLogicalToGrid > |
| using | compute_tags = tmpl::list< Tags::LogicalCoordinatesCompute< Dim >, ::domain::Tags::MappedCoordinates< ::domain::Tags::ElementMap< Dim, Frame::Grid >, subcell::Tags::Coordinates< Dim, Frame::Logical >, subcell::Tags::Coordinates >, Tags::TciStatusCompute< Dim > > |
Static Public Member Functions | |
| template<typename DbTagsList , typename... InboxTags, typename ArrayIndex , typename ActionList , typename ParallelComponent , typename Metavariables > | |
| static std::tuple< db::DataBox< DbTagsList > && > | apply (db::DataBox< DbTagsList > &box, const tuples::TaggedTuple< InboxTags... > &inboxes, const Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &array_index, ActionList, const ParallelComponent *const) noexcept |
Initialize the subcell grid, and switch from DG to subcell if the DG solution is inadmissible.
Interior cells are marked as troubled if subcell_options.always_use_subcells() is true or if Metavariables::SubcellOptions::DgInitialDataTci::apply reports that the initial data is not well represented on the DG grid for that cell. Exterior cells are never marked as troubled, because subcell doesn't yet support boundary conditions.
If the cell is troubled then Tags::ActiveGrid is set to subcell::ActiveGrid::Subcell, the System::variables_tag become the variables on the subcell grid set by calling evolution::Initialization::Actions::SetVariables, Tags::Inactive<System::variables_tag> become the (inadmissible) DG solution, and the db::add_tag_prefix<Tags::dt, System::variables_tag> are resized to the subcell grid with an ASSERT requiring that they were previously set to the size of the DG grid (this is to reduce the likelihood of them being resized back to the DG grid later).
Metavariables::SubcellOptions::DgInitialDataTci::apply is called with the evolved variables on the DG grid, the projected evolved variables, the DG mesh, the initial RDMP parameters \(\delta_0\) and \(\epsilon\), and the Persson TCI parameter \(\alpha\). The apply function must return a bool that is true if the cell is troubled.
GlobalCache:
DataBox:
domain::Tags::Mesh<Dim>domain::Tags::Element<Dim>System::variables_tagsubcell::Tags::Mesh<Dim>subcell::Tags::ActiveGridsubcell::Tags::DidRollbacksubcell::Tags::Inactive<System::variables_tag>subcell::Tags::TciGridHistorysubcell::Tags::NeighborDataForReconstructionAndRdmpTci<Dim>subcell::fd::Tags::InverseJacobianLogicalToGrid<Dim>subcell::fd::Tags::DetInverseJacobianLogicalToGridsubcell::Tags::LogicalCoordinates<Dim>subcell::Tags::Corodinates<Dim, Frame::Grid> (as compute tag)subcell::Tags::TciStatusCompute<Dim>System::variables_tag if the cell is troubledTags::dt<System::variables_tag> if the cell is troubled