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

Private Member Functions | |
| void | assertInitialized () const |
| void | validateOps () |
| void | setupDefaultObjectLabel () |
| DefaultAddedLinearOp (const DefaultAddedLinearOp &) | |
| DefaultAddedLinearOp & | operator= (const DefaultAddedLinearOp &) |
Private Attributes | |
| std::vector < Teuchos::ConstNonconstObjectContainer < LinearOpBase< Scalar > > > | Ops_ |
Related Functions | |
(Note that these are not member functions.) | |
| template<class Scalar > | |
| RCP< LinearOpBase< Scalar > > | nonconstAdd (const RCP< LinearOpBase< Scalar > > &A, const RCP< LinearOpBase< Scalar > > &B, const std::string &label="") |
Form an implicit addition of two linear operators: M = A + B. | |
| template<class Scalar > | |
| RCP< const LinearOpBase< Scalar > > | add (const RCP< const LinearOpBase< Scalar > > &A, const RCP< const LinearOpBase< Scalar > > &B, const std::string &label="") |
Form an implicit addition of two linear operators: M = A + B. | |
| template<class Scalar > | |
| RCP< LinearOpBase< Scalar > > | nonconstSubtract (const RCP< LinearOpBase< Scalar > > &A, const RCP< LinearOpBase< Scalar > > &B, const std::string &label="") |
Form an implicit subtraction of two linear operators: M = A - B. | |
| template<class Scalar > | |
| RCP< const LinearOpBase< Scalar > > | subtract (const RCP< const LinearOpBase< Scalar > > &A, const RCP< const LinearOpBase< Scalar > > &B, const std::string &label="") |
Form an implicit subtraction of two linear operators: M = A - B. | |
Constructors/initializers/accessors | |
| DefaultAddedLinearOp () | |
| Constructs to uninitialized. | |
| DefaultAddedLinearOp (const ArrayView< const RCP< LinearOpBase< Scalar > > > &Ops) | |
| DefaultAddedLinearOp (const ArrayView< const RCP< const LinearOpBase< Scalar > > > &Ops) | |
| 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 AddedLinearOpBase | |
| 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 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. | |
| THYRA_DEPRECATED | DefaultAddedLinearOp (const int numOps, const RCP< const LinearOpBase< Scalar > > Ops[]) |
| THYRA_DEPRECATED | DefaultAddedLinearOp (const int numOps, const RCP< LinearOpBase< Scalar > > Ops[]) |
| Deprecated. | |
| THYRA_DEPRECATED void | initialize (const int numOps_in, const RCP< LinearOpBase< Scalar > > Ops[]) |
| Deprecated. | |
| THYRA_DEPRECATED void | initialize (const int numOps_in, const RCP< const LinearOpBase< Scalar > > Ops[]) |
| Deprecated. | |
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 72 of file Thyra_DefaultAddedLinearOp_decl.hpp.
| Thyra::DefaultAddedLinearOp< Scalar >::DefaultAddedLinearOp | ( | ) |
Constructs to uninitialized.
Postconditions:
this->numOps()==0 Definition at line 45 of file Thyra_DefaultAddedLinearOp_def.hpp.
| Thyra::DefaultAddedLinearOp< Scalar >::DefaultAddedLinearOp | ( | const ArrayView< const RCP< LinearOpBase< Scalar > > > & | Ops | ) |
Calls initialize().
Rather than calling this constructor directly, consider using the non-member helper functions described here.
Definition at line 50 of file Thyra_DefaultAddedLinearOp_def.hpp.
| Thyra::DefaultAddedLinearOp< Scalar >::DefaultAddedLinearOp | ( | const ArrayView< const RCP< const LinearOpBase< Scalar > > > & | Ops | ) |
Calls initialize().
Rather than calling this constructor directly, consider using the non-member helper functions described here.
Definition at line 58 of file Thyra_DefaultAddedLinearOp_def.hpp.
| Thyra::DefaultAddedLinearOp< Scalar >::DefaultAddedLinearOp | ( | const int | numOps, |
| const RCP< const LinearOpBase< Scalar > > | Ops[] | ||
| ) |
Deprecated.
Definition at line 230 of file Thyra_DefaultAddedLinearOp_def.hpp.
| THYRA_DEPRECATED Thyra::DefaultAddedLinearOp< Scalar >::DefaultAddedLinearOp | ( | const int | numOps, |
| const RCP< LinearOpBase< Scalar > > | Ops[] | ||
| ) |
Deprecated.
| Thyra::DefaultAddedLinearOp< Scalar >::DefaultAddedLinearOp | ( | const DefaultAddedLinearOp< Scalar > & | ) | [private] |
| void Thyra::DefaultAddedLinearOp< 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 66 of file Thyra_DefaultAddedLinearOp_def.hpp.
Referenced by Thyra::DefaultAddedLinearOp< Scalar >::initialize().
| void Thyra::DefaultAddedLinearOp< Scalar >::initialize | ( | const ArrayView< const RCP< const LinearOpBase< Scalar > > > & | Ops | ) |
Initialize given a list of const linear operators.
| 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 79 of file Thyra_DefaultAddedLinearOp_def.hpp.
| void Thyra::DefaultAddedLinearOp< Scalar >::uninitialize | ( | ) |
Set to uninitialized.
Postconditions:
this->numOps()==0 Definition at line 92 of file Thyra_DefaultAddedLinearOp_def.hpp.
| int Thyra::DefaultAddedLinearOp< Scalar >::numOps | ( | ) | const [virtual] |
Implements Thyra::AddedLinearOpBase< Scalar >.
Definition at line 103 of file Thyra_DefaultAddedLinearOp_def.hpp.
| bool Thyra::DefaultAddedLinearOp< Scalar >::opIsConst | ( | const int | k | ) | const [virtual] |
Implements Thyra::AddedLinearOpBase< Scalar >.
Definition at line 110 of file Thyra_DefaultAddedLinearOp_def.hpp.
| Teuchos::RCP< LinearOpBase< Scalar > > Thyra::DefaultAddedLinearOp< Scalar >::getNonconstOp | ( | const int | k | ) | [virtual] |
Implements Thyra::AddedLinearOpBase< Scalar >.
Definition at line 121 of file Thyra_DefaultAddedLinearOp_def.hpp.
| Teuchos::RCP< const LinearOpBase< Scalar > > Thyra::DefaultAddedLinearOp< Scalar >::getOp | ( | const int | k | ) | const [virtual] |
Implements Thyra::AddedLinearOpBase< Scalar >.
Definition at line 132 of file Thyra_DefaultAddedLinearOp_def.hpp.
| Teuchos::RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultAddedLinearOp< 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 146 of file Thyra_DefaultAddedLinearOp_def.hpp.
| Teuchos::RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultAddedLinearOp< 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 155 of file Thyra_DefaultAddedLinearOp_def.hpp.
| Teuchos::RCP< const LinearOpBase< Scalar > > Thyra::DefaultAddedLinearOp< Scalar >::clone | ( | ) | const [virtual] |
Reimplemented from Thyra::LinearOpBase< Scalar >.
Definition at line 164 of file Thyra_DefaultAddedLinearOp_def.hpp.
| 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 174 of file Thyra_DefaultAddedLinearOp_def.hpp.
| 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!
Definition at line 184 of file Thyra_DefaultAddedLinearOp_def.hpp.
| THYRA_DEPRECATED void Thyra::DefaultAddedLinearOp< Scalar >::initialize | ( | const int | numOps_in, |
| const RCP< LinearOpBase< Scalar > > | Ops[] | ||
| ) | [inline] |
Deprecated.
Definition at line 221 of file Thyra_DefaultAddedLinearOp_decl.hpp.
References Thyra::DefaultAddedLinearOp< Scalar >::initialize().
| THYRA_DEPRECATED void Thyra::DefaultAddedLinearOp< Scalar >::initialize | ( | const int | numOps_in, |
| const RCP< const LinearOpBase< Scalar > > | Ops[] | ||
| ) | [inline] |
Deprecated.
Definition at line 230 of file Thyra_DefaultAddedLinearOp_decl.hpp.
References Thyra::DefaultAddedLinearOp< Scalar >::initialize().
| bool Thyra::DefaultAddedLinearOp< 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 256 of file Thyra_DefaultAddedLinearOp_def.hpp.
| void Thyra::DefaultAddedLinearOp< 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 267 of file Thyra_DefaultAddedLinearOp_def.hpp.
References Thyra::apply(), and THYRA_ASSERT_LINEAR_OP_MULTIVEC_APPLY_SPACES.
| void Thyra::DefaultAddedLinearOp< Scalar >::assertInitialized | ( | ) | const [inline, private] |
Definition at line 354 of file Thyra_DefaultAddedLinearOp_decl.hpp.
| void Thyra::DefaultAddedLinearOp< Scalar >::validateOps | ( | ) | [private] |
Definition at line 298 of file Thyra_DefaultAddedLinearOp_def.hpp.
References Thyra::NOTRANS, THYRA_ASSERT_LINEAR_OP_PLUS_LINEAR_OP_SPACES_NAMES, and Thyra::toString().
| void Thyra::DefaultAddedLinearOp< Scalar >::setupDefaultObjectLabel | ( | ) | [private] |
Definition at line 325 of file Thyra_DefaultAddedLinearOp_def.hpp.
| DefaultAddedLinearOp& Thyra::DefaultAddedLinearOp< Scalar >::operator= | ( | const DefaultAddedLinearOp< Scalar > & | ) | [private] |
| RCP< LinearOpBase< Scalar > > nonconstAdd | ( | const RCP< LinearOpBase< Scalar > > & | A, |
| const RCP< LinearOpBase< Scalar > > & | B, | ||
| const std::string & | label = "" |
||
| ) | [related] |
Form an implicit addition of two linear operators: M = A + B.
| RCP< const LinearOpBase< Scalar > > add | ( | const RCP< const LinearOpBase< Scalar > > & | A, |
| const RCP< const LinearOpBase< Scalar > > & | B, | ||
| const std::string & | label = "" |
||
| ) | [related] |
Form an implicit addition of two linear operators: M = A + B.
Referenced by exampleImplicitlyComposedLinearOperators(), and run_composite_linear_ops_tests().
| RCP< LinearOpBase< Scalar > > nonconstSubtract | ( | const RCP< LinearOpBase< Scalar > > & | A, |
| const RCP< LinearOpBase< Scalar > > & | B, | ||
| const std::string & | label = "" |
||
| ) | [related] |
Form an implicit subtraction of two linear operators: M = A - B.
| RCP< const LinearOpBase< Scalar > > subtract | ( | const RCP< const LinearOpBase< Scalar > > & | A, |
| const RCP< const LinearOpBase< Scalar > > & | B, | ||
| const std::string & | label = "" |
||
| ) | [related] |
Form an implicit subtraction of two linear operators: M = A - B.
Referenced by exampleImplicitlyComposedLinearOperators(), and run_composite_linear_ops_tests().
std::vector<Teuchos::ConstNonconstObjectContainer<LinearOpBase<Scalar> > > Thyra::DefaultAddedLinearOp< Scalar >::Ops_ [private] |
Definition at line 263 of file Thyra_DefaultAddedLinearOp_decl.hpp.
1.7.4