1 #ifndef GEOS_LINEARALGEBRA_INTERFACES_HYPRE_HYPREDRIVE_HPP_
2 #define GEOS_LINEARALGEBRA_INTERFACES_HYPRE_HYPREDRIVE_HPP_
16 class HypredriveSolverTestPeer;
27 enum class InputSource
41 InputSource
source = InputSource::generatedFallback;
65 void initializeRuntime();
67 void finalizeRuntime();
128 bool configureHypredrive(
HypreMatrix const & mat );
144 void syncExecutionAnnotations();
146 void closeExecutionAnnotations();
148 void syncLegacyResult()
const;
150 void destroyHypredrive();
152 void resetHypredriveState();
157 friend class HypredriveSolverTestPeer;
164 bool m_hasExecutionContext =
false;
165 bool m_timestepScopeActive =
false;
166 bool m_newtonScopeActive =
false;
167 size_t m_hypredriveGeneration = 0;
168 HYPREDRV_t m_hypredrive{};
169 mutable HypreVector m_dummyRhs;
170 mutable HypreVector m_dummySol;
171 std::unique_ptr< HypreSolver > m_legacySolver;
Wrapper class for hypre's ParCSRMatrix.
Wrapper class for hypre's ParVector.
Linear solver adapter that routes GEOS Hypre systems through hypredrive.
void clear() override
Reset solver-owned state and destroy any active hypredrive object.
void solve(HypreVector const &rhs, HypreVector &sol) const override
Solve the linear system with hypredrive.
void setup(HypreMatrix const &mat) override
Build or refresh the solver/preconditioner for a matrix.
HypredriveSolver(LinearSolverParameters parameters)
Construct a hypredrive-backed linear solver.
void setExecutionContext(LinearSolverExecutionContext const &context) override
Update the execution metadata associated with subsequent solves.
void apply(HypreVector const &src, HypreVector &dst) const override
Apply the configured operator as a preconditioner action.
~HypredriveSolver() override
Destroys the managed hypredrive object and releases any fallback solver state.
Simple interface for linear solvers that allows to extract solution results.
LinearSolverResult m_result
Result of most recent solve (status, timings)
LinearSolverParameters m_params
Parameters for the solver.
LinearSolverParameters const & parameters() const
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
std::string string
String type.
internal::StdVectorWrapper< T, Allocator, USE_STD_CONTAINER_BOUNDS_CHECKING > stdVector
Execution metadata associated with a linear-solver invocation.
Set of parameters for a linear solver or preconditioner.