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

Complete a step of the asynchronous linear solver. 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, 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::CompleteStep< FieldsTag, OptionsGroup, SourceTag, Label, ArraySectionIdTag, ObserveInitialResidual >

Complete a step of the asynchronous linear solver.

This action prepares the next step of the asynchronous linear solver, and observes the residual. To observe the correct residual, make sure the db::add_tag_prefix<LinearSolver::Tags::OperatorAppliedTo, FieldsTag> is up-to-date at the time this action is invoked.

This action checks if the algorithm has converged, i.e. it has completed the requested number of steps. If it hasn't, the algorithm jumps back to the action immediately following the LinearSolver::async_solvers::PrepareSolve to perform another iteration. Make sure both actions use the same template parameters.

Template Parameters
FieldsTagThe data x in the linear equation Ax = b to be solved.
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. This parameter should match the one passed to PrepareSolve.

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