SpECTRE  v2023.01.13
elliptic::nonlinear_solver::Solver< Metavariables > Struct Template Reference

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

#include <NonlinearEllipticSolver.hpp>

Public Types

using system = typename Metavariables::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 = db::add_tag_prefix< NonlinearSolver::Tags::OperatorAppliedTo, fields_tag >
 
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, typename nonlinear_solver::linear_solver_fields_tag, OptionTags::GmresGroup, true, typename nonlinear_solver::linear_solver_source_tag, LinearSolver::multigrid::Tags::IsFinestGrid >
 The linear solver algorithm. We use GMRES since the operator is not necessarily to be 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< 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 = tmpl::list< elliptic::subdomain_preconditioners::Registrars::MinusLaplacian< volume_dim, OptionTags::SchwarzSmootherGroup > >
 
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 correction_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_correction_vars_tag = db::add_tag_prefix< LinearSolver::Tags::OperatorAppliedTo, correction_vars_tag >
 
using correction_fluxes_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 observed_reduction_data_tags = observers::collect_reduction_data_tags< tmpl::list< nonlinear_solver, linear_solver, multigrid, schwarz_smoother > >
 Collect all reduction tags for observers.
 
using initialization_actions = tmpl::list< elliptic::dg::Actions::InitializeDomain< volume_dim >, typename nonlinear_solver::initialize_element, typename linear_solver::initialize_element, typename multigrid::initialize_element, typename schwarz_smoother::initialize_element, elliptic::Actions::InitializeFields< system, initial_guess_tag >, elliptic::Actions::InitializeFixedSources< system, background_tag >, elliptic::Actions::InitializeOptionalAnalyticSolution< background_tag, tmpl::append< typename system::primal_fields, typename system::primal_fluxes >, elliptic::analytic_data::AnalyticSolution >, elliptic::dg::Actions::initialize_operator< system, background_tag >, elliptic::dg::subdomain_operator::Actions::InitializeSubdomain< system, background_tag, typename schwarz_smoother::options_group >, ::Initialization::Actions::AddComputeTags< tmpl::list< elliptic::Tags::BoundaryFieldsCompute< volume_dim, fields_tag >, elliptic::Tags::BoundaryFluxesCompute< volume_dim, fields_tag, fluxes_tag > > > >
 
using register_actions = tmpl::list< typename nonlinear_solver::register_element, typename multigrid::register_element, typename schwarz_smoother::register_element >
 
template<bool Linearized>
using build_operator_actions = elliptic::dg::Actions::apply_operator< system, Linearized, tmpl::conditional_t< Linearized, linear_solver_iteration_id, nonlinear_solver_iteration_id >, tmpl::conditional_t< Linearized, correction_vars_tag, fields_tag >, tmpl::conditional_t< Linearized, correction_fluxes_tag, fluxes_tag >, tmpl::conditional_t< Linearized, operator_applied_to_correction_vars_tag, operator_applied_to_fields_tag > >
 
template<typename Label >
using smooth_actions = typename schwarz_smoother::template solve< build_operator_actions< true >, Label >
 
using communicated_overlap_tags = tmpl::flatten< tmpl::list< fields_tag, fluxes_tag, domain::make_faces_tags< volume_dim, typename system::primal_fields >, domain::make_faces_tags< volume_dim, db::wrap_tags_in<::Tags::NormalDotFlux, typename system::primal_fields > > > >
 This data needs to be communicated on subdomain overlap regions.
 
template<typename StepActions >
using solve_actions = typename nonlinear_solver::template solve< build_operator_actions< false >, 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 >, LinearSolver::Schwarz::Actions::ReceiveOverlapFields< volume_dim, communicated_overlap_tags, typename schwarz_smoother::options_group >, LinearSolver::Schwarz::Actions::ResetSubdomainSolver< typename schwarz_smoother::options_group >, typename linear_solver::template solve< tmpl::list< typename multigrid::template solve< build_operator_actions< true >, smooth_actions< LinearSolver::multigrid::VcycleDownLabel >, smooth_actions< LinearSolver::multigrid::VcycleUpLabel > >, ::LinearSolver::Actions::make_identity_if_skipped< multigrid, build_operator_actions< true > > > > >, StepActions >
 
using component_list = tmpl::list< typename nonlinear_solver::component_list, typename linear_solver::component_list, typename multigrid::component_list, typename schwarz_smoother::component_list >
 

Static Public Attributes

static constexpr size_t volume_dim = Metavariables::volume_dim
 

Detailed Description

template<typename Metavariables>
struct elliptic::nonlinear_solver::Solver< Metavariables >

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

Uses Metavariables::volume_dim and Metavariables::system. Also uses Metavariables to instantiate parallel components.


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