SpECTRE  2021.08.02
Initialization

Actions and metafunctions used for initialization of parallel components. More...

Namespaces

namespace  Initialization::Tags
 Tags used during initialization of parallel components.
 
namespace  Initialization::Actions
 Available actions to be used in the initialization.
 

Classes

struct  elliptic::dg::Actions::InitializeDomain< Dim >
 Initialize items related to the basic structure of the element. More...
 
struct  Initialization::Actions::ConservativeSystem< System, EquationOfStateTag >
 Allocate variables needed for evolution of conservative systems. More...
 
struct  evolution::dg::Initialization::Domain< Dim, OverrideCubicFunctionsOfTime >
 Initialize items related to the basic structure of the element. More...
 
struct  Initialization::Actions::DiscontinuousGalerkin< Metavariables >
 Initialize items related to the discontinuous Galerkin method. More...
 
struct  Initialization::Actions::TimeAndTimeStep< Metavariables >
 Initialize items related to time, such as the time step. More...
 
struct  Initialization::Actions::TimeStepperHistory< Metavariables >
 Initialize time-stepper items. More...
 
struct  Initialization::Actions::GrTagsForHydro< System >
 Allocate and set general relativity quantities needed for evolution of some hydro systems. More...
 
struct  Initialization::Actions::Minmod< Dim >
 Allocate items for minmod limiter. More...
 
struct  Initialization::Actions::NonconservativeSystem< System >
 Allocate variables needed for evolution of nonconservative systems. More...
 
struct  evolution::Initialization::Actions::SetVariables< LogicalCoordinatesTag >
 Sets variables needed for evolution of hyperbolic systems. More...
 
struct  Initialization::subcell::GrTagsForHydro< System, Dim >
 Allocate and set general relativity quantities needed for evolution of hydro systems when using a DG-subcell hybrid scheme. More...
 
struct  ScalarWave::Actions::InitializeConstraints< Dim >
 Initialize items related to constraints of the ScalarWave system. More...
 
struct  Initialization::Actions::RemoveOptionsAndTerminatePhase
 

Functions

template<size_t VolumeDim>
Element< VolumeDim > domain::Initialization::create_initial_element (const ElementId< VolumeDim > &element_id, const Block< VolumeDim > &block, const std::vector< std::array< size_t, VolumeDim > > &initial_refinement_levels) noexcept
 Creates an initial element of a Block. More...
 
template<size_t Dim>
Mesh< Dim > domain::Initialization::create_initial_mesh (const std::vector< std::array< size_t, Dim > > &initial_extents, const ElementId< Dim > &element_id, Spectral::Quadrature quadrature, const OrientationMap< Dim > &orientation={}) noexcept
 Construct the initial Mesh of an Element. More...
 
template<typename AddingAction , typename SimpleTagsList , typename ComputeTagsList = tmpl::list<>, MergePolicy Policy = MergePolicy::Error, typename... SimpleTags, typename DbTagsList , typename... Args>
auto Initialization::merge_into_databox (db::DataBox< DbTagsList > &&box, Args &&... args) noexcept
 Add tags that are not yet in the DataBox. More...
 

Detailed Description

Actions and metafunctions used for initialization of parallel components.

Function Documentation

◆ create_initial_element()

template<size_t VolumeDim>
Element< VolumeDim > domain::Initialization::create_initial_element ( const ElementId< VolumeDim > &  element_id,
const Block< VolumeDim > &  block,
const std::vector< std::array< size_t, VolumeDim > > &  initial_refinement_levels 
)
noexcept

Creates an initial element of a Block.

Details

This function creates an element at the refinement level and position specified by the element_id within the block. It assumes that all elements in a given block have the same refinement level, given in initial_refinement_levels.

◆ create_initial_mesh()

template<size_t Dim>
Mesh< Dim > domain::Initialization::create_initial_mesh ( const std::vector< std::array< size_t, Dim > > &  initial_extents,
const ElementId< Dim > &  element_id,
Spectral::Quadrature  quadrature,
const OrientationMap< Dim > &  orientation = {} 
)
noexcept

Construct the initial Mesh of an Element.

Details

When constructing the Mesh of an Element, pass its id, and use the default argument for orientation. When constructing the mesh of a neighboring Element (when constructing mortars), pass the id and orientation of the neighbor.

Parameters
initial_extentsthe initial extents of each Block in the Domain
element_idid of an Element or its neighbor
quadraturethe quadrature rule/grid point distribution
orientationOrientationMap of (neighboring) element_id

◆ merge_into_databox()

template<typename AddingAction , typename SimpleTagsList , typename ComputeTagsList = tmpl::list<>, MergePolicy Policy = MergePolicy::Error, typename... SimpleTags, typename DbTagsList , typename... Args>
auto Initialization::merge_into_databox ( db::DataBox< DbTagsList > &&  box,
Args &&...  args 
)
noexcept

Add tags that are not yet in the DataBox.

How duplicate tags are handled depends on the MergePolicy passed. The default merge policy is to error if the simple tag being added does not have an equivalence operator and is being added again. MergePolicy::IgnoreIncomparable means that nothing is done if the simple tag being added does not have an equivalence operator. Tags that have an equivalence operator are check that the value being added and that is already in the DataBox are the same. If they aren't, an error occurs. Finally, MergePolicy::Overwrite means the current simple tag in the DataBox is overwritten with the new value passed in.

Compute tags that are not in the DataBox are added, ones that are in the DataBox already are ignored.