Hypre::HyprePreconditioner< M, X, Y > Class Template Reference

Wrapper for Hypre's BoomerAMG preconditioner. More...

#include <HyprePreconditioner.hpp>

Inheritance diagram for Hypre::HyprePreconditioner< M, X, Y >:
Inheritance graph

Public Member Functions

 HyprePreconditioner (const M &A, const Opm::PropertyTree prm)
 Constructor for the HyprePreconditioner class. More...
 
 ~HyprePreconditioner ()
 Destructor for the HyprePreconditioner class. More...
 
void update () override
 Updates the preconditioner with the current matrix values. 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...
 
Dune::SolverCategory::Category category () const override
 Returns the solver category. More...
 
bool hasPerfectUpdate () const override
 Checks if the preconditioner has a perfect update. More...
 

Detailed Description

template<class M, class X, class Y>
class Hypre::HyprePreconditioner< M, X, Y >

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.

Template Parameters
MThe matrix type the preconditioner is for.
XThe type of the update vector.
YThe type of the defect vector.

Constructor & Destructor Documentation

◆ HyprePreconditioner()

template<class M , class X , class Y >
Hypre::HyprePreconditioner< M, X, Y >::HyprePreconditioner ( const M &  A,
const Opm::PropertyTree  prm 
)
inline

Constructor for the HyprePreconditioner class.

Initializes the preconditioner with the given matrix and property tree.

Parameters
AThe matrix for which the preconditioner is constructed.
prmThe property tree containing configuration parameters.

References Opm::PropertyTree::get(), and Hypre::HyprePreconditioner< M, X, Y >::update().

◆ ~HyprePreconditioner()

template<class M , class X , class Y >
Hypre::HyprePreconditioner< M, X, Y >::~HyprePreconditioner ( )
inline

Destructor for the HyprePreconditioner class.

Cleans up resources allocated by the preconditioner.

Member Function Documentation

◆ apply()

template<class M , class X , class Y >
void Hypre::HyprePreconditioner< M, X, Y >::apply ( X &  v,
const Y &  d 
)
inlineoverride

Applies the preconditioner to a vector.

Performs one AMG V-cycle to solve the system.

Parameters
vThe update vector.
dThe defect vector.

◆ category()

template<class M , class X , class Y >
Dune::SolverCategory::Category Hypre::HyprePreconditioner< M, X, Y >::category ( ) const
inlineoverride

Returns the solver category.

Returns
The solver category, which is sequential.

◆ hasPerfectUpdate()

template<class M , class X , class Y >
bool Hypre::HyprePreconditioner< M, X, Y >::hasPerfectUpdate ( ) const
inlineoverridevirtual

Checks if the preconditioner has a perfect update.

Returns
True, indicating that the preconditioner can be perfectly updated.

Implements Dune::PreconditionerWithUpdate< X, Y >.

◆ post()

template<class M , class X , class Y >
void Hypre::HyprePreconditioner< M, X, Y >::post ( X &  )
inlineoverride

Post-processing step after applying the preconditioner.

This method is currently a no-op.

Parameters
vThe update vector.

◆ pre()

template<class M , class X , class Y >
void Hypre::HyprePreconditioner< M, X, Y >::pre ( X &  ,
Y &   
)
inlineoverride

Pre-processing step before applying the preconditioner.

This method is currently a no-op.

Parameters
vThe update vector.
dThe defect vector.

◆ update()

template<class M , class X , class Y >
void Hypre::HyprePreconditioner< M, X, Y >::update ( )
inlineoverridevirtual

Updates the preconditioner with the current matrix values.

This method should be called whenever the matrix values change.

Implements Dune::PreconditionerWithUpdate< X, Y >.

Referenced by Hypre::HyprePreconditioner< M, X, Y >::HyprePreconditioner().


The documentation for this class was generated from the following file: