GEOSX
Public Types | Public Member Functions | List of all members
geosx::NormalOperator< LAI > Class Template Reference

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

#include <NormalOperator.hpp>

Inheritance diagram for geosx::NormalOperator< LAI >:
Inheritance graph
[legend]

Public Types

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

Public Member Functions

 NormalOperator (Matrix const &mat)
 Constructor. More...
 
virtual ~NormalOperator () override=default
 Destructor.
 
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 getComm () const override
 
- Public Member Functions inherited from geosx::LinearOperator< LAI::ParallelVector >
 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...
 

Detailed Description

template<typename LAI>
class geosx::NormalOperator< LAI >

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

Template Parameters
LAIthe linear algebra interface

Definition at line 31 of file NormalOperator.hpp.

Constructor & Destructor Documentation

◆ NormalOperator()

template<typename LAI >
geosx::NormalOperator< LAI >::NormalOperator ( Matrix const &  mat)
inlineexplicit

Constructor.

Parameters
matthe underlying matrix (must outlive this operator)

Definition at line 48 of file NormalOperator.hpp.

Member Function Documentation

◆ apply()

template<typename LAI >
void geosx::NormalOperator< LAI >::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 64 of file NormalOperator.hpp.

◆ getComm()

template<typename LAI >
MPI_Comm geosx::NormalOperator< LAI >::getComm ( ) const
inlineoverridevirtual
Returns
the communicator

Implements geosx::LinearOperator< LAI::ParallelVector >.

Definition at line 105 of file NormalOperator.hpp.

◆ numGlobalCols()

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

Implements geosx::LinearOperator< LAI::ParallelVector >.

Definition at line 81 of file NormalOperator.hpp.

◆ numGlobalRows()

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

Implements geosx::LinearOperator< LAI::ParallelVector >.

Definition at line 73 of file NormalOperator.hpp.

◆ numLocalCols()

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

Implements geosx::LinearOperator< LAI::ParallelVector >.

Definition at line 97 of file NormalOperator.hpp.

◆ numLocalRows()

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

Implements geosx::LinearOperator< LAI::ParallelVector >.

Definition at line 89 of file NormalOperator.hpp.


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