49 #include "Thyra_DefaultProductVectorSpace.hpp" 50 #include "Thyra_ProductMultiVectorBase.hpp" 51 #include "Thyra_DefaultMultipliedLinearOp.hpp" 52 #include "Thyra_MultiVectorStdOps.hpp" 54 using namespace Thyra;
56 using Teuchos::ArrayRCP;
57 using Teuchos::dyn_cast;
63 LU2x2InverseOp::LU2x2InverseOp(
const BlockedLinearOp & A,
64 const LinearOp & invA00,
65 const LinearOp & invS)
66 : A_(A), hatInvA00_(invA00), tildeInvA00_(invA00), invS_(invS),
70 using Thyra::productVectorSpace;
90 LU2x2InverseOp::LU2x2InverseOp(
const BlockedLinearOp & A,
91 const LinearOp & hatInvA00,
92 const LinearOp & tildeInvA00,
93 const LinearOp & invS)
98 using Thyra::productVectorSpace;
108 const double alpha,
const double beta)
const 141 applyOp(
A10_, uc, ps, -1.0, 1.0);
142 applyOp(
invS_, ps, pc, -1.0);
143 applyOp(invA00_A01, pc, uc, -1.0, 1.0);
147 update(alpha,uc,beta,u);
148 update(alpha,pc,beta,p);
150 else if(alpha!=1.0) {
156 void LU2x2InverseOp::describe(Teuchos::FancyOStream & out_arg,
157 const Teuchos::EVerbosityLevel verbLevel)
const 159 using Teuchos::OSTab;
161 RCP<Teuchos::FancyOStream> out = rcp(&out_arg,
false);
164 case Teuchos::VERB_DEFAULT:
165 case Teuchos::VERB_LOW:
166 *out << this->description() << std::endl;
168 case Teuchos::VERB_MEDIUM:
169 case Teuchos::VERB_HIGH:
170 case Teuchos::VERB_EXTREME:
172 *out << Teuchos::Describable::description() <<
"{" 173 <<
"rangeDim=" << this->
range()->dim()
174 <<
",domainDim=" << this->
domain()->dim()
179 *out << Teuchos::describe(*
invS_,verbLevel);
181 *out <<
"[hatInvA00]:\n";
182 *out << Teuchos::describe(*
hatInvA00_,verbLevel);
184 *out <<
"[tildeInvA00]:\n";
188 *out << Teuchos::describe(*
A10_,verbLevel);
191 *out << Teuchos::describe(*
A01_,verbLevel);
196 TEUCHOS_TEST_FOR_EXCEPT(
true);
const LinearOp hatInvA00_
inverse of
MultiVector deepcopy(const MultiVector &v)
Perform a deep copy of the vector.
void scale(const double alpha, MultiVector &x)
Scale a multivector by a constant.
Teuchos::RCP< const Thyra::ProductVectorSpaceBase< double > > productRange_
Range vector space.
const LinearOp A01_
operator
Teuchos::RCP< const Thyra::ProductVectorSpaceBase< double > > productDomain_
Domain vector space.
virtual VectorSpace domain() const
Domain space of this operator.
const BlockedLinearOp A_
operator
virtual void implicitApply(const BlockedMultiVector &x, BlockedMultiVector &y, const double alpha=1.0, const double beta=0.0) const
Perform a matrix vector multiply with this operator.
MultiVector getBlock(int i, const BlockedMultiVector &bmv)
Get the ith block from a BlockedMultiVector object.
const LinearOp invS_
inverse of
virtual VectorSpace range() const
Range space of this operator.
const LinearOp A10_
operator
const LinearOp tildeInvA00_
inverse of