NOX  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LOCA::BorderedSolver::LAPACKDirectSolve Class Reference

Bordered system solver strategy based on direct factorization. More...

#include <LOCA_BorderedSolver_LAPACKDirectSolve.H>

Inheritance diagram for LOCA::BorderedSolver::LAPACKDirectSolve:
Inheritance graph
[legend]
Collaboration diagram for LOCA::BorderedSolver::LAPACKDirectSolve:
Collaboration graph
[legend]

Public Member Functions

 LAPACKDirectSolve (const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RCP< LOCA::Parameter::SublistParser > &topParams, const Teuchos::RCP< Teuchos::ParameterList > &solverParams)
 Constructor. More...
 
virtual ~LAPACKDirectSolve ()
 Destructor.
 
virtual void setMatrixBlocks (const Teuchos::RCP< const LOCA::BorderedSolver::AbstractOperator > &op, const Teuchos::RCP< const NOX::Abstract::MultiVector > &blockA, const Teuchos::RCP< const LOCA::MultiContinuation::ConstraintInterface > &blockB, const Teuchos::RCP< const NOX::Abstract::MultiVector::DenseMatrix > &blockC)
 Set blocks. More...
 
virtual
NOX::Abstract::Group::ReturnType 
initForSolve ()
 Intialize solver for a solve. More...
 
virtual
NOX::Abstract::Group::ReturnType 
initForTransposeSolve ()
 Intialize solver for a transpose solve. More...
 
virtual
NOX::Abstract::Group::ReturnType 
apply (const NOX::Abstract::MultiVector &X, const NOX::Abstract::MultiVector::DenseMatrix &Y, NOX::Abstract::MultiVector &U, NOX::Abstract::MultiVector::DenseMatrix &V) const
 Computed extended matrix-multivector product. More...
 
virtual
NOX::Abstract::Group::ReturnType 
applyTranspose (const NOX::Abstract::MultiVector &X, const NOX::Abstract::MultiVector::DenseMatrix &Y, NOX::Abstract::MultiVector &U, NOX::Abstract::MultiVector::DenseMatrix &V) const
 Computed extended matrix transpose-multivector product. More...
 
virtual
NOX::Abstract::Group::ReturnType 
applyInverse (Teuchos::ParameterList &params, const NOX::Abstract::MultiVector *F, const NOX::Abstract::MultiVector::DenseMatrix *G, NOX::Abstract::MultiVector &X, NOX::Abstract::MultiVector::DenseMatrix &Y) const
 Solves the extended system as defined above using Gaussian Elimination. More...
 
virtual
NOX::Abstract::Group::ReturnType 
applyInverseTranspose (Teuchos::ParameterList &params, const NOX::Abstract::MultiVector *F, const NOX::Abstract::MultiVector::DenseMatrix *G, NOX::Abstract::MultiVector &X, NOX::Abstract::MultiVector::DenseMatrix &Y) const
 Solves the transpose of the extended system as defined above. More...
 
- Public Member Functions inherited from LOCA::BorderedSolver::AbstractStrategy
 AbstractStrategy ()
 Constructor.
 
virtual ~AbstractStrategy ()
 Destructor.
 
virtual void setMatrixBlocksMultiVecConstraint (const Teuchos::RCP< const LOCA::BorderedSolver::AbstractOperator > &op, const Teuchos::RCP< const NOX::Abstract::MultiVector > &blockA, const Teuchos::RCP< const NOX::Abstract::MultiVector > &blockB, const Teuchos::RCP< const NOX::Abstract::MultiVector::DenseMatrix > &blockC)
 Set blocks with multivector constraint. More...
 

Protected Member Functions

NOX::Abstract::Group::ReturnType solve (bool trans, Teuchos::ParameterList &params, const NOX::Abstract::MultiVector *F, const NOX::Abstract::MultiVector::DenseMatrix *G, NOX::Abstract::MultiVector &X, NOX::Abstract::MultiVector::DenseMatrix &Y) const
 Solve linear system.
 

Protected Attributes

Teuchos::RCP< LOCA::GlobalDataglobalData
 Global data object.
 
Teuchos::RCP
< Teuchos::ParameterList
solverParams
 Solver parameters.
 
Teuchos::RCP< const
LOCA::LAPACK::Group
grp
 Pointer to group.
 
Teuchos::RCP< const
LOCA::BorderedSolver::AbstractOperator
op
 Pointer to operator.
 
Teuchos::RCP< const
NOX::Abstract::MultiVector
A
 Pointer to A block.
 
Teuchos::RCP< const
LOCA::MultiContinuation::ConstraintInterfaceMVDX
B
 Pointer to B block.
 
Teuchos::RCP< const
NOX::Abstract::MultiVector::DenseMatrix
C
 Pointer to C block.
 
Teuchos::RCP
< NOX::LAPACK::LinearSolver
< double > > 
augJacSolver
 The augmented Jacobian matrix solver.
 
int n
 Matrix dimension.
 
int m
 Number of additional rows/columns.
 
int N
 Size of augmented matrix.
 
bool isZeroA
 flag indicating whether A block is zero
 
bool isZeroB
 flag indicating whether B block is zero
 
bool isZeroC
 flag indicating whether C block is zero
 
bool isZeroF
 flag indicating whether F block is zero
 
bool isZeroG
 flag indicating whether G block is zero
 
bool isComplex
 flag indicating whether we are solving the complex matrix or not
 

Detailed Description

Bordered system solver strategy based on direct factorization.

This class solves the extended system of equations

\[ \begin{bmatrix} J & A \\ B^T & C \end{bmatrix} \begin{bmatrix} X \\ Y \end{bmatrix} = \begin{bmatrix} F \\ G \end{bmatrix} \]

using a direct solve by augmenting the $J$ with $A$, $B$, and $C$. To support this, the group representing $J$ must be a LOCA::LAPACK::Group and the contraint object representing $B$ must be a LOCA::MultiContinuation::ConstraintInterfaceMVDX.

Constructor & Destructor Documentation

LOCA::BorderedSolver::LAPACKDirectSolve::LAPACKDirectSolve ( const Teuchos::RCP< LOCA::GlobalData > &  global_data,
const Teuchos::RCP< LOCA::Parameter::SublistParser > &  topParams,
const Teuchos::RCP< Teuchos::ParameterList > &  solverParams 
)

Constructor.

Parameters
global_data[in] Global data object
topParams[in] Parsed top-level parameter list
solverParams[in] Bordered solver parameters. Currently none are referenced.

Member Function Documentation

NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::LAPACKDirectSolve::apply ( const NOX::Abstract::MultiVector X,
const NOX::Abstract::MultiVector::DenseMatrix Y,
NOX::Abstract::MultiVector U,
NOX::Abstract::MultiVector::DenseMatrix V 
) const
virtual
NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::LAPACKDirectSolve::applyInverse ( Teuchos::ParameterList params,
const NOX::Abstract::MultiVector F,
const NOX::Abstract::MultiVector::DenseMatrix G,
NOX::Abstract::MultiVector X,
NOX::Abstract::MultiVector::DenseMatrix Y 
) const
virtual

Solves the extended system as defined above using Gaussian Elimination.

The params argument is the linear solver parameters. If isZeroF or isZeroG is true, than the corresponding F or G pointers may be NULL.

Implements LOCA::BorderedSolver::AbstractStrategy.

NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::LAPACKDirectSolve::applyInverseTranspose ( Teuchos::ParameterList params,
const NOX::Abstract::MultiVector F,
const NOX::Abstract::MultiVector::DenseMatrix G,
NOX::Abstract::MultiVector X,
NOX::Abstract::MultiVector::DenseMatrix Y 
) const
virtual

Solves the transpose of the extended system as defined above.

The params argument is the linear solver parameters.

Implements LOCA::BorderedSolver::AbstractStrategy.

NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::LAPACKDirectSolve::applyTranspose ( const NOX::Abstract::MultiVector X,
const NOX::Abstract::MultiVector::DenseMatrix Y,
NOX::Abstract::MultiVector U,
NOX::Abstract::MultiVector::DenseMatrix V 
) const
virtual
NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::LAPACKDirectSolve::initForSolve ( )
virtual

Intialize solver for a solve.

This should be called after setMatrixBlocks(), but before applyInverse().

Implements LOCA::BorderedSolver::AbstractStrategy.

References NOX::Abstract::Group::Ok.

NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::LAPACKDirectSolve::initForTransposeSolve ( )
virtual

Intialize solver for a transpose solve.

This should be called after setMatrixBlocks(), but before applyInverseTranspose().

Implements LOCA::BorderedSolver::AbstractStrategy.

References NOX::Abstract::Group::Ok.

void LOCA::BorderedSolver::LAPACKDirectSolve::setMatrixBlocks ( const Teuchos::RCP< const LOCA::BorderedSolver::AbstractOperator > &  op,
const Teuchos::RCP< const NOX::Abstract::MultiVector > &  blockA,
const Teuchos::RCP< const LOCA::MultiContinuation::ConstraintInterface > &  blockB,
const Teuchos::RCP< const NOX::Abstract::MultiVector::DenseMatrix > &  blockC 
)
virtual

Set blocks.

The blockA or blockC pointer may be null if either is zero. Whether block B is zero will be determined by querying blockB via ConstraintInterface::isConstraintDerivativesXZero.

Implements LOCA::BorderedSolver::AbstractStrategy.

References LOCA::BorderedSolver::JacobianOperator::getGroup(), LOCA::Hopf::ComplexMultiVector::getImagMultiVec(), LOCA::Hopf::ComplexMultiVector::getRealMultiVec(), NOX::LAPACK::Matrix< T >::numRows(), Teuchos::rcp(), and TEUCHOS_ASSERT.


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