NOX Development
Loading...
Searching...
No Matches
LOCA::Epetra::CompactWYOp Class Reference

An Epetra operator for solving extended sets of equations using Householder transformations. More...

#include <LOCA_Epetra_CompactWYOp.H>

Inheritance diagram for LOCA::Epetra::CompactWYOp:
Collaboration diagram for LOCA::Epetra::CompactWYOp:

Public Member Functions

 CompactWYOp (const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RCP< const Epetra_Operator > &jacOperator, const Teuchos::RCP< const Epetra_MultiVector > &A_multiVec, const Teuchos::RCP< const Epetra_MultiVector > &Y_x_multiVec, const Teuchos::RCP< const NOX::Abstract::MultiVector::DenseMatrix > &Y_p_matrix, const Teuchos::RCP< const NOX::Abstract::MultiVector::DenseMatrix > &T_matrix)
 Constructor.
virtual ~CompactWYOp ()
 Destructor.
virtual int SetUseTranspose (bool UseTranspose)
 The operator currently does not support a transpose.
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 as described above.
virtual int ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 This method does nothing.
virtual double NormInf () const
 Returns an approximate infinity norm of the operator matrix.
virtual const char * Label () const
 Returns a character std::string describing the operator.
virtual bool UseTranspose () const
 Returns the current UseTranspose setting. Always returns false.
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.
void init (const Epetra_MultiVector &x)
 Initialize operator. Call this before starting a linear solve. The Epetra_MultiVector argument x must be of the same size and distribution as arguments to Apply().
void finish ()
 Finish up solve. Call this after a linear solve is finished to inform the operator that the solve is completed.
void applyCompactWY (const Epetra_MultiVector &x, Epetra_MultiVector &result_x, Epetra_MultiVector &result_p) const
 Applies the operator Q with a zero parameter component on input.

Protected Attributes

Teuchos::RCP< LOCA::GlobalDataglobalData
 Global data object.
std::string label
 Label for operator.
Epetra_LocalMap localMap
 Local map for generating temporary matrices.
Teuchos::RCP< const Epetra_OperatorJ
 Stores operator representing J.
Teuchos::RCP< const Epetra_MultiVectorA
 Stores multivector representing A.
Teuchos::RCP< const Epetra_MultiVectorY_x
 Stores multivector representing solution component of Y.
Epetra_MultiVector Y_p
 Stores multivector representing parameter component of Y.
Epetra_MultiVector T
 Stores multivector representing T.
Epetra_MultiVectortmpMat1
 Temporary matrix.
Epetra_MultiVectortmpMV
 Temporary multivec.
Teuchos::BLAS< int, double > dblas
 BLAS wrappers, used for triangular matrix-matrix products.

Detailed Description

An Epetra operator for solving extended sets of equations using Householder transformations.

This class implements the $P$ operator as described in the LOCA::BorderedSolver::EpetraHouseholder documentation for solving an extended set of equations. It uses the $Q$ factor from a QR factorization using the compact WY representation.

Constructor & Destructor Documentation

◆ CompactWYOp()

LOCA::Epetra::CompactWYOp::CompactWYOp ( const Teuchos::RCP< LOCA::GlobalData > & global_data,
const Teuchos::RCP< const Epetra_Operator > & jacOperator,
const Teuchos::RCP< const Epetra_MultiVector > & A_multiVec,
const Teuchos::RCP< const Epetra_MultiVector > & Y_x_multiVec,
const Teuchos::RCP< const NOX::Abstract::MultiVector::DenseMatrix > & Y_p_matrix,
const Teuchos::RCP< const NOX::Abstract::MultiVector::DenseMatrix > & T_matrix )

Constructor.

Parameters
global_data[in] The global data object
jacOperator[in] Jacobian operator J
A_multiVec[in] Multivector representing A
Y_x_multiVec[in] Multivector representing the solution component of the Y matrix in the compact WY representation
Y_p_matrix[in] Matrix representing the parameter component of the Y matrix in the compact WY representation
T_matrix[in] Matrix representing the T matrix in the compact WY representation.

References A, Comm(), dblas, globalData, J, label, localMap, T, tmpMat1, tmpMV, Y_p, and Y_x.

◆ ~CompactWYOp()

LOCA::Epetra::CompactWYOp::~CompactWYOp ( )
virtual

Destructor.

References tmpMat1, and tmpMV.

Member Function Documentation

◆ Apply()

int LOCA::Epetra::CompactWYOp::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 as described above.

Implements Epetra_Operator.

References A, applyCompactWY(), globalData, J, Epetra_MultiVector::Multiply(), tmpMat1, and tmpMV.

◆ applyCompactWY()

void LOCA::Epetra::CompactWYOp::applyCompactWY ( const Epetra_MultiVector & x,
Epetra_MultiVector & result_x,
Epetra_MultiVector & result_p ) const

Applies the operator Q with a zero parameter component on input.

References dblas, Epetra_MultiVector::Multiply(), Epetra_MultiVector::MyLength(), Epetra_MultiVector::NumVectors(), T, Epetra_MultiVector::Values(), Y_p, and Y_x.

Referenced by Apply().

◆ ApplyInverse()

int LOCA::Epetra::CompactWYOp::ApplyInverse ( const Epetra_MultiVector & X,
Epetra_MultiVector & Y ) const
virtual

This method does nothing.

Implements Epetra_Operator.

References globalData.

◆ Comm()

const Epetra_Comm & LOCA::Epetra::CompactWYOp::Comm ( ) const
virtual

Returns a reference to the Epetra_Comm communicator associated with this operator.

Implements Epetra_Operator.

References J.

Referenced by CompactWYOp().

◆ finish()

void LOCA::Epetra::CompactWYOp::finish ( )

Finish up solve. Call this after a linear solve is finished to inform the operator that the solve is completed.

References tmpMat1, and tmpMV.

◆ HasNormInf()

bool LOCA::Epetra::CompactWYOp::HasNormInf ( ) const
virtual

Returns true if the this object can provide an approximate Inf-norm, false otherwise.

Implements Epetra_Operator.

References J.

◆ init()

void LOCA::Epetra::CompactWYOp::init ( const Epetra_MultiVector & x)

Initialize operator. Call this before starting a linear solve. The Epetra_MultiVector argument x must be of the same size and distribution as arguments to Apply().

References Epetra_MultiVector::Epetra_MultiVector(), localMap, Epetra_DistObject::Map(), tmpMat1, and tmpMV.

◆ Label()

const char * LOCA::Epetra::CompactWYOp::Label ( ) const
virtual

Returns a character std::string describing the operator.

Implements Epetra_Operator.

References label.

◆ NormInf()

double LOCA::Epetra::CompactWYOp::NormInf ( ) const
virtual

Returns an approximate infinity norm of the operator matrix.

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

Implements Epetra_Operator.

References A, and J.

◆ OperatorDomainMap()

const Epetra_Map & LOCA::Epetra::CompactWYOp::OperatorDomainMap ( ) const
virtual

Returns the Epetra_Map object associated with the domain of this matrix operator.

Implements Epetra_Operator.

References J.

◆ OperatorRangeMap()

const Epetra_Map & LOCA::Epetra::CompactWYOp::OperatorRangeMap ( ) const
virtual

Returns the Epetra_Map object associated with the range of this matrix operator.

Implements Epetra_Operator.

References J.

◆ SetUseTranspose()

int LOCA::Epetra::CompactWYOp::SetUseTranspose ( bool UseTranspose)
virtual

The operator currently does not support a transpose.

Setting this to true throws an error.

Implements Epetra_Operator.

References globalData, and UseTranspose().

◆ UseTranspose()

bool LOCA::Epetra::CompactWYOp::UseTranspose ( ) const
virtual

Returns the current UseTranspose setting. Always returns false.

Implements Epetra_Operator.

Referenced by SetUseTranspose().

Member Data Documentation

◆ A

Teuchos::RCP<const Epetra_MultiVector> LOCA::Epetra::CompactWYOp::A
protected

Stores multivector representing A.

Referenced by Apply(), CompactWYOp(), and NormInf().

◆ dblas

Teuchos::BLAS<int,double> LOCA::Epetra::CompactWYOp::dblas
protected

BLAS wrappers, used for triangular matrix-matrix products.

Referenced by applyCompactWY(), and CompactWYOp().

◆ globalData

Teuchos::RCP<LOCA::GlobalData> LOCA::Epetra::CompactWYOp::globalData
protected

Global data object.

Referenced by Apply(), ApplyInverse(), CompactWYOp(), and SetUseTranspose().

◆ J

Teuchos::RCP<const Epetra_Operator> LOCA::Epetra::CompactWYOp::J
protected

Stores operator representing J.

Referenced by Apply(), Comm(), CompactWYOp(), HasNormInf(), NormInf(), OperatorDomainMap(), and OperatorRangeMap().

◆ label

std::string LOCA::Epetra::CompactWYOp::label
protected

Label for operator.

Referenced by CompactWYOp(), and Label().

◆ localMap

Epetra_LocalMap LOCA::Epetra::CompactWYOp::localMap
protected

Local map for generating temporary matrices.

Referenced by CompactWYOp(), and init().

◆ T

Epetra_MultiVector LOCA::Epetra::CompactWYOp::T
protected

Stores multivector representing T.

Referenced by applyCompactWY(), and CompactWYOp().

◆ tmpMat1

Epetra_MultiVector* LOCA::Epetra::CompactWYOp::tmpMat1
protected

Temporary matrix.

Referenced by Apply(), CompactWYOp(), finish(), init(), and ~CompactWYOp().

◆ tmpMV

Epetra_MultiVector* LOCA::Epetra::CompactWYOp::tmpMV
protected

Temporary multivec.

Referenced by Apply(), CompactWYOp(), finish(), init(), and ~CompactWYOp().

◆ Y_p

Epetra_MultiVector LOCA::Epetra::CompactWYOp::Y_p
protected

Stores multivector representing parameter component of Y.

Referenced by applyCompactWY(), and CompactWYOp().

◆ Y_x

Teuchos::RCP<const Epetra_MultiVector> LOCA::Epetra::CompactWYOp::Y_x
protected

Stores multivector representing solution component of Y.

Referenced by applyCompactWY(), and CompactWYOp().


The documentation for this class was generated from the following files: