42 #ifndef THYRA_LINEAR_OP_WITH_SOLVE_FACTORY_SUBCLASS_HELPERS_HPP
43 #define THYRA_LINEAR_OP_WITH_SOLVE_FACTORY_SUBCLASS_HELPERS_HPP
46 #include "Thyra_LinearOpWithSolveBase.hpp"
47 #include "Teuchos_toString.hpp"
60 template<
class Scalar>
61 void assertSolveSupports(
62 const LinearOpWithSolveBase<Scalar> &lows,
64 const Ptr<
const SolveCriteria<Scalar> > solveCriteria = Teuchos::null
74 template<
class Scalar>
75 void assertSupportsSolveMeasureType(
76 const LinearOpWithSolveBase<Scalar> &lows,
78 const SolveMeasureType &solveMeasureType
90 template<
class Scalar>
91 void Thyra::assertSolveSupports(
92 const LinearOpWithSolveBase<Scalar> &lows,
94 const Ptr<
const SolveCriteria<Scalar> > solveCriteria
99 !lows.solveSupports(M_trans, solveCriteria),
101 "Error, the LinearOpWithSolve object \"" << lows.description() <<
"\"\n"
102 "for M_trans = " <<
toString(M_trans) <<
" does not support the solve"
104 << (
nonnull(solveCriteria) ?
toString(*solveCriteria) : std::string(
"null") )
111 template<
class Scalar>
112 void Thyra::assertSupportsSolveMeasureType(
113 const LinearOpWithSolveBase<Scalar> &lows,
115 const SolveMeasureType &solveMeasureType
121 "Error, the LinearOpWithSolve object \"" << lows.description() <<
"\"\n"
122 "for M_trans = " <<
toString(M_trans) <<
" does not support the solve"
124 <<
toString(solveMeasureType.numerator)
126 <<
toString(solveMeasureType.denominator)
131 #endif // THYRA_LINEAR_OP_WITH_SOLVE_FACTORY_SUBCLASS_HELPERS_HPP
EOpTransp
Enumeration for determining how a linear operator is applied. `*.
std::string toString(ModelEvaluatorBase::EInArgsMembers)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
bool solveSupportsSolveMeasureType(const LinearOpWithSolveBase< Scalar > &A, const EOpTransp transp, const SolveMeasureType &solveMeasureType)
Call solveSupportsSolveMeasureType() as a non-member function.
bool nonnull(const boost::shared_ptr< T > &p)
std::string toString(const T &t)