LinearOpBase subclass that creates an implicitly multiplied linear operator out of one or more constituent LinearOpBase objects.
More...
#include <Thyra_DefaultMultipliedLinearOpDecl.hpp>
Inheritance diagram for Thyra::DefaultMultipliedLinearOp< Scalar >:
Constructors/initializers/accessors | |
| DefaultMultipliedLinearOp () | |
| Constructs to uninitialized. | |
| DefaultMultipliedLinearOp (const int numOps, const Teuchos::RefCountPtr< LinearOpBase< Scalar > > Ops[]) | |
| DefaultMultipliedLinearOp (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 MultipliedLinearOpBase | |
| 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 DefaultMultipliedLinearOp 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 > > | nonconstMultiply (const Teuchos::RefCountPtr< LinearOpBase< Scalar > > &A, const Teuchos::RefCountPtr< LinearOpBase< Scalar > > &B) |
Form an implicit multiplication of two linear operators: M = A * B. | |
| Teuchos::RefCountPtr< const LinearOpBase< Scalar > > | multiply (const Teuchos::RefCountPtr< const LinearOpBase< Scalar > > &A, const Teuchos::RefCountPtr< const LinearOpBase< Scalar > > &B) |
Form an implicit multiplication of two linear operators: M = A * B. | |
LinearOpBase subclass that creates an implicitly multiplied linear operator out of one or more constituent LinearOpBase objects.
This class represents a multiplied 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] * ( Op[1] * ( .... ( Op[numOps-1] * x ) ... ) ) ) + beta * y
for the case where M_trans==NOTRANS and as:
y = alpha*M'*x + beta*y = alpha * ( Op[numOps-1]' * ( .... ( Op[1]' * ( Op[0]' * x ) ) ... ) ) + beta * y
for the case where real_trans(M_trans)!=NOTRANS (where the transpose ' either defines TRANS or CONJTRANS).
Constructing a multiplied operator is easy. For example, suppose one wants to construct the multiplied operator D = A * B' * C. To do so one would do:
template<class Scalar> void constructD( 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::DefaultMultipliedLinearOp<Scalar>( 3, Teuchos::arrayArg<LOB>(A,adjoin(B),C)() ) ); }
Rather than calling the constructor directly, consider using the non-member helper functions described here.
Definition at line 108 of file Thyra_DefaultMultipliedLinearOpDecl.hpp.
|
|||||||||
|
Constructs to uninitialized. Postconditions:
Definition at line 41 of file Thyra_DefaultMultipliedLinearOp.hpp. |
|
||||||||||||||||
|
Calls Rather than calling this constructor directly, consider using the non-member helper functions described here. Definition at line 45 of file Thyra_DefaultMultipliedLinearOp.hpp. |
|
||||||||||||||||
|
Calls Rather than calling this constructor directly, consider using the non-member helper functions described here. |
|
||||||||||||||||
|
Initialize given a list of non-const linear operators.
Postconditions:
Definition at line 63 of file Thyra_DefaultMultipliedLinearOp.hpp. |
|
||||||||||||||||
|
Initialize given a list of const linear operators.
Postconditions:
|
|
|||||||||
|
Set to uninitialized. Postconditions:
Definition at line 87 of file Thyra_DefaultMultipliedLinearOp.hpp. |
|
|||||||||
|
Implements Thyra::MultipliedLinearOpBase< Scalar >. Definition at line 95 of file Thyra_DefaultMultipliedLinearOp.hpp. |
|
||||||||||
|
Implements Thyra::MultipliedLinearOpBase< Scalar >. Definition at line 101 of file Thyra_DefaultMultipliedLinearOp.hpp. |
|
||||||||||
|
Implements Thyra::MultipliedLinearOpBase< Scalar >. Definition at line 111 of file Thyra_DefaultMultipliedLinearOp.hpp. |
|
||||||||||
|
Implements Thyra::MultipliedLinearOpBase< Scalar >. Definition at line 121 of file Thyra_DefaultMultipliedLinearOp.hpp. |
|
|||||||||
|
Returns
Definition at line 133 of file Thyra_DefaultMultipliedLinearOp.hpp. |
|
|||||||||
|
Returns
Definition at line 141 of file Thyra_DefaultMultipliedLinearOp.hpp. |
|
|||||||||
|
Definition at line 149 of file Thyra_DefaultMultipliedLinearOp.hpp. |
|
|||||||||
|
Prints just the name
Definition at line 157 of file Thyra_DefaultMultipliedLinearOp.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! Reimplemented from Thyra::LinearOpDefaultBase< Scalar >. Definition at line 167 of file Thyra_DefaultMultipliedLinearOp.hpp. |
|
||||||||||
|
Returns
Implements Thyra::SingleScalarLinearOpBase< Scalar >. Definition at line 213 of file Thyra_DefaultMultipliedLinearOp.hpp. |
|
||||||||||||||||||||||||||||
|
Implements Thyra::SingleScalarLinearOpBase< Scalar >. Definition at line 223 of file Thyra_DefaultMultipliedLinearOp.hpp. |
|
||||||||||||||||
|
Form an implicit multiplication of two linear operators:
|
|
||||||||||||||||
|
Form an implicit multiplication of two linear operators:
|
1.3.9.1