LinearOpBase subclass that creates a multiplicative linear operator out of one or more constituent LinearOpBase objects.
More...
#include <Thyra_MultiplicativeLinearOpDecl.hpp>
Inheritance diagram for Thyra::MultiplicativeLinearOp< Scalar >:
Constructors/initializers/accessors | |
| MultiplicativeLinearOp () | |
| Constructs to uninitialized. | |
| MultiplicativeLinearOp (const int numOps, const Teuchos::RefCountPtr< const LinearOpBase< Scalar > > Ops[], const Scalar &gamma=Teuchos::ScalarTraits< Scalar >::one()) | |
| void | initialize (const int numOps, const Teuchos::RefCountPtr< const LinearOpBase< Scalar > > Ops[], const Scalar &gamma=Teuchos::ScalarTraits< Scalar >::one()) |
| Initialize given a list of linear operators. | |
| int | numOps () const |
| Returns the current number of constituent operators. | |
| Teuchos::RefCountPtr< const LinearOpBase< Scalar > > | getOp (const int k) const |
Return the kth constituent operator. | |
| void | uninitialize (const int numOps=0, Teuchos::RefCountPtr< const LinearOpBase< Scalar > > Ops[]=NULL, Scalar *gamma=NULL) |
| Set to uninitialized. | |
Overridden from Teuchos::Describable | |
| std::string | description () const |
Prints just the name MultiplicativeLinearOp along with the overall dimensions and the number of constituent operators. | |
| std::ostream & | describe (std::ostream &out, const Teuchos::EVerbosityLevel verbLevel, const std::string leadingIndent, const std::string indentSpacer) const |
| Prints the details about the constituent linear operators. | |
Overridden from OpBase | |
| Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > | range () const |
Returns this->getOp(0).range(). | |
| Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > | domain () const |
Returns this->getOp(this->numOps()-1).domain(). | |
| bool | opSupported (ETransp M_trans) const |
Returns true only if all constituent operators support M_trans. | |
Overridden from LinearOpBase | |
| void | apply (const ETransp M_trans, const MultiVectorBase< Scalar > &X, MultiVectorBase< Scalar > *Y, const Scalar alpha, const Scalar beta) const |
| | |
| Teuchos::RefCountPtr< const LinearOpBase< Scalar > > | clone () const |
| | |
LinearOpBase subclass that creates a multiplicative linear operator out of one or more constituent LinearOpBase objects.
This class represents a multiplicative linear operator M of the form:
M = gamma * Op[0] * Op[1] * ... * Op[numOps-1]
where Op[] is an array of numOps LinearOp objects and gamma is a scalar. 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*gamma) * ( Op[0] * ( Op[1] * ( .... ( Op[numOps-1] * x ) ... ) ) ) + beta * y
for the case where M_trans==NOTRANS and as:
y = alpha*M'*x + beta*y = (alpha*gamma) * ( Op[numOps-1]' * ( .... ( Op[1]' * ( Op[0]' * x ) ) ... ) ) + beta * y
for the case where M_trans!=NOTRANS (where the transpose ' either defines TRANS or CONJTRANS).
Constructing a multiplicative operator is easy. For example, suppose one wants to construct the multiplicative operator D = gamma * A * B' * C. To do so one would do:
template<class Scalar> void constructD( const Scalar &gamma ,const Teuchos::RefCountPtr<const Thyra::LinearOpBase<Scalar> > &A ,const Teuchos::RefCountPtr<const Thyra::LinearOpBase<Scalar> > &B ,const Teuchos::RefCountPtr<const Thyra::LinearOpBase<Scalar> > &C ,Teuchos::RefCountPtr<const Thyra::LinearOpBase<Scalar> > *D ) { typedef Teuchos::RefCountPtr<const Thyra::LinearOpBase<Scalar> > LOB; *D = Teuchos::rcp( new Thyra::MultiplicativeLinearOp<Scalar>( 3, Teuchos::arrayArg<LOB>(A,adjoin(B),C)(), gamma ) ); }
Rather than calling the constructor directly, consider using the non-member helper functions described here.
Definition at line 101 of file Thyra_MultiplicativeLinearOpDecl.hpp.
|
|||||||||
|
Constructs to uninitialized. Postconditions:
Definition at line 40 of file Thyra_MultiplicativeLinearOp.hpp. |
|
||||||||||||||||||||
|
Calls Rather than calling this constructor directly, consider using the non-member helper functions described here. Definition at line 44 of file Thyra_MultiplicativeLinearOp.hpp. |
|
||||||||||||||||||||
|
Initialize given a list of linear operators.
Postconditions:
Definition at line 54 of file Thyra_MultiplicativeLinearOp.hpp. |
|
|||||||||
|
Returns the current number of constituent operators.
A return value of Definition at line 310 of file Thyra_MultiplicativeLinearOpDecl.hpp. |
|
||||||||||
|
Return the
Definition at line 317 of file Thyra_MultiplicativeLinearOpDecl.hpp. |
|
||||||||||||||||||||
|
Set to uninitialized.
Postconditions:
Definition at line 78 of file Thyra_MultiplicativeLinearOp.hpp. |
|
|||||||||
|
Prints just the name
Definition at line 96 of file Thyra_MultiplicativeLinearOp.hpp. |
|
||||||||||||||||||||||||
|
Prints the details about the constituent linear operators.
This function outputs different levels of detail based on the value passed in for ToDo: Finish documentation! Definition at line 106 of file Thyra_MultiplicativeLinearOp.hpp. |
|
|||||||||
|
Returns Preconditions:
Definition at line 145 of file Thyra_MultiplicativeLinearOp.hpp. |
|
|||||||||
|
Returns Preconditions:
Definition at line 153 of file Thyra_MultiplicativeLinearOp.hpp. |
|
||||||||||
|
Returns
Implements Thyra::SingleScalarLinearOpBase< Scalar >. Definition at line 160 of file Thyra_MultiplicativeLinearOp.hpp. |
|
||||||||||||||||||||||||||||
|
Implements Thyra::SingleScalarLinearOpBase< Scalar >. Definition at line 172 of file Thyra_MultiplicativeLinearOp.hpp. |
|
|||||||||
|
Definition at line 226 of file Thyra_MultiplicativeLinearOp.hpp. |
1.3.9.1