Reference documentation for deal.II version Git c68cbde08a 2021-01-22 11:50:48 +0100
\(\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\}}\)
Classes | Public Member Functions | Protected Attributes | List of all members
GinkgoWrappers::SolverGMRES< ValueType, IndexType > Class Template Reference

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

Inheritance diagram for GinkgoWrappers::SolverGMRES< ValueType, IndexType >:
[legend]

Classes

struct  AdditionalData
 

Public Member Functions

 SolverGMRES (SolverControl &solver_control, const std::string &exec_type, const AdditionalData &data=AdditionalData())
 
 SolverGMRES (SolverControl &solver_control, const std::string &exec_type, const std::shared_ptr< gko::LinOpFactory > &preconditioner, const AdditionalData &data=AdditionalData())
 
void initialize (const SparseMatrix< ValueType > &matrix)
 
void apply (Vector< ValueType > &solution, const Vector< ValueType > &rhs)
 
void solve (const SparseMatrix< ValueType > &matrix, Vector< ValueType > &solution, const Vector< ValueType > &rhs)
 
SolverControlcontrol () const
 

Protected Attributes

const AdditionalData additional_data
 
SolverControlsolver_control
 
std::shared_ptr< gko::LinOpFactory > solver_gen
 
std::shared_ptr< gko::stop::ResidualNormReduction<>::Factory > residual_criterion
 
std::shared_ptr< gko::log::Convergence<> > convergence_logger
 
std::shared_ptr< gko::stop::Combined::Factory > combined_factory
 
std::shared_ptr< gko::Executor > executor
 

Detailed Description

template<typename ValueType = double, typename IndexType = int32_t>
class GinkgoWrappers::SolverGMRES< ValueType, IndexType >

An implementation of the solver interface using the Ginkgo GMRES solver.

Definition at line 451 of file ginkgo_solver.h.

Constructor & Destructor Documentation

◆ SolverGMRES() [1/2]

template<typename ValueType , typename IndexType >
SolverGMRES< ValueType, IndexType >::SolverGMRES ( SolverControl solver_control,
const std::string &  exec_type,
const AdditionalData data = AdditionalData() 
)

Constructor.

Parameters
[in,out]solver_controlThe solver control object is then used to set the parameters and setup the GMRES solver from the GMRES factory which solves the linear system.
[in]exec_typeThe execution paradigm for the GMRES solver.
[in]dataThe additional data required by the solver.

Definition at line 446 of file ginkgo_solver.cc.

◆ SolverGMRES() [2/2]

template<typename ValueType , typename IndexType >
SolverGMRES< ValueType, IndexType >::SolverGMRES ( SolverControl solver_control,
const std::string &  exec_type,
const std::shared_ptr< gko::LinOpFactory > &  preconditioner,
const AdditionalData data = AdditionalData() 
)

Constructor.

Parameters
[in,out]solver_controlThe solver control object is then used to set the parameters and setup the GMRES solver from the GMRES factory which solves the linear system.
[in]exec_typeThe execution paradigm for the GMRES solver.
[in]preconditionerThe preconditioner for the solver.
[in]dataThe additional data required by the solver.

Definition at line 462 of file ginkgo_solver.cc.

Member Function Documentation

◆ initialize()

template<typename ValueType , typename IndexType >
void SolverBase< ValueType, IndexType >::initialize ( const SparseMatrix< ValueType > &  matrix)
inherited

Initialize the matrix and copy over its data to Ginkgo's data structures.

Definition at line 218 of file ginkgo_solver.cc.

◆ apply()

template<typename ValueType , typename IndexType >
void SolverBase< ValueType, IndexType >::apply ( Vector< ValueType > &  solution,
const Vector< ValueType > &  rhs 
)
inherited

Solve the linear system Ax=b. Dependent on the information provided by derived classes one of Ginkgo's linear solvers is chosen.

Definition at line 88 of file ginkgo_solver.cc.

◆ solve()

template<typename ValueType , typename IndexType >
void SolverBase< ValueType, IndexType >::solve ( const SparseMatrix< ValueType > &  matrix,
Vector< ValueType > &  solution,
const Vector< ValueType > &  rhs 
)
inherited

Solve the linear system Ax=b. Dependent on the information provided by derived classes one of Ginkgo's linear solvers is chosen.

Definition at line 292 of file ginkgo_solver.cc.

◆ control()

template<typename ValueType , typename IndexType >
SolverControl & SolverBase< ValueType, IndexType >::control ( ) const
inherited

Access to the object that controls convergence.

Definition at line 209 of file ginkgo_solver.cc.

Member Data Documentation

◆ additional_data

template<typename ValueType = double, typename IndexType = int32_t>
const AdditionalData GinkgoWrappers::SolverGMRES< ValueType, IndexType >::additional_data
protected

Store a copy of the settings for this particular solver.

Definition at line 508 of file ginkgo_solver.h.

◆ solver_control

template<typename ValueType , typename IndexType >
SolverControl& GinkgoWrappers::SolverBase< ValueType, IndexType >::solver_control
protectedinherited

Reference to the object that controls convergence of the iterative solvers.

Definition at line 148 of file ginkgo_solver.h.

◆ solver_gen

template<typename ValueType , typename IndexType >
std::shared_ptr<gko::LinOpFactory> GinkgoWrappers::SolverBase< ValueType, IndexType >::solver_gen
protectedinherited

The Ginkgo generated solver factory object.

Definition at line 153 of file ginkgo_solver.h.

◆ residual_criterion

template<typename ValueType , typename IndexType >
std::shared_ptr<gko::stop::ResidualNormReduction<>::Factory> GinkgoWrappers::SolverBase< ValueType, IndexType >::residual_criterion
protectedinherited

The residual criterion object that controls the reduction of the residual based on the tolerance set in the solver_control member.

Definition at line 160 of file ginkgo_solver.h.

◆ convergence_logger

template<typename ValueType , typename IndexType >
std::shared_ptr<gko::log::Convergence<> > GinkgoWrappers::SolverBase< ValueType, IndexType >::convergence_logger
protectedinherited

The Ginkgo convergence logger used to check for convergence and other solver data if needed.

Definition at line 166 of file ginkgo_solver.h.

◆ combined_factory

template<typename ValueType , typename IndexType >
std::shared_ptr<gko::stop::Combined::Factory> GinkgoWrappers::SolverBase< ValueType, IndexType >::combined_factory
protectedinherited

The Ginkgo combined factory object is used to create a combined stopping criterion to be passed to the solver.

Definition at line 172 of file ginkgo_solver.h.

◆ executor

template<typename ValueType , typename IndexType >
std::shared_ptr<gko::Executor> GinkgoWrappers::SolverBase< ValueType, IndexType >::executor
protectedinherited

The execution paradigm in Ginkgo. The choices are between gko::OmpExecutor, gko::CudaExecutor and gko::ReferenceExecutor and more details can be found in Ginkgo's documentation.

Definition at line 179 of file ginkgo_solver.h.


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