|
opm-simulators
|
Wrapper for AMGX's AMG preconditioner. More...
#include <AmgxPreconditioner.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 | |
| AmgxPreconditioner (const M &A, const Opm::PropertyTree prm) | |
| Constructor for AmgxPreconditioner. More... | |
| ~AmgxPreconditioner () | |
| Destructor for AmgxPreconditioner. More... | |
| void | pre (X &, 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... | |
| void | update () override |
| Updates the preconditioner with the current matrix values. 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... | |
Static Public Attributes | |
| static constexpr int | block_size = 1 |
Wrapper for AMGX's AMG preconditioner.
This class provides an interface to the AMG preconditioner from the AMGX library. It is designed to work with matrices, update vectors, and defect vectors specified by the template parameters. The AmgxInterface class provides a unified interface to AMGX's functionality, allowing for easy switching between CPU and GPU input data types.
| M | The matrix type |
| X | The vector type for the solution |
| Y | The vector type for the right-hand side |
|
inline |
Constructor for AmgxPreconditioner.
Initializes the AMGX preconditioner with the given matrix and property tree.
| A | The matrix for which to construct the preconditioner |
| prm | The property tree containing configuration parameters |
|
inline |
Destructor for AmgxPreconditioner.
Cleans up resources allocated by the preconditioner.
|
inlineoverride |
Applies the preconditioner to a vector.
Performs one AMG cycle to solve the system. Involves uploading vectors to AMGX, 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 >.