Thyra Package Browser (Single Doxygen Collection) Version of the Day
Classes | Functions
Example use cases for Thyra::LinearOpWithSolve[Factory]Base interfaces

Classes

class  Thyra::LinearOpChanger< Scalar >
 Silly abstract strategy interface for changing Thyra::LinearOpBase objects. More...
class  Thyra::NullLinearOpChanger< Scalar >
 No-op changer. More...

Functions

template<class Scalar >
void singleLinearSolve (const Thyra::LinearOpBase< Scalar > &A, const Thyra::LinearOpWithSolveFactoryBase< Scalar > &lowsFactory, const Thyra::VectorBase< Scalar > &b, const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &x, Teuchos::FancyOStream &out)
 Performing a single linear solve given a forward operator.
template<class Scalar >
Teuchos::RCP
< Thyra::LinearOpWithSolveBase
< Scalar > > 
createScaledAdjointLinearOpWithSolve (const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &A, const Scalar &scalar, const Thyra::LinearOpWithSolveFactoryBase< Scalar > &lowsFactory, Teuchos::FancyOStream &out)
 Create a LinearOpWithSolveBase object from an implicitly scaled adjoint LinearOpBase object.
template<class Scalar >
void solveNumericalChangeSolve (const Teuchos::Ptr< Thyra::LinearOpBase< Scalar > > &A, const Thyra::LinearOpChanger< Scalar > &opChanger, const Thyra::LinearOpWithSolveFactoryBase< Scalar > &lowsFactory, const Thyra::VectorBase< Scalar > &b1, const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &x1, const Thyra::VectorBase< Scalar > &b2, const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &x2, Teuchos::FancyOStream &out)
 Create a LinearOpWithSolveBase object and perform a solve, then change the LinearOpBase object and solve again.
template<class Scalar >
void solveSmallNumericalChangeSolve (const Teuchos::Ptr< Thyra::LinearOpBase< Scalar > > &A, const Thyra::LinearOpChanger< Scalar > &opSmallChanger, const Thyra::LinearOpWithSolveFactoryBase< Scalar > &lowsFactory, const Thyra::VectorBase< Scalar > &b1, const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &x1, const Thyra::VectorBase< Scalar > &b2, const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &x2, Teuchos::FancyOStream &out)
 Create a LinearOpWithSolveBase object and perform a solve, then change the LinearOpBase object in a very small way and solve again.
template<class Scalar >
void solveMajorChangeSolve (const Teuchos::Ptr< Thyra::LinearOpBase< Scalar > > &A, const Thyra::LinearOpChanger< Scalar > &opMajorChanger, const Thyra::LinearOpWithSolveFactoryBase< Scalar > &lowsFactory, const Thyra::VectorBase< Scalar > &b1, const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &x1, const Thyra::VectorBase< Scalar > &b2, const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &x2, Teuchos::FancyOStream &out)
 Create a LinearOpWithSolveBase object and perform a solve, then change the LinearOpBase object in a very small way and solve again.
template<class Scalar >
Teuchos::RCP
< Thyra::LinearOpWithSolveBase
< Scalar > > 
createGeneralPreconditionedLinearOpWithSolve (const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &A, const Teuchos::RCP< const Thyra::PreconditionerBase< Scalar > > &P, const Thyra::LinearOpWithSolveFactoryBase< Scalar > &lowsFactory, Teuchos::FancyOStream &out)
 Create a Thyra::LinearOpWithSolveBase object given an externally created preconditioner specified as a Thyra::PreconditionerBase object.
template<class Scalar >
Teuchos::RCP
< Thyra::LinearOpWithSolveBase
< Scalar > > 
createUnspecifiedPreconditionedLinearOpWithSolve (const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &A, const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &P_op, const Thyra::LinearOpWithSolveFactoryBase< Scalar > &lowsFactory, Teuchos::FancyOStream &out)
 Create a Thyra::LinearOpWithSolveBase object given an externally created preconditioner specified as a single Thyra::LinearOpBase object not targeted for the left or right.
template<class Scalar >
Teuchos::RCP
< Thyra::LinearOpWithSolveBase
< Scalar > > 
createLeftPreconditionedLinearOpWithSolve (const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &A, const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &P_op_left, const Thyra::LinearOpWithSolveFactoryBase< Scalar > &lowsFactory, Teuchos::FancyOStream &out)
 Create a Thyra::LinearOpWithSolveBase object given an externally created preconditioner specified as Thyra::LinearOpBase object to be applied on the left.
template<class Scalar >
Teuchos::RCP
< Thyra::LinearOpWithSolveBase
< Scalar > > 
createRightPreconditionedLinearOpWithSolve (const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &A, const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &P_op_right, const Thyra::LinearOpWithSolveFactoryBase< Scalar > &lowsFactory, Teuchos::FancyOStream &out)
 Create a Thyra::LinearOpWithSolveBase object given an externally created preconditioner specified as Thyra::LinearOpBase object to be applied on the right.
template<class Scalar >
Teuchos::RCP
< Thyra::LinearOpWithSolveBase
< Scalar > > 
createLeftRightPreconditionedLinearOpWithSolve (const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &A, const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &P_op_left, const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &P_op_right, const Thyra::LinearOpWithSolveFactoryBase< Scalar > &lowsFactory, Teuchos::FancyOStream &out)
 Create a Thyra::LinearOpWithSolveBase object given an externally created preconditioner specified as left and right Thyra::LinearOpBase objects.
template<class Scalar >
Teuchos::RCP
< Thyra::LinearOpWithSolveBase
< Scalar > > 
createMatrixPreconditionedLinearOpWithSolve (const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &A, const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &A_approx, const Thyra::LinearOpWithSolveFactoryBase< Scalar > &lowsFactory, Teuchos::FancyOStream &out)
 Create a Thyra::LinearOpWithSolveBase object given an approximate forward operator that will be used to create the preconditioner internally.
template<class Scalar >
void externalPreconditionerReuseWithSolves (const Teuchos::Ptr< Thyra::LinearOpBase< Scalar > > &A_inout, const Thyra::LinearOpChanger< Scalar > &opChanger, const Thyra::LinearOpWithSolveFactoryBase< Scalar > &lowsFactory, const Thyra::PreconditionerFactoryBase< Scalar > &precFactory, const Thyra::VectorBase< Scalar > &b1, const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &x1, const Thyra::VectorBase< Scalar > &b2, const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &x2, Teuchos::FancyOStream &out)
 Example use case for preconditioner reuse.
template<class Scalar >
void nonExternallyPreconditionedLinearSolveUseCases (const Thyra::LinearOpBase< Scalar > &A, const Thyra::LinearOpWithSolveFactoryBase< Scalar > &lowsFactory, bool supportsAdjoints, Teuchos::FancyOStream &out)
 Combined use cases for the use of a Thyra::LinearOpWithSolveFactoryBase object without an externally set preconditioner.
template<class Scalar >
void externallyPreconditionedLinearSolveUseCases (const Thyra::LinearOpBase< Scalar > &A, const Thyra::LinearOpWithSolveFactoryBase< Scalar > &lowsFactory, const Thyra::PreconditionerFactoryBase< Scalar > &precFactory, const bool supportsLeftPrec, const bool supportsRightPrec, Teuchos::FancyOStream &out)
 Combined use cases for the use of a Thyra::LinearOpWithSolveFactoryBase object which use an externally set preconditioner.

Function Documentation

template<class Scalar >
void singleLinearSolve ( const Thyra::LinearOpBase< Scalar > &  A,
const Thyra::LinearOpWithSolveFactoryBase< Scalar > &  lowsFactory,
const Thyra::VectorBase< Scalar > &  b,
const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &  x,
Teuchos::FancyOStream out 
)

Performing a single linear solve given a forward operator.

Definition at line 94 of file Thyra_LinearOpWithSolveFactoryExamples.hpp.

References Thyra::MultiVectorBase< Scalar >::assign(), and Thyra::NOTRANS.

Referenced by nonExternallyPreconditionedLinearSolveUseCases().

template<class Scalar >
Teuchos::RCP<Thyra::LinearOpWithSolveBase<Scalar> > createScaledAdjointLinearOpWithSolve ( const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &  A,
const Scalar &  scalar,
const Thyra::LinearOpWithSolveFactoryBase< Scalar > &  lowsFactory,
Teuchos::FancyOStream out 
)

Create a LinearOpWithSolveBase object from an implicitly scaled adjoint LinearOpBase object.

Definition at line 124 of file Thyra_LinearOpWithSolveFactoryExamples.hpp.

References Thyra::DefaultScaledAdjointLinearOp< Scalar >::adjoint(), Thyra::DefaultScaledAdjointLinearOp< Scalar >::scale(), and Teuchos::VERB_MEDIUM.

Referenced by nonExternallyPreconditionedLinearSolveUseCases().

template<class Scalar >
void solveNumericalChangeSolve ( const Teuchos::Ptr< Thyra::LinearOpBase< Scalar > > &  A,
const Thyra::LinearOpChanger< Scalar > &  opChanger,
const Thyra::LinearOpWithSolveFactoryBase< Scalar > &  lowsFactory,
const Thyra::VectorBase< Scalar > &  b1,
const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &  x1,
const Thyra::VectorBase< Scalar > &  b2,
const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &  x2,
Teuchos::FancyOStream out 
)

Create a LinearOpWithSolveBase object and perform a solve, then change the LinearOpBase object and solve again.

Definition at line 148 of file Thyra_LinearOpWithSolveFactoryExamples.hpp.

References Teuchos::as(), Thyra::assign(), Thyra::LinearOpChanger< Scalar >::changeOp(), Thyra::LinearOpWithSolveFactoryBase< Scalar >::createOp(), Thyra::NOTRANS, and Teuchos::RCP< T >::ptr().

template<class Scalar >
void solveSmallNumericalChangeSolve ( const Teuchos::Ptr< Thyra::LinearOpBase< Scalar > > &  A,
const Thyra::LinearOpChanger< Scalar > &  opSmallChanger,
const Thyra::LinearOpWithSolveFactoryBase< Scalar > &  lowsFactory,
const Thyra::VectorBase< Scalar > &  b1,
const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &  x1,
const Thyra::VectorBase< Scalar > &  b2,
const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &  x2,
Teuchos::FancyOStream out 
)

Create a LinearOpWithSolveBase object and perform a solve, then change the LinearOpBase object in a very small way and solve again.

Definition at line 197 of file Thyra_LinearOpWithSolveFactoryExamples.hpp.

References Teuchos::as(), Thyra::assign(), Thyra::LinearOpChanger< Scalar >::changeOp(), Thyra::LinearOpWithSolveFactoryBase< Scalar >::createOp(), Thyra::NOTRANS, and Teuchos::RCP< T >::ptr().

template<class Scalar >
void solveMajorChangeSolve ( const Teuchos::Ptr< Thyra::LinearOpBase< Scalar > > &  A,
const Thyra::LinearOpChanger< Scalar > &  opMajorChanger,
const Thyra::LinearOpWithSolveFactoryBase< Scalar > &  lowsFactory,
const Thyra::VectorBase< Scalar > &  b1,
const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &  x1,
const Thyra::VectorBase< Scalar > &  b2,
const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &  x2,
Teuchos::FancyOStream out 
)

Create a LinearOpWithSolveBase object and perform a solve, then change the LinearOpBase object in a very small way and solve again.

Definition at line 245 of file Thyra_LinearOpWithSolveFactoryExamples.hpp.

References Teuchos::as(), Thyra::assign(), Thyra::LinearOpChanger< Scalar >::changeOp(), Thyra::LinearOpWithSolveFactoryBase< Scalar >::createOp(), Thyra::NOTRANS, and Teuchos::RCP< T >::ptr().

template<class Scalar >
Teuchos::RCP<Thyra::LinearOpWithSolveBase<Scalar> > createGeneralPreconditionedLinearOpWithSolve ( const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &  A,
const Teuchos::RCP< const Thyra::PreconditionerBase< Scalar > > &  P,
const Thyra::LinearOpWithSolveFactoryBase< Scalar > &  lowsFactory,
Teuchos::FancyOStream out 
)

Create a Thyra::LinearOpWithSolveBase object given an externally created preconditioner specified as a Thyra::PreconditionerBase object.

Definition at line 300 of file Thyra_LinearOpWithSolveFactoryExamples.hpp.

References Thyra::LinearOpWithSolveFactoryBase< Scalar >::createOp(), Teuchos::RCP< T >::ptr(), and Teuchos::VERB_MEDIUM.

template<class Scalar >
Teuchos::RCP<Thyra::LinearOpWithSolveBase<Scalar> > createUnspecifiedPreconditionedLinearOpWithSolve ( const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &  A,
const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &  P_op,
const Thyra::LinearOpWithSolveFactoryBase< Scalar > &  lowsFactory,
Teuchos::FancyOStream out 
)

Create a Thyra::LinearOpWithSolveBase object given an externally created preconditioner specified as a single Thyra::LinearOpBase object not targeted for the left or right.

Definition at line 325 of file Thyra_LinearOpWithSolveFactoryExamples.hpp.

References Thyra::LinearOpWithSolveFactoryBase< Scalar >::createOp(), Teuchos::RCP< T >::ptr(), and Teuchos::VERB_MEDIUM.

Referenced by externallyPreconditionedLinearSolveUseCases().

template<class Scalar >
Teuchos::RCP<Thyra::LinearOpWithSolveBase<Scalar> > createLeftPreconditionedLinearOpWithSolve ( const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &  A,
const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &  P_op_left,
const Thyra::LinearOpWithSolveFactoryBase< Scalar > &  lowsFactory,
Teuchos::FancyOStream out 
)

Create a Thyra::LinearOpWithSolveBase object given an externally created preconditioner specified as Thyra::LinearOpBase object to be applied on the left.

Definition at line 354 of file Thyra_LinearOpWithSolveFactoryExamples.hpp.

References Thyra::LinearOpWithSolveFactoryBase< Scalar >::createOp(), Teuchos::RCP< T >::ptr(), and Teuchos::VERB_MEDIUM.

Referenced by externallyPreconditionedLinearSolveUseCases().

template<class Scalar >
Teuchos::RCP<Thyra::LinearOpWithSolveBase<Scalar> > createRightPreconditionedLinearOpWithSolve ( const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &  A,
const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &  P_op_right,
const Thyra::LinearOpWithSolveFactoryBase< Scalar > &  lowsFactory,
Teuchos::FancyOStream out 
)

Create a Thyra::LinearOpWithSolveBase object given an externally created preconditioner specified as Thyra::LinearOpBase object to be applied on the right.

Definition at line 381 of file Thyra_LinearOpWithSolveFactoryExamples.hpp.

References Thyra::LinearOpWithSolveFactoryBase< Scalar >::createOp(), Teuchos::RCP< T >::ptr(), and Teuchos::VERB_MEDIUM.

Referenced by externallyPreconditionedLinearSolveUseCases().

template<class Scalar >
Teuchos::RCP<Thyra::LinearOpWithSolveBase<Scalar> > createLeftRightPreconditionedLinearOpWithSolve ( const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &  A,
const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &  P_op_left,
const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &  P_op_right,
const Thyra::LinearOpWithSolveFactoryBase< Scalar > &  lowsFactory,
Teuchos::FancyOStream out 
)

Create a Thyra::LinearOpWithSolveBase object given an externally created preconditioner specified as left and right Thyra::LinearOpBase objects.

Definition at line 408 of file Thyra_LinearOpWithSolveFactoryExamples.hpp.

References Thyra::LinearOpWithSolveFactoryBase< Scalar >::createOp(), Teuchos::RCP< T >::ptr(), and Teuchos::VERB_MEDIUM.

Referenced by externallyPreconditionedLinearSolveUseCases().

template<class Scalar >
Teuchos::RCP<Thyra::LinearOpWithSolveBase<Scalar> > createMatrixPreconditionedLinearOpWithSolve ( const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &  A,
const Teuchos::RCP< const Thyra::LinearOpBase< Scalar > > &  A_approx,
const Thyra::LinearOpWithSolveFactoryBase< Scalar > &  lowsFactory,
Teuchos::FancyOStream out 
)

Create a Thyra::LinearOpWithSolveBase object given an approximate forward operator that will be used to create the preconditioner internally.

Definition at line 436 of file Thyra_LinearOpWithSolveFactoryExamples.hpp.

References Thyra::LinearOpWithSolveFactoryBase< Scalar >::createOp(), Teuchos::RCP< T >::ptr(), and Teuchos::VERB_MEDIUM.

template<class Scalar >
void externalPreconditionerReuseWithSolves ( const Teuchos::Ptr< Thyra::LinearOpBase< Scalar > > &  A_inout,
const Thyra::LinearOpChanger< Scalar > &  opChanger,
const Thyra::LinearOpWithSolveFactoryBase< Scalar > &  lowsFactory,
const Thyra::PreconditionerFactoryBase< Scalar > &  precFactory,
const Thyra::VectorBase< Scalar > &  b1,
const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &  x1,
const Thyra::VectorBase< Scalar > &  b2,
const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &  x2,
Teuchos::FancyOStream out 
)
template<class Scalar >
void nonExternallyPreconditionedLinearSolveUseCases ( const Thyra::LinearOpBase< Scalar > &  A,
const Thyra::LinearOpWithSolveFactoryBase< Scalar > &  lowsFactory,
bool  supportsAdjoints,
Teuchos::FancyOStream out 
)
template<class Scalar >
void externallyPreconditionedLinearSolveUseCases ( const Thyra::LinearOpBase< Scalar > &  A,
const Thyra::LinearOpWithSolveFactoryBase< Scalar > &  lowsFactory,
const Thyra::PreconditionerFactoryBase< Scalar > &  precFactory,
const bool  supportsLeftPrec,
const bool  supportsRightPrec,
Teuchos::FancyOStream out 
)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines