SpECTRE  v2024.04.12
LinearSolver::async_solvers::PrepareSolve< FieldsTag, OptionsGroup, SourceTag, Label, ArraySectionIdTag, ObserveInitialResidual > Struct Template Reference

Prepare the asynchronous linear solver for a solve. More...

#include <ElementActions.hpp>

Public Types

using const_global_cache_tags = tmpl::list< logging::Tags::Verbosity< OptionsGroup > >
 

Static Public Member Functions

template<typename DbTagsList , typename... InboxTags, typename Metavariables , typename ArrayIndex , typename ActionList , typename ParallelComponent >
static Parallel::iterable_action_return_t apply (db::DataBox< DbTagsList > &box, const tuples::TaggedTuple< InboxTags... > &, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &array_index, const ActionList, const ParallelComponent *const)
 

Detailed Description

template<typename FieldsTag, typename OptionsGroup, typename SourceTag, typename Label = OptionsGroup, typename ArraySectionIdTag = void, bool ObserveInitialResidual = true>
struct LinearSolver::async_solvers::PrepareSolve< FieldsTag, OptionsGroup, SourceTag, Label, ArraySectionIdTag, ObserveInitialResidual >

Prepare the asynchronous linear solver for a solve.

This action resets the asynchronous linear solver to its initial state, and optionally observes the initial residual. If the initial residual should be observed, both the SourceTag as well as the db::add_tag_prefix<LinearSolver::Tags::OperatorAppliedTo, FieldsTag> must be up-to-date at the time this action is invoked.

This action also provides an anchor point in the action list for looping the linear solver, in the sense that the algorithm jumps back to the action immediately following this one when a step is complete and the solver hasn't yet converged (see LinearSolver::async_solvers::CompleteStep).

Template Parameters
FieldsTagThe data x in the linear equation Ax = b to be solved. Should hold the initial guess x_0 at this point in the algorithm.
OptionsGroupAn options group identifying the linear solver
SourceTagThe data b in Ax = b
LabelAn optional compile-time label for the solver to distinguish different solves with the same solver in the action list
ArraySectionIdTagObserve the residual norm separately for each array section identified by this tag (see Parallel::Section). Set to void to observe the residual norm over all elements of the array (default). The section only affects observations of residuals and has no effect on the solver algorithm.
ObserveInitialResidualWhether or not to observe the initial residual b - A x_0 (default: true). Disable when b or A x_0 are not yet available at the preparation stage.

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