NOX Development
Public Member Functions | Protected Member Functions | Protected Attributes
NOX::Epetra::FiniteDifferenceColoringWithUpdate Class Reference

Concrete implementation for creating an Epetra_RowMatrix Jacobian via finite differencing of the residual using coloring. This method assumes the existence of a valid parallel coloring of the columns of the Jacobian (aka from Isorropia). More...

#include <NOX_Epetra_FiniteDifferenceColoringWithUpdate.H>

Inheritance diagram for NOX::Epetra::FiniteDifferenceColoringWithUpdate:
Inheritance graph
[legend]
Collaboration diagram for NOX::Epetra::FiniteDifferenceColoringWithUpdate:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FiniteDifferenceColoringWithUpdate (Teuchos::ParameterList &printingParams, const Teuchos::RCP< Interface::Required > &i, const NOX::Epetra::Vector &initialGuess, const Teuchos::RCP< Epetra_MapColoring > &colorMap, double beta=1.0e-6, double alpha=1.0e-4)
 Constructor with no frills.
 FiniteDifferenceColoringWithUpdate (Teuchos::ParameterList &printingParams, const Teuchos::RCP< Interface::Required > &i, const NOX::Epetra::Vector &initialGuess, const Teuchos::RCP< Epetra_CrsGraph > &rawGraph, const Teuchos::RCP< Epetra_MapColoring > &colorMap, double beta=1.0e-6, double alpha=1.0e-4)
 Constructor with graph.
 FiniteDifferenceColoringWithUpdate (Teuchos::ParameterList &printingParams, const Teuchos::RCP< Interface::Required > &i, const NOX::Epetra::Vector &initialGuess, const Teuchos::RCP< Epetra_MapColoring > &colorMap, const Teuchos::RCP< Epetra_MapColoring > &updateColorMap, double beta=1.0e-6, double alpha=1.0e-4)
 Constructor with update map.
 FiniteDifferenceColoringWithUpdate (Teuchos::ParameterList &printingParams, const Teuchos::RCP< Interface::Required > &i, const NOX::Epetra::Vector &initialGuess, const Teuchos::RCP< Epetra_CrsGraph > &rawGraph, const Teuchos::RCP< Epetra_MapColoring > &colorMap, const Teuchos::RCP< Epetra_MapColoring > &updatecolorMap, double beta=1.0e-6, double alpha=1.0e-4)
 Constructor with update map and graph.
virtual void forceJacobianRecompute ()
virtual ~FiniteDifferenceColoringWithUpdate ()
 Pure virtual destructor.
virtual bool computeJacobian (const Epetra_Vector &x, Epetra_Operator &Jac)
 Computes (or updates) the Jacobian given the specified input vector, x. Returns true if computation was successful.
virtual bool computeJacobian (const Epetra_Vector &x)
 Computes (or updates) Jacobian given the specified input vector, x. Returns true if computation was successful.
void SetProbingDiagnostics (bool activate)
 Disable/Enable the (low computational cost) probing diagnostics.

Protected Member Functions

bool differenceProbe (const Epetra_Vector &x, Epetra_CrsMatrix &Jac, const Epetra_MapColoring &colors)

Protected Attributes

bool jacobianComputed
bool use_update
bool use_probing_diags
Teuchos::RCP< Epetra_MapColoringcolorMap_
Teuchos::RCP< Epetra_MapColoringupdateColorMap_

Detailed Description

Concrete implementation for creating an Epetra_RowMatrix Jacobian via finite differencing of the residual using coloring. This method assumes the existence of a valid parallel coloring of the columns of the Jacobian (aka from Isorropia).

Unlike the class NOX::FiniteDifferenceColoring, this class allows for "update" colorings, for use in situations where part of the Jacobian changes from iteration to iteration, but part does not. The first time (or any time after the forceJacobianRecompute method is called) the method uses the complete coloring. Afterwards, it uses the "update" coloring and only changes the entries that can change.

WARNING: The "update" coloring assumes that rows AND columns corresponding to uncolored (aka color 0) nodes do not change from call to call. If either the row or the column corresponding to a given node change then you must make sure it gets colored.

WARNING: Centered Difference Coloring is NOT supported as of yet.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends