GEOS
Public Types | Public Member Functions | List of all members
geos::NormalOperator< MATRIX > Class Template Reference

Wraps a matrix A and represents A^T * A as a linear operator. More...

#include <NormalOperator.hpp>

Inheritance diagram for geos::NormalOperator< MATRIX >:
Inheritance graph
[legend]

Public Types

using Base = LinearOperator< typename MATRIX::Vector >
 Alias for base type.
 
using Vector = typename Base::Vector
 Alias for vector type.
 
using Matrix = MATRIX
 Alias for matrix type.
 
- Public Types inherited from geos::LinearOperator< MATRIX::Vector >
using Vector = MATRIX::Vector
 Alias for template parameter.
 

Public Member Functions

 NormalOperator (Matrix const &mat)
 Constructor. More...
 
void apply (Vector const &src, Vector &dst) const override
 Apply operator to a vector. More...
 
globalIndex numGlobalRows () const override
 
globalIndex numGlobalCols () const override
 
localIndex numLocalRows () const override
 
localIndex numLocalCols () const override
 
MPI_Comm comm () const override
 
- Public Member Functions inherited from geos::LinearOperator< MATRIX::Vector >
 LinearOperator ()=default
 Constructor.
 
virtual ~LinearOperator ()=default
 Destructor.
 
virtual void apply (Vector const &src, Vector &dst) const=0
 Apply operator to a vector, dst = this(src). More...
 
virtual void residual (Vector const &x, Vector const &b, Vector &r) const
 Compute residual r = b - this(x). More...
 
virtual globalIndex numGlobalNonzeros () const
 
virtual localIndex numLocalNonzeros () const
 

Detailed Description

template<typename MATRIX>
class geos::NormalOperator< MATRIX >

Wraps a matrix A and represents A^T * A as a linear operator.

Template Parameters
LAIthe linear algebra interface

Definition at line 32 of file NormalOperator.hpp.

Constructor & Destructor Documentation

◆ NormalOperator()

template<typename MATRIX >
geos::NormalOperator< MATRIX >::NormalOperator ( Matrix const &  mat)
inlineexplicit

Constructor.

Parameters
matthe underlying matrix (must outlive this operator)

Definition at line 49 of file NormalOperator.hpp.

Member Function Documentation

◆ apply()

template<typename MATRIX >
void geos::NormalOperator< MATRIX >::apply ( Vector const &  src,
Vector dst 
) const
inlineoverride

Apply operator to a vector.

Parameters
srcinput vector
dstoutput vector
Warning
src and dst cannot alias the same vector (some implementations may allow this).

Definition at line 60 of file NormalOperator.hpp.

◆ comm()

template<typename MATRIX >
MPI_Comm geos::NormalOperator< MATRIX >::comm ( ) const
inlineoverridevirtual
Returns
the communicator

Implements geos::LinearOperator< MATRIX::Vector >.

Definition at line 101 of file NormalOperator.hpp.

◆ numGlobalCols()

template<typename MATRIX >
globalIndex geos::NormalOperator< MATRIX >::numGlobalCols ( ) const
inlineoverridevirtual
Returns
the global number of columns

Implements geos::LinearOperator< MATRIX::Vector >.

Definition at line 77 of file NormalOperator.hpp.

◆ numGlobalRows()

template<typename MATRIX >
globalIndex geos::NormalOperator< MATRIX >::numGlobalRows ( ) const
inlineoverridevirtual
Returns
the global number of rows

Implements geos::LinearOperator< MATRIX::Vector >.

Definition at line 69 of file NormalOperator.hpp.

◆ numLocalCols()

template<typename MATRIX >
localIndex geos::NormalOperator< MATRIX >::numLocalCols ( ) const
inlineoverridevirtual
Returns
the local number of columns

Implements geos::LinearOperator< MATRIX::Vector >.

Definition at line 93 of file NormalOperator.hpp.

◆ numLocalRows()

template<typename MATRIX >
localIndex geos::NormalOperator< MATRIX >::numLocalRows ( ) const
inlineoverridevirtual
Returns
the local number of rows

Implements geos::LinearOperator< MATRIX::Vector >.

Definition at line 85 of file NormalOperator.hpp.


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