Diagonal preconditioner. More...
#include <Cabana_Grid_HypreSemiStructuredSolver.hpp>


Public Types | |
| using | base_type |
| Base HYPRE semi-structured solver type. | |
Public Types inherited from Cabana::Grid::HypreSemiStructuredSolver< Scalar, EntityType, MemorySpace > | |
| using | entity_type = EntityType |
| Entity type. | |
| using | memory_space = MemorySpace |
| Kokkos memory space.. | |
| using | value_type = Scalar |
| Scalar value type. | |
Public Member Functions | |
| template<class ArrayLayout_t> | |
| HypreSemiStructDiagonal (const ArrayLayout_t &layout, const bool is_preconditioner=false, int n_vars=3) | |
| Constructor. | |
| HYPRE_SStructSolver | getHypreSolver () const override |
| Get the preconditioner. | |
| HYPRE_PtrToSStructSolverFcn | getHypreSetupFunction () const override |
| Get the preconditioner setup function. | |
| HYPRE_PtrToSStructSolverFcn | getHypreSolveFunction () const override |
| Get the preconditioner solve function. | |
Public Member Functions inherited from Cabana::Grid::HypreSemiStructuredSolver< Scalar, EntityType, MemorySpace > | |
| template<class ArrayLayout_t> | |
| HypreSemiStructuredSolver (const ArrayLayout_t &layout, int n_vars, const bool is_preconditioner=false) | |
| Hypre memory space compatibility check. | |
| bool | isPreconditioner () const |
| Return if this solver is a preconditioner. | |
| void | createMatrixStencil (int NumSpaceDim, int var=0, int n_vars=3, std::vector< unsigned > stencil_length={ 7, 7, 7 }) |
| Create the operator stencil to be filled by setMatrixStencil. | |
| template<std::size_t NumSpaceDim> | |
| void | setMatrixStencil (const std::vector< std::array< int, NumSpaceDim > > &stencil, int var=0, int dep=0) |
| Set the operator stencil. | |
| void | setSolverGraph (int n_vars) |
| Set the solver graph. | |
| template<class Array_t> | |
| void | setMatrixValues (const Array_t &values, int v_x, int v_h) |
| Set the matrix values. | |
| void | printMatrix (const char *prefix) |
| Print the hypre matrix to output file. | |
| void | printLHS (const char *prefix) |
| Print the hypre LHS to output file. | |
| void | printRHS (const char *prefix) |
| Print the hypre RHS to output file. | |
| void | setTolerance (const double tol) |
| Set convergence tolerance implementation. | |
| void | setMaxIter (const int max_iter) |
| Set maximum iteration implementation. | |
| void | setPrintLevel (const int print_level) |
| Set the output level. | |
| void | setPreconditioner (const std::shared_ptr< HypreSemiStructuredSolver< Scalar, EntityType, MemorySpace > > &preconditioner) |
| Set a preconditioner. | |
| void | setup () |
| Setup the problem. | |
| template<class Array_t> | |
| void | solve (const Array_t &b, Array_t &x, int n_vars=3) |
| Solve the problem Ax = b for x. | |
| int | getNumIter () |
| Get the number of iterations taken on the last solve. | |
| double | getFinalRelativeResidualNorm () |
| Get the relative residual norm achieved on the last solve. | |
Protected Member Functions | |
| void | setToleranceImpl (const double) override |
| Set convergence tolerance implementation. | |
| void | setMaxIterImpl (const int) override |
| Set maximum iteration implementation. | |
| void | setPrintLevelImpl (const int) override |
| Set the output level. | |
| void | setupImpl () override |
| Setup implementation. | |
| void | solveImpl () override |
| Solver implementation. | |
| int | getNumIterImpl () override |
| Get the number of iterations taken on the last solve. | |
| double | getFinalRelativeResidualNormImpl () override |
| Get the relative residual norm achieved on the last solve. | |
| void | setPreconditionerImpl (const HypreSemiStructuredSolver< Scalar, EntityType, MemorySpace > &) override |
| Set a preconditioner. | |
Protected Member Functions inherited from Cabana::Grid::HypreSemiStructuredSolver< Scalar, EntityType, MemorySpace > | |
| void | checkHypreError (const int error) const |
| Check a hypre error. | |
Additional Inherited Members | |
Public Attributes inherited from Cabana::Grid::HypreSemiStructuredSolver< Scalar, EntityType, MemorySpace > | |
| const int | object_type = HYPRE_SSTRUCT |
| Object Type for SStruct. | |
Protected Attributes inherited from Cabana::Grid::HypreSemiStructuredSolver< Scalar, EntityType, MemorySpace > | |
| HYPRE_SStructMatrix | _A |
| Matrix for the problem Ax = b. | |
| HYPRE_SStructVector | _b |
| Forcing term for the problem Ax = b. | |
| HYPRE_SStructVector | _x |
| Solution to the problem Ax = b. | |
Diagonal preconditioner.
| using Cabana::Grid::HypreSemiStructDiagonal< Scalar, EntityType, MemorySpace >::base_type |
Base HYPRE semi-structured solver type.
|
inlineoverrideprotectedvirtual |
Get the relative residual norm achieved on the last solve.
Implements Cabana::Grid::HypreSemiStructuredSolver< Scalar, EntityType, MemorySpace >.
|
inlineoverridevirtual |
Get the preconditioner setup function.
Implements Cabana::Grid::HypreSemiStructuredSolver< Scalar, EntityType, MemorySpace >.
|
inlineoverridevirtual |
Get the preconditioner solve function.
Implements Cabana::Grid::HypreSemiStructuredSolver< Scalar, EntityType, MemorySpace >.
|
inlineoverridevirtual |
Get the preconditioner.
Implements Cabana::Grid::HypreSemiStructuredSolver< Scalar, EntityType, MemorySpace >.
|
inlineoverrideprotectedvirtual |
Get the number of iterations taken on the last solve.
Implements Cabana::Grid::HypreSemiStructuredSolver< Scalar, EntityType, MemorySpace >.
|
inlineoverrideprotectedvirtual |
Set maximum iteration implementation.
Implements Cabana::Grid::HypreSemiStructuredSolver< Scalar, EntityType, MemorySpace >.
|
inlineoverrideprotectedvirtual |
Set a preconditioner.
Implements Cabana::Grid::HypreSemiStructuredSolver< Scalar, EntityType, MemorySpace >.
|
inlineoverrideprotectedvirtual |
Set the output level.
Implements Cabana::Grid::HypreSemiStructuredSolver< Scalar, EntityType, MemorySpace >.
|
inlineoverrideprotectedvirtual |
Set convergence tolerance implementation.
Implements Cabana::Grid::HypreSemiStructuredSolver< Scalar, EntityType, MemorySpace >.
|
inlineoverrideprotectedvirtual |
Setup implementation.
Implements Cabana::Grid::HypreSemiStructuredSolver< Scalar, EntityType, MemorySpace >.
|
inlineoverrideprotectedvirtual |
Solver implementation.
Implements Cabana::Grid::HypreSemiStructuredSolver< Scalar, EntityType, MemorySpace >.