|
Thyra Package Browser (Single Doxygen Collection) Version of the Day
|
Concrete composite LinearOpBase subclass that creates an implicitly multiplied linear operator out of one or more constituent LinearOpBase objects.
More...
#include <Thyra_DefaultMultipliedLinearOp_decl.hpp>

Private Member Functions | |
| void | assertInitialized () const |
| void | validateOps () |
| void | setupDefaultObjectLabel () |
| DefaultMultipliedLinearOp (const DefaultMultipliedLinearOp &) | |
| DefaultMultipliedLinearOp & | operator= (const DefaultMultipliedLinearOp &) |
Private Attributes | |
| Array < Teuchos::ConstNonconstObjectContainer < LinearOpBase< Scalar > > > | Ops_ |
Related Functions | |
(Note that these are not member functions.) | |
| template<class Scalar > | |
| RCP< DefaultMultipliedLinearOp < Scalar > > | defaultMultipliedLinearOp () |
| Nonmember constructor. | |
| template<class Scalar > | |
| RCP< DefaultMultipliedLinearOp < Scalar > > | defaultMultipliedLinearOp (const ArrayView< const RCP< LinearOpBase< Scalar > > > &Ops) |
| Nonmember constructor. | |
| template<class Scalar > | |
| RCP< DefaultMultipliedLinearOp < Scalar > > | defaultMultipliedLinearOp (const ArrayView< const RCP< const LinearOpBase< Scalar > > > &Ops) |
| Nonmember constructor. | |
| template<class Scalar > | |
| RCP< LinearOpBase< Scalar > > | nonconstMultiply (const RCP< LinearOpBase< Scalar > > &A, const RCP< LinearOpBase< Scalar > > &B, const std::string &M_label="") |
Form an implicit multiplication of two linear operators: M = A * B. | |
| template<class Scalar > | |
| RCP< const LinearOpBase< Scalar > > | multiply (const RCP< const LinearOpBase< Scalar > > &A, const RCP< const LinearOpBase< Scalar > > &B, const std::string &M_label="") |
Form an implicit multiplication of two linear operators: M = A * B. | |
| template<class Scalar > | |
| RCP< const LinearOpBase< Scalar > > | multiply (const RCP< const LinearOpBase< Scalar > > &A, const RCP< const LinearOpBase< Scalar > > &B, const RCP< const LinearOpBase< Scalar > > &C, const std::string &M_label="") |
Form an implicit multiplication of three linear operators: M = A * B * C. | |
Constructors/initializers/accessors | |
| DefaultMultipliedLinearOp () | |
| Constructs to uninitialized. | |
| 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 MultipliedLinearOpBase | |
| 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 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 |
| | |
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. | |
Deprecated. | |
| DefaultMultipliedLinearOp (const int numOps_in, const RCP< LinearOpBase< Scalar > > Ops[]) | |
| Deprecated. | |
| DefaultMultipliedLinearOp (const int numOps_in, const RCP< const LinearOpBase< Scalar > > Ops[]) | |
| Deprecated. | |
| void | initialize (const int numOps_in, const RCP< LinearOpBase< Scalar > > Ops[]) |
| Deprecated. | |
| void | initialize (const int numOps_in, const RCP< const LinearOpBase< Scalar > > Ops[]) |
| Deprecated. | |
Concrete composite 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 RCP<const Thyra::LinearOpBase<Scalar> > &A, const RCP<const Thyra::LinearOpBase<Scalar> > &B, const RCP<const Thyra::LinearOpBase<Scalar> > &C, const Ptr<RCP<const Thyra::LinearOpBase<Scalar> > > &D ) { typedef RCP<const Thyra::LinearOpBase<Scalar> > LOB; *D = Teuchos::rcp( new Thyra::DefaultMultipliedLinearOp<Scalar>( Teuchos::tuple<LOB>(A, adjoin(B), C)() ) ); }
Rather than calling the constructor directly, consider using the non-member helper functions described here.
Definition at line 107 of file Thyra_DefaultMultipliedLinearOp_decl.hpp.
| Thyra::DefaultMultipliedLinearOp< Scalar >::DefaultMultipliedLinearOp | ( | ) |
Constructs to uninitialized.
Postconditions:
this->numOps()==0 Definition at line 43 of file Thyra_DefaultMultipliedLinearOp_def.hpp.
| Thyra::DefaultMultipliedLinearOp< Scalar >::DefaultMultipliedLinearOp | ( | const int | numOps_in, |
| const RCP< LinearOpBase< Scalar > > | Ops[] | ||
| ) | [inline] |
Deprecated.
Definition at line 252 of file Thyra_DefaultMultipliedLinearOp_decl.hpp.
References Thyra::DefaultMultipliedLinearOp< Scalar >::initialize().
| Thyra::DefaultMultipliedLinearOp< Scalar >::DefaultMultipliedLinearOp | ( | const int | numOps_in, |
| const RCP< const LinearOpBase< Scalar > > | Ops[] | ||
| ) | [inline] |
Deprecated.
Definition at line 261 of file Thyra_DefaultMultipliedLinearOp_decl.hpp.
References Thyra::DefaultMultipliedLinearOp< Scalar >::initialize().
| Thyra::DefaultMultipliedLinearOp< Scalar >::DefaultMultipliedLinearOp | ( | const DefaultMultipliedLinearOp< Scalar > & | ) | [private] |
| void Thyra::DefaultMultipliedLinearOp< Scalar >::initialize | ( | const ArrayView< const RCP< LinearOpBase< Scalar > > > & | Ops | ) |
Initialize given a list of non-const linear 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 48 of file Thyra_DefaultMultipliedLinearOp_def.hpp.
Referenced by Thyra::DefaultMultipliedLinearOp< Scalar >::DefaultMultipliedLinearOp(), and Thyra::DefaultMultipliedLinearOp< Scalar >::initialize().
| void Thyra::DefaultMultipliedLinearOp< Scalar >::initialize | ( | const ArrayView< const RCP< const LinearOpBase< Scalar > > > & | Ops | ) |
Initialize given a list of const linear 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 61 of file Thyra_DefaultMultipliedLinearOp_def.hpp.
| void Thyra::DefaultMultipliedLinearOp< Scalar >::uninitialize | ( | ) |
Set to uninitialized.
Postconditions:
this->numOps()==0 Definition at line 74 of file Thyra_DefaultMultipliedLinearOp_def.hpp.
| int Thyra::DefaultMultipliedLinearOp< Scalar >::numOps | ( | ) | const [virtual] |
Implements Thyra::MultipliedLinearOpBase< Scalar >.
Definition at line 85 of file Thyra_DefaultMultipliedLinearOp_def.hpp.
| bool Thyra::DefaultMultipliedLinearOp< Scalar >::opIsConst | ( | const int | k | ) | const [virtual] |
Implements Thyra::MultipliedLinearOpBase< Scalar >.
Definition at line 92 of file Thyra_DefaultMultipliedLinearOp_def.hpp.
| RCP< LinearOpBase< Scalar > > Thyra::DefaultMultipliedLinearOp< Scalar >::getNonconstOp | ( | const int | k | ) | [virtual] |
Implements Thyra::MultipliedLinearOpBase< Scalar >.
Definition at line 103 of file Thyra_DefaultMultipliedLinearOp_def.hpp.
| RCP< const LinearOpBase< Scalar > > Thyra::DefaultMultipliedLinearOp< Scalar >::getOp | ( | const int | k | ) | const [virtual] |
Implements Thyra::MultipliedLinearOpBase< Scalar >.
Definition at line 114 of file Thyra_DefaultMultipliedLinearOp_def.hpp.
| RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultMultipliedLinearOp< 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 128 of file Thyra_DefaultMultipliedLinearOp_def.hpp.
| RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultMultipliedLinearOp< 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 137 of file Thyra_DefaultMultipliedLinearOp_def.hpp.
| RCP< const LinearOpBase< Scalar > > Thyra::DefaultMultipliedLinearOp< Scalar >::clone | ( | ) | const [virtual] |
Reimplemented from Thyra::LinearOpBase< Scalar >.
Definition at line 146 of file Thyra_DefaultMultipliedLinearOp_def.hpp.
| std::string Thyra::DefaultMultipliedLinearOp< Scalar >::description | ( | ) | const |
Prints just the name DefaultMultipliedLinearOp along with the overall dimensions and the number of constituent operators.
Definition at line 156 of file Thyra_DefaultMultipliedLinearOp_def.hpp.
| void Thyra::DefaultMultipliedLinearOp< 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!
Definition at line 166 of file Thyra_DefaultMultipliedLinearOp_def.hpp.
| bool Thyra::DefaultMultipliedLinearOp< Scalar >::opSupportedImpl | ( | EOpTransp | M_trans | ) | const [protected, virtual] |
Returns true only if all constituent operators support M_trans.
Implements Thyra::LinearOpBase< Scalar >.
Definition at line 214 of file Thyra_DefaultMultipliedLinearOp_def.hpp.
| void Thyra::DefaultMultipliedLinearOp< Scalar >::applyImpl | ( | const EOpTransp | M_trans, |
| const MultiVectorBase< Scalar > & | X, | ||
| const Ptr< MultiVectorBase< Scalar > > & | Y, | ||
| const Scalar | alpha, | ||
| const Scalar | beta | ||
| ) | const [protected, virtual] |
Implements Thyra::LinearOpBase< Scalar >.
Definition at line 225 of file Thyra_DefaultMultipliedLinearOp_def.hpp.
References Thyra::apply(), Thyra::LinearOpBase< Scalar >::domain(), Thyra::NOTRANS, Thyra::real_trans(), and THYRA_ASSERT_LINEAR_OP_MULTIVEC_APPLY_SPACES.
| void Thyra::DefaultMultipliedLinearOp< Scalar >::initialize | ( | const int | numOps_in, |
| const RCP< LinearOpBase< Scalar > > | Ops[] | ||
| ) | [inline] |
Deprecated.
Definition at line 270 of file Thyra_DefaultMultipliedLinearOp_decl.hpp.
References Thyra::DefaultMultipliedLinearOp< Scalar >::initialize().
| void Thyra::DefaultMultipliedLinearOp< Scalar >::initialize | ( | const int | numOps_in, |
| const RCP< const LinearOpBase< Scalar > > | Ops[] | ||
| ) | [inline] |
Deprecated.
Definition at line 279 of file Thyra_DefaultMultipliedLinearOp_decl.hpp.
References Thyra::DefaultMultipliedLinearOp< Scalar >::initialize().
| void Thyra::DefaultMultipliedLinearOp< Scalar >::assertInitialized | ( | ) | const [inline, private] |
Definition at line 394 of file Thyra_DefaultMultipliedLinearOp_decl.hpp.
| void Thyra::DefaultMultipliedLinearOp< Scalar >::validateOps | ( | ) | [private] |
Definition at line 287 of file Thyra_DefaultMultipliedLinearOp_def.hpp.
References Thyra::NOTRANS, THYRA_ASSERT_LINEAR_OP_TIMES_LINEAR_OP_SPACES_NAMES, and Thyra::toString().
| void Thyra::DefaultMultipliedLinearOp< Scalar >::setupDefaultObjectLabel | ( | ) | [private] |
Definition at line 313 of file Thyra_DefaultMultipliedLinearOp_def.hpp.
| DefaultMultipliedLinearOp& Thyra::DefaultMultipliedLinearOp< Scalar >::operator= | ( | const DefaultMultipliedLinearOp< Scalar > & | ) | [private] |
| RCP< DefaultMultipliedLinearOp< Scalar > > defaultMultipliedLinearOp | ( | ) | [related] |
Nonmember constructor.
Definition at line 311 of file Thyra_DefaultMultipliedLinearOp_decl.hpp.
| RCP< DefaultMultipliedLinearOp< Scalar > > defaultMultipliedLinearOp | ( | const ArrayView< const RCP< LinearOpBase< Scalar > > > & | Ops | ) | [related] |
Nonmember constructor.
Definition at line 323 of file Thyra_DefaultMultipliedLinearOp_decl.hpp.
| RCP< DefaultMultipliedLinearOp< Scalar > > defaultMultipliedLinearOp | ( | const ArrayView< const RCP< const LinearOpBase< Scalar > > > & | Ops | ) | [related] |
Nonmember constructor.
Definition at line 337 of file Thyra_DefaultMultipliedLinearOp_decl.hpp.
| RCP< LinearOpBase< Scalar > > nonconstMultiply | ( | const RCP< LinearOpBase< Scalar > > & | A, |
| const RCP< LinearOpBase< Scalar > > & | B, | ||
| const std::string & | M_label = "" |
||
| ) | [related] |
Form an implicit multiplication of two linear operators: M = A * B.
Referenced by run_composite_linear_ops_tests().
| RCP< const LinearOpBase< Scalar > > multiply | ( | const RCP< const LinearOpBase< Scalar > > & | A, |
| const RCP< const LinearOpBase< Scalar > > & | B, | ||
| const std::string & | M_label = "" |
||
| ) | [related] |
Form an implicit multiplication of two linear operators: M = A * B.
Referenced by exampleImplicitlyComposedLinearOperators(), run_composite_linear_ops_tests(), and runCgSolveExample().
| RCP< const LinearOpBase< Scalar > > multiply | ( | const RCP< const LinearOpBase< Scalar > > & | A, |
| const RCP< const LinearOpBase< Scalar > > & | B, | ||
| const RCP< const LinearOpBase< Scalar > > & | C, | ||
| const std::string & | M_label = "" |
||
| ) | [related] |
Form an implicit multiplication of three linear operators: M = A * B * C.
Array<Teuchos::ConstNonconstObjectContainer<LinearOpBase<Scalar> > > Thyra::DefaultMultipliedLinearOp< Scalar >::Ops_ [private] |
Definition at line 291 of file Thyra_DefaultMultipliedLinearOp_decl.hpp.
1.7.4