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. More... | |
template<class Scalar > | |
RCP < DefaultDiagonalLinearOpWithSolve < Scalar > > | defaultDiagonalLinearOpWithSolve (const RCP< const VectorBase< Scalar > > &diag) |
Nonmember constructor. More... | |
Related Functions inherited from Thyra::DefaultDiagonalLinearOp< Scalar > | |
template<class Scalar > | |
RCP< const LinearOpBase< Scalar > > | diagonal (const RCP< VectorBase< Scalar > > &diag, const std::string &label="") |
Nonmember constructor function. More... | |
Related Functions inherited from Thyra::LinearOpBase< Scalar > | |
template<class Scalar > | |
bool | isFullyUninitialized (const LinearOpBase< Scalar > &M) |
Determines if a linear operator is in the "Fully Uninitialized" state or not. More... | |
template<class Scalar > | |
bool | isPartiallyInitialized (const LinearOpBase< Scalar > &M) |
Determines if a linear operator is in the "Partially Initialized" state or not. More... | |
template<class Scalar > | |
bool | isFullyInitialized (const LinearOpBase< Scalar > &M) |
Determines if a linear operator is in the "Fully Initialized" state or not. More... | |
template<class Scalar > | |
bool | opSupported (const LinearOpBase< Scalar > &M, EOpTransp M_trans) |
Determines if an operation is supported for a single scalar type. More... | |
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(...) . More... | |
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>(...) . More... | |
Related Functions inherited from Thyra::LinearOpWithSolveBase< Scalar > | |
template<class Scalar > | |
bool | solveSupports (const LinearOpWithSolveBase< Scalar > &A, const EOpTransp transp) |
Call solveSupports() as a non-member function. More... | |
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. More... | |
template<class Scalar > | |
bool | solveSupportsSolveMeasureType (const LinearOpWithSolveBase< Scalar > &A, const EOpTransp transp, const SolveMeasureType &solveMeasureType) |
Call solveSupportsSolveMeasureType() as a non-member function. More... | |
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. More... | |
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. More... | |
Constructors/initializers/accessors | |
DefaultDiagonalLinearOpWithSolve () | |
Constructs to uninitialized. More... | |
DefaultDiagonalLinearOpWithSolve (const RCP< const VectorBase< Scalar > > &diag) | |
Calls initialize() More... | |
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 |
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.