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

Simple class that wraps a matrix and represents its transpose as a linear operator. More...

#include <TransposeOperator.hpp>

Inheritance diagram for geos::TransposeOperator< 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

 TransposeOperator (Matrix const &mat)
 Constructor. More...
 
virtual void apply (Vector const &src, Vector &dst) const override
 Apply operator to a vector. More...
 
virtual globalIndex numGlobalRows () const override
 
virtual globalIndex numGlobalCols () const override
 
virtual localIndex numLocalRows () const override
 
virtual localIndex numLocalCols () const override
 
virtual MPI_Comm comm () const override
 Get the MPI communicator the matrix was created with. More...
 
- 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::TransposeOperator< MATRIX >

Simple class that wraps a matrix and represents its transpose as a linear operator.

Template Parameters
MATRIXthe linear algebra matrix type

Definition at line 33 of file TransposeOperator.hpp.

Constructor & Destructor Documentation

◆ TransposeOperator()

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

Constructor.

Parameters
matthe underlying matrix

Definition at line 50 of file TransposeOperator.hpp.

Member Function Documentation

◆ apply()

template<typename MATRIX >
virtual void geos::TransposeOperator< MATRIX >::apply ( Vector const &  src,
Vector dst 
) const
inlineoverridevirtual

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).

Definition at line 62 of file TransposeOperator.hpp.

◆ comm()

template<typename MATRIX >
virtual MPI_Comm geos::TransposeOperator< MATRIX >::comm ( ) const
inlineoverridevirtual

Get the MPI communicator the matrix was created with.

Returns
MPI communicator of the underlying matrix

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

Definition at line 103 of file TransposeOperator.hpp.

◆ numGlobalCols()

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

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

Definition at line 78 of file TransposeOperator.hpp.

◆ numGlobalRows()

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

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

Definition at line 70 of file TransposeOperator.hpp.

◆ numLocalCols()

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

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

Definition at line 94 of file TransposeOperator.hpp.

◆ numLocalRows()

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

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

Definition at line 86 of file TransposeOperator.hpp.


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