|
opm-simulators
|
Wrapper for Hypre's BoomerAMG preconditioner. More...
#include <HyprePreconditioner.hpp>
Public Types | |
| using | matrix_type = M |
| The matrix type the preconditioner is for. | |
| using | matrix_field_type = typename M::field_type |
| The field type of the matrix. | |
| using | domain_type = X |
| The domain type of the preconditioner. | |
| using | range_type = Y |
| The range type of the preconditioner. | |
| using | vector_field_type = typename X::field_type |
| The field type of the vectors. | |
Public Member Functions | |
| HyprePreconditioner (const M &A, const Opm::PropertyTree prm, const Comm &comm) | |
| Constructor for the HyprePreconditioner class. More... | |
| ~HyprePreconditioner () | |
| Destructor for HyprePreconditioner. More... | |
| void | update () override |
| Updates the preconditioner with the current matrix values. More... | |
| void | pre (X &v, Y &) override |
| Pre-processing step before applying the preconditioner. More... | |
| void | apply (X &v, const Y &d) override |
| Applies the preconditioner to a vector. More... | |
| void | post (X &) override |
| Post-processing step after applying the preconditioner. More... | |
| Dune::SolverCategory::Category | category () const override |
| Returns the solver category. More... | |
| bool | hasPerfectUpdate () const override |
| Checks if the preconditioner has a perfect update. More... | |
Wrapper for Hypre's BoomerAMG preconditioner.
This class provides an interface to the BoomerAMG preconditioner from the Hypre library. It is designed to work with matrices, update vectors, and defect vectors specified by the template parameters. The HypreInterface class provides a unified interface to Hypre's functionality, allowing for easy switching between CPU and GPU input data types and backend acceleration.
Supports four use cases:
| M | The matrix type |
| X | The vector type for the solution |
| Y | The vector type for the right-hand side |
|
inline |
Constructor for the HyprePreconditioner class.
Initializes the preconditioner with the given matrix and property tree.
| A | The matrix for which the preconditioner is constructed. |
| prm | The property tree containing configuration parameters. |
| comm | Parallel communicator. |
|
inline |
Destructor for HyprePreconditioner.
Cleans up resources allocated by the preconditioner.
|
inlineoverride |
Applies the preconditioner to a vector.
Performs one AMG V-cycle to solve the system. Involves uploading vectors to Hypre, applying the preconditioner, and transferring the result back to the vector.
| v | The update vector. |
| d | The defect vector. |
|
inlineoverride |
Returns the solver category.
|
inlineoverridevirtual |
Checks if the preconditioner has a perfect update.
Implements Dune::PreconditionerWithUpdate< X, Y >.
|
inlineoverride |
Post-processing step after applying the preconditioner.
This method is currently a no-op.
| v | The update vector. |
|
inlineoverride |
Pre-processing step before applying the preconditioner.
This method is currently a no-op.
| v | The update vector. |
| d | The defect vector. |
|
inlineoverridevirtual |
Updates the preconditioner with the current matrix values.
This method should be called whenever the matrix values change.
Implements Dune::PreconditionerWithUpdate< X, Y >.