SpECTRE  v2021.12.06
elliptic::Actions::InitializeAnalyticSolution< AnalyticSolutionTag, AnalyticSolutionFields > Struct Template Reference

Place the analytic solution of the system fields in the DataBox. More...

#include <InitializeAnalyticSolution.hpp>

Public Types

using simple_tags = tmpl::list< analytic_fields_tag >
using compute_tags = tmpl::list<>

Static Public Member Functions

template<typename DbTagsList , typename... InboxTags, typename Metavariables , size_t Dim, typename ActionList , typename ParallelComponent >
static std::tuple< db::DataBox< DbTagsList > && > apply (db::DataBox< DbTagsList > &box, const tuples::TaggedTuple< InboxTags... > &, const Parallel::GlobalCache< Metavariables > &, const ElementId< Dim > &, const ActionList, const ParallelComponent *const)

Detailed Description

template<typename AnalyticSolutionTag, typename AnalyticSolutionFields>
struct elliptic::Actions::InitializeAnalyticSolution< AnalyticSolutionTag, AnalyticSolutionFields >

Place the analytic solution of the system fields in the DataBox.

Use InitializeAnalyticSolution if it is clear at compile-time that an analytic solution is available, and InitializeOptionalAnalyticSolution if that is a runtime decision, e.g. based on a choice in the input file. The Tags::AnalyticSolutionsBase tag can be retrieved from the DataBox in either case, but it will hold a std::optional when InitializeOptionalAnalyticSolution is used. In that case, the analytic solution is only evaluated and stored in the DataBox if the BackgroundTag holds a type that inherits from the AnalyticSolutionType.


  • DataBox:
    • AnalyticSolutionTag or BackgroundTag
    • Tags::Coordinates<Dim, Frame::Inertial>


This action relies on the SetupDataBox aggregated initialization mechanism, so Actions::SetupDataBox must be present in the Initialization phase action list prior to this action.

The documentation for this struct was generated from the following file: