10#ifndef THYRA_DEFAULT_SCALED_ADJOINT_LINEAR_OP_DECL_HPP
11#define THYRA_DEFAULT_SCALED_ADJOINT_LINEAR_OP_DECL_HPP
14#include "Thyra_ScaledAdjointLinearOpBase.hpp"
15#include "Teuchos_ConstNonconstObjectContainer.hpp"
117 const Scalar &scalar,
118 const EOpTransp &transp,
129 const Scalar &scalar,
130 const EOpTransp &transp,
156 const Scalar &scalar,
157 const EOpTransp &transp,
183 ,
const EOpTransp &transp
295 const EOpTransp M_trans,
309 template <
class Scalar2>
310 struct ScalarETransp {
315 ScalarETransp(
const Scalar2 &_scalar,
const EOpTransp &_transp )
316 : scalar(_scalar), transp(_transp)
320 typedef std::vector<ScalarETransp<Scalar> > allScalarETransp_t;
328 Scalar overallScalar_;
329 EOpTransp overallTransp_;
338 const Scalar &scalar,
339 const EOpTransp &transp,
343 CNLOC getOpImpl()
const;
344 void assertInitialized()
const;
368template<
class Scalar>
371 const Scalar &scalar,
373 const std::string &label =
""
392template<
class Scalar>
395 const Scalar &scalar,
397 const std::string &label =
""
416template<
class Scalar>
420 const std::string &label =
""
439template<
class Scalar>
443 const std::string &label =
""
462template<
class Scalar>
466 const std::string &label =
""
485template<
class Scalar>
489 const std::string &label =
""
509template<
class Scalar>
512 const Scalar &scalar,
const EOpTransp &transp,
514 const std::string &label =
""
534template<
class Scalar>
537 const Scalar &scalar,
const EOpTransp &transp,
539 const std::string &label =
""
547template<
class Scalar>
556template<
class Scalar>
560 ,
const EOpTransp &transp
570template<
class Scalar>
574 ,
const EOpTransp &transp
584template<
class Scalar>
586void DefaultScaledAdjointLinearOp<Scalar>::assertInitialized()
const
601template<
class Scalar>
inline
604 const Scalar &scalar,
605 const RCP<LinearOpBase<Scalar> > &Op,
606 const std::string &label
609 RCP<Thyra::LinearOpBase<Scalar> >
611 new DefaultScaledAdjointLinearOp<Scalar>(
616 salo->setObjectLabel(label);
621template<
class Scalar>
inline
624 const Scalar &scalar,
625 const RCP<
const LinearOpBase<Scalar> > &Op,
626 const std::string &label
629 RCP<Thyra::LinearOpBase<Scalar> >
631 new DefaultScaledAdjointLinearOp<Scalar>(scalar,NOTRANS,Op)
634 salo->setObjectLabel(label);
639template<
class Scalar>
inline
642 const RCP<LinearOpBase<Scalar> > &Op,
643 const std::string &label
646 RCP<Thyra::LinearOpBase<Scalar> >
648 new DefaultScaledAdjointLinearOp<Scalar>(
653 salo->setObjectLabel(label);
658template<
class Scalar>
inline
661 const RCP<
const LinearOpBase<Scalar> > &Op,
662 const std::string &label
665 RCP<Thyra::LinearOpBase<Scalar> >
667 new DefaultScaledAdjointLinearOp<Scalar>(
672 salo->setObjectLabel(label);
677template<
class Scalar>
inline
680 const RCP<LinearOpBase<Scalar> > &Op,
681 const std::string &label
684 RCP<Thyra::LinearOpBase<Scalar> >
686 new DefaultScaledAdjointLinearOp<Scalar>(
691 salo->setObjectLabel(label);
696template<
class Scalar>
inline
699 const RCP<
const LinearOpBase<Scalar> > &Op,
700 const std::string &label
703 RCP<Thyra::LinearOpBase<Scalar> >
705 new DefaultScaledAdjointLinearOp<Scalar>(
710 salo->setObjectLabel(label);
715template<
class Scalar>
inline
718 const Scalar &scalar,
719 const EOpTransp &transp,
720 const RCP<LinearOpBase<Scalar> > &Op,
721 const std::string &label
724 RCP<Thyra::LinearOpBase<Scalar> >
726 new DefaultScaledAdjointLinearOp<Scalar>(scalar,transp,Op)
729 salo->setObjectLabel(label);
734template<
class Scalar>
inline
737 const Scalar &scalar,
738 const EOpTransp &transp,
739 const RCP<
const LinearOpBase<Scalar> > &Op,
740 const std::string &label
743 RCP<Thyra::LinearOpBase<Scalar> >
745 new DefaultScaledAdjointLinearOp<Scalar>(
750 salo->setObjectLabel(label);
RCP< LinearOpBase< Scalar > > getNonconstOp()
Return the non-const linear operator passed into initialize().
RCP< LinearOpBase< Scalar > > getNonconstOrigOp()
bool opSupportedImpl(EOpTransp M_trans) const
Return if the operation is supported on the logical linear operator.
std::string description() const
Outputs DefaultScaledAdjointLinearOp<Scalar>{this->getOrigOp().description()) along with the dimensio...
RCP< const LinearOpBase< Scalar > > scale(const Scalar &scalar, const RCP< const LinearOpBase< Scalar > > &Op, const std::string &label="")
Build an implicit const scaled linear operator.
RCP< const VectorSpaceBase< Scalar > > domain() const
Return the domain space of the logical linear operator.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
Prints out the original operator as well as all of the scalings and transpositions in the order that ...
void uninitialize()
Set to uninitialized and (optionally) extract the objects passed into initialize().
void applyImpl(const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< 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.
RCP< const LinearOpBase< Scalar > > transpose(const RCP< const LinearOpBase< Scalar > > &Op, const std::string &label="")
Build an implicit const transposed linear operator.
RCP< LinearOpBase< Scalar > > nonconstAdjoint(const RCP< LinearOpBase< Scalar > > &Op, const std::string &label="")
Build an implicit non-const adjoined linear operator.
RCP< const LinearOpBase< Scalar > > clone() const
RCP< LinearOpBase< Scalar > > nonconstScale(const Scalar &scalar, const RCP< LinearOpBase< Scalar > > &Op, const std::string &label="")
Build an implicit non-const scaled linear operator.
RCP< const LinearOpBase< Scalar > > getOrigOp() const
RCP< const VectorSpaceBase< Scalar > > range() const
Return the range space of the logical linear operator.
void initialize(const Scalar &scalar, const EOpTransp &transp, const RCP< LinearOpBase< Scalar > > &Op)
Initialize with an operator with by defining adjoint (transpose) and scaling arguments.
DefaultScaledAdjointLinearOp()
Constructs to uninitialized.
Scalar overallScalar() const
RCP< LinearOpBase< Scalar > > nonconstTranspose(const RCP< LinearOpBase< Scalar > > &Op, const std::string &label="")
Build an implicit non-const transposed linear operator.
RCP< const LinearOpBase< Scalar > > scaleAndAdjoint(const Scalar &scalar, const EOpTransp &transp, const RCP< const LinearOpBase< Scalar > > &Op, const std::string &label="")
Build an implicit const scaled and/or adjoined (transposed) linear operator.
RCP< const LinearOpBase< Scalar > > adjoint(const RCP< const LinearOpBase< Scalar > > &Op, const std::string &label="")
Build an implicit const adjoined linear operator.
RCP< LinearOpBase< Scalar > > nonconstScaleAndAdjoint(const Scalar &scalar, const EOpTransp &transp, const RCP< LinearOpBase< Scalar > > &Op, const std::string &label="")
Build an implicit non-const scaled and/or adjoined (transposed) linear operator.
EOpTransp overallTransp() const
RCP< const LinearOpBase< Scalar > > getOp() const
Return the const linear operator passed into initialize().
RCP< const LinearOpBase< Scalar > > zero(const RCP< const VectorSpaceBase< Scalar > > &range, const RCP< const VectorSpaceBase< Scalar > > &domain)
Create a zero linear operator with given range and domain spaces.
Base class for all linear operators.
Interface for a collection of column vectors called a multi-vector.
Base class for LinearOpBase decorator subclasses that wrap a LinearOpBase object and adds on an extra...
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
NOTRANS
Type for the dimension of a vector space. `**/ typedef Teuchos::Ordinal Ordinal;.
basic_FancyOStream< char > FancyOStream
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)