SpECTRE
v2025.03.17
|
Prepare the asynchronous linear solver for a solve. More...
#include <ElementActions.hpp>
Public Types | |
using | const_global_cache_tags = implementation defined |
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) |
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
).
FieldsTag | The data x in the linear equation Ax = b to be solved. Should hold the initial guess x_0 at this point in the algorithm. |
OptionsGroup | An options group identifying the linear solver |
SourceTag | The data b in Ax = b |
Label | An optional compile-time label for the solver to distinguish different solves with the same solver in the action list |
ArraySectionIdTag | Observe 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. |
ObserveInitialResidual | Whether 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. |