deal.II version GIT relicensing-1991-gec5bc16adb 2024-10-14 08:00:00+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LinearAlgebra::TpetraWrappers::SolverDirectBase< Number, MemorySpace > Class Template Reference

#include <deal.II/lac/trilinos_tpetra_solver_direct.h>

Inheritance diagram for LinearAlgebra::TpetraWrappers::SolverDirectBase< Number, MemorySpace >:
Inheritance graph
[legend]

Public Member Functions

virtual ~SolverDirectBase ()=default
 
void initialize (const SparseMatrix< Number, MemorySpace > &A)
 
void solve (Vector< Number, MemorySpace > &x, const Vector< Number, MemorySpace > &b)
 
void solve (const SparseMatrix< Number, MemorySpace > &A, Vector< Number, MemorySpace > &x, const Vector< Number, MemorySpace > &b)
 
SolverControlcontrol () const
 

Static Public Member Functions

static ::ExceptionBaseExcTrilinosError (int arg1)
 

Protected Member Functions

 SolverDirectBase (SolverControl &cn, const std::string &solver_type)
 
void do_solve ()
 

Protected Attributes

SolverControlsolver_control
 
Teuchos::RCP< Amesos2::Solver< TpetraTypes::MatrixType< Number, MemorySpace >, TpetraTypes::MultiVectorType< Number, MemorySpace > > > solver
 
std::string solver_type
 
Teuchos::ParameterList parameter_list
 

Detailed Description

template<typename Number, typename MemorySpace = ::MemorySpace::Host>
class LinearAlgebra::TpetraWrappers::SolverDirectBase< Number, MemorySpace >

The base class for all direct solvers based on the Amesos2 package of Trilinos.

Definition at line 72 of file trilinos_tpetra_solver_direct.h.

Constructor & Destructor Documentation

◆ ~SolverDirectBase()

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
virtual LinearAlgebra::TpetraWrappers::SolverDirectBase< Number, MemorySpace >::~SolverDirectBase ( )
virtualdefault

Destructor.

◆ SolverDirectBase()

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
LinearAlgebra::TpetraWrappers::SolverDirectBase< Number, MemorySpace >::SolverDirectBase ( SolverControl cn,
const std::string &  solver_type 
)
protected

Constructor. Takes the solver control object and name and creates the solver.

Member Function Documentation

◆ initialize()

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
void LinearAlgebra::TpetraWrappers::SolverDirectBase< Number, MemorySpace >::initialize ( const SparseMatrix< Number, MemorySpace > &  A)

Initializes the direct solver for the matrix A and creates a factorization for it with the package chosen from the additional data structure. Note that there is no need for a preconditioner here and solve() is not called.

◆ solve() [1/2]

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
void LinearAlgebra::TpetraWrappers::SolverDirectBase< Number, MemorySpace >::solve ( Vector< Number, MemorySpace > &  x,
const Vector< Number, MemorySpace > &  b 
)

Solve the linear system Ax=b based on the package set in initialize(). Note the matrix is not refactorized during this call.

◆ solve() [2/2]

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
void LinearAlgebra::TpetraWrappers::SolverDirectBase< Number, MemorySpace >::solve ( const SparseMatrix< Number, MemorySpace > &  A,
Vector< Number, MemorySpace > &  x,
const Vector< Number, MemorySpace > &  b 
)

Solve the linear system Ax=b. Creates a factorization of the matrix with the package chosen from the additional data structure and performs the solve. Note that there is no need for a preconditioner here.

◆ control()

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
SolverControl & LinearAlgebra::TpetraWrappers::SolverDirectBase< Number, MemorySpace >::control ( ) const

Access to object that controls convergence.

◆ do_solve()

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
void LinearAlgebra::TpetraWrappers::SolverDirectBase< Number, MemorySpace >::do_solve ( )
protected

Actually performs the operations for solving the linear system, including the factorization and forward and backward substitution.

Member Data Documentation

◆ solver_control

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
SolverControl& LinearAlgebra::TpetraWrappers::SolverDirectBase< Number, MemorySpace >::solver_control
protected

Reference to the object that controls convergence of the iterative solver. In fact, for these Trilinos wrappers, Trilinos does so itself, but we copy the data from this object before starting the solution process, and copy the data back into it afterwards.

Definition at line 143 of file trilinos_tpetra_solver_direct.h.

◆ solver

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
Teuchos::RCP< Amesos2::Solver<TpetraTypes::MatrixType<Number, MemorySpace>, TpetraTypes::MultiVectorType<Number, MemorySpace> > > LinearAlgebra::TpetraWrappers::SolverDirectBase< Number, MemorySpace >::solver
protected

A structure that contains the Trilinos solver object.

Definition at line 151 of file trilinos_tpetra_solver_direct.h.

◆ solver_type

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
std::string LinearAlgebra::TpetraWrappers::SolverDirectBase< Number, MemorySpace >::solver_type
protected

Definition at line 156 of file trilinos_tpetra_solver_direct.h.

◆ parameter_list

template<typename Number , typename MemorySpace = ::MemorySpace::Host>
Teuchos::ParameterList LinearAlgebra::TpetraWrappers::SolverDirectBase< Number, MemorySpace >::parameter_list
protected

An optional Teuchos::ParameterList for fine tuning the solver. Please refer to the Amesos2 manual to see which parameters to set for each individual solver.

Definition at line 163 of file trilinos_tpetra_solver_direct.h.


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