SpECTRE  v2025.03.17
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
elliptic::Solver< Metavariables, Dim, System > Struct Template Reference

A complete nonlinear elliptic solver stack. Use to compose an executable. More...

#include <Solver.hpp>

Classes

struct  RandomizeInitialGuess
 

Public Types

using system = System
 
using background_tag = elliptic::Tags::Background< elliptic::analytic_data::Background >
 
using initial_guess_tag = elliptic::Tags::InitialGuess< elliptic::analytic_data::InitialGuess >
 
using fields_tag = ::Tags::Variables< typename system::primal_fields >
 These are the fields we solve for.
 
using fluxes_tag = ::Tags::Variables< typename system::primal_fluxes >
 These are the fluxes corresponding to the fields, i.e. essentially their first derivatives. These are background fields for the linearized sources.
 
using fixed_sources_tag = db::add_tag_prefix<::Tags::FixedSource, fields_tag >
 These are the fixed sources, i.e. the RHS of the equations.
 
using operator_applied_to_fields_tag = implementation defined
 
using amr_iteration_id = Convergence::Tags::IterationId<::amr::OptionTags::AmrGroup >
 
using nonlinear_solver = NonlinearSolver::newton_raphson::NewtonRaphson< Metavariables, fields_tag, OptionTags::NewtonRaphsonGroup, fixed_sources_tag, LinearSolver::multigrid::Tags::IsFinestGrid >
 The nonlinear solver algorithm.
 
using nonlinear_solver_iteration_id = Convergence::Tags::IterationId< typename nonlinear_solver::options_group >
 
using linear_solver = LinearSolver::gmres::Gmres< Metavariables, tmpl::conditional_t< is_linear, fields_tag, typename nonlinear_solver::linear_solver_fields_tag >, OptionTags::GmresGroup, true, tmpl::conditional_t< is_linear, fixed_sources_tag, typename nonlinear_solver::linear_solver_source_tag >, LinearSolver::multigrid::Tags::IsFinestGrid >
 The linear solver algorithm. We use GMRES since the operator is not necessarily symmetric. Using CG here would be an optimization for symmetric problems.
 
using linear_solver_iteration_id = Convergence::Tags::IterationId< typename linear_solver::options_group >
 
using multigrid = LinearSolver::multigrid::Multigrid< Metavariables, volume_dim, typename linear_solver::operand_tag, OptionTags::MultigridGroup, elliptic::dg::Tags::Massive, typename linear_solver::preconditioner_source_tag >
 Precondition each linear solver iteration with a multigrid V-cycle.
 
using subdomain_operator = elliptic::dg::subdomain_operator::SubdomainOperator< system, OptionTags::SchwarzSmootherGroup >
 Smooth each multigrid level with a number of Schwarz smoothing steps.
 
using subdomain_preconditioners = implementation defined
 
using schwarz_smoother = LinearSolver::Schwarz::Schwarz< typename multigrid::smooth_fields_tag, OptionTags::SchwarzSmootherGroup, subdomain_operator, subdomain_preconditioners, typename multigrid::smooth_source_tag, LinearSolver::multigrid::Tags::MultigridLevel >
 
using vars_tag = typename linear_solver::operand_tag
 For the GMRES linear solver we need to apply the DG operator to its internal "operand" in every iteration of the algorithm.
 
using operator_applied_to_vars_tag = db::add_tag_prefix< LinearSolver::Tags::OperatorAppliedTo, vars_tag >
 
using fluxes_vars_tag = db::add_tag_prefix< NonlinearSolver::Tags::Correction, fluxes_tag >
 The correction fluxes can be stored in an arbitrary tag. We don't need to access them anywhere, they're just a memory buffer for the linearized operator.
 
using observe_fields = implementation defined
 Fields that may be observed to monitor the state of the solver.
 
using observed_reduction_data_tags = observers::collect_reduction_data_tags< tmpl::flatten< tmpl::list< tmpl::conditional_t< is_linear, tmpl::list<>, nonlinear_solver >, linear_solver, multigrid, schwarz_smoother > > >
 Collect all reduction tags for observers.
 
template<bool Linearized>
using dg_operator = elliptic::dg::Actions::DgOperator< system, Linearized, tmpl::conditional_t< Linearized, linear_solver_iteration_id, nonlinear_solver_iteration_id >, tmpl::conditional_t< Linearized, vars_tag, fields_tag >, tmpl::conditional_t< Linearized, fluxes_vars_tag, fluxes_tag >, tmpl::conditional_t< Linearized, operator_applied_to_vars_tag, operator_applied_to_fields_tag > >
 
using build_matrix = LinearSolver::Actions::BuildMatrix< typename dg_operator< true >::temporal_id_tag, fields_tag, fixed_sources_tag, vars_tag, operator_applied_to_vars_tag, domain::Tags::Coordinates< volume_dim, Frame::Inertial >, LinearSolver::multigrid::Tags::IsFinestGrid >
 
using build_matrix_actions = typename build_matrix::template actions< typename dg_operator< true >::apply_actions >
 
using init_analytic_solution_action = elliptic::Actions::InitializeOptionalAnalyticSolution< volume_dim, background_tag, tmpl::append< typename system::primal_fields, typename system::primal_fluxes >, elliptic::analytic_data::AnalyticSolution >
 
using initialization_actions = implementation defined
 
using register_actions = implementation defined
 
template<typename Label >
using smooth_actions = typename schwarz_smoother::template solve< typename dg_operator< true >::apply_actions, Label >
 
using subdomain_init_tags = implementation defined
 
using communicated_overlap_tags = implementation defined
 This data needs to be communicated on subdomain overlap regions.
 
using init_subdomain_action = elliptic::dg::subdomain_operator::Actions::InitializeSubdomain< system, background_tag, typename schwarz_smoother::options_group, false >
 
template<typename StepActions >
using linear_solve_actions = typename linear_solver::template solve< tmpl::list< typename multigrid::template solve< typename dg_operator< true >::apply_actions, smooth_actions< LinearSolver::multigrid::VcycleDownLabel >, smooth_actions< LinearSolver::multigrid::VcycleUpLabel > >, ::LinearSolver::Actions::make_identity_if_skipped< multigrid, typename dg_operator< true >::apply_actions > >, StepActions >
 
template<typename StepActions >
using nonlinear_solve_actions = typename nonlinear_solver::template solve< typename dg_operator< false >::apply_actions, tmpl::list< LinearSolver::multigrid::Actions::ReceiveFieldsFromFinerGrid< volume_dim, tmpl::list< fields_tag, fluxes_tag >, typename multigrid::options_group >, LinearSolver::multigrid::Actions::SendFieldsToCoarserGrid< tmpl::list< fields_tag, fluxes_tag >, typename multigrid::options_group, void >, LinearSolver::Schwarz::Actions::SendOverlapFields< communicated_overlap_tags, typename schwarz_smoother::options_group, false, nonlinear_solver_iteration_id >, LinearSolver::Schwarz::Actions::ReceiveOverlapFields< volume_dim, communicated_overlap_tags, typename schwarz_smoother::options_group, false, nonlinear_solver_iteration_id >, LinearSolver::Schwarz::Actions::ResetSubdomainSolver< typename schwarz_smoother::options_group >, linear_solve_actions< tmpl::list<> > >, StepActions >
 
template<typename StepActions >
using solve_actions = implementation defined
 
template<typename Tag >
using overlaps_tag = LinearSolver::Schwarz::Tags::Overlaps< Tag, volume_dim, OptionTags::SchwarzSmootherGroup >
 
using amr_projectors = implementation defined
 
using component_list = implementation defined
 

Static Public Attributes

static constexpr size_t volume_dim = Dim
 
static constexpr bool is_linear
 

Detailed Description

template<typename Metavariables, size_t Dim, typename System>
struct elliptic::Solver< Metavariables, Dim, System >

A complete nonlinear elliptic solver stack. Use to compose an executable.

The elliptic solver stack is described in detail in .

Uses Metavariables to instantiate parallel components.

Member Data Documentation

◆ is_linear

template<typename Metavariables , size_t Dim, typename System >
constexpr bool elliptic::Solver< Metavariables, Dim, System >::is_linear
staticconstexpr
Initial value:
=
std::is_same_v<elliptic::get_sources_computer<system, true>,
typename system::sources_computer>

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