PyTrilinos::NOX::Epetra::MatrixFree Class Reference

Inheritance diagram for PyTrilinos::NOX::Epetra::MatrixFree:

Inheritance graph
[legend]
Collaboration diagram for PyTrilinos::NOX::Epetra::MatrixFree:

Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def SetUseTranspose
def Apply
def ApplyInverse
def NormInf
def Label
def UseTranspose
def HasNormInf
def Comm
def OperatorDomainMap
def OperatorRangeMap
def computeJacobian
def setDifferenceMethod
def setLambda
def setComputePerturbation
def setPerturbation
def getPerturbation
def setGroupForComputeF
def __init__
def SetUseTranspose
def Apply
def ApplyInverse
def NormInf
def Label
def UseTranspose
def HasNormInf
def Comm
def OperatorDomainMap
def OperatorRangeMap
def computeJacobian
def setDifferenceMethod
def setLambda
def setComputePerturbation
def setPerturbation
def getPerturbation
def setGroupForComputeF

Public Attributes

 this

Static Public Attributes

 Forward = ___init__.MatrixFree_Forward
 Backward = ___init__.MatrixFree_Backward
 Centered = ___init__.MatrixFree_Centered


Detailed Description

Concrete implementation for creating an Epetra_Operator Jacobian based
on the Matrix-Free Newton-Krylov method.

Matrix-Free Newton-Krylov is a method that takes advantage of the fact
the Newton Krylov solvers do not require an explicit Jacobian matrix.
Newton-Krylov solvers only require the matrix-vector product $Jy$ in
the iteration sequence. This product can approximated by the
following:

\\[ Jy = \\frac{F(x + \\delta y) - F(x)}{\\delta} \\]

where $J$ is the Jacobian, $F$ is the function evaluation, $x$ is the
solution vector, $y$ is the vector to be operated on, and $\\delta$
is a scalar perturbation calculated by:

\\[ \\delta = \\lambda * (\\lambda + \\frac{\\|
x\\|}{\\| y\\|} ) \\]

where $ \\lambda = 1.0e-6 $.

C++ includes: NOX_Epetra_MatrixFree.H 

Member Function Documentation

def PyTrilinos::NOX::Epetra::MatrixFree::__init__ (   self,
  args 
)

__init__(self, ParameterList printParams, Teuchos::RCP<(NOX::Epetra::Interface::Required)> i, 
    Vector cloneVector, 
    bool useNewPerturbation = False) -> MatrixFree

MatrixFree::MatrixFree(Teuchos::ParameterList &printParams, const
Teuchos::RCP< NOX::Epetra::Interface::Required > &i, const
NOX::Epetra::Vector &cloneVector, bool useNewPerturbation=false)

Constructor.

The vector x is used to clone the solution vector. 

Reimplemented from PyTrilinos::NOX::Epetra::Interface::Jacobian.

def PyTrilinos::NOX::Epetra::MatrixFree::__init__ (   self,
  args 
)

__init__(self, ParameterList printParams, Teuchos::RCP<(NOX::Epetra::Interface::Required)> i, 
    Vector cloneVector, 
    bool useNewPerturbation = False) -> MatrixFree

MatrixFree::MatrixFree(Teuchos::ParameterList &printParams, const
Teuchos::RCP< NOX::Epetra::Interface::Required > &i, const
NOX::Epetra::Vector &cloneVector, bool useNewPerturbation=false)

Constructor.

The vector x is used to clone the solution vector. 

Reimplemented from PyTrilinos::NOX::Epetra::Interface::Jacobian.

def PyTrilinos::NOX::Epetra::MatrixFree::Apply (   self,
  args 
)

Apply(self, Epetra_MultiVector X, Epetra_MultiVector Y) -> int

int
MatrixFree::Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y)
const

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

Parameters:
-----------

X:  - A Epetra_MultiVector of dimension NumVectors to multiply with
matrix.

Y:  -A Epetra_MultiVector of dimension NumVectors containing result.

Integer error code, set to 0 if successful. 

def PyTrilinos::NOX::Epetra::MatrixFree::Apply (   self,
  args 
)

Apply(self, Epetra_MultiVector X, Epetra_MultiVector Y) -> int

int
MatrixFree::Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y)
const

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

Parameters:
-----------

X:  - A Epetra_MultiVector of dimension NumVectors to multiply with
matrix.

Y:  -A Epetra_MultiVector of dimension NumVectors containing result.

Integer error code, set to 0 if successful. 

def PyTrilinos::NOX::Epetra::MatrixFree::ApplyInverse (   self,
  args 
)

ApplyInverse(self, Epetra_MultiVector X, Epetra_MultiVector Y) -> int

int
MatrixFree::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.

Parameters:
-----------

X:  - A Epetra_MultiVector of dimension NumVectors to solve for.

Y:  -A Epetra_MultiVector of dimension NumVectors containing result.

Integer error code, set to 0 if successful.

WARNING:  In order to work with AztecOO, any implementation of this
method must support the case where X and Y are the same object. 

def PyTrilinos::NOX::Epetra::MatrixFree::ApplyInverse (   self,
  args 
)

ApplyInverse(self, Epetra_MultiVector X, Epetra_MultiVector Y) -> int

int
MatrixFree::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.

Parameters:
-----------

X:  - A Epetra_MultiVector of dimension NumVectors to solve for.

Y:  -A Epetra_MultiVector of dimension NumVectors containing result.

Integer error code, set to 0 if successful.

WARNING:  In order to work with AztecOO, any implementation of this
method must support the case where X and Y are the same object. 

def PyTrilinos::NOX::Epetra::MatrixFree::Comm (   self,
  args 
)

Comm(self) -> Epetra_Comm

const
Epetra_Comm & MatrixFree::Comm() const

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

def PyTrilinos::NOX::Epetra::MatrixFree::Comm (   self,
  args 
)

Comm(self) -> Epetra_Comm

const
Epetra_Comm & MatrixFree::Comm() const

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

def PyTrilinos::NOX::Epetra::MatrixFree::computeJacobian (   self,
  args 
)

computeJacobian(self, Epetra_Vector x, Epetra_Operator Jac) -> bool

bool
MatrixFree::computeJacobian(const Epetra_Vector &x, Epetra_Operator
&Jac)

Compute Jacobian given the specified input vector, x. Returns true if
computation was successful. 

Reimplemented from PyTrilinos::NOX::Epetra::Interface::Jacobian.

def PyTrilinos::NOX::Epetra::MatrixFree::computeJacobian (   self,
  args 
)

computeJacobian(self, Epetra_Vector x, Epetra_Operator Jac) -> bool

bool
MatrixFree::computeJacobian(const Epetra_Vector &x, Epetra_Operator
&Jac)

Compute Jacobian given the specified input vector, x. Returns true if
computation was successful. 

Reimplemented from PyTrilinos::NOX::Epetra::Interface::Jacobian.

def PyTrilinos::NOX::Epetra::MatrixFree::getPerturbation (   self,
  args 
)

getPerturbation(self) -> double

double MatrixFree::getPerturbation() const

Returns the most recently used value of the perturbation parameter $
\\eta $. 

def PyTrilinos::NOX::Epetra::MatrixFree::getPerturbation (   self,
  args 
)

getPerturbation(self) -> double

double MatrixFree::getPerturbation() const

Returns the most recently used value of the perturbation parameter $
\\eta $. 

def PyTrilinos::NOX::Epetra::MatrixFree::HasNormInf (   self,
  args 
)

HasNormInf(self) -> bool

bool
MatrixFree::HasNormInf() const

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

def PyTrilinos::NOX::Epetra::MatrixFree::HasNormInf (   self,
  args 
)

HasNormInf(self) -> bool

bool
MatrixFree::HasNormInf() const

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

def PyTrilinos::NOX::Epetra::MatrixFree::Label (   self,
  args 
)

Label(self) -> char

const char *
MatrixFree::Label() const

Returns a character string describing the operator. 

def PyTrilinos::NOX::Epetra::MatrixFree::Label (   self,
  args 
)

Label(self) -> char

const char *
MatrixFree::Label() const

Returns a character string describing the operator. 

def PyTrilinos::NOX::Epetra::MatrixFree::NormInf (   self,
  args 
)

NormInf(self) -> double

double
MatrixFree::NormInf() const

Returns the infinity norm of the global matrix. 

def PyTrilinos::NOX::Epetra::MatrixFree::NormInf (   self,
  args 
)

NormInf(self) -> double

double
MatrixFree::NormInf() const

Returns the infinity norm of the global matrix. 

def PyTrilinos::NOX::Epetra::MatrixFree::OperatorDomainMap (   self,
  args 
)

OperatorDomainMap(self) -> Epetra_Map

const Epetra_Map & MatrixFree::OperatorDomainMap() const

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

def PyTrilinos::NOX::Epetra::MatrixFree::OperatorDomainMap (   self,
  args 
)

OperatorDomainMap(self) -> Epetra_Map

const Epetra_Map & MatrixFree::OperatorDomainMap() const

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

def PyTrilinos::NOX::Epetra::MatrixFree::OperatorRangeMap (   self,
  args 
)

OperatorRangeMap(self) -> Epetra_Map

const Epetra_Map & MatrixFree::OperatorRangeMap() const

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

def PyTrilinos::NOX::Epetra::MatrixFree::OperatorRangeMap (   self,
  args 
)

OperatorRangeMap(self) -> Epetra_Map

const Epetra_Map & MatrixFree::OperatorRangeMap() const

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

def PyTrilinos::NOX::Epetra::MatrixFree::setComputePerturbation (   self,
  args 
)

setComputePerturbation(self, bool bVal)

void MatrixFree::setComputePerturbation(bool bVal)

Flag that toggles whether MatrixFree should compute the perturbation
parameter $ \\eta $ or use a value supplied by the user through
setPerturbation(). 

def PyTrilinos::NOX::Epetra::MatrixFree::setComputePerturbation (   self,
  args 
)

setComputePerturbation(self, bool bVal)

void MatrixFree::setComputePerturbation(bool bVal)

Flag that toggles whether MatrixFree should compute the perturbation
parameter $ \\eta $ or use a value supplied by the user through
setPerturbation(). 

def PyTrilinos::NOX::Epetra::MatrixFree::setDifferenceMethod (   self,
  args 
)

setDifferenceMethod(self, DifferenceType type)

void MatrixFree::setDifferenceMethod(DifferenceType type)

Set the type of perturbation method used (default is Forward). 

def PyTrilinos::NOX::Epetra::MatrixFree::setDifferenceMethod (   self,
  args 
)

setDifferenceMethod(self, DifferenceType type)

void MatrixFree::setDifferenceMethod(DifferenceType type)

Set the type of perturbation method used (default is Forward). 

def PyTrilinos::NOX::Epetra::MatrixFree::setGroupForComputeF (   self,
  args 
)

setGroupForComputeF(self, Group group)

void MatrixFree::setGroupForComputeF(const NOX::Abstract::Group
&group)

Clone a NOX::Abstract::Group derived object and use the computeF()
method of that group for the perturbation instead of the
NOX::Epetra::Interface::Required::computeF() method. This is required
for LOCA to get the operators correct during homotopy. 

def PyTrilinos::NOX::Epetra::MatrixFree::setGroupForComputeF (   self,
  args 
)

setGroupForComputeF(self, Group group)

void MatrixFree::setGroupForComputeF(const NOX::Abstract::Group
&group)

Clone a NOX::Abstract::Group derived object and use the computeF()
method of that group for the perturbation instead of the
NOX::Epetra::Interface::Required::computeF() method. This is required
for LOCA to get the operators correct during homotopy. 

def PyTrilinos::NOX::Epetra::MatrixFree::setLambda (   self,
  args 
)

setLambda(self, double lambda_)

void
MatrixFree::setLambda(double lambda_)

Allows the user to change the value of $ \\lambda $ in the
perturbation calculation. 

def PyTrilinos::NOX::Epetra::MatrixFree::setLambda (   self,
  args 
)

setLambda(self, double lambda_)

void
MatrixFree::setLambda(double lambda_)

Allows the user to change the value of $ \\lambda $ in the
perturbation calculation. 

def PyTrilinos::NOX::Epetra::MatrixFree::setPerturbation (   self,
  args 
)

setPerturbation(self, double eta_)

void
MatrixFree::setPerturbation(double eta_)

Set the perturbation parameter $ \\eta $. 

def PyTrilinos::NOX::Epetra::MatrixFree::setPerturbation (   self,
  args 
)

setPerturbation(self, double eta_)

void
MatrixFree::setPerturbation(double eta_)

Set the perturbation parameter $ \\eta $. 

def PyTrilinos::NOX::Epetra::MatrixFree::SetUseTranspose (   self,
  args 
)

SetUseTranspose(self, bool UseTranspose) -> int

int
MatrixFree::SetUseTranspose(bool UseTranspose)

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

This flag allows the transpose of the given operator to be used
implicitly. Setting this flag affects only the Apply() and
ApplyInverse() methods. If the implementation of this interface does
not support transpose use, this method should return a value of -1.

Parameters:
-----------

UseTranspose:  -If true, multiply by the transpose of operator,
otherwise just use operator.

Integer error code, set to 0 if successful. Set to -1 if this
implementation does not support transpose. 

def PyTrilinos::NOX::Epetra::MatrixFree::SetUseTranspose (   self,
  args 
)

SetUseTranspose(self, bool UseTranspose) -> int

int
MatrixFree::SetUseTranspose(bool UseTranspose)

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

This flag allows the transpose of the given operator to be used
implicitly. Setting this flag affects only the Apply() and
ApplyInverse() methods. If the implementation of this interface does
not support transpose use, this method should return a value of -1.

Parameters:
-----------

UseTranspose:  -If true, multiply by the transpose of operator,
otherwise just use operator.

Integer error code, set to 0 if successful. Set to -1 if this
implementation does not support transpose. 

def PyTrilinos::NOX::Epetra::MatrixFree::UseTranspose (   self,
  args 
)

UseTranspose(self) -> bool

bool
MatrixFree::UseTranspose() const

Returns the current UseTranspose setting. 

def PyTrilinos::NOX::Epetra::MatrixFree::UseTranspose (   self,
  args 
)

UseTranspose(self) -> bool

bool
MatrixFree::UseTranspose() const

Returns the current UseTranspose setting. 


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

Generated on Thu Dec 17 11:00:22 2009 for PyTrilinos by  doxygen 1.5.9