Thyra::DefaultAddedLinearOp< Scalar > Class Template Reference
[Development of linear Abstract Numerical Algorithms (ANAs)]

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

#include <Thyra_DefaultAddedLinearOpDecl.hpp>

Inheritance diagram for Thyra::DefaultAddedLinearOp< Scalar >:

[legend]
List of all members.

Constructors/initializers/accessors

 DefaultAddedLinearOp ()
 Constructs to uninitialized.
 DefaultAddedLinearOp (const int numOps, const Teuchos::RefCountPtr< LinearOpBase< Scalar > > Ops[])
 DefaultAddedLinearOp (const int numOps, const Teuchos::RefCountPtr< const LinearOpBase< Scalar > > Ops[])
void initialize (const int numOps, const Teuchos::RefCountPtr< LinearOpBase< Scalar > > Ops[])
 Initialize given a list of non-const linear operators.
void initialize (const int numOps, const Teuchos::RefCountPtr< 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
 
Teuchos::RefCountPtr< LinearOpBase<
Scalar > > 
getNonconstOp (const int k)
 
Teuchos::RefCountPtr< const
LinearOpBase< Scalar > > 
getOp (const int k) const
 

Overridden from LinearOpBase

Teuchos::RefCountPtr< const
VectorSpaceBase< Scalar > > 
range () const
 Returns this->getOp(0).range() if <t>this->numOps() > 0 and returns Teuchos::null otherwise.
Teuchos::RefCountPtr< const
VectorSpaceBase< Scalar > > 
domain () const
 Returns this->getOp(this->numOps()-1).domain() if <t>this->numOps() > 0 and returns Teuchos::null otherwise.
Teuchos::RefCountPtr< const
LinearOpBase< Scalar > > 
clone () 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.

Overridden from SingleScalarLinearOpBase

bool opSupported (ETransp M_trans) const
 Returns true only if all constituent operators support M_trans.
void apply (const ETransp M_trans, const MultiVectorBase< Scalar > &X, MultiVectorBase< Scalar > *Y, const Scalar alpha, const Scalar beta) const
 

Related Functions

(Note that these are not member functions.)

Teuchos::RefCountPtr< LinearOpBase<
Scalar > > 
nonconstAdd (const Teuchos::RefCountPtr< LinearOpBase< Scalar > > &A, const Teuchos::RefCountPtr< LinearOpBase< Scalar > > &B)
 Form an implicit addition of two linear operators: M = A + B.
Teuchos::RefCountPtr< const
LinearOpBase< Scalar > > 
add (const Teuchos::RefCountPtr< const LinearOpBase< Scalar > > &A, const Teuchos::RefCountPtr< const LinearOpBase< Scalar > > &B)
 Form an implicit addition of two linear operators: M = A + B.

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 71 of file Thyra_DefaultAddedLinearOpDecl.hpp.


Constructor & Destructor Documentation

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

Constructs to uninitialized.

Postconditions:

Definition at line 41 of file Thyra_DefaultAddedLinearOp.hpp.

template<class Scalar>
Thyra::DefaultAddedLinearOp< Scalar >::DefaultAddedLinearOp const int  numOps,
const Teuchos::RefCountPtr< LinearOpBase< Scalar > >  Ops[]
 

Calls initialize().

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

Definition at line 45 of file Thyra_DefaultAddedLinearOp.hpp.

template<class Scalar>
Thyra::DefaultAddedLinearOp< Scalar >::DefaultAddedLinearOp const int  numOps,
const Teuchos::RefCountPtr< const LinearOpBase< Scalar > >  Ops[]
 

Calls initialize().

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


Member Function Documentation

template<class Scalar>
void Thyra::DefaultAddedLinearOp< Scalar >::initialize const int  numOps,
const Teuchos::RefCountPtr< LinearOpBase< Scalar > >  Ops[]
 

Initialize given a list of non-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 63 of file Thyra_DefaultAddedLinearOp.hpp.

template<class Scalar>
void Thyra::DefaultAddedLinearOp< Scalar >::initialize const int  numOps,
const Teuchos::RefCountPtr< 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

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

Set to uninitialized.

Postconditions:

Definition at line 93 of file Thyra_DefaultAddedLinearOp.hpp.

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

Implements Thyra::AddedLinearOpBase< Scalar >.

Definition at line 101 of file Thyra_DefaultAddedLinearOp.hpp.

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

Implements Thyra::AddedLinearOpBase< Scalar >.

Definition at line 107 of file Thyra_DefaultAddedLinearOp.hpp.

template<class Scalar>
Teuchos::RefCountPtr< LinearOpBase< Scalar > > Thyra::DefaultAddedLinearOp< Scalar >::getNonconstOp const int  k  )  [virtual]
 

Implements Thyra::AddedLinearOpBase< Scalar >.

Definition at line 117 of file Thyra_DefaultAddedLinearOp.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const LinearOpBase< Scalar > > Thyra::DefaultAddedLinearOp< Scalar >::getOp const int  k  )  const [virtual]
 

Implements Thyra::AddedLinearOpBase< Scalar >.

Definition at line 127 of file Thyra_DefaultAddedLinearOp.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > Thyra::DefaultAddedLinearOp< Scalar >::range  )  const
 

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

Definition at line 139 of file Thyra_DefaultAddedLinearOp.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > Thyra::DefaultAddedLinearOp< Scalar >::domain  )  const
 

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

Definition at line 147 of file Thyra_DefaultAddedLinearOp.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const LinearOpBase< Scalar > > Thyra::DefaultAddedLinearOp< Scalar >::clone  )  const
 

Definition at line 155 of file Thyra_DefaultAddedLinearOp.hpp.

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

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

Definition at line 163 of file Thyra_DefaultAddedLinearOp.hpp.

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

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 Thyra::LinearOpDefaultBase< Scalar >.

Definition at line 173 of file Thyra_DefaultAddedLinearOp.hpp.

template<class Scalar>
bool Thyra::DefaultAddedLinearOp< Scalar >::opSupported ETransp  M_trans  )  const [protected, virtual]
 

Returns true only if all constituent operators support M_trans.

Implements Thyra::SingleScalarLinearOpBase< Scalar >.

Definition at line 219 of file Thyra_DefaultAddedLinearOp.hpp.

template<class Scalar>
void Thyra::DefaultAddedLinearOp< Scalar >::apply const ETransp  M_trans,
const MultiVectorBase< Scalar > &  X,
MultiVectorBase< Scalar > *  Y,
const Scalar  alpha,
const Scalar  beta
const [protected, virtual]
 

Implements Thyra::SingleScalarLinearOpBase< Scalar >.

Definition at line 229 of file Thyra_DefaultAddedLinearOp.hpp.


Friends And Related Function Documentation

template<class Scalar>
Teuchos::RefCountPtr< LinearOpBase< Scalar > > nonconstAdd const Teuchos::RefCountPtr< LinearOpBase< Scalar > > &  A,
const Teuchos::RefCountPtr< LinearOpBase< Scalar > > &  B
[related]
 

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

template<class Scalar>
Teuchos::RefCountPtr< const LinearOpBase< Scalar > > add const Teuchos::RefCountPtr< const LinearOpBase< Scalar > > &  A,
const Teuchos::RefCountPtr< const LinearOpBase< Scalar > > &  B
[related]
 

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


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:32:32 2008 for Thyra Operator/Vector Support by doxygen 1.3.9.1