#include <LOCA_BorderedSolver_Nested.H>
Public Member Functions | |
Nested (const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RCP< LOCA::Parameter::SublistParser > &topParams, const Teuchos::RCP< Teuchos::ParameterList > &solverParams) | |
Constructor. | |
virtual | ~Nested () |
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 bordering. | |
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 using bordering. | |
Protected Attributes | |
Teuchos::RCP< LOCA::GlobalData > | globalData |
Global data object. | |
Teuchos::RCP < Teuchos::ParameterList > | solverParams |
Solver parameters. | |
Teuchos::RCP < LOCA::BorderedSolver::AbstractStrategy > | solver |
Underlying solver. | |
Teuchos::RCP< const LOCA::BorderedSystem::AbstractGroup > | grp |
Pointer to group storing J. | |
Teuchos::RCP< const NOX::Abstract::Group > | unbordered_grp |
Pointer to unbordered group. | |
int | myWidth |
Width for bordered rows/columns. | |
int | underlyingWidth |
Underling width. | |
int | numConstraints |
Number of my constraints. | |
Private Member Functions | |
Nested (const Nested &) | |
Private to prohibit copying. | |
Nested & | operator= (const Nested &) |
Private to prohibit copying. |
This class implements a bordered solver strategy for the bordered system
when itself has this block form. It combines the blocks for
,
, and
and then instantiates a solver as specified by the "Nested Bordered Solver" sublist of the
solverParams
pass through the constructor. This sublist should specify the "Bordered Solver Method" for the solver as well as any other parameters for that method, and any method that can be instantiated through the LOCA::Factory is available.
Note that the operator representing must implement the LOCA::BorderedSolver::BorderedOperator interface, and the constraint object representing
must be of type LOCA::MultiContinuation::ConstraintInterfaceMVDX.
Definition at line 93 of file LOCA_BorderedSolver_Nested.H.
LOCA::BorderedSolver::Nested::Nested | ( | 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 as described above |
Definition at line 53 of file LOCA_BorderedSolver_Nested.C.
References globalData, solver, and solverParams.
LOCA::BorderedSolver::Nested::~Nested | ( | ) | [virtual] |
LOCA::BorderedSolver::Nested::Nested | ( | const Nested & | ) | [private] |
Private to prohibit copying.
void LOCA::BorderedSolver::Nested::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 81 of file LOCA_BorderedSolver_Nested.C.
References globalData, grp, myWidth, numConstraints, solver, unbordered_grp, and underlyingWidth.
NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::Nested::initForSolve | ( | ) | [virtual] |
Intialize solver for a solve.
This should be called after setMatrixBlocks(), but before applyInverse().
Implements LOCA::BorderedSolver::AbstractStrategy.
Definition at line 231 of file LOCA_BorderedSolver_Nested.C.
References solver.
NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::Nested::initForTransposeSolve | ( | ) | [virtual] |
Intialize solver for a transpose solve.
This should be called after setMatrixBlocks(), but before applyInverseTranspose().
Implements LOCA::BorderedSolver::AbstractStrategy.
Definition at line 237 of file LOCA_BorderedSolver_Nested.C.
References solver.
NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::Nested::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 243 of file LOCA_BorderedSolver_Nested.C.
References grp, myWidth, numConstraints, NOX::Abstract::MultiVector::numVectors(), solver, unbordered_grp, and underlyingWidth.
NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::Nested::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 283 of file LOCA_BorderedSolver_Nested.C.
References grp, myWidth, numConstraints, NOX::Abstract::MultiVector::numVectors(), solver, unbordered_grp, and underlyingWidth.
NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::Nested::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 bordering.
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 323 of file LOCA_BorderedSolver_Nested.C.
References grp, NOX::Abstract::MultiVector::init(), myWidth, numConstraints, NOX::Abstract::MultiVector::numVectors(), solver, unbordered_grp, and underlyingWidth.
NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::Nested::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 using bordering.
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 379 of file LOCA_BorderedSolver_Nested.C.
References grp, NOX::Abstract::MultiVector::init(), myWidth, numConstraints, NOX::Abstract::MultiVector::numVectors(), solver, unbordered_grp, and underlyingWidth.
Private to prohibit copying.
Teuchos::RCP<LOCA::GlobalData> LOCA::BorderedSolver::Nested::globalData [protected] |
Global data object.
Definition at line 242 of file LOCA_BorderedSolver_Nested.H.
Referenced by Nested(), and setMatrixBlocks().
Teuchos::RCP<Teuchos::ParameterList> LOCA::BorderedSolver::Nested::solverParams [protected] |
Solver parameters.
Definition at line 245 of file LOCA_BorderedSolver_Nested.H.
Referenced by Nested().
Teuchos::RCP<LOCA::BorderedSolver::AbstractStrategy> LOCA::BorderedSolver::Nested::solver [protected] |
Underlying solver.
Definition at line 248 of file LOCA_BorderedSolver_Nested.H.
Referenced by apply(), applyInverse(), applyInverseTranspose(), applyTranspose(), initForSolve(), initForTransposeSolve(), Nested(), and setMatrixBlocks().
Teuchos::RCP<const LOCA::BorderedSystem::AbstractGroup> LOCA::BorderedSolver::Nested::grp [protected] |
Pointer to group storing J.
Definition at line 251 of file LOCA_BorderedSolver_Nested.H.
Referenced by apply(), applyInverse(), applyInverseTranspose(), applyTranspose(), and setMatrixBlocks().
Teuchos::RCP<const NOX::Abstract::Group> LOCA::BorderedSolver::Nested::unbordered_grp [protected] |
Pointer to unbordered group.
Definition at line 254 of file LOCA_BorderedSolver_Nested.H.
Referenced by apply(), applyInverse(), applyInverseTranspose(), applyTranspose(), and setMatrixBlocks().
int LOCA::BorderedSolver::Nested::myWidth [protected] |
Width for bordered rows/columns.
Definition at line 257 of file LOCA_BorderedSolver_Nested.H.
Referenced by apply(), applyInverse(), applyInverseTranspose(), applyTranspose(), and setMatrixBlocks().
int LOCA::BorderedSolver::Nested::underlyingWidth [protected] |
Underling width.
Definition at line 260 of file LOCA_BorderedSolver_Nested.H.
Referenced by apply(), applyInverse(), applyInverseTranspose(), applyTranspose(), and setMatrixBlocks().
int LOCA::BorderedSolver::Nested::numConstraints [protected] |
Number of my constraints.
Definition at line 263 of file LOCA_BorderedSolver_Nested.H.
Referenced by apply(), applyInverse(), applyInverseTranspose(), applyTranspose(), and setMatrixBlocks().