Thyra Version of the Day
Loading...
Searching...
No Matches
Related Symbols | List of all members

Concrete composite LinearOpBase subclass that creates an implicitly added linear operator out of one or more constituent LinearOpBase objects. More...

#include <Thyra_DefaultAddedLinearOp_decl.hpp>

Inheritance diagram for Thyra::DefaultAddedLinearOp< Scalar >:
Inheritance graph
[legend]

Related Symbols

(Note that these are not member symbols.)

template<class Scalar >
RCP< LinearOpBase< Scalar > > nonconstAdd (const RCP< LinearOpBase< Scalar > > &A, const RCP< LinearOpBase< Scalar > > &B, const std::string &label="")
 Form an implicit addition of two linear operators: M = A + B.
 
template<class Scalar >
RCP< const LinearOpBase< Scalar > > add (const RCP< const LinearOpBase< Scalar > > &A, const RCP< const LinearOpBase< Scalar > > &B, const std::string &label="")
 Form an implicit addition of two linear operators: M = A + B.
 
template<class Scalar >
RCP< LinearOpBase< Scalar > > nonconstSubtract (const RCP< LinearOpBase< Scalar > > &A, const RCP< LinearOpBase< Scalar > > &B, const std::string &label="")
 Form an implicit subtraction of two linear operators: M = A - B.
 
template<class Scalar >
RCP< const LinearOpBase< Scalar > > subtract (const RCP< const LinearOpBase< Scalar > > &A, const RCP< const LinearOpBase< Scalar > > &B, const std::string &label="")
 Form an implicit subtraction of two linear operators: M = A - B.
 

Overridden from LinearOpBase

RCP< const VectorSpaceBase< Scalar > > range () const
 Returns this->getOp(0).range() if <t>this->numOps() > 0 and returns Teuchos::null otherwise.
 
RCP< const VectorSpaceBase< Scalar > > domain () const
 Returns this->getOp(this->numOps()-1).domain() if <t>this->numOps() > 0 and returns Teuchos::null otherwise.
 
RCP< const LinearOpBase< Scalar > > clone () const
 
bool opSupportedImpl (EOpTransp M_trans) const
 Returns true only if all constituent operators support M_trans.
 
void applyImpl (const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const
 

Constructors/initializers/accessors

 DefaultAddedLinearOp ()
 Constructs to uninitialized.
 
 DefaultAddedLinearOp (const ArrayView< const RCP< LinearOpBase< Scalar > > > &Ops)
 
 DefaultAddedLinearOp (const ArrayView< const RCP< const LinearOpBase< Scalar > > > &Ops)
 
void initialize (const ArrayView< const RCP< LinearOpBase< Scalar > > > &Ops)
 Initialize given a list of non-const linear operators.
 
void initialize (const ArrayView< const RCP< const LinearOpBase< Scalar > > > &Ops)
 Initialize given a list of const linear operators.
 
void uninitialize ()
 Set to uninitialized.
 

Overridden from AddedLinearOpBase

int numOps () const
 
bool opIsConst (const int k) const
 
RCP< LinearOpBase< Scalar > > getNonconstOp (const int k)
 
RCP< const LinearOpBase< Scalar > > getOp (const int k) const
 

Overridden from Teuchos::Describable

std::string description () const
 Prints just the name DefaultAddedLinearOp along with the overall dimensions and the number of constituent operators.
 
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
 Prints the details about the constituent linear operators.
 

Additional Inherited Members

- Public Member Functions inherited from Thyra::AddedLinearOpBase< Scalar >
- Public Member Functions inherited from Thyra::LinearOpBase< Scalar >
bool opSupported (EOpTransp M_trans) const
 Return if the M_trans operation of apply() is supported or not.
 
void apply (const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const
 Apply the linear operator to a multi-vector : Y = alpha*op(M)*X + beta*Y.
 
- Protected Member Functions inherited from Thyra::LinearOpBase< Scalar >

Detailed Description

template<class Scalar>
class Thyra::DefaultAddedLinearOp< Scalar >

Concrete composite LinearOpBase subclass that creates an implicitly added linear operator out of one or more constituent LinearOpBase objects.

This class represents a added linear operator M of the form:

M = Op[0] + Op[1] + ... + Op[numOps-1]

where Op[] is an array of numOps LinearOp objects. Of course the operator M is not constructed explicitly but instead just applies the constituent linear operators accordingly using temporaries.

In other words, this class defines apply() as:

y = alpha*M*x + beta*y
  = alpha * ( Op[0]*x + Op[1]*x + ... * Op[numOps-1]*x ) + beta * y

Rather than calling the constructor directly, consider using the non-member helper functions described here.

Definition at line 85 of file Thyra_DefaultAddedLinearOp_decl.hpp.

Constructor & Destructor Documentation

◆ DefaultAddedLinearOp() [1/3]

template<class Scalar >
Thyra::DefaultAddedLinearOp< Scalar >::DefaultAddedLinearOp ( )

Constructs to uninitialized.

Postconditions:

Definition at line 95 of file Thyra_DefaultAddedLinearOp_def.hpp.

◆ DefaultAddedLinearOp() [2/3]

template<class Scalar >
Thyra::DefaultAddedLinearOp< Scalar >::DefaultAddedLinearOp ( const ArrayView< const RCP< LinearOpBase< Scalar > > > & Ops)

Calls initialize().

Rather than calling this constructor directly, consider using the non-member helper functions described here.

Definition at line 100 of file Thyra_DefaultAddedLinearOp_def.hpp.

◆ DefaultAddedLinearOp() [3/3]

template<class Scalar >
Thyra::DefaultAddedLinearOp< Scalar >::DefaultAddedLinearOp ( const ArrayView< const RCP< const LinearOpBase< Scalar > > > & Ops)

Calls initialize().

Rather than calling this constructor directly, consider using the non-member helper functions described here.

Definition at line 108 of file Thyra_DefaultAddedLinearOp_def.hpp.

Member Function Documentation

◆ initialize() [1/2]

template<class Scalar >
void Thyra::DefaultAddedLinearOp< Scalar >::initialize ( const ArrayView< const RCP< LinearOpBase< Scalar > > > & Ops)

Initialize given a list of non-const linear operators.

Parameters
Ops[in] Array (length numOps) of constituent linear operators and their aggregated default definitions of the non-transposed operator.

Preconditions:

  • numOps > 0
  • Ops != NULL
  • Ops[k].op().get()!=NULL, for k=0...numOps-1

Postconditions:

  • this->numOps()==numOps
  • this->getOp(k).op().get()==Ops[k].op().get(), for k=0...numOps-1

Definition at line 116 of file Thyra_DefaultAddedLinearOp_def.hpp.

◆ initialize() [2/2]

template<class Scalar >
void Thyra::DefaultAddedLinearOp< Scalar >::initialize ( const ArrayView< const RCP< const LinearOpBase< Scalar > > > & Ops)

Initialize given a list of const linear operators.

Parameters
numOps[in] Number of constituent operators.
Ops[in] Array (length numOps) of constituent linear operators and their aggregated default definitions of the non-transposed operator.

Preconditions:

  • numOps > 0
  • Ops != NULL
  • Ops[k].op().get()!=NULL, for k=0...numOps-1

Postconditions:

  • this->numOps()==numOps
  • this->getOp(k).op().get()==Ops[k].op().get(), for k=0...numOps-1

Definition at line 129 of file Thyra_DefaultAddedLinearOp_def.hpp.

◆ uninitialize()

template<class Scalar >
void Thyra::DefaultAddedLinearOp< Scalar >::uninitialize ( )

Set to uninitialized.

Postconditions:

Definition at line 142 of file Thyra_DefaultAddedLinearOp_def.hpp.

◆ numOps()

template<class Scalar >
int Thyra::DefaultAddedLinearOp< Scalar >::numOps ( ) const
virtual

◆ opIsConst()

template<class Scalar >
bool Thyra::DefaultAddedLinearOp< Scalar >::opIsConst ( const int k) const
virtual

◆ getNonconstOp()

template<class Scalar >
Teuchos::RCP< LinearOpBase< Scalar > > Thyra::DefaultAddedLinearOp< Scalar >::getNonconstOp ( const int k)
virtual

◆ getOp()

template<class Scalar >
Teuchos::RCP< const LinearOpBase< Scalar > > Thyra::DefaultAddedLinearOp< Scalar >::getOp ( const int k) const
virtual

◆ range()

template<class Scalar >
Teuchos::RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultAddedLinearOp< Scalar >::range ( ) const
virtual

Returns this->getOp(0).range() if <t>this->numOps() > 0 and returns Teuchos::null otherwise.

Implements Thyra::LinearOpBase< Scalar >.

Definition at line 196 of file Thyra_DefaultAddedLinearOp_def.hpp.

◆ domain()

template<class Scalar >
Teuchos::RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultAddedLinearOp< Scalar >::domain ( ) const
virtual

Returns this->getOp(this->numOps()-1).domain() if <t>this->numOps() > 0 and returns Teuchos::null otherwise.

Implements Thyra::LinearOpBase< Scalar >.

Definition at line 207 of file Thyra_DefaultAddedLinearOp_def.hpp.

◆ clone()

template<class Scalar >
Teuchos::RCP< const LinearOpBase< Scalar > > Thyra::DefaultAddedLinearOp< Scalar >::clone ( ) const
virtual

Reimplemented from Thyra::LinearOpBase< Scalar >.

Definition at line 218 of file Thyra_DefaultAddedLinearOp_def.hpp.

◆ description()

template<class Scalar >
std::string Thyra::DefaultAddedLinearOp< Scalar >::description ( ) const
virtual

Prints just the name DefaultAddedLinearOp along with the overall dimensions and the number of constituent operators.

Reimplemented from Teuchos::Describable.

Definition at line 228 of file Thyra_DefaultAddedLinearOp_def.hpp.

◆ describe()

template<class Scalar >
void Thyra::DefaultAddedLinearOp< Scalar >::describe ( Teuchos::FancyOStream & out,
const Teuchos::EVerbosityLevel verbLevel ) const
virtual

Prints the details about the constituent linear operators.

This function outputs different levels of detail based on the value passed in for verbLevel:

ToDo: Finish documentation!

Reimplemented from Teuchos::Describable.

Definition at line 239 of file Thyra_DefaultAddedLinearOp_def.hpp.

◆ opSupportedImpl()

template<class Scalar >
bool Thyra::DefaultAddedLinearOp< Scalar >::opSupportedImpl ( EOpTransp M_trans) const
protectedvirtual

Returns true only if all constituent operators support M_trans.

Implements Thyra::LinearOpBase< Scalar >.

Definition at line 282 of file Thyra_DefaultAddedLinearOp_def.hpp.

◆ applyImpl()

template<class Scalar >
void Thyra::DefaultAddedLinearOp< Scalar >::applyImpl ( const EOpTransp M_trans,
const MultiVectorBase< Scalar > & X,
const Ptr< MultiVectorBase< Scalar > > & Y,
const Scalar alpha,
const Scalar beta ) const
protectedvirtual

Implements Thyra::LinearOpBase< Scalar >.

Definition at line 293 of file Thyra_DefaultAddedLinearOp_def.hpp.

Friends And Related Symbol Documentation

◆ nonconstAdd()

template<class Scalar >
RCP< LinearOpBase< Scalar > > nonconstAdd ( const RCP< LinearOpBase< Scalar > > & A,
const RCP< LinearOpBase< Scalar > > & B,
const std::string & label = "" )
related

Form an implicit addition of two linear operators: M = A + B.

◆ add()

template<class Scalar >
RCP< const LinearOpBase< Scalar > > add ( const RCP< const LinearOpBase< Scalar > > & A,
const RCP< const LinearOpBase< Scalar > > & B,
const std::string & label = "" )
related

Form an implicit addition of two linear operators: M = A + B.

◆ nonconstSubtract()

template<class Scalar >
RCP< LinearOpBase< Scalar > > nonconstSubtract ( const RCP< LinearOpBase< Scalar > > & A,
const RCP< LinearOpBase< Scalar > > & B,
const std::string & label = "" )
related

Form an implicit subtraction of two linear operators: M = A - B.

◆ subtract()

template<class Scalar >
RCP< const LinearOpBase< Scalar > > subtract ( const RCP< const LinearOpBase< Scalar > > & A,
const RCP< const LinearOpBase< Scalar > > & B,
const std::string & label = "" )
related

Form an implicit subtraction of two linear operators: M = A - B.


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