Reference preconditioned structured solver interface. More...
#include <Cabana_Grid_ReferenceStructuredSolver.hpp>
Public Types | |
using | entity_type = EntityType |
Entity type. | |
using | value_type = Scalar |
Scalar value type. | |
using | memory_space = typename MemorySpace::memory_space |
Memory space. | |
using | execution_space = typename memory_space::execution_space |
Default execution space. | |
using | Array_t = Array<Scalar, EntityType, MeshType, MemorySpace> |
Array type. | |
using | subarray_type = typename Array_t::subarray_type |
SubArray type. | |
Public Member Functions | |
virtual void | setMatrixStencil (const std::vector< std::array< int, num_space_dim > > &stencil, const bool is_symmetric)=0 |
Set the matrix stencil. | |
virtual const Array_t & | getMatrixValues ()=0 |
Get the matrix values. | |
virtual void | setPreconditionerStencil (const std::vector< std::array< int, num_space_dim > > &stencil, const bool is_symmetric)=0 |
Set the preconditioner stencil. | |
virtual const Array_t & | getPreconditionerValues ()=0 |
Get the preconditioner values. | |
virtual void | setTolerance (const double tol)=0 |
Set convergence tolerance implementation. | |
virtual void | setMaxIter (const int max_iter)=0 |
Set maximum iteration implementation. | |
virtual void | setPrintLevel (const int print_level)=0 |
Set the output level. | |
virtual void | setup ()=0 |
Setup the problem. | |
virtual void | solve (const Array_t &b, Array_t &x)=0 |
Solve the problem Ax = b for x. | |
virtual int | getNumIter ()=0 |
Get the number of iterations taken on the last solve. | |
virtual double | getFinalRelativeResidualNorm ()=0 |
Get the relative residual norm achieved on the last solve. | |
Static Public Attributes | |
static constexpr std::size_t | num_space_dim = MeshType::num_space_dim |
Spatial dimension. | |
Reference preconditioned structured solver interface.
|
pure virtual |
Get the relative residual norm achieved on the last solve.
Implemented in Cabana::Grid::ReferenceConjugateGradient< Scalar, EntityType, MeshType, MemorySpace >.
|
pure virtual |
Get the matrix values.
Implemented in Cabana::Grid::ReferenceConjugateGradient< Scalar, EntityType, MeshType, MemorySpace >.
|
pure virtual |
Get the number of iterations taken on the last solve.
Implemented in Cabana::Grid::ReferenceConjugateGradient< Scalar, EntityType, MeshType, MemorySpace >.
|
pure virtual |
Get the preconditioner values.
Implemented in Cabana::Grid::ReferenceConjugateGradient< Scalar, EntityType, MeshType, MemorySpace >.
|
pure virtual |
Set the matrix stencil.
stencil | The (i,j,k) offsets describing the structured matrix entries at each grid point. Offsets are defined relative to an index. |
is_symmetric | If true the matrix is designated as symmetric. The stencil entries should only contain one entry from each symmetric component if this is true. |
Implemented in Cabana::Grid::ReferenceConjugateGradient< Scalar, EntityType, MeshType, MemorySpace >.
|
pure virtual |
Set maximum iteration implementation.
Implemented in Cabana::Grid::ReferenceConjugateGradient< Scalar, EntityType, MeshType, MemorySpace >.
|
pure virtual |
Set the preconditioner stencil.
stencil | The (i,j,k) offsets describing the structured preconditioner entries at each grid point. Offsets are defined relative to an index. |
is_symmetric | If true the preconditioner is designated as symmetric. The stencil entries should only contain one entry from each symmetric component if this is true. |
Implemented in Cabana::Grid::ReferenceConjugateGradient< Scalar, EntityType, MeshType, MemorySpace >.
|
pure virtual |
Set the output level.
Implemented in Cabana::Grid::ReferenceConjugateGradient< Scalar, EntityType, MeshType, MemorySpace >.
|
pure virtual |
Set convergence tolerance implementation.
Implemented in Cabana::Grid::ReferenceConjugateGradient< Scalar, EntityType, MeshType, MemorySpace >.
|
pure virtual |
Setup the problem.
Implemented in Cabana::Grid::ReferenceConjugateGradient< Scalar, EntityType, MeshType, MemorySpace >.
|
pure virtual |
Solve the problem Ax = b for x.
b | The forcing term. |
x | The solution. |
Implemented in Cabana::Grid::ReferenceConjugateGradient< Scalar, EntityType, MeshType, MemorySpace >.