#include <LOCA_BorderedSolver_LAPACKDirectSolve.H>
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. | |
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. | |
virtual NOX::Abstract::Group::ReturnType | initForSolve () |
Intialize solver for a solve. | |
virtual NOX::Abstract::Group::ReturnType | initForTransposeSolve () |
Intialize solver for a transpose solve. | |
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. | |
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. | |
virtual NOX::Abstract::Group::ReturnType | applyInverse (Teuchos::ParameterList ¶ms, 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. | |
virtual NOX::Abstract::Group::ReturnType | applyInverseTranspose (Teuchos::ParameterList ¶ms, 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. | |
Protected Member Functions | |
NOX::Abstract::Group::ReturnType | solve (bool trans, Teuchos::ParameterList ¶ms, 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::GlobalData > | globalData |
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. | |
Teuchos::RCP < NOX::LAPACK::LinearSolver < std::complex< double > > > | augComplexSolver |
The augmented complex 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 | |
Private Member Functions | |
LAPACKDirectSolve (const LAPACKDirectSolve &) | |
Private to prohibit copying. | |
LAPACKDirectSolve & | operator= (const LAPACKDirectSolve &) |
Private to prohibit copying. |
This class solves the extended system of equations
using a direct solve by augmenting the with
,
, and
. To support this, the group representing
must be a LOCA::LAPACK::Group and the contraint object representing
must be a LOCA::MultiContinuation::ConstraintInterfaceMVDX.
Definition at line 88 of file LOCA_BorderedSolver_LAPACKDirectSolve.H.
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.
global_data | [in] Global data object | |
topParams | [in] Parsed top-level parameter list | |
solverParams | [in] Bordered solver parameters. Currently none are referenced. |
Definition at line 52 of file LOCA_BorderedSolver_LAPACKDirectSolve.C.
LOCA::BorderedSolver::LAPACKDirectSolve::~LAPACKDirectSolve | ( | ) | [virtual] |
LOCA::BorderedSolver::LAPACKDirectSolve::LAPACKDirectSolve | ( | const LAPACKDirectSolve & | ) | [private] |
Private to prohibit copying.
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.
Definition at line 82 of file LOCA_BorderedSolver_LAPACKDirectSolve.C.
References A, augComplexSolver, augJacSolver, B, C, globalData, grp, isComplex, isZeroA, isZeroB, isZeroC, m, N, n, NOX::LAPACK::Matrix< T >::numRows(), and op.
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.
Definition at line 329 of file LOCA_BorderedSolver_LAPACKDirectSolve.C.
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.
Definition at line 335 of file LOCA_BorderedSolver_LAPACKDirectSolve.C.
References NOX::Abstract::Group::Ok.
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] |
Computed extended matrix-multivector product.
Computes
Implements LOCA::BorderedSolver::AbstractStrategy.
Definition at line 341 of file LOCA_BorderedSolver_LAPACKDirectSolve.C.
References A, B, C, NOX::Abstract::Group::Failed, isZeroA, isZeroB, isZeroC, op, and NOX::Abstract::MultiVector::update().
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] |
Computed extended matrix transpose-multivector product.
Computes
Implements LOCA::BorderedSolver::AbstractStrategy.
Definition at line 452 of file LOCA_BorderedSolver_LAPACKDirectSolve.C.
References A, B, C, NOX::Abstract::Group::Failed, isZeroA, isZeroB, isZeroC, NOX::Abstract::MultiVector::multiply(), and op.
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.
Definition at line 484 of file LOCA_BorderedSolver_LAPACKDirectSolve.C.
References solve().
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.
Definition at line 495 of file LOCA_BorderedSolver_LAPACKDirectSolve.C.
References solve().
NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::LAPACKDirectSolve::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 [protected] |
Solve linear system.
Definition at line 506 of file LOCA_BorderedSolver_LAPACKDirectSolve.C.
References augComplexSolver, augJacSolver, NOX::Abstract::Group::Failed, LOCA::Hopf::ComplexMultiVector::getImagMultiVec(), LOCA::Hopf::ComplexMultiVector::getRealMultiVec(), NOX::Abstract::MultiVector::init(), isComplex, isZeroF, isZeroG, m, n, N, NOX::Abstract::MultiVector::numVectors(), and NOX::Abstract::Group::Ok.
Referenced by applyInverse(), and applyInverseTranspose().
LAPACKDirectSolve& LOCA::BorderedSolver::LAPACKDirectSolve::operator= | ( | const LAPACKDirectSolve & | ) | [private] |
Private to prohibit copying.
Teuchos::RCP<LOCA::GlobalData> LOCA::BorderedSolver::LAPACKDirectSolve::globalData [protected] |
Global data object.
Definition at line 246 of file LOCA_BorderedSolver_LAPACKDirectSolve.H.
Referenced by setMatrixBlocks().
Teuchos::RCP<Teuchos::ParameterList> LOCA::BorderedSolver::LAPACKDirectSolve::solverParams [protected] |
Teuchos::RCP<const LOCA::LAPACK::Group> LOCA::BorderedSolver::LAPACKDirectSolve::grp [protected] |
Pointer to group.
Definition at line 252 of file LOCA_BorderedSolver_LAPACKDirectSolve.H.
Referenced by setMatrixBlocks().
Teuchos::RCP<const LOCA::BorderedSolver::AbstractOperator> LOCA::BorderedSolver::LAPACKDirectSolve::op [protected] |
Pointer to operator.
Definition at line 255 of file LOCA_BorderedSolver_LAPACKDirectSolve.H.
Referenced by apply(), applyTranspose(), and setMatrixBlocks().
Teuchos::RCP<const NOX::Abstract::MultiVector> LOCA::BorderedSolver::LAPACKDirectSolve::A [protected] |
Pointer to A block.
Definition at line 258 of file LOCA_BorderedSolver_LAPACKDirectSolve.H.
Referenced by apply(), applyTranspose(), and setMatrixBlocks().
Teuchos::RCP<const LOCA::MultiContinuation::ConstraintInterfaceMVDX> LOCA::BorderedSolver::LAPACKDirectSolve::B [protected] |
Pointer to B block.
Definition at line 261 of file LOCA_BorderedSolver_LAPACKDirectSolve.H.
Referenced by apply(), applyTranspose(), and setMatrixBlocks().
Teuchos::RCP<const NOX::Abstract::MultiVector::DenseMatrix> LOCA::BorderedSolver::LAPACKDirectSolve::C [protected] |
Pointer to C block.
Definition at line 264 of file LOCA_BorderedSolver_LAPACKDirectSolve.H.
Referenced by apply(), applyTranspose(), and setMatrixBlocks().
Teuchos::RCP< NOX::LAPACK::LinearSolver<double> > LOCA::BorderedSolver::LAPACKDirectSolve::augJacSolver [protected] |
The augmented Jacobian matrix solver.
Definition at line 267 of file LOCA_BorderedSolver_LAPACKDirectSolve.H.
Referenced by setMatrixBlocks(), and solve().
Teuchos::RCP< NOX::LAPACK::LinearSolver< std::complex<double> > > LOCA::BorderedSolver::LAPACKDirectSolve::augComplexSolver [protected] |
The augmented complex matrix solver.
Definition at line 270 of file LOCA_BorderedSolver_LAPACKDirectSolve.H.
Referenced by setMatrixBlocks(), and solve().
int LOCA::BorderedSolver::LAPACKDirectSolve::n [protected] |
Matrix dimension.
Definition at line 273 of file LOCA_BorderedSolver_LAPACKDirectSolve.H.
Referenced by setMatrixBlocks(), and solve().
int LOCA::BorderedSolver::LAPACKDirectSolve::m [protected] |
Number of additional rows/columns.
Definition at line 276 of file LOCA_BorderedSolver_LAPACKDirectSolve.H.
Referenced by setMatrixBlocks(), and solve().
int LOCA::BorderedSolver::LAPACKDirectSolve::N [protected] |
Size of augmented matrix.
Definition at line 279 of file LOCA_BorderedSolver_LAPACKDirectSolve.H.
Referenced by setMatrixBlocks(), and solve().
bool LOCA::BorderedSolver::LAPACKDirectSolve::isZeroA [protected] |
flag indicating whether A block is zero
Definition at line 282 of file LOCA_BorderedSolver_LAPACKDirectSolve.H.
Referenced by apply(), applyTranspose(), and setMatrixBlocks().
bool LOCA::BorderedSolver::LAPACKDirectSolve::isZeroB [protected] |
flag indicating whether B block is zero
Definition at line 285 of file LOCA_BorderedSolver_LAPACKDirectSolve.H.
Referenced by apply(), applyTranspose(), and setMatrixBlocks().
bool LOCA::BorderedSolver::LAPACKDirectSolve::isZeroC [protected] |
flag indicating whether C block is zero
Definition at line 288 of file LOCA_BorderedSolver_LAPACKDirectSolve.H.
Referenced by apply(), applyTranspose(), and setMatrixBlocks().
bool LOCA::BorderedSolver::LAPACKDirectSolve::isZeroF [protected] |
flag indicating whether F block is zero
Definition at line 291 of file LOCA_BorderedSolver_LAPACKDirectSolve.H.
Referenced by solve().
bool LOCA::BorderedSolver::LAPACKDirectSolve::isZeroG [protected] |
flag indicating whether G block is zero
Definition at line 294 of file LOCA_BorderedSolver_LAPACKDirectSolve.H.
Referenced by solve().
bool LOCA::BorderedSolver::LAPACKDirectSolve::isComplex [protected] |
flag indicating whether we are solving the complex matrix or not
Definition at line 297 of file LOCA_BorderedSolver_LAPACKDirectSolve.H.
Referenced by setMatrixBlocks(), and solve().