10 #ifndef THYRA_DEFUALT_PRECONDITIONER_DEF_HPP
11 #define THYRA_DEFUALT_PRECONDITIONER_DEF_HPP
13 #include "Thyra_DefaultPreconditioner_decl.hpp"
14 #include "Thyra_LinearOpBase.hpp"
23 template <
class Scalar>
28 template <
class Scalar>
38 leftPrecOp_.initialize(leftPrecOp);
40 rightPrecOp_.initialize(rightPrecOp);
44 template <
class Scalar>
54 leftPrecOp_.initialize(leftPrecOp);
56 rightPrecOp_.initialize(rightPrecOp);
60 template <
class Scalar>
65 unspecifiedPrecOp_.initialize(unspecifiedPrecOp);
69 template <
class Scalar>
74 unspecifiedPrecOp_.initialize(unspecifiedPrecOp);
78 template <
class Scalar>
84 leftPrecOp_.initialize(leftPrecOp);
88 template <
class Scalar>
94 leftPrecOp_.initialize(leftPrecOp);
98 template <
class Scalar>
104 rightPrecOp_.initialize(rightPrecOp);
108 template <
class Scalar>
114 rightPrecOp_.initialize(rightPrecOp);
118 template <
class Scalar>
125 rightPrecOp_.initialize(rightPrecOp);
126 leftPrecOp_.initialize(leftPrecOp);
130 template <
class Scalar>
137 rightPrecOp_.initialize(rightPrecOp);
138 leftPrecOp_.initialize(leftPrecOp);
142 template <
class Scalar>
148 unspecifiedPrecOp_.initialize(unspecifiedPrecOp);
152 template <
class Scalar>
158 unspecifiedPrecOp_.initialize(unspecifiedPrecOp);
162 template <
class Scalar>
165 leftPrecOp_.uninitialize();
166 rightPrecOp_.uninitialize();
167 unspecifiedPrecOp_.uninitialize();
174 template <
class Scalar>
177 return leftPrecOp_.isConst();
181 template <
class Scalar>
185 return leftPrecOp_.getNonconstObj();
189 template <
class Scalar>
193 return leftPrecOp_.getConstObj();
197 template <
class Scalar>
200 return rightPrecOp_.isConst();
204 template <
class Scalar>
208 return rightPrecOp_.getNonconstObj();
212 template <
class Scalar>
216 return rightPrecOp_.getConstObj();
220 template <
class Scalar>
223 return unspecifiedPrecOp_.isConst();
227 template <
class Scalar>
231 return unspecifiedPrecOp_.getNonconstObj();
235 template <
class Scalar>
239 return unspecifiedPrecOp_.getConstObj();
246 template <
class Scalar>
249 std::ostringstream oss;
251 bool wroteOne =
false;
252 if(!
is_null(leftPrecOp_.getConstObj())) {
253 if(wroteOne) oss <<
",";
254 oss <<
"leftPrecOp=" << leftPrecOp_.getConstObj()->description();
257 if(!
is_null(rightPrecOp_.getConstObj())) {
258 if(wroteOne) oss <<
",";
259 oss <<
"rightPrecOp=" << rightPrecOp_.getConstObj()->description();
262 if(!
is_null(unspecifiedPrecOp_.getConstObj())) {
263 if(wroteOne) oss <<
",";
264 oss <<
"unspecifiedPrecOp=" << unspecifiedPrecOp_.getConstObj()->description();
272 template <
class Scalar>
280 using Teuchos::describe;
294 if(!
is_null(leftPrecOp_.getConstObj()))
295 out <<
"leftPrecOp=" << describe(*leftPrecOp_.getConstObj(),verbLevel);
296 if(!
is_null(rightPrecOp_.getConstObj()))
297 out <<
"rig htPrecOp=" << describe(*rightPrecOp_.getConstObj(),verbLevel);
298 if(!
is_null(unspecifiedPrecOp_.getConstObj()))
299 out <<
"unspecifiedPrecOp=" << describe(*unspecifiedPrecOp_.getConstObj(),verbLevel);
311 #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)