Thyra Version of the Day
Loading...
Searching...
No Matches
Related Functions | List of all members
Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar > Class Template Reference

Concrete composite LinearOpWithSolveBase subclass that creates single upper or lower block triangular LOWSB object out of a set of LOWSB objects along the diagonal with LOB objects off diagonal. More...

#include <Thyra_DefaultBlockedTriangularLinearOpWithSolve_decl.hpp>

Inheritance diagram for Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >:
Inheritance graph
[legend]

Related Functions

(Note that these are not member functions.)

template<class Scalar >
RCP< DefaultBlockedTriangularLinearOpWithSolve< Scalar > > defaultBlockedTriangularLinearOpWithSolve ()
 Nonmember constructor.
 

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
 

Constructors/Initializers/Accessors

 DefaultBlockedTriangularLinearOpWithSolve ()
 
void setNonconstBlocks (const RCP< PhysicallyBlockedLinearOpBase< Scalar > > &blocks)
 
void setBlocks (const RCP< const PhysicallyBlockedLinearOpBase< Scalar > > &blocks)
 
RCP< PhysicallyBlockedLinearOpBase< Scalar > > getNonconstBlocks ()
 
RCP< const PhysicallyBlockedLinearOpBase< Scalar > > getBlocks ()
 

Overridden from PhysicallyBlockedLinearOpWithSolveBase

bool acceptsLOWSBlock (const int i, const int j) const
 
void setNonconstLOWSBlock (const int i, const int j, const RCP< LinearOpWithSolveBase< Scalar > > &block)
 
void setLOWSBlock (const int i, const int j, const RCP< const LinearOpWithSolveBase< Scalar > > &block)
 

Overridden from PhysicallyBlockedLinearOpBase

void beginBlockFill ()
 
void beginBlockFill (const int numRowBlocks, const int numColBlocks)
 
void beginBlockFill (const RCP< const ProductVectorSpaceBase< Scalar > > &productRange, const RCP< const ProductVectorSpaceBase< Scalar > > &productDomain)
 
bool blockFillIsActive () const
 
bool acceptsBlock (const int i, const int j) const
 
void setNonconstBlock (const int i, const int j, const RCP< LinearOpBase< Scalar > > &block)
 
void setBlock (const int i, const int j, const RCP< const LinearOpBase< Scalar > > &block)
 
void endBlockFill ()
 
void uninitialize ()
 

Overridden from BlockedLinearOpWithSolveBase

RCP< LinearOpWithSolveBase< Scalar > > getNonconstLOWSBlock (const int i, const int j)
 
RCP< const LinearOpWithSolveBase< Scalar > > getLOWSBlock (const int i, const int j) const
 

Overridden from BlockedLinearOpBase

RCP< const ProductVectorSpaceBase< Scalar > > productRange () const
 
RCP< const ProductVectorSpaceBase< Scalar > > productDomain () const
 
bool blockExists (const int i, const int j) const
 
bool blockIsConst (const int i, const int j) const
 
RCP< LinearOpBase< Scalar > > getNonconstBlock (const int i, const int j)
 
RCP< const LinearOpBase< Scalar > > getBlock (const int i, const int j) const
 

Overridden from LinearOpBase

RCP< const VectorSpaceBase< Scalar > > range () const
 
RCP< const VectorSpaceBase< Scalar > > domain () const
 
RCP< const LinearOpBase< Scalar > > clone () const
 
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
 

Overridden from Teuchos::Describable

std::string description () const
 Prints just the name DefaultBlockedTriangularLinearOpWithSolve along with the overall dimensions and the number of constituent operators.
 
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
 Prints the details about the constituent linear operators.
 

Additional Inherited Members

virtual bool acceptsLOWSBlock (const int i, const int j) const =0
 Determines if the block (i,j) can be filled with a LOWDB object or not.
 
virtual void setNonconstLOWSBlock (const int i, const int j, const Teuchos::RCP< LinearOpWithSolveBase< Scalar > > &block)=0
 
virtual void setLOWSBlock (const int i, const int j, const Teuchos::RCP< const LinearOpWithSolveBase< Scalar > > &block)=0
 
virtual Teuchos::RCP< LinearOpWithSolveBase< Scalar > > getNonconstLOWSBlock (const int i, const int j)=0
 
virtual Teuchos::RCP< const LinearOpWithSolveBase< Scalar > > getLOWSBlock (const int i, const int j) const =0
 
- Public Member Functions inherited from Thyra::LinearOpWithSolveBase< Scalar >
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.
 
- Public Member Functions inherited from Thyra::LinearOpBase< Scalar >
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.
 
virtual Teuchos::RCP< const ProductVectorSpaceBase< Scalar > > productRange () const =0
 Return the product space for the range.
 
virtual Teuchos::RCP< const ProductVectorSpaceBase< Scalar > > productDomain () const =0
 Return the product space for the domain.
 
virtual bool blockExists (const int i, const int j) const =0
 Return if the block (i,j) exists or not.
 
virtual bool blockIsConst (const int i, const int j) const =0
 Return if the block (i,j) is const only or not.
 
virtual Teuchos::RCP< LinearOpBase< Scalar > > getNonconstBlock (const int i, const int j)=0
 Return a non-const view of the block (i,j) if it exists.
 
virtual Teuchos::RCP< const LinearOpBase< Scalar > > getBlock (const int i, const int j) const =0
 Return a const view of the block (i,j) if it exists.
 
virtual void beginBlockFill ()=0
 Begin a block fill where the product range and domain spaces will be created on the fly and the number of block rows and columns is not known in advance.
 
virtual void beginBlockFill (const int numRowBlocks, const int numColBlocks)=0
 Begin a block fill where the product range and domain spaces will be created on the fly but the total number of block rows and block columns is known in advance.
 
virtual void beginBlockFill (const Teuchos::RCP< const ProductVectorSpaceBase< Scalar > > &productRange, const Teuchos::RCP< const ProductVectorSpaceBase< Scalar > > &productDomain)=0
 Begin a block fill where the product range and domain spaces are set a priori.
 
virtual bool blockFillIsActive () const =0
 Determines if a block fill is active or not .
 
virtual bool acceptsBlock (const int i, const int j) const =0
 Determines if the block (i,j) can be filled or not.
 
virtual void setNonconstBlock (const int i, const int j, const Teuchos::RCP< LinearOpBase< Scalar > > &block)=0
 Set a non-const block linear operator.
 
virtual void setBlock (const int i, const int j, const Teuchos::RCP< const LinearOpBase< Scalar > > &block)=0
 Set a const block linear operator.
 
virtual void endBlockFill ()=0
 End a block fill after which *this object can be used.
 
virtual void uninitialize ()=0
 Set to uninitlaized.
 
- Protected Member Functions inherited from Thyra::LinearOpWithSolveBase< Scalar >
virtual bool solveSupportsNewImpl (EOpTransp, const Ptr< const SolveCriteria< Scalar > >) const
 Virtual implementation of solveSupports().
 
- Protected Member Functions inherited from Thyra::LinearOpBase< Scalar >

Detailed Description

template<class Scalar>
class Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >

Concrete composite LinearOpWithSolveBase subclass that creates single upper or lower block triangular LOWSB object out of a set of LOWSB objects along the diagonal with LOB objects off diagonal.

This subclass implements a strictly block upper or lower triangular LOWSB object. With LOWSB objects on the diagonal, the block system can be solved by solving for each of the diagonal blocks and moving lower (or upper) blocks to the RHS on each successive solve.

For example, consider the lower block triangular linear operator:

      [ M(0,0)                   ]
  M = [ M(1,0)   M(1,1)          ]
      [ M(2,0)   M(2,1)   M(2,2) ]  

A linear system of the form:

  M * x = b

  =>

  [ M(0,0)                   ]   [ x(0) ]   [ b(0) ]
  [ M(1,0)   M(1,1)          ] * [ x(1) ] = [ b(1) ]
  [ M(2,0)   M(2,1)   M(2,2) ]   [ x(2) ]   [ b(2) ]

is solved as:

 x(0) = inv(M(0,0)) * b(0)
 x(1) = inv(M(1,1)) * ( b(1) - M(1,0)*x(0) )
 x(2) = inv(M(2,2)) * ( b(2) - M(2,0)*x(0) - M(2,1)*x(1) )

The same approach can be used for block upper triangular linear operators as well of course.

See the class DefaultBlockedTriangularLinearOpWithSolveFactory for an example of how one of these objects can be created from any PhysicallyBlockedLinearOpBase object and compatible LinearWithSolveBase objects.

ToDo: Finish Documentation!

Definition at line 112 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve_decl.hpp.

Constructor & Destructor Documentation

◆ DefaultBlockedTriangularLinearOpWithSolve()

template<class Scalar >
Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::DefaultBlockedTriangularLinearOpWithSolve

Member Function Documentation

◆ setNonconstBlocks()

template<class Scalar >
void Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::setNonconstBlocks ( const RCP< PhysicallyBlockedLinearOpBase< Scalar > > &  blocks)

◆ setBlocks()

template<class Scalar >
void Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::setBlocks ( const RCP< const PhysicallyBlockedLinearOpBase< Scalar > > &  blocks)

◆ getNonconstBlocks()

template<class Scalar >
RCP< PhysicallyBlockedLinearOpBase< Scalar > > Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::getNonconstBlocks

◆ getBlocks()

template<class Scalar >
RCP< const PhysicallyBlockedLinearOpBase< Scalar > > Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::getBlocks

◆ acceptsLOWSBlock()

template<class Scalar >
bool Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::acceptsLOWSBlock ( const int  i,
const int  j 
) const
virtual

◆ setNonconstLOWSBlock()

template<class Scalar >
void Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::setNonconstLOWSBlock ( const int  i,
const int  j,
const RCP< LinearOpWithSolveBase< Scalar > > &  block 
)
virtual

◆ setLOWSBlock()

template<class Scalar >
void Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::setLOWSBlock ( const int  i,
const int  j,
const RCP< const LinearOpWithSolveBase< Scalar > > &  block 
)
virtual

◆ beginBlockFill() [1/3]

template<class Scalar >
void Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::beginBlockFill
virtual

◆ beginBlockFill() [2/3]

template<class Scalar >
void Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::beginBlockFill ( const int  numRowBlocks,
const int  numColBlocks 
)
virtual

◆ beginBlockFill() [3/3]

template<class Scalar >
void Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::beginBlockFill ( const RCP< const ProductVectorSpaceBase< Scalar > > &  productRange,
const RCP< const ProductVectorSpaceBase< Scalar > > &  productDomain 
)
virtual

◆ blockFillIsActive()

template<class Scalar >
bool Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::blockFillIsActive
virtual

◆ acceptsBlock()

template<class Scalar >
bool Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::acceptsBlock ( const int  i,
const int  j 
) const
virtual

◆ setNonconstBlock()

template<class Scalar >
void Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::setNonconstBlock ( const int  i,
const int  j,
const RCP< LinearOpBase< Scalar > > &  block 
)
virtual

◆ setBlock()

template<class Scalar >
void Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::setBlock ( const int  i,
const int  j,
const RCP< const LinearOpBase< Scalar > > &  block 
)
virtual

◆ endBlockFill()

template<class Scalar >
void Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::endBlockFill
virtual

◆ uninitialize()

template<class Scalar >
void Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::uninitialize
virtual

◆ getNonconstLOWSBlock()

template<class Scalar >
Teuchos::RCP< LinearOpWithSolveBase< Scalar > > Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::getNonconstLOWSBlock ( const int  i,
const int  j 
)
virtual

◆ getLOWSBlock()

template<class Scalar >
Teuchos::RCP< const LinearOpWithSolveBase< Scalar > > Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::getLOWSBlock ( const int  i,
const int  j 
) const
virtual

◆ productRange()

template<class Scalar >
Teuchos::RCP< const ProductVectorSpaceBase< Scalar > > Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::productRange
virtual

◆ productDomain()

template<class Scalar >
Teuchos::RCP< const ProductVectorSpaceBase< Scalar > > Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::productDomain
virtual

◆ blockExists()

template<class Scalar >
bool Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::blockExists ( const int  i,
const int  j 
) const
virtual

◆ blockIsConst()

template<class Scalar >
bool Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::blockIsConst ( const int  i,
const int  j 
) const
virtual

◆ getNonconstBlock()

template<class Scalar >
Teuchos::RCP< LinearOpBase< Scalar > > Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::getNonconstBlock ( const int  i,
const int  j 
)
virtual

◆ getBlock()

template<class Scalar >
Teuchos::RCP< const LinearOpBase< Scalar > > Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::getBlock ( const int  i,
const int  j 
) const
virtual

◆ range()

template<class Scalar >
Teuchos::RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::range
virtual

◆ domain()

template<class Scalar >
Teuchos::RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::domain
virtual

◆ clone()

template<class Scalar >
Teuchos::RCP< const LinearOpBase< Scalar > > Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::clone
virtual

◆ description()

template<class Scalar >
std::string Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::description
virtual

Prints just the name DefaultBlockedTriangularLinearOpWithSolve along with the overall dimensions and the number of constituent operators.

Reimplemented from Teuchos::Describable.

Definition at line 397 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve_def.hpp.

◆ describe()

template<class Scalar >
void Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::describe ( Teuchos::FancyOStream out,
const Teuchos::EVerbosityLevel  verbLevel 
) const
virtual

Prints the details about the constituent linear operators.

This function outputs different levels of detail based on the value passed in for verbLevel:

ToDo: Finish documentation!

Reimplemented from Teuchos::Describable.

Definition at line 410 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve_def.hpp.

◆ opSupportedImpl()

template<class Scalar >
bool Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::opSupportedImpl ( EOpTransp  M_trans) const
protectedvirtual

◆ applyImpl()

template<class Scalar >
void Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::applyImpl ( const EOpTransp  M_trans,
const MultiVectorBase< Scalar > &  X,
const Ptr< MultiVectorBase< Scalar > > &  Y,
const Scalar  alpha,
const Scalar  beta 
) const
protectedvirtual

◆ solveSupportsImpl()

template<class Scalar >
bool Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::solveSupportsImpl ( EOpTransp  M_trans) const
protectedvirtual

◆ solveSupportsSolveMeasureTypeImpl()

template<class Scalar >
bool Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::solveSupportsSolveMeasureTypeImpl ( EOpTransp  M_trans,
const SolveMeasureType solveMeasureType 
) const
protectedvirtual

◆ solveImpl()

template<class Scalar >
SolveStatus< Scalar > Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::solveImpl ( const EOpTransp  transp,
const MultiVectorBase< Scalar > &  B,
const Ptr< MultiVectorBase< Scalar > > &  X,
const Ptr< const SolveCriteria< Scalar > >  solveCriteria 
) const
protectedvirtual

Friends And Related Function Documentation

◆ defaultBlockedTriangularLinearOpWithSolve()

template<class Scalar >
RCP< DefaultBlockedTriangularLinearOpWithSolve< Scalar > > defaultBlockedTriangularLinearOpWithSolve ( )
related

Nonmember constructor.

Definition at line 346 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve_decl.hpp.


The documentation for this class was generated from the following files: