LOCA::Epetra::BorderedOp Class Reference

Epetra operator representing a $n+1$ bordered matrix. More...

#include <LOCA_Epetra_BorderedOp.H>

Inheritance diagram for LOCA::Epetra::BorderedOp:

[legend]
Collaboration diagram for LOCA::Epetra::BorderedOp:
[legend]
List of all members.

Public Member Functions

 BorderedOp (Epetra_Operator &jac, const Epetra_Vector &a, const Epetra_Vector &b)
 Constructor.
virtual ~BorderedOp ()
 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 X in Y.
virtual double NormInf () const
 Returns the infinity norm of the bordered matrix.
virtual const char * Label () const
 Returns a character 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_CommComm () const
 Returns a reference to the Epetra_Comm communicator associated with this operator.
virtual const Epetra_MapOperatorDomainMap () const
 Returns the Epetra_Map object associated with the domain of this matrix operator.
virtual const Epetra_MapOperatorRangeMap () const
 Returns the Epetra_Map object associated with the range of this matrix operator.
virtual Epetra_VectorbuildEpetraExtendedVec (Epetra_Vector &x, double p, bool doCopy) const
 Builds an extended vector from components.
virtual void setEpetraExtendedVec (Epetra_Vector &x, double &p, Epetra_Vector &extVec) const
 Sets components from extended vector.

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

string label
 Label for operator.
Epetra_OperatorjacOperator
 Stores operator representing $J$.
const Epetra_VectoraVecPtr
 Stores pointer to a vector.
const Epetra_VectorbVecPtr
 Stores pointer to b vector.
const Epetra_BlockMapunderlyingMapPtr
 Stores underlying domain map.
const Epetra_CommunderlyingCommPtr
 Stores comm.
int underlyingLength
 Stores underlying vector local length.
Epetra_MapextendedMapPtr
 Stores extended domain map.
Epetra_MapextendedImportMapPtr
 Stores extended turning point map for importing param component.
Epetra_ImportextendedImporter
 Stores importer object for importing param component.
bool haveParamComponent
 Flag indicating whether we have the parameter component.
bool useTranspose
 Flag indicating whether to use transpose of operator.

Detailed Description

Epetra operator representing a $n+1$ bordered matrix.

The LOCA::Epetra::BorderedOp is an Epetra_Operator representing the $n+1$ bordered matrix

\[ \begin{bmatrix} J & a \\ b^T & 0 \end{bmatrix} \]

where $J$ is an Epetra_Operator representing an $n\times n$ matrix, and $a$ and $b$ are length $n$ Epetra_Vector's (The case where $a$ and/or $b$ are multi-vectors is not yet supported). It is assumed the Epetra_Map's for $a$, $b$, and $J$ are the same and the corresponding map for the bordered matrix is constructed from this map by storing the additional component on processor 0. The buildEpetraExtendedVec() method can be used to construct an Epetra_Vector using this map and a supplied length $n$ Epetra_Vector and a scalar, while setEpetraExtendedVec() splits an extended vector into its length $n$ and scalar components. The Apply() method performs the $n+1\times n+1$ matrix multiplication while ApplyInverse() uses a block-elimination algorithm to compute the inverse using the ApplyInverse() method of the underlying operator $J$. In this way, linear systems of the form

\[ \begin{bmatrix} J & a \\ b^T & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} c \\ d \end{bmatrix} \]

can be solved in a matrix-free mode using the Apply() method. This operator can also represent a preconditioner of the form

\[ \begin{bmatrix} M & a \\ b^T & 0 \end{bmatrix} \]

using the ApplyInvese() method, where $M$ is a preconditioner for $J$. Note that if $J$ is nearly singular, the preconditioner should not be too good because otherwise the preconditining operation represented by ApplyInverse() becomes unstable.


Constructor & Destructor Documentation

LOCA::Epetra::BorderedOp::BorderedOp Epetra_Operator jac,
const Epetra_Vector a,
const Epetra_Vector b
 

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.


Member Function Documentation

int LOCA::Epetra::BorderedOp::Apply const Epetra_MultiVector Input,
Epetra_MultiVector Result
const [virtual]
 

Returns the result of a Epetra_Operator applied to a Epetra_MultiVector Input in Result.

Computes the extended matrix-vector product

\[ \begin{bmatrix} J & a \\ b^T & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} Jx + ya \\ b^T x \end{bmatrix} \]

or its transpose if UseTranpose() is true. Currently, only the case where Input and Result are Epetra_Vector's is supported.

Implements Epetra_Operator.

int LOCA::Epetra::BorderedOp::ApplyInverse const Epetra_MultiVector X,
Epetra_MultiVector Y
const [virtual]
 

Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y.

Solves the extended system

\[ \begin{bmatrix} J & a \\ b^T & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} c \\ d \end{bmatrix} \]

using the following block-elimination algorithm:

\[ \tilde{c} = J^{-1} c, \quad \tilde{a} = J^{-1} a, \quad y = \frac{b^T\tilde{c} - d}{b^T\tilde{a}}, \quad x = \tilde{c} - y\tilde{a} \]

Currently, only the case where Input and Result are Epetra_Vector's is supported. If UseTranpose() is true, the tranpose of the system is solved.

Implements Epetra_Operator.

Epetra_Vector * LOCA::Epetra::BorderedOp::buildEpetraExtendedVec Epetra_Vector x,
double  p,
bool  doCopy
const [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.

double LOCA::Epetra::BorderedOp::NormInf  )  const [virtual]
 

Returns the infinity norm of the bordered matrix.

This is defined only if NormInf() of the underlying operator $J$ is defined and is given by $\|J\|_\infty+\|a\|_\infty+\|b\|_\infty$.

Implements Epetra_Operator.

void LOCA::Epetra::BorderedOp::setEpetraExtendedVec Epetra_Vector x,
double &  p,
Epetra_Vector extVec
const [virtual]
 

Sets components from extended vector.

Splits the extended vector extVec into components x and p by copying values out of extVec.

int LOCA::Epetra::BorderedOp::SetUseTranspose bool  UseTranspose  )  [virtual]
 

If set true, transpose of this operator will be applied.

Note that is only valid if the underlying operator $J$ supports a transpose.

Implements Epetra_Operator.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:40:44 2008 for NOX by doxygen 1.3.9.1