GEOS
Public Types | Public Member Functions | List of all members
geos::TransposeOperator< LAI > 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< 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 geos::LinearOperator< LAI::ParallelVector >
using Vector = LAI::ParallelVector
 Alias for template parameter.
 

Public Member Functions

 TransposeOperator (Matrix const &mat)
 Constructor. More...
 
virtual ~TransposeOperator () override=default
 Destructor.
 
virtual void apply (Vector const &src, Vector &dst) const override
 Apply operator to a vector. More...
 
virtual globalIndex numGlobalRows () const override
 Get the number of global rows. More...
 
virtual globalIndex numGlobalCols () const override
 Get the number of global columns. More...
 
virtual localIndex numLocalRows () const override
 Get the number of local rows. More...
 
virtual localIndex numLocalCols () const override
 Get the number of local columns. More...
 
virtual MPI_Comm comm () const override
 Get the MPI communicator the matrix was created with. More...
 
- Public Member Functions inherited from geos::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 geos::TransposeOperator< LAI >

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

Template Parameters
LAIthe linear algebra interface

Definition at line 33 of file TransposeOperator.hpp.

Constructor & Destructor Documentation

◆ TransposeOperator()

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

Constructor.

Parameters
matthe underlying matrix

Definition at line 50 of file TransposeOperator.hpp.

Member Function Documentation

◆ apply()

template<typename LAI >
virtual void geos::TransposeOperator< LAI >::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 67 of file TransposeOperator.hpp.

◆ comm()

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

Get the MPI communicator the matrix was created with.

Returns
MPI communicator of the underlying matrix

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

Definition at line 112 of file TransposeOperator.hpp.

◆ numGlobalCols()

template<typename LAI >
virtual globalIndex geos::TransposeOperator< LAI >::numGlobalCols ( ) const
inlineoverridevirtual

Get the number of global columns.

Returns
Number of global columns in the operator.

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

Definition at line 85 of file TransposeOperator.hpp.

◆ numGlobalRows()

template<typename LAI >
virtual globalIndex geos::TransposeOperator< LAI >::numGlobalRows ( ) const
inlineoverridevirtual

Get the number of global rows.

Returns
Number of global rows in the operator.

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

Definition at line 76 of file TransposeOperator.hpp.

◆ numLocalCols()

template<typename LAI >
virtual localIndex geos::TransposeOperator< LAI >::numLocalCols ( ) const
inlineoverridevirtual

Get the number of local columns.

Returns
Number of local columns in the operator.

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

Definition at line 103 of file TransposeOperator.hpp.

◆ numLocalRows()

template<typename LAI >
virtual localIndex geos::TransposeOperator< LAI >::numLocalRows ( ) const
inlineoverridevirtual

Get the number of local rows.

Returns
Number of local rows in the operator.

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

Definition at line 94 of file TransposeOperator.hpp.


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