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>
74 template<
class Scalar>
75 void assertSupportsSolveMeasureType(
90 template<
class Scalar>
91 void Thyra::assertSolveSupports(
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)
virtual std::string description() const
Base class for all linear operators that can support a high-level solve operation.
bool solveSupportsSolveMeasureType(const LinearOpWithSolveBase< Scalar > &A, const EOpTransp transp, const SolveMeasureType &solveMeasureType)
Call solveSupportsSolveMeasureType() as a non-member function.
bool solveSupports(EOpTransp transp) const
Return if solve() supports the argument transp.
void assertSolveSupports(const LinearOpWithSolveBase< Scalar > &lows, const EOpTransp M_trans, const Ptr< const SolveCriteria< Scalar > > solveCriteria=Teuchos::null)
Assert that a LOWSB object supports a particular solve type.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
bool nonnull(const boost::shared_ptr< T > &p)
EOpTransp
Enumeration for determining how a linear operator is applied. `*.
TEUCHOSCORE_LIB_DLL_EXPORT std::string toString(const EVerbosityLevel verbLevel)
Simple struct that defines the requested solution criteria for a solve.