Thyra Version of the Day
|
Concrete LinearOpWithSolveBase
subclass for diagonal linear operators.
More...
#include <Thyra_DefaultDiagonalLinearOpWithSolve_decl.hpp>
Related Functions | |
(Note that these are not member functions.) | |
template<class Scalar > | |
RCP< DefaultDiagonalLinearOpWithSolve< Scalar > > | defaultDiagonalLinearOpWithSolve () |
Nonmember constructor. | |
template<class Scalar > | |
RCP< DefaultDiagonalLinearOpWithSolve< Scalar > > | defaultDiagonalLinearOpWithSolve (const RCP< const VectorBase< Scalar > > &diag) |
Nonmember constructor. | |
![]() | |
template<class Scalar > | |
RCP< const LinearOpBase< Scalar > > | diagonal (const RCP< VectorBase< Scalar > > &diag, const std::string &label="") |
Nonmember constructor function. | |
![]() | |
template<class Scalar > | |
bool | isFullyUninitialized (const LinearOpBase< Scalar > &M) |
Determines if a linear operator is in the "Fully Uninitialized" state or not. | |
template<class Scalar > | |
bool | isPartiallyInitialized (const LinearOpBase< Scalar > &M) |
Determines if a linear operator is in the "Partially Initialized" state or not. | |
template<class Scalar > | |
bool | isFullyInitialized (const LinearOpBase< Scalar > &M) |
Determines if a linear operator is in the "Fully Initialized" state or not. | |
template<class Scalar > | |
bool | opSupported (const LinearOpBase< Scalar > &M, EOpTransp M_trans) |
Determines if an operation is supported for a single scalar type. | |
template<class Scalar > | |
void | apply (const LinearOpBase< Scalar > &M, const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha=static_cast< Scalar >(1.0), const Scalar beta=static_cast< Scalar >(0.0)) |
Non-member function call for M.apply(...) . | |
void | apply (const LinearOpBase< double > &M, const EOpTransp M_trans, const MultiVectorBase< double > &X, const Ptr< MultiVectorBase< double > > &Y, const double alpha=1.0, const double beta=0.0) |
Calls apply<double>(...) . | |
![]() | |
template<class Scalar > | |
bool | solveSupports (const LinearOpWithSolveBase< Scalar > &A, const EOpTransp transp) |
Call solveSupports() as a non-member function. | |
template<class Scalar > | |
bool | solveSupports (const LinearOpWithSolveBase< Scalar > &A, const EOpTransp transp, const Ptr< const SolveCriteria< Scalar > > solveCriteria) |
Call solveSupports() as a non-member function. | |
template<class Scalar > | |
bool | solveSupportsSolveMeasureType (const LinearOpWithSolveBase< Scalar > &A, const EOpTransp transp, const SolveMeasureType &solveMeasureType) |
Call solveSupportsSolveMeasureType() as a non-member function. | |
template<class Scalar > | |
SolveStatus< Scalar > | solve (const LinearOpWithSolveBase< Scalar > &A, const EOpTransp A_trans, const MultiVectorBase< Scalar > &B, const Ptr< MultiVectorBase< Scalar > > &X, const Ptr< const SolveCriteria< Scalar > > solveCriteria=Teuchos::null) |
Call solve() as a non-member function. | |
template<class Scalar > | |
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. | |
Constructors/initializers/accessors | |
DefaultDiagonalLinearOpWithSolve () | |
Constructs to uninitialized. | |
DefaultDiagonalLinearOpWithSolve (const RCP< const VectorBase< Scalar > > &diag) | |
Calls initialize() | |
Overridden from LinearOpWithSolveBase | |
bool | solveSupportsImpl (EOpTransp M_trans) const |
bool | solveSupportsSolveMeasureTypeImpl (EOpTransp M_trans, const SolveMeasureType &solveMeasureType) const |
SolveStatus< Scalar > | solveImpl (const EOpTransp transp, const MultiVectorBase< Scalar > &B, const Ptr< MultiVectorBase< Scalar > > &X, const Ptr< const SolveCriteria< Scalar > > solveCriteria) const |
Additional Inherited Members | |
![]() | |
DefaultDiagonalLinearOp () | |
Constructs to uninitialized. | |
DefaultDiagonalLinearOp (const RCP< const VectorSpaceBase< Scalar > > &space) | |
Calls initialize() to construct given a vector space. | |
DefaultDiagonalLinearOp (const RCP< VectorBase< Scalar > > &diag) | |
Calls initialize() to construct for a non-const diagonal vector. | |
DefaultDiagonalLinearOp (const RCP< const VectorBase< Scalar > > &diag) | |
Calls initialize() to construct for a const diagonal vector. | |
void | initialize (const RCP< const VectorSpaceBase< Scalar > > &space) |
Initialize given a vector space which allocates a vector internally. | |
void | initialize (const RCP< VectorBase< Scalar > > &diag) |
Initialize given a non-const diagonal vector. | |
void | initialize (const RCP< const VectorBase< Scalar > > &diag) |
Initialize given a const diagonal vector. | |
void | uninitialize () |
Uninitialize. | |
bool | isDiagConst () const |
RCP< VectorBase< Scalar > > | getNonconstDiag () |
RCP< const VectorBase< Scalar > > | getDiag () const |
RCP< const VectorSpaceBase< Scalar > > | range () const |
Returns this->getDiag()->space() . | |
RCP< const VectorSpaceBase< Scalar > > | domain () const |
Returns this->getDiag()->space() . | |
RCP< const LinearOpBase< Scalar > > | clone () const |
![]() | |
![]() | |
bool | opSupported (EOpTransp M_trans) const |
Return if the M_trans operation of apply() is supported or not. | |
void | apply (const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const |
Apply the linear operator to a multi-vector : Y = alpha*op(M)*X + beta*Y . | |
![]() | |
bool | solveSupports (EOpTransp transp) const |
Return if solve() supports the argument transp . | |
bool | solveSupports (EOpTransp transp, const Ptr< const SolveCriteria< Scalar > > solveCriteria) const |
Return if solve() supports a given transpose and solve criteria specification. | |
bool | solveSupportsSolveMeasureType (EOpTransp transp, const SolveMeasureType &solveMeasureType) const |
Return if solve() supports the given the solve measure type. | |
SolveStatus< Scalar > | solve (const EOpTransp A_trans, const MultiVectorBase< Scalar > &B, const Ptr< MultiVectorBase< Scalar > > &X, const Ptr< const SolveCriteria< Scalar > > solveCriteria=Teuchos::null) const |
Request the solution of a block linear system. | |
![]() | |
bool | opSupportedImpl (EOpTransp M_trans) const |
void | applyImpl (const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const |
![]() | |
![]() | |
virtual bool | solveSupportsNewImpl (EOpTransp, const Ptr< const SolveCriteria< Scalar > >) const |
Virtual implementation of solveSupports() . | |
Concrete LinearOpWithSolveBase
subclass for diagonal linear operators.
This class represents a diagonal linear operator M
of the form:
M = diag(diag)
where diag
is a VectorBase
object.
The defined operator implements this->apply()
as follows:
y = alpha*op(M)*x + beta*y => y(i) = alpha*diag(i)*x(i) + beta*y(i), for i = 0 ... n-1
where n = this->domain()->dim()
.
The defined operator implements this->solve()
as follows:
x = inv(op(M))*b => x(i) = b(i)/diag(i), for i = 0 ... n-1
where n = this->domain()->dim()
.
That is all there is to this subclass.
Definition at line 92 of file Thyra_DefaultDiagonalLinearOpWithSolve_decl.hpp.
Thyra::DefaultDiagonalLinearOpWithSolve< Scalar >::DefaultDiagonalLinearOpWithSolve |
Constructs to uninitialized.
Postconditions:
this->getDiag().get()==NULL
Definition at line 60 of file Thyra_DefaultDiagonalLinearOpWithSolve_def.hpp.
Thyra::DefaultDiagonalLinearOpWithSolve< Scalar >::DefaultDiagonalLinearOpWithSolve | ( | const RCP< const VectorBase< Scalar > > & | diag | ) |
Calls initialize()
Definition at line 65 of file Thyra_DefaultDiagonalLinearOpWithSolve_def.hpp.
|
protectedvirtual |
Reimplemented from Thyra::LinearOpWithSolveBase< Scalar >.
Definition at line 81 of file Thyra_DefaultDiagonalLinearOpWithSolve_def.hpp.
|
protectedvirtual |
Reimplemented from Thyra::LinearOpWithSolveBase< Scalar >.
Definition at line 91 of file Thyra_DefaultDiagonalLinearOpWithSolve_def.hpp.
|
protectedvirtual |
Implements Thyra::LinearOpWithSolveBase< Scalar >.
Definition at line 100 of file Thyra_DefaultDiagonalLinearOpWithSolve_def.hpp.
|
related |
Nonmember constructor.
Definition at line 141 of file Thyra_DefaultDiagonalLinearOpWithSolve_decl.hpp.
|
related |
Nonmember constructor.
Definition at line 153 of file Thyra_DefaultDiagonalLinearOpWithSolve_decl.hpp.