|
OpenImpala
Image-based parallel transport property solver
|
Base class for HYPRE structured-grid solvers. More...
#include <HypreStructSolver.H>
Public Member Functions | |
| amrex::Real | getFinalRelativeResidualNorm () const |
| bool | getSolverConverged () const |
| int | getSolverIterations () const |
| HypreStructSolver (const HypreStructSolver &)=delete | |
| HypreStructSolver & | operator= (const HypreStructSolver &)=delete |
| virtual | ~HypreStructSolver () |
| Virtual destructor. Cleans up HYPRE resources safely (guards against post-MPI_Finalize). | |
Static Public Member Functions | |
| static amrex::Array< HYPRE_Int, 3 > | hiV (const amrex::Box &b) |
| Convert AMReX Box upper corner to HYPRE_Int array. | |
| static amrex::Array< HYPRE_Int, 3 > | loV (const amrex::Box &b) |
| Convert AMReX Box lower corner to HYPRE_Int array. | |
Protected Member Functions | |
| void | assembleSystem () |
| Assemble HYPRE matrix and vectors after box values have been set. | |
| void | createMatrixAndVectors () |
| Create and initialize HYPRE matrix and vectors (A, b, x). Must be called after setupGrid() and setupStencil(). | |
| HypreStructSolver (const amrex::Geometry &geom, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm, SolverType solvertype, amrex::Real eps, int maxiter, int verbose) | |
| Construct base solver with configuration. Does NOT call any HYPRE functions. | |
| bool | runSolver (PrecondType precond_type=PrecondType::SMG) |
| Run the HYPRE solver specified by m_solvertype. | |
| void | setupGrid (bool periodic=false) |
| Create HYPRE structured grid from AMReX BoxArray. | |
| void | setupStencil () |
| Create 7-point stencil (center + 6 face neighbours). | |
Protected Attributes | |
| HYPRE_StructMatrix | m_A = nullptr |
| HYPRE_StructVector | m_b = nullptr |
| amrex::BoxArray | m_ba |
| bool | m_converged = false |
| amrex::DistributionMapping | m_dm |
| amrex::Real | m_eps |
| amrex::Real | m_final_res_norm = std::numeric_limits<amrex::Real>::quiet_NaN() |
| amrex::Geometry | m_geom |
| HYPRE_StructGrid | m_grid = nullptr |
| int | m_maxiter |
| HYPRE_Int | m_num_iterations = -1 |
| const SolverType | m_solvertype |
| HYPRE_StructStencil | m_stencil = nullptr |
| int | m_verbose |
| HYPRE_StructVector | m_x = nullptr |
Static Protected Attributes | |
| static constexpr int | STENCIL_SIZE = 7 |
Base class for HYPRE structured-grid solvers.
Provides:
Derived classes call the protected setup/solve methods from their own constructors and solve routines, and provide their own matrix fill logic.
|
virtual |
Virtual destructor. Cleans up HYPRE resources safely (guards against post-MPI_Finalize).
|
delete |
|
protected |
Construct base solver with configuration. Does NOT call any HYPRE functions.
Derived classes should call setupGrid(), setupStencil(), etc. from their own constructors after initializing their physics-specific members.
|
protected |
Assemble HYPRE matrix and vectors after box values have been set.
|
protected |
Create and initialize HYPRE matrix and vectors (A, b, x). Must be called after setupGrid() and setupStencil().
|
inline |
|
inline |
|
inline |
|
static |
Convert AMReX Box upper corner to HYPRE_Int array.
|
static |
Convert AMReX Box lower corner to HYPRE_Int array.
|
delete |
|
protected |
Run the HYPRE solver specified by m_solvertype.
| precond_type | Preconditioner to use with Krylov solvers. |
Updates m_num_iterations, m_final_res_norm, and m_converged.
|
protected |
Create HYPRE structured grid from AMReX BoxArray.
| periodic | If true, sets HYPRE periodic BCs using AMReX Geometry periodicity. |
|
protected |
Create 7-point stencil (center + 6 face neighbours).
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticconstexprprotected |