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 object on the off diagonal.. More...

#include <Thyra_DefaultBlockedTriangularLinearOpWithSolveDecl.hpp>

Inheritance diagram for Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >:

Inheritance graph
[legend]
List of all members.

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
 

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.

Overridden from SingleScalarLinearOpWithSolveBase

bool solveSupportsTrans (EOpTransp M_trans) const
 
bool solveSupportsSolveMeasureType (EOpTransp M_trans, const SolveMeasureType &solveMeasureType) const
 
void solve (const EOpTransp M_trans, const MultiVectorBase< Scalar > &B, MultiVectorBase< Scalar > *X, const int numBlocks, const BlockSolveCriteria< Scalar > blockSolveCriteria[], SolveStatus< Scalar > blockSolveStatus[]) const
 

Overridden from SingleScalarLinearOpBase

bool opSupported (EOpTransp M_trans) const
 Returns true only if all constituent operators support M_trans.
void apply (const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, MultiVectorBase< Scalar > *Y, const Scalar alpha, const Scalar beta) const
 

Public Member Functions

template<class LinearOpWithSolveType>
void setLOWSBlockImpl (const int i, const int j, const Teuchos::RCP< LinearOpWithSolveType > &block)

Related Functions

(Note that these are not member functions.)

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

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 object on the 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 100 of file Thyra_DefaultBlockedTriangularLinearOpWithSolveDecl.hpp.


Constructor & Destructor Documentation

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

Definition at line 47 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.


Member Function Documentation

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

Definition at line 53 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

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

Definition at line 63 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

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

Definition at line 74 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

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

Definition at line 82 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

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

Definition at line 92 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

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

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

template<class Scalar>
void Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::beginBlockFill (  ) 

Definition at line 125 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

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

Definition at line 133 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

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

template<class Scalar>
bool Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::blockFillIsActive (  )  const

Definition at line 161 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

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

Definition at line 168 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

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

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

template<class Scalar>
void Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::endBlockFill (  ) 

Definition at line 201 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

template<class Scalar>
void Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::uninitialize (  ) 

Definition at line 215 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

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

Definition at line 230 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

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

Definition at line 244 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

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

Definition at line 261 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

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

Definition at line 269 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

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

Definition at line 276 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

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

Definition at line 289 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

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

Definition at line 301 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

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

Definition at line 315 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

template<class Scalar>
Teuchos::RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::range (  )  const [virtual]

Implements Thyra::LinearOpBase< RangeScalar, DomainScalar >.

Definition at line 332 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

template<class Scalar>
Teuchos::RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::domain (  )  const [virtual]

Implements Thyra::LinearOpBase< RangeScalar, DomainScalar >.

Definition at line 340 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

template<class Scalar>
Teuchos::RCP< const LinearOpBase< Scalar > > Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::clone (  )  const [virtual]

Reimplemented from Thyra::LinearOpBase< RangeScalar, DomainScalar >.

Definition at line 348 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

template<class Scalar>
std::string Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::description (  )  const [virtual]

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

Reimplemented from Teuchos::Describable.

Definition at line 359 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

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 373 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

template<class Scalar>
bool Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::solveSupportsTrans ( EOpTransp  M_trans  )  const [protected, virtual]

Implements Thyra::SingleScalarLinearOpWithSolveBase< Scalar >.

Definition at line 391 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

template<class Scalar>
bool Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::solveSupportsSolveMeasureType ( EOpTransp  M_trans,
const SolveMeasureType solveMeasureType 
) const [protected, virtual]

Implements Thyra::SingleScalarLinearOpWithSolveBase< Scalar >.

Definition at line 409 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

template<class Scalar>
void Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::solve ( const EOpTransp  M_trans,
const MultiVectorBase< Scalar > &  B,
MultiVectorBase< Scalar > *  X,
const int  numBlocks,
const BlockSolveCriteria< Scalar >  blockSolveCriteria[],
SolveStatus< Scalar >  blockSolveStatus[] 
) const [protected, virtual]

Implements Thyra::SingleScalarLinearOpWithSolveBase< Scalar >.

Definition at line 434 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

template<class Scalar>
bool Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::opSupported ( EOpTransp  M_trans  )  const [protected]

Returns true only if all constituent operators support M_trans.

Definition at line 506 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.

template<class Scalar>
void Thyra::DefaultBlockedTriangularLinearOpWithSolve< Scalar >::apply ( const EOpTransp  M_trans,
const MultiVectorBase< Scalar > &  X,
MultiVectorBase< Scalar > *  Y,
const Scalar  alpha,
const Scalar  beta 
) const [protected]

Definition at line 524 of file Thyra_DefaultBlockedTriangularLinearOpWithSolve.hpp.


Friends And Related Function Documentation

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

Nonmember constructor.

Definition at line 341 of file Thyra_DefaultBlockedTriangularLinearOpWithSolveDecl.hpp.


The documentation for this class was generated from the following files:
Generated on Wed May 12 21:42:47 2010 for Thyra Operator Solve Support by  doxygen 1.4.7