GEOSX
Public Types | Public Member Functions | List of all members
geosx::LinearOperator< VECTOR > Class Template Referenceabstract

Abstract base class for linear operators. More...

#include <LinearOperator.hpp>

Inheritance diagram for geosx::LinearOperator< VECTOR >:
Inheritance graph
[legend]

Public Types

using Vector = VECTOR
 Alias for template parameter.
 

Public Member Functions

 LinearOperator ()=default
 Constructor.
 
virtual ~LinearOperator ()=default
 Destructor.
 
virtual void apply (Vector const &src, Vector &dst) const =0
 Apply operator to a vector. More...
 
virtual void residual (Vector const &x, Vector const &b, Vector &r) const
 Compute residual r = Ax - b. More...
 
virtual globalIndex numGlobalRows () const =0
 Get the number of global rows. More...
 
virtual globalIndex numGlobalCols () const =0
 Get the number of global columns. More...
 

Detailed Description

template<typename VECTOR>
class geosx::LinearOperator< VECTOR >

Abstract base class for linear operators.

Template Parameters
VECTORType of vector this operator can be applied to

Definition at line 37 of file LinearOperator.hpp.

Member Function Documentation

◆ apply()

template<typename VECTOR>
virtual void geosx::LinearOperator< VECTOR >::apply ( Vector const &  src,
Vector dst 
) const
pure virtual

Apply operator to a vector.

Parameters
srcInput vector (x).
dstOutput vector (b).
Warning
src and dst cannot alias the same vector (some implementations may allow this).

Implemented in geosx::MatrixBase< MATRIX, VECTOR >, geosx::MatrixBase< HypreMatrix, HypreVector >, geosx::MatrixBase< PetscMatrix, PetscVector >, geosx::MatrixBase< EpetraMatrix, EpetraVector >, geosx::HypreMatrix, geosx::PetscMatrix, geosx::EpetraMatrix, geosx::BlockOperatorView< Vector, Matrix >, and geosx::NormalOperator< MATRIX, VECTOR >.

◆ numGlobalCols()

template<typename VECTOR>
virtual globalIndex geosx::LinearOperator< VECTOR >::numGlobalCols ( ) const
pure virtual

◆ numGlobalRows()

template<typename VECTOR>
virtual globalIndex geosx::LinearOperator< VECTOR >::numGlobalRows ( ) const
pure virtual

◆ residual()

template<typename VECTOR>
virtual void geosx::LinearOperator< VECTOR >::residual ( Vector const &  x,
Vector const &  b,
Vector r 
) const
inlinevirtual

Compute residual r = Ax - b.

Parameters
xInput solution.
bInput right hand side.
rOutput residual.
Warning
b and x may alias the same vector. r cannot alias any of the other two vectors (some implementations may allow this).

Reimplemented in geosx::MatrixBase< MATRIX, VECTOR >, geosx::MatrixBase< HypreMatrix, HypreVector >, geosx::MatrixBase< PetscMatrix, PetscVector >, and geosx::MatrixBase< EpetraMatrix, EpetraVector >.

Definition at line 73 of file LinearOperator.hpp.


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