NOX::Direction::Broyden Class Reference

Broyden direction More...

#include <NOX_Direction_Broyden.H>

Inheritance diagram for NOX::Direction::Broyden:

Inheritance graph
[legend]
Collaboration diagram for NOX::Direction::Broyden:

Collaboration graph
[legend]

List of all members.

Classes

class  BroydenMemory
 Utility class for NOX::Direction::Broyden method to manage the information stored in "limited" memory. More...
class  BroydenMemoryUnit
 Utility class for NOX::Direction::Broyden::BroydenMemory. More...

Public Member Functions

 Broyden (const Teuchos::RCP< NOX::GlobalData > &gd, Teuchos::ParameterList &params)
 Constructor.
virtual ~Broyden ()
 Destructor.
virtual bool reset (const Teuchos::RCP< NOX::GlobalData > &gd, Teuchos::ParameterList &params)
 Reset direction based on possibly new parameters.
virtual bool compute (NOX::Abstract::Vector &dir, NOX::Abstract::Group &grp, const NOX::Solver::Generic &solver)
 Not supported for this direction - only works for line search based solver.
virtual bool compute (NOX::Abstract::Vector &dir, NOX::Abstract::Group &grp, const NOX::Solver::LineSearchBased &solver)
 Same as compute(NOX::Abstract::Vector&, NOX::Abstract::Group&, const NOX::Solver::Generic&).

Private Member Functions

void throwError (const string &functionName, const string &errorMsg)
 Print an error message and throw an error.
bool doRestart (NOX::Abstract::Group &soln, const NOX::Solver::LineSearchBased &solver)
 Determine if it's time to restart.

Private Attributes

Teuchos::RCP< NOX::GlobalDataglobalDataPtr
 Global data pointer. Keep this so the parameter list remains valid.
Teuchos::RCP< NOX::Utilsutils
 Printing Utils.
Teuchos::ParameterList * lsParamsPtr
 "Linear Solver" sublist from "Direction"/"Broyden"
Teuchos::RCP
< NOX::Abstract::Group
oldJacobianGrpPtr
 Group to hold the "old" Jacobian.
int cnt
 Counter of how many times the Jacobian associated with oldJacobianGrpPtr has been used since its last update.
int cntMax
 Maximum number of times the Jacboian should be used between updates.
double convRate
 Last computed convergence rate.
double maxConvRate
 Greatest allowable convergence rate before the Jacobian is recomputed.
int memorySizeMax
 Maximum memory size.
BroydenMemory memory
 Storage of update vectors and related attributes.
NOX::Direction::Utils::InexactNewton inexactNewtonUtils
 Inexact Newton solve utilities.


Detailed Description

Broyden direction

We will calculate a limited-memory Broyden direction of the form

   $d_k = -B_k^{-1} F_k.$

Here $B_k$ is a limited-memory Broyden approximation to the Jacobian of $F$ at $x_k$, and $F_k = F(x_k)$. It is based on apply Broyden updates to the Jacobian from some previous step.

Note:
The Broyden direction can only be used with NOX::Solver::LineSearchBased. It cannot be used with any other solver, include NOX::Solver::TrustRegionBased.
References

Parameters

To use this direction, specify that the "Method" is "Broyden" in the "Direction" sublist of the parameters that are passed to the solver (see NOX::Direction::Manager for more information on choosing the search direction).

In "Direction"/"Broyden":

Definition at line 123 of file NOX_Direction_Broyden.H.


Constructor & Destructor Documentation

NOX::Direction::Broyden::Broyden ( const Teuchos::RCP< NOX::GlobalData > &  gd,
Teuchos::ParameterList &  params 
)

Constructor.

Definition at line 182 of file NOX_Direction_Broyden.C.

References reset().

NOX::Direction::Broyden::~Broyden (  )  [virtual]

Destructor.

Definition at line 190 of file NOX_Direction_Broyden.C.


Member Function Documentation

bool NOX::Direction::Broyden::reset ( const Teuchos::RCP< NOX::GlobalData > &  gd,
Teuchos::ParameterList &  params 
) [virtual]

bool NOX::Direction::Broyden::compute ( NOX::Abstract::Vector dir,
NOX::Abstract::Group grp,
const NOX::Solver::Generic solver 
) [virtual]

Not supported for this direction - only works for line search based solver.

Implements NOX::Direction::Generic.

Definition at line 229 of file NOX_Direction_Broyden.C.

References throwError().

bool NOX::Direction::Broyden::compute ( NOX::Abstract::Vector dir,
NOX::Abstract::Group grp,
const NOX::Solver::LineSearchBased solver 
) [virtual]

void NOX::Direction::Broyden::throwError ( const string &  functionName,
const string &  errorMsg 
) [private]

Print an error message and throw an error.

If error printing is enabled for this process (see NOX::Utils), prints the following where <functionName> and <errorMsg> are replaced by the strings that are passed in.

NOX::Direction::Broyden::<functionName> - <errorMsg>

Then throws the string "NOX Error".

Definition at line 374 of file NOX_Direction_Broyden.C.

References NOX::Utils::Error, and utils.

Referenced by compute().

bool NOX::Direction::Broyden::doRestart ( NOX::Abstract::Group soln,
const NOX::Solver::LineSearchBased solver 
) [private]

Determine if it's time to restart.

A restart should be performed if any of the following conditions hold:

  • It's the very first iteration
  • The current Jacobian has been used cntMax times
  • $ \frac{ \|F_{new}\|}{\|F_{old}\|} > \alpha $ where $ \alpha $ is the maximum convergence rate that is specified in the parameter list (defaults to 1.0).

Definition at line 350 of file NOX_Direction_Broyden.C.

References cnt, cntMax, convRate, NOX::Abstract::Group::getNormF(), NOX::Solver::LineSearchBased::getNumIterations(), NOX::Solver::LineSearchBased::getPreviousSolutionGroup(), NOX::Solver::LineSearchBased::getStepSize(), and maxConvRate.

Referenced by compute().


Member Data Documentation

Global data pointer. Keep this so the parameter list remains valid.

Definition at line 374 of file NOX_Direction_Broyden.H.

Referenced by reset().

Teuchos::RCP<NOX::Utils> NOX::Direction::Broyden::utils [private]

Printing Utils.

Definition at line 377 of file NOX_Direction_Broyden.H.

Referenced by compute(), reset(), and throwError().

Teuchos::ParameterList* NOX::Direction::Broyden::lsParamsPtr [private]

"Linear Solver" sublist from "Direction"/"Broyden"

Note:
This is pointer rather than a reference to allow for the reset function. It should not be deleted in the destructor.

Definition at line 384 of file NOX_Direction_Broyden.H.

Referenced by compute(), and reset().

Group to hold the "old" Jacobian.

Definition at line 387 of file NOX_Direction_Broyden.H.

Referenced by compute().

Counter of how many times the Jacobian associated with oldJacobianGrpPtr has been used since its last update.

Definition at line 393 of file NOX_Direction_Broyden.H.

Referenced by compute(), and doRestart().

Maximum number of times the Jacboian should be used between updates.

Note:
Should only be changed by reset()

Definition at line 399 of file NOX_Direction_Broyden.H.

Referenced by doRestart(), and reset().

Last computed convergence rate.

Definition at line 402 of file NOX_Direction_Broyden.H.

Referenced by doRestart().

Greatest allowable convergence rate before the Jacobian is recomputed.

Definition at line 405 of file NOX_Direction_Broyden.H.

Referenced by doRestart(), and reset().

Maximum memory size.

Note:
Should only be changed by reset()

Definition at line 409 of file NOX_Direction_Broyden.H.

Referenced by reset().

Storage of update vectors and related attributes.

Definition at line 412 of file NOX_Direction_Broyden.H.

Referenced by compute(), and reset().

Inexact Newton solve utilities.

Definition at line 415 of file NOX_Direction_Broyden.H.

Referenced by compute(), and reset().


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

Generated on Thu Dec 17 11:03:04 2009 for Nonlinear Solver Project by  doxygen 1.5.9