Loading...
Searching...
No Matches
terra::linalg::solvers Namespace Reference

Namespaces

namespace  detail
 

Classes

class  BlockDiagonalPreconditioner2x2
 Block-diagonal preconditioner for 2x2 block operators. More...
 
class  BlockTriangularPreconditioner2x2
 Static assertion: BlockDiagonalPreconditioner2x2 satisfies SolverLike concept. More...
 
class  Chebyshev
 Chebyshev accelerated Jacobi iterative solver for linear systems. More...
 
class  FGMRES
 Flexible GMRES (FGMRES) iterative solver for nonsymmetric linear systems. More...
 
struct  FGMRESOptions
 
class  GCAElementsCollector
 
class  IdentitySolver
 "Identity solver" for linear systems. More...
 
class  IterativeSolverParameters
 
class  IterativeSolverStatistics
 
class  Jacobi
 Jacobi iterative solver for linear systems. More...
 
class  LocalMatrixStorage
 
class  Multigrid
 Multigrid solver for linear systems. More...
 
class  PBiCGStab
 BiCGStab(l) iterative solver for general (possibly unsymmetric) linear systems. More...
 
class  PCG
 Preconditioned Conjugate Gradient (PCG) iterative solver for symmetric positive definite linear systems. More...
 
class  PMINRES
 Preconditioned MINRES (PMINRES) iterative solver for symmetric indefinite linear systems. More...
 
class  Richardson
 Richardson iterative solver for linear systems. Satisfies the SolverLike concept (see solver.hpp). Implements the update rule: More...
 
struct  SelectiveStorageKey
 
class  TwoGridGCA
 : Galerkin coarse approximation (GCA). TwoGridGCA takes a coarser and a finer operator. Each thread assembles a coarse-grid gca matrix in the coarser operator on a single hex. To do this, it loops the finer hexes of the coarse hex and its respective wedges. It computes the interpolation matrix P mapping from coarse wedge to the current fine wedge, computes the triple-product P^TAP with the fine-operator local matrix A and adds the resulting gca matrix up for all fine wedges comprising the coarse wedge. Finally, it stores the result in the wedge-wise matrix storage of the coarse operator. More...
 

Concepts

concept  SolverLike
 Concept for types that behave like linear solvers. Requires exposing OperatorType and a solve_impl method. See OperatorLike in operator.hpp for operator requirements.
 

Typedefs

template<SolverLike Solver>
using SolutionOf = SrcOf< typename Solver::OperatorType >
 Alias for the solution vector type of a solver.
 
template<SolverLike Solver>
using RHSOf = DstOf< typename Solver::OperatorType >
 Alias for the right-hand side vector type of a solver.
 

Enumerations

enum class  InterpolationMode { Constant , Linear }
 Modes for choosing interpolation weights. More...
 

Functions

int map_to_coarse_element (const int fine_cell, const int level_range)
 
template<terra::linalg::OperatorLike OperatorT>
double power_iteration (OperatorT &op, SrcOf< OperatorT > &tmpIt, SrcOf< OperatorT > &tmpAux, const int iterations)
 Power iteration to estimate the largest eigenvalue of a row-normalized operator D^{-1}A, where D^{-1} is the inverted diagonal of A.
 
template<SolverLike Solver, OperatorLike Operator, VectorLike SolutionVector, VectorLike RHSVector>
void solve (Solver &solver, Operator &A, SolutionVector &x, const RHSVector &b)
 Solve a linear system using the given solver and operator. Calls the solver's solve_impl method.
 

Typedef Documentation

◆ RHSOf

template<SolverLike Solver>
using terra::linalg::solvers::RHSOf = typedef DstOf< typename Solver::OperatorType >

Alias for the right-hand side vector type of a solver.

◆ SolutionOf

template<SolverLike Solver>
using terra::linalg::solvers::SolutionOf = typedef SrcOf< typename Solver::OperatorType >

Alias for the solution vector type of a solver.

Enumeration Type Documentation

◆ InterpolationMode

Modes for choosing interpolation weights.

Enumerator
Constant 
Linear 

Function Documentation

◆ map_to_coarse_element()

int terra::linalg::solvers::map_to_coarse_element ( const int  fine_cell,
const int  level_range 
)

◆ power_iteration()

template<terra::linalg::OperatorLike OperatorT>
double terra::linalg::solvers::power_iteration ( OperatorT &  op,
SrcOf< OperatorT > &  tmpIt,
SrcOf< OperatorT > &  tmpAux,
const int  iterations 
)

Power iteration to estimate the largest eigenvalue of a row-normalized operator D^{-1}A, where D^{-1} is the inverted diagonal of A.

Template Parameters
OperatorTOperator type (must satisfy OperatorLike).

◆ solve()

template<SolverLike Solver, OperatorLike Operator, VectorLike SolutionVector, VectorLike RHSVector>
void terra::linalg::solvers::solve ( Solver &  solver,
Operator &  A,
SolutionVector &  x,
const RHSVector &  b 
)

Solve a linear system using the given solver and operator. Calls the solver's solve_impl method.

Parameters
solverThe solver instance.
AThe operator (matrix).
xSolution vector (output).
bRight-hand side vector (input).