NOX Development
|
Epetra operator representing a
#include <LOCA_Epetra_AugmentedOp.H>
Public Member Functions | |
AugmentedOp (const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RCP< Epetra_Operator > &jac, const Teuchos::RCP< const Epetra_MultiVector > &a, const Teuchos::RCP< const Epetra_MultiVector > &b, const Teuchos::RCP< const NOX::Abstract::MultiVector::DenseMatrix > c) | |
Constructor. | |
virtual | ~AugmentedOp () |
Destructor. | |
virtual int | SetUseTranspose (bool UseTranspose) |
If set true, transpose of this operator will be applied. | |
virtual int | Apply (const Epetra_MultiVector &Input, Epetra_MultiVector &Result) const |
Returns the result of a Epetra_Operator applied to a Epetra_MultiVector Input in Result. | |
virtual int | ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector Input in Result. | |
virtual double | NormInf () const |
Returns the infinity norm of the bordered matrix. | |
virtual const char * | Label () const |
Returns a character std::string describing the operator. | |
virtual bool | UseTranspose () const |
Returns the current UseTranspose setting. | |
virtual bool | HasNormInf () const |
Returns true if the this object can provide an approximate Inf-norm, false otherwise. | |
virtual const Epetra_Comm & | Comm () const |
Returns a reference to the Epetra_Comm communicator associated with this operator. | |
virtual const Epetra_Map & | OperatorDomainMap () const |
Returns the Epetra_Map object associated with the domain of this matrix operator. | |
virtual const Epetra_Map & | OperatorRangeMap () const |
Returns the Epetra_Map object associated with the range of this matrix operator. | |
virtual void | init (const Epetra_MultiVector &x) |
Initialiazes operator for a solve. | |
virtual Teuchos::RCP< Epetra_MultiVector > | buildEpetraAugmentedMultiVec (const Epetra_MultiVector &x, const NOX::Abstract::MultiVector::DenseMatrix *y, bool doCopy) const |
Builds an extended vector from components. | |
virtual void | setEpetraAugmentedMultiVec (Epetra_MultiVector &x, NOX::Abstract::MultiVector::DenseMatrix &y, const Epetra_MultiVector &augMultiVec) const |
Sets components from extended vector. | |
virtual int | SetUseTranspose (bool UseTranspose)=0 |
virtual int | Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0 |
virtual int | ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0 |
virtual double | NormInf () const=0 |
virtual const char * | Label () const=0 |
virtual bool | UseTranspose () const=0 |
virtual bool | HasNormInf () const=0 |
virtual const Epetra_Comm & | Comm () const=0 |
virtual const Epetra_Map & | OperatorDomainMap () const=0 |
virtual const Epetra_Map & | OperatorRangeMap () const=0 |
virtual int | SetUseTranspose (bool UseTranspose)=0 |
virtual int | Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0 |
virtual int | ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0 |
virtual double | NormInf () const=0 |
virtual const char * | Label () const=0 |
virtual bool | UseTranspose () const=0 |
virtual bool | HasNormInf () const=0 |
virtual const Epetra_Comm & | Comm () const=0 |
virtual const Epetra_Map & | OperatorDomainMap () const=0 |
virtual const Epetra_Map & | OperatorRangeMap () const=0 |
Protected Member Functions | |
void | buildExtendedMap (const Epetra_BlockMap &map, Epetra_Map *&extMapPtr, bool buildImporter, bool haveParam) |
Builds extended domain, range maps. | |
int | blockMap2PointMap (const Epetra_BlockMap &BlockMap, Epetra_Map *&PointMap) const |
Converts a block map to an equivalent point map. | |
Protected Attributes | |
Teuchos::RCP< LOCA::GlobalData > | globalData |
LOCA global data object. | |
std::string | label |
Label for operator. | |
Teuchos::RCP< Epetra_Operator > | jacOperator |
Stores operator representing ![]() | |
const Epetra_BlockMap & | underlyingMap |
Stores underlying domain map. | |
const Epetra_Comm & | underlyingComm |
Stores comm. | |
Epetra_LocalMap | localMap |
Local map for generating Epetra matrices. | |
Teuchos::RCP< const Epetra_MultiVector > | a |
Stores pointer to a multivector. | |
Teuchos::RCP< const Epetra_MultiVector > | b |
Stores pointer to b multivector. | |
Epetra_MultiVector | c |
Stores c matrix. | |
int | underlyingLength |
Stores underlying vector local length. | |
int | numConstraints |
Number of constraints. | |
Epetra_Map * | extendedMapPtr |
Stores extended domain map. | |
Epetra_Map * | extendedImportMapPtr |
Stores extended turning point map for importing param component. | |
Epetra_Import * | extendedImporter |
Stores importer object for importing param component. | |
Epetra_MultiVector * | importedInput |
Stores imported input multivector. | |
Epetra_MultiVector * | result_y |
Stores parameter component of result multivector. | |
Epetra_MultiVector * | tmp |
Stores temporary multivector used in ApplyInverse() | |
bool | haveParamComponent |
Flag indicating whether we have the parameter component. | |
bool | useTranspose |
Flag indicating whether to use transpose of operator. | |
Teuchos::LAPACK< int, double > | dlapack |
LAPACK Wrappers. | |
Epetra operator representing a
The LOCA::Epetra::AugmentedOp is an Epetra_Operator representing the
where
can be solved in a matrix-free mode using the Apply() method. This operator can also represent a preconditioner of the form
using the ApplyInvese() method, where
LOCA::Epetra::AugmentedOp::AugmentedOp | ( | const Teuchos::RCP< LOCA::GlobalData > & | global_data, |
const Teuchos::RCP< Epetra_Operator > & | jac, | ||
const Teuchos::RCP< const Epetra_MultiVector > & | a, | ||
const Teuchos::RCP< const Epetra_MultiVector > & | b, | ||
const Teuchos::RCP< const NOX::Abstract::MultiVector::DenseMatrix > | c | ||
) |
Constructor.
Builds the bordered operator using the supplied operator jac and Epetra_Vector's a and b. It is assumed a, b, and jac all have the same map.
References buildExtendedMap(), extendedImporter, extendedImportMapPtr, extendedMapPtr, haveParamComponent, Epetra_Comm::MyPID(), underlyingComm, underlyingMap, and View.
|
virtual |
Returns the result of a Epetra_Operator applied to a Epetra_MultiVector Input in Result.
Computes the extended matrix-vector product
or its transpose if UseTranpose() is true.
Implements Epetra_Operator.
References Epetra_MultiVector::ExtractView(), Insert, Epetra_MultiVector::Multiply(), Epetra_MultiVector::NumVectors(), and View.
|
virtual |
Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector Input in Result.
Solves the extended system
using the following block-elimination algorithm:
If UseTranpose() is true, the tranpose of the system is solved.
Implements Epetra_Operator.
References Epetra_MultiVector::ExtractView(), Insert, Epetra_MultiVector::Multiply(), Epetra_MultiVector::NumVectors(), and View.
|
virtual |
Builds an extended vector from components.
Builds an extended vector using the map representing the bordered matrix. If doCopy is true, the contents of x are copied into the extended vector, otherwise only space for the extended vector is created.
References Epetra_MultiVector::NumVectors().
Referenced by LOCA::BorderedSolver::EpetraAugmented::applyInverse().
|
virtual |
Returns a reference to the Epetra_Comm communicator associated with this operator.
Implements Epetra_Operator.
|
virtual |
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
Implements Epetra_Operator.
|
virtual |
Returns a character std::string describing the operator.
Implements Epetra_Operator.
|
virtual |
Returns the infinity norm of the bordered matrix.
This is defined only if NormInf() of the underlying operator
Implements Epetra_Operator.
|
virtual |
Returns the Epetra_Map object associated with the domain of this matrix operator.
Implements Epetra_Operator.
|
virtual |
Returns the Epetra_Map object associated with the range of this matrix operator.
Implements Epetra_Operator.
|
virtual |
Sets components from extended vector.
Splits the extended vector augMultiVec into components x and y by copying values out of extVec.
References Insert, and Epetra_MultiVector::NumVectors().
Referenced by LOCA::BorderedSolver::EpetraAugmented::applyInverse().
|
virtual |
If set true, transpose of this operator will be applied.
Note that is only valid if the underlying operator
Implements Epetra_Operator.
|
virtual |
Returns the current UseTranspose setting.
Implements Epetra_Operator.