LinearOpBase subclass that wraps a LinearOpBase object and adds on an extra scaling factor and/or a transpose enum.
More...
#include <Thyra_ScaledAdjointLinearOpDecl.hpp>
Inheritance diagram for Thyra::ScaledAdjointLinearOp< Scalar >:
Constructors/initializers/accessors | |
| ScaledAdjointLinearOp () | |
| Constructs to uninitialized. | |
| ScaledAdjointLinearOp (const Scalar &scalar, const ETransp &transp, const Teuchos::RefCountPtr< const LinearOpBase< Scalar > > &Op) | |
Calls initialize(). | |
| void | initialize (const Scalar &scalar, const ETransp &transp, const Teuchos::RefCountPtr< const LinearOpBase< Scalar > > &Op) |
| Initialize with an operator with by defining adjoint (transpose) and scaling arguments. | |
| void | uninitialize (Scalar *scalar=NULL, ETransp *transp=NULL, Teuchos::RefCountPtr< const LinearOpBase< Scalar > > *Op=NULL) |
Set to uninitialized and (optionally) extract the objects passed into initialize(). | |
Overridden from Teuchos::Describable | |
| std::string | description () const |
Outputs ScaledAdjointLinearOp<Scalar>{this->getOrigOp().description()) along with the dimensions. | |
| std::ostream & | describe (std::ostream &out, const Teuchos::EVerbosityLevel verbLevel, const std::string leadingIndent, const std::string indentSpacer) const |
| Prints out the original operator as well as all of the scalings and transpositions in the order that they occurred. | |
Overridden from OpBase | |
| Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > | range () const |
| Return the range space of the logical linear operator. | |
| Teuchos::RefCountPtr< const VectorSpaceBase< Scalar > > | domain () const |
| Return the domain space of the logical linear operator. | |
| bool | opSupported (ETransp M_trans) const |
Overridden from LinearOpBase | |
| void | apply (const ETransp M_trans, const MultiVectorBase< Scalar > &X, MultiVectorBase< Scalar > *Y, const Scalar alpha, const Scalar beta) const |
Apply the linear operator (or its transpose) to a multi-vector : Y = alpha*op(M)*X + beta*Y. | |
Overridden from ScaledAdointLinearOpBase | |
| Scalar | overallScalar () const |
| | |
| ETransp | overallTransp () const |
| | |
| Teuchos::RefCountPtr< const LinearOpBase< Scalar > > | getOrigOp () const |
| | |
| Teuchos::RefCountPtr< const LinearOpBase< Scalar > > | getOp () const |
| | |
LinearOpBase subclass that wraps a LinearOpBase object and adds on an extra scaling factor and/or a transpose enum.
This class represents a scaled, adjointed (transposed) linear operator M of the form:
M = scalar * op(Op)
where Op is another LinearOpBase object, scalar is a Scalar, and the operation op(Op) is specified by a ETransp and is given as op(Op) = Op (NOTRANS), or op(Op) = Op^T (TRANS), or op(Op) = Op^H (CONJTRANS). Of course the operator M is not constructed explicitly but instead just applies the decorated operator Op by modifying the apply() function that calls Op.apply().
This subclass is designed to allow the efficient handling of multiple implicit scalings and/or adjoints (transposes) and allow these implicit transformations to be reversed. A sequence of scalings/adjoints from some original LinearOpBase object origOp is shown as:
M = scalar_n * op_n( ... scalar_2 * op_2( scalar_1 * op_1( origOp ) ) ... ) => M = overallScalar * overall_op(origOp)
where overallScalar and overall_op(...) are the cumulative transformations given as:
overallScalar = scalar_n * ... * scalar_2 * ... * scalar_1 overall_op(origOp) = op_n( ... op_2( op_1( ... op_n( origOp ) ... ) ) )
Each individual transformation pair (scalar_i,op_i(...)) is specified with arguments Scalar scalar and ETransp transp. The overall scaling is returned using this->overallScalar(), the overall adjoint enum is returned using this->overallTransp(), and the original linear operator is returned from <tt>this->getOrigOp().
The operator most recently wrapped is returned from <tt>this->getOp(). The individual scalings and transformations are not exposed from this interface but can be viewed by calling this->description() with a verbosity level of ???. The arguments passed into the constructor ScaledAdjointLinearOp() or initialize() can always be extracted using uninitialize().
This subclass keeps track of all of the individual scalings scalar_i and adjoining operations op_i(...) so that the description() function can print this out and also so that the operations can be reversed.
The copy constructor and assignment operators are declared private since some thought needs to be put into what they should mean.
Note: This class does not maintain any specific cached information about the original operator so it is safe, in some cases, to manipulate the original operator and still keep this intact and automatically updated for any changes that are made.
Definition at line 109 of file Thyra_ScaledAdjointLinearOpDecl.hpp.
|
|||||||||
|
Constructs to uninitialized. Postconditions:
Definition at line 469 of file Thyra_ScaledAdjointLinearOpDecl.hpp. |
|
||||||||||||||||||||
|
Calls
Note, instead of calling this constructor directly consider using the non-member functions described here which create dynamically allocated Definition at line 476 of file Thyra_ScaledAdjointLinearOpDecl.hpp. |
|
||||||||||||||||||||
|
Initialize with an operator with by defining adjoint (transpose) and scaling arguments.
Postconditions:
Definition at line 40 of file Thyra_ScaledAdjointLinearOp.hpp. |
|
||||||||||||||||||||
|
Set to uninitialized and (optionally) extract the objects passed into
Definition at line 92 of file Thyra_ScaledAdjointLinearOp.hpp. |
|
|||||||||
|
Outputs
Definition at line 117 of file Thyra_ScaledAdjointLinearOp.hpp. |
|
||||||||||||||||||||||||
|
Prints out the original operator as well as all of the scalings and transpositions in the order that they occurred.
This function outputs different levels of detail based on the value passed in for ToDo: Finish documentation! Definition at line 129 of file Thyra_ScaledAdjointLinearOp.hpp. |
|
|||||||||
|
Return the range space of the logical linear operator. Simply returns: return ( this->overallTransp()==NOTRANS ? this->getOrigOp()->range() : this->getOrigOp()->domain() ); Definition at line 181 of file Thyra_ScaledAdjointLinearOp.hpp. |
|
|||||||||
|
Return the domain space of the logical linear operator. Simply returns: return ( this->overallTransp()==NOTRANS ? this->getOrigOp()->domain() : this->getOrigOp()->range() ); Definition at line 189 of file Thyra_ScaledAdjointLinearOp.hpp. |
|
||||||||||
|
Return if the operation is supported on the logical linear operator. Simply returns: return this->getOrigOp()->opSupported(trans_trans(this->overallTransp(),M_trans)); Implements Thyra::SingleScalarLinearOpBase< Scalar >. Definition at line 196 of file Thyra_ScaledAdjointLinearOp.hpp. |
|
||||||||||||||||||||||||||||
|
Apply the linear operator (or its transpose) to a multi-vector : Simply calls: this->getOrigOp()->apply(trans_trans(M_trans,this->overallTransp()),X,Y,(this->overallScalar()*alpha),beta) Implements Thyra::SingleScalarLinearOpBase< Scalar >. Definition at line 205 of file Thyra_ScaledAdjointLinearOp.hpp. |
|
|||||||||
|
Implements Thyra::ScaledAdjointLinearOpBase< Scalar >. Definition at line 220 of file Thyra_ScaledAdjointLinearOp.hpp. |
|
|||||||||
|
Implements Thyra::ScaledAdjointLinearOpBase< Scalar >. Definition at line 226 of file Thyra_ScaledAdjointLinearOp.hpp. |
|
|||||||||
|
Implements Thyra::ScaledAdjointLinearOpBase< Scalar >. Definition at line 233 of file Thyra_ScaledAdjointLinearOp.hpp. |
|
|||||||||
|
Definition at line 74 of file Thyra_ScaledAdjointLinearOp.hpp. |
1.3.9.1