#include <LOCA_BorderedSolver_Bordering.H>
This class solves the extended system of equations
via bordering (block elimination):
It takes advantage of any of the matrix blocks being zero and concatenates and
into a contiguous multivector to compute
and
in one block solve.
To solve the transpose of the system, a similar bordering algorithm is implemented. Note however that for the transpose, the constraint object representing must implement the LOCA::MultiContinuation::ConstraintInterfaceMVDX since
appears on the right-hand-side of a linear system.
Definition at line 95 of file LOCA_BorderedSolver_Bordering.H.
LOCA::BorderedSolver::Bordering::Bordering | ( | 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 53 of file LOCA_BorderedSolver_Bordering.C.
LOCA::BorderedSolver::Bordering::~Bordering | ( | ) | [virtual] |
LOCA::BorderedSolver::Bordering::Bordering | ( | const Bordering & | ) | [private] |
Private to prohibit copying.
void LOCA::BorderedSolver::Bordering::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 76 of file LOCA_BorderedSolver_Bordering.C.
References A, B, C, globalData, isZeroA, isZeroB, isZeroC, and op.
NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::Bordering::initForSolve | ( | ) | [virtual] |
Intialize solver for a solve.
This should be called after setMatrixBlocks(), but before applyInverse().
Implements LOCA::BorderedSolver::AbstractStrategy.
Definition at line 105 of file LOCA_BorderedSolver_Bordering.C.
References NOX::Abstract::Group::Ok.
NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::Bordering::initForTransposeSolve | ( | ) | [virtual] |
Intialize solver for a transpose solve.
This should be called after setMatrixBlocks(), but before applyInverseTranspose().
Implements LOCA::BorderedSolver::AbstractStrategy.
Definition at line 111 of file LOCA_BorderedSolver_Bordering.C.
References NOX::Abstract::Group::Ok.
NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::Bordering::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 117 of file LOCA_BorderedSolver_Bordering.C.
References A, B, C, NOX::Abstract::Group::Failed, isZeroA, isZeroB, isZeroC, op, and NOX::Abstract::MultiVector::update().
NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::Bordering::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 150 of file LOCA_BorderedSolver_Bordering.C.
References A, B, C, NOX::Abstract::Group::Failed, isZeroA, isZeroB, isZeroC, NOX::Abstract::MultiVector::multiply(), and op.
NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::Bordering::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 183 of file LOCA_BorderedSolver_Bordering.C.
References A, B, C, NOX::Abstract::MultiVector::clone(), globalData, isZeroA, isZeroB, isZeroF, isZeroG, NOX::Abstract::MultiVector::numVectors(), op, LOCA::BorderedSolver::UpperTriangularBlockElimination::solve(), LOCA::BorderedSolver::LowerTriangularBlockElimination::solve(), solveContiguous(), and solveFZero().
NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::Bordering::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. Note that for the transpose solve B must be of type LOCA::MultiContinuation::ConstraintInterfaceMVDX.
Implements LOCA::BorderedSolver::AbstractStrategy.
Definition at line 246 of file LOCA_BorderedSolver_Bordering.C.
References A, B, C, NOX::Abstract::MultiVector::clone(), globalData, isZeroA, isZeroB, isZeroF, isZeroG, NOX::Abstract::MultiVector::numVectors(), op, solveContiguousTrans(), solveFZeroTrans(), LOCA::BorderedSolver::LowerTriangularBlockElimination::solveTranspose(), and LOCA::BorderedSolver::UpperTriangularBlockElimination::solveTranspose().
NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::Bordering::solveFZero | ( | Teuchos::ParameterList & | params, | |
const NOX::Abstract::MultiVector * | AA, | |||
const LOCA::MultiContinuation::ConstraintInterface * | BB, | |||
const NOX::Abstract::MultiVector::DenseMatrix * | CC, | |||
const NOX::Abstract::MultiVector::DenseMatrix * | G, | |||
NOX::Abstract::MultiVector & | X, | |||
NOX::Abstract::MultiVector::DenseMatrix & | Y | |||
) | const [protected] |
Solves the extended system when F = 0.
Definition at line 327 of file LOCA_BorderedSolver_Bordering.C.
References NOX::Abstract::MultiVector::clone(), NOX::Abstract::Group::Failed, globalData, NOX::Abstract::MultiVector::init(), isZeroC, isZeroG, LOCA::MultiContinuation::ConstraintInterface::multiplyDX(), LOCA::MultiContinuation::ConstraintInterface::numConstraints(), NOX::Abstract::Group::Ok, op, NOX::ShapeCopy, and NOX::Abstract::MultiVector::update().
Referenced by applyInverse().
NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::Bordering::solveContiguous | ( | Teuchos::ParameterList & | params, | |
const NOX::Abstract::MultiVector * | AA, | |||
const LOCA::MultiContinuation::ConstraintInterface * | BB, | |||
const NOX::Abstract::MultiVector::DenseMatrix * | CC, | |||
vector< int > & | indexF, | |||
vector< int > & | indexA, | |||
const NOX::Abstract::MultiVector * | F, | |||
const NOX::Abstract::MultiVector::DenseMatrix * | G, | |||
NOX::Abstract::MultiVector & | X, | |||
NOX::Abstract::MultiVector::DenseMatrix & | Y | |||
) | const [protected] |
Solves the extended system when F and A are contiguous.
Definition at line 391 of file LOCA_BorderedSolver_Bordering.C.
References NOX::Abstract::Group::Failed, globalData, isZeroC, isZeroG, LOCA::MultiContinuation::ConstraintInterface::multiplyDX(), LOCA::MultiContinuation::ConstraintInterface::numConstraints(), NOX::Abstract::Group::Ok, op, and NOX::Abstract::MultiVector::subView().
Referenced by applyInverse().
NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::Bordering::solveFZeroTrans | ( | Teuchos::ParameterList & | params, | |
const NOX::Abstract::MultiVector * | AA, | |||
const NOX::Abstract::MultiVector * | BB, | |||
const NOX::Abstract::MultiVector::DenseMatrix * | CC, | |||
const NOX::Abstract::MultiVector::DenseMatrix * | G, | |||
NOX::Abstract::MultiVector & | X, | |||
NOX::Abstract::MultiVector::DenseMatrix & | Y | |||
) | const [protected] |
Solves the transpose of the extended system when F = 0.
Definition at line 459 of file LOCA_BorderedSolver_Bordering.C.
References NOX::Abstract::MultiVector::clone(), NOX::Abstract::Group::Failed, globalData, NOX::Abstract::MultiVector::init(), isZeroC, isZeroG, NOX::Abstract::MultiVector::numVectors(), NOX::Abstract::Group::Ok, op, NOX::ShapeCopy, and NOX::Abstract::MultiVector::update().
Referenced by applyInverseTranspose().
NOX::Abstract::Group::ReturnType LOCA::BorderedSolver::Bordering::solveContiguousTrans | ( | Teuchos::ParameterList & | params, | |
const NOX::Abstract::MultiVector * | AA, | |||
const NOX::Abstract::MultiVector * | BB, | |||
const NOX::Abstract::MultiVector::DenseMatrix * | CC, | |||
vector< int > & | indexF, | |||
vector< int > & | indexA, | |||
const NOX::Abstract::MultiVector * | F, | |||
const NOX::Abstract::MultiVector::DenseMatrix * | G, | |||
NOX::Abstract::MultiVector & | X, | |||
NOX::Abstract::MultiVector::DenseMatrix & | Y | |||
) | const [protected] |
Solves the transpose of the extended system when F and B are contiguous.
Definition at line 525 of file LOCA_BorderedSolver_Bordering.C.
References NOX::Abstract::Group::Failed, globalData, isZeroC, isZeroG, NOX::Abstract::MultiVector::numVectors(), NOX::Abstract::Group::Ok, op, and NOX::Abstract::MultiVector::subView().
Referenced by applyInverseTranspose().
Private to prohibit copying.
Teuchos::RCP<LOCA::GlobalData> LOCA::BorderedSolver::Bordering::globalData [protected] |
Global data object.
Definition at line 304 of file LOCA_BorderedSolver_Bordering.H.
Referenced by applyInverse(), applyInverseTranspose(), setMatrixBlocks(), solveContiguous(), solveContiguousTrans(), solveFZero(), and solveFZeroTrans().
Teuchos::RCP<Teuchos::ParameterList> LOCA::BorderedSolver::Bordering::solverParams [protected] |
Teuchos::RCP<const LOCA::BorderedSolver::AbstractOperator> LOCA::BorderedSolver::Bordering::op [protected] |
Pointer to operator.
Definition at line 310 of file LOCA_BorderedSolver_Bordering.H.
Referenced by apply(), applyInverse(), applyInverseTranspose(), applyTranspose(), setMatrixBlocks(), solveContiguous(), solveContiguousTrans(), solveFZero(), and solveFZeroTrans().
Teuchos::RCP<const NOX::Abstract::MultiVector> LOCA::BorderedSolver::Bordering::A [protected] |
Pointer to A block.
Definition at line 313 of file LOCA_BorderedSolver_Bordering.H.
Referenced by apply(), applyInverse(), applyInverseTranspose(), applyTranspose(), and setMatrixBlocks().
Teuchos::RCP<const LOCA::MultiContinuation::ConstraintInterface> LOCA::BorderedSolver::Bordering::B [protected] |
Pointer to B block.
Definition at line 316 of file LOCA_BorderedSolver_Bordering.H.
Referenced by apply(), applyInverse(), applyInverseTranspose(), applyTranspose(), and setMatrixBlocks().
Teuchos::RCP<const NOX::Abstract::MultiVector::DenseMatrix> LOCA::BorderedSolver::Bordering::C [protected] |
Pointer to C block.
Definition at line 319 of file LOCA_BorderedSolver_Bordering.H.
Referenced by apply(), applyInverse(), applyInverseTranspose(), applyTranspose(), and setMatrixBlocks().
bool LOCA::BorderedSolver::Bordering::isZeroA [protected] |
flag indicating whether A block is zero
Definition at line 322 of file LOCA_BorderedSolver_Bordering.H.
Referenced by apply(), applyInverse(), applyInverseTranspose(), applyTranspose(), and setMatrixBlocks().
bool LOCA::BorderedSolver::Bordering::isZeroB [protected] |
flag indicating whether B block is zero
Definition at line 325 of file LOCA_BorderedSolver_Bordering.H.
Referenced by apply(), applyInverse(), applyInverseTranspose(), applyTranspose(), and setMatrixBlocks().
bool LOCA::BorderedSolver::Bordering::isZeroC [protected] |
flag indicating whether C block is zero
Definition at line 328 of file LOCA_BorderedSolver_Bordering.H.
Referenced by apply(), applyTranspose(), setMatrixBlocks(), solveContiguous(), solveContiguousTrans(), solveFZero(), and solveFZeroTrans().
bool LOCA::BorderedSolver::Bordering::isZeroF [mutable, protected] |
flag indicating whether F block is zero
Definition at line 331 of file LOCA_BorderedSolver_Bordering.H.
Referenced by applyInverse(), and applyInverseTranspose().
bool LOCA::BorderedSolver::Bordering::isZeroG [mutable, protected] |
flag indicating whether G block is zero
Definition at line 334 of file LOCA_BorderedSolver_Bordering.H.
Referenced by applyInverse(), applyInverseTranspose(), solveContiguous(), solveContiguousTrans(), solveFZero(), and solveFZeroTrans().