SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
LinearSolver::Richardson::Richardson< FieldsTag, OptionsGroup, SourceTag, ArraySectionIdTag > Struct Template Reference

A simple Richardson scheme for solving a system of linear equations \(Ax=b\). More...

#include <Richardson.hpp>

Public Types

using fields_tag = FieldsTag
using options_group = OptionsGroup
using source_tag = SourceTag
using operand_tag = fields_tag
using component_list = tmpl::list<>
using observed_reduction_data_tags
using initialize_element
using amr_projectors = initialize_element
using register_element
template<typename ApplyOperatorActions, typename Label = OptionsGroup>
using solve

Detailed Description

template<typename FieldsTag, typename OptionsGroup, typename SourceTag = db::add_tag_prefix<::Tags::FixedSource, FieldsTag>, typename ArraySectionIdTag = void>
struct LinearSolver::Richardson::Richardson< FieldsTag, OptionsGroup, SourceTag, ArraySectionIdTag >

A simple Richardson scheme for solving a system of linear equations \(Ax=b\).

Warning
This linear solver is useful only for basic preconditioning of another linear solver or for testing purposes. See LinearSolver::cg::ConjugateGradient or LinearSolver::gmres::Gmres for more useful general-purpose linear solvers.

In each step the solution is updated from its initial state \(x_0\) as

\[x_{k+1} = x_k + \omega \left(b - Ax\right) \]

where \(\omega\) is a relaxation parameter that weights the residual.

The scheme converges if the spectral radius (i.e. the largest absolute eigenvalue) of the iteration operator \(G=1-\omega A\) is smaller than one. For symmetric positive definite (SPD) matrices \(A\) with largest eigenvalue \(\lambda_\mathrm{max}\) and smallest eigenvalue \(\lambda_\mathrm{min}\) choose

\[\omega_\mathrm{SPD,optimal} = \frac{2}{\lambda_\mathrm{max} + \lambda_\mathrm{min}} \]

for optimal convergence.

Array sections
This linear solver requires no synchronization between elements, so it runs on all elements in the array parallel component. Partitioning of the elements in sections is only relevant for observing residual norms. Pass the section ID tag for the ArraySectionIdTag template parameter if residual norms should be computed over a section. Pass void (default) to compute residual norms over all elements in the array.

Member Typedef Documentation

◆ initialize_element

template<typename FieldsTag, typename OptionsGroup, typename SourceTag = db::add_tag_prefix<::Tags::FixedSource, FieldsTag>, typename ArraySectionIdTag = void>
using LinearSolver::Richardson::Richardson< FieldsTag, OptionsGroup, SourceTag, ArraySectionIdTag >::initialize_element

◆ observed_reduction_data_tags

template<typename FieldsTag, typename OptionsGroup, typename SourceTag = db::add_tag_prefix<::Tags::FixedSource, FieldsTag>, typename ArraySectionIdTag = void>
using LinearSolver::Richardson::Richardson< FieldsTag, OptionsGroup, SourceTag, ArraySectionIdTag >::observed_reduction_data_tags
Initial value:
observers::make_reduction_data_tags<
tmpl::list<async_solvers::reduction_data>>

◆ register_element

template<typename FieldsTag, typename OptionsGroup, typename SourceTag = db::add_tag_prefix<::Tags::FixedSource, FieldsTag>, typename ArraySectionIdTag = void>
using LinearSolver::Richardson::Richardson< FieldsTag, OptionsGroup, SourceTag, ArraySectionIdTag >::register_element
Initial value:
async_solvers::RegisterElement<FieldsTag, OptionsGroup, SourceTag,
ArraySectionIdTag>

◆ solve

template<typename FieldsTag, typename OptionsGroup, typename SourceTag = db::add_tag_prefix<::Tags::FixedSource, FieldsTag>, typename ArraySectionIdTag = void>
template<typename ApplyOperatorActions, typename Label = OptionsGroup>
using LinearSolver::Richardson::Richardson< FieldsTag, OptionsGroup, SourceTag, ArraySectionIdTag >::solve
Initial value:
tmpl::list<async_solvers::PrepareSolve<FieldsTag, OptionsGroup, SourceTag,
Label, ArraySectionIdTag>,
detail::UpdateFields<FieldsTag, OptionsGroup, SourceTag>,
ApplyOperatorActions,
async_solvers::CompleteStep<FieldsTag, OptionsGroup, SourceTag,
Label, ArraySectionIdTag>>
Complete a step of the asynchronous linear solver.
Definition ElementActions.hpp:382
Prepare the asynchronous linear solver for a solve.
Definition ElementActions.hpp:285

The documentation for this struct was generated from the following file:
  • src/ParallelAlgorithms/LinearSolver/Richardson/Richardson.hpp