VertexCFD  0.0-dev
Public Member Functions | List of all members
VertexCFD::LinearSolvers::Hypre Class Reference
Inheritance diagram for VertexCFD::LinearSolvers::Hypre:
Inheritance graph
[legend]
Collaboration diagram for VertexCFD::LinearSolvers::Hypre:
Collaboration graph
[legend]

Public Member Functions

 Hypre ()
 Constructor.
 
 ~Hypre ()
 Destructor.
 
void initialize () override
 Initialize the preconditioner, does not touch matrix values.
 
bool isInitialized () const
 
void compute () override
 
bool isComputed () const override
 
void setParameters (const Teuchos::ParameterList &parameterlist) override
 
void setMatrix (const Teuchos::RCP< const Tpetra::RowMatrix<>> &A)
 Set the matrix to be preconditioned. More...
 
void apply (const Tpetra::MultiVector<> &x, Tpetra::MultiVector<> &y, Teuchos::ETransp mode=Teuchos::NO_TRANS, double alpha=Teuchos::ScalarTraits< double >::one(), double beta=Teuchos::ScalarTraits< double >::zero()) const override
 Apply the preconditioner to X, returning the result in Y. More...
 
Teuchos::RCP< const Tpetra::Map<> > getDomainMap () const override
 The Tpetra::Map representing the domain of this operator.
 
Teuchos::RCP< const Tpetra::Map<> > getRangeMap () const override
 The Tpetra::Map representing the range of this operator.
 
bool hasTransposeApply () const override
 Whether it's possible to apply the transpose of this operator.
 
Attribute accessor methods
Teuchos::RCP< const Teuchos::Comm< int > > getComm () const
 The communicator over which the matrix is distributed.
 
Teuchos::RCP< const Tpetra::RowMatrix<> > getMatrix () const override
 The matrix for which this is a preconditioner.
 
int getNumInitialize () const override
 The number of calls to initialize().
 
int getNumCompute () const override
 The number of calls to compute().
 
int getNumApply () const override
 The number of calls to apply().
 
double getInitializeTime () const override
 The time (in seconds) spent in initialize().
 
double getComputeTime () const override
 The time (in seconds) spent in compute().
 
double getApplyTime () const override
 The time (in seconds) spent in apply().
 

Implementation of Teuchos::Describable

std::string description () const override
 A simple one-line description of this object.
 
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const override
 Print the object with some verbosity level to a Teuchos::FancyOStream.
 

Member Function Documentation

◆ apply()

void VertexCFD::LinearSolvers::Hypre::apply ( const Tpetra::MultiVector<> &  x,
Tpetra::MultiVector<> &  y,
Teuchos::ETransp  mode = Teuchos::NO_TRANS,
double  alpha = Teuchos::ScalarTraits<double>::one(),
double  beta = Teuchos::ScalarTraits<double>::zero() 
) const
override

Apply the preconditioner to X, returning the result in Y.

Parameters
[in]XA (multi)vector to which to apply the preconditioner.
[in,out]YA (multi)vector containing the result of applying the preconditioner to X.
[in]modeIf Teuchos::NO_TRANS, apply the matrix A. If mode is Teuchos::NO_TRANS, apply its transpose \(A^T\). If Teuchos::CONJ_TRANS, apply its Hermitian transpose \(A^H\).
[in]alphaScaling factor for the result of Chebyshev iteration. The default is 1.
[in]betaScaling factor for Y. The default is 0.

◆ compute()

void VertexCFD::LinearSolvers::Hypre::compute ( )
override

Compute ILU factors L and U using the specified graph, diagonal perturbation thresholds and relaxation parameters.

This function computes the ILU(k) factors.

◆ isComputed()

bool VertexCFD::LinearSolvers::Hypre::isComputed ( ) const
inlineoverride

If factor is completed, this query returns true, otherwise it returns false.

◆ isInitialized()

bool VertexCFD::LinearSolvers::Hypre::isInitialized ( ) const
inline

Returns true if the preconditioner has been successfully initialized.

◆ setMatrix()

void VertexCFD::LinearSolvers::Hypre::setMatrix ( const Teuchos::RCP< const Tpetra::RowMatrix<>> &  A)

Set the matrix to be preconditioned.

Parameters
[in]AThe new matrix.
Postcondition
! isInitialized ()
! isComputed ()

Calling this method resets the preconditioner's state. After calling this method with a nonnull input, you must first call initialize() and compute() (in that order) before you may call apply().

You may call this method with a null input. If A is null, then you may not call initialize() or compute() until you first call this method again with a nonnull input. This method invalidates any previous factorization whether or not A is null, so calling setMatrix() with a null input is one way to clear the preconditioner's state (and free any memory that it may be using).

The new matrix A need not necessarily have the same Maps or even the same communicator as the original matrix.

◆ setParameters()

void VertexCFD::LinearSolvers::Hypre::setParameters ( const Teuchos::ParameterList &  parameterlist)
override

Set parameters using a Teuchos::ParameterList object. The parameter list should contain the path the the HypreDrive yaml file.


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