42 #ifndef THYRA_DEFUALT_PRECONDITIONER_DEF_HPP
43 #define THYRA_DEFUALT_PRECONDITIONER_DEF_HPP
45 #include "Thyra_DefaultPreconditioner_decl.hpp"
46 #include "Thyra_LinearOpBase.hpp"
55 template <
class Scalar>
60 template <
class Scalar>
70 leftPrecOp_.initialize(leftPrecOp);
72 rightPrecOp_.initialize(rightPrecOp);
76 template <
class Scalar>
86 leftPrecOp_.initialize(leftPrecOp);
88 rightPrecOp_.initialize(rightPrecOp);
92 template <
class Scalar>
97 unspecifiedPrecOp_.initialize(unspecifiedPrecOp);
101 template <
class Scalar>
106 unspecifiedPrecOp_.initialize(unspecifiedPrecOp);
110 template <
class Scalar>
116 leftPrecOp_.initialize(leftPrecOp);
120 template <
class Scalar>
126 leftPrecOp_.initialize(leftPrecOp);
130 template <
class Scalar>
136 rightPrecOp_.initialize(rightPrecOp);
140 template <
class Scalar>
146 rightPrecOp_.initialize(rightPrecOp);
150 template <
class Scalar>
157 rightPrecOp_.initialize(rightPrecOp);
158 leftPrecOp_.initialize(leftPrecOp);
162 template <
class Scalar>
169 rightPrecOp_.initialize(rightPrecOp);
170 leftPrecOp_.initialize(leftPrecOp);
174 template <
class Scalar>
180 unspecifiedPrecOp_.initialize(unspecifiedPrecOp);
184 template <
class Scalar>
190 unspecifiedPrecOp_.initialize(unspecifiedPrecOp);
194 template <
class Scalar>
197 leftPrecOp_.uninitialize();
198 rightPrecOp_.uninitialize();
199 unspecifiedPrecOp_.uninitialize();
206 template <
class Scalar>
209 return leftPrecOp_.isConst();
213 template <
class Scalar>
217 return leftPrecOp_.getNonconstObj();
221 template <
class Scalar>
225 return leftPrecOp_.getConstObj();
229 template <
class Scalar>
232 return rightPrecOp_.isConst();
236 template <
class Scalar>
240 return rightPrecOp_.getNonconstObj();
244 template <
class Scalar>
248 return rightPrecOp_.getConstObj();
252 template <
class Scalar>
255 return unspecifiedPrecOp_.isConst();
259 template <
class Scalar>
263 return unspecifiedPrecOp_.getNonconstObj();
267 template <
class Scalar>
271 return unspecifiedPrecOp_.getConstObj();
278 template <
class Scalar>
281 std::ostringstream oss;
283 bool wroteOne =
false;
284 if(!
is_null(leftPrecOp_.getConstObj())) {
285 if(wroteOne) oss <<
",";
286 oss <<
"leftPrecOp=" << leftPrecOp_.getConstObj()->description();
289 if(!
is_null(rightPrecOp_.getConstObj())) {
290 if(wroteOne) oss <<
",";
291 oss <<
"rightPrecOp=" << rightPrecOp_.getConstObj()->description();
294 if(!
is_null(unspecifiedPrecOp_.getConstObj())) {
295 if(wroteOne) oss <<
",";
296 oss <<
"unspecifiedPrecOp=" << unspecifiedPrecOp_.getConstObj()->description();
304 template <
class Scalar>
312 using Teuchos::describe;
326 if(!
is_null(leftPrecOp_.getConstObj()))
327 out <<
"leftPrecOp=" << describe(*leftPrecOp_.getConstObj(),verbLevel);
328 if(!
is_null(rightPrecOp_.getConstObj()))
329 out <<
"rig htPrecOp=" << describe(*rightPrecOp_.getConstObj(),verbLevel);
330 if(!
is_null(unspecifiedPrecOp_.getConstObj()))
331 out <<
"unspecifiedPrecOp=" << describe(*unspecifiedPrecOp_.getConstObj(),verbLevel);
343 #endif // THYRA_DEFUALT_PRECONDITIONER_DEF_HPP
bool isRightPrecOpConst() const
bool is_null(const boost::shared_ptr< T > &p)
void initializeUnspecified(const Teuchos::RCP< LinearOpBase< Scalar > > &unspecifiedPrecOp)
Initialize a single unspecified preconditioner operator.
void uninitialize()
Uninitialize.
basic_OSTab< char > OSTab
bool isUnspecifiedPrecOpConst() const
basic_FancyOStream< char > FancyOStream
bool isLeftPrecOpConst() const
void initializeRight(const Teuchos::RCP< LinearOpBase< Scalar > > &rightPrecOp)
Initialize a right preconditioner.
Teuchos::RCP< LinearOpBase< Scalar > > getNonconstUnspecifiedPrecOp()
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
virtual std::string description() const
Teuchos::RCP< const LinearOpBase< Scalar > > getRightPrecOp() const
Base class for all linear operators.
Teuchos::RCP< const LinearOpBase< Scalar > > getLeftPrecOp() const
Teuchos::RCP< LinearOpBase< Scalar > > getNonconstLeftPrecOp()
std::string description() const
Teuchos::RCP< LinearOpBase< Scalar > > getNonconstRightPrecOp()
Teuchos::RCP< const LinearOpBase< Scalar > > getUnspecifiedPrecOp() const
void initializeLeftRight(const Teuchos::RCP< LinearOpBase< Scalar > > &leftPrecOp, const Teuchos::RCP< LinearOpBase< Scalar > > &rightPrecOp)
Initialize a split left/right preconditioner.
DefaultPreconditioner()
Construct to uninitialized.
void initializeLeft(const Teuchos::RCP< LinearOpBase< Scalar > > &leftPrecOp)
Initialize a left preconditioner.
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
std::string typeName(const T &t)