NOX Development
Loading...
Searching...
No Matches
NOX::ObserverLog Class Reference

Logs observer calls. Useful for unit testing and debugging. More...

#include <NOX_Observer_Log.hpp>

Inheritance diagram for NOX::ObserverLog:
Collaboration diagram for NOX::ObserverLog:

Public Member Functions

 ObserverLog (const bool log_call_order=true)
void runPreIterate (const NOX::Solver::Generic &solver)
 User defined method that will be executed at the start of a call to NOX::Solver::Generic::step().
void runPostIterate (const NOX::Solver::Generic &solver)
 User defined method that will be executed at the end of a call to NOX::Solver::Generic::step().
void runPreSolve (const NOX::Solver::Generic &solver)
 User defined method that will be executed at the start of a call to NOX::Solver::Generic::solve().
void runPostSolve (const NOX::Solver::Generic &solver)
 User defined method that will be executed at the end of a call to NOX::Solver::Generic::solve().
void runPreSolutionUpdate (const NOX::Abstract::Vector &update, const NOX::Solver::Generic &solver)
 User defined method that will be executed prior to the update of the solution vector during a call to NOX::Solver::Generic::step(). This is intended to allow users to adjust the direction before the solution update, typically based on knowledge of the problem formulation. The direction is const as we can't guarantee that changes to the direction won't violate assumptions of the solution algorithm. Users can change the update/direciton after a const cast, but NOX may not function as expected. Use at your own risk!
void runPostSolutionUpdate (const NOX::Solver::Generic &solver)
 User defined method that will be executed after the update of the solution vector during a call to NOX::Solver::Generic::step(). This is intended to allow users to adjust the direction after the solution update, typically based on knowledge of the problem formulation (e.g. clipping negative mass fractions). The direction is const as we can't guarantee that changes to the direction won't violate assumptions of the solution algorithm. Users can change the update/direciton after a const cast, but NOX may not function as expected. Use at your own risk!
void runPreLineSearch (const NOX::Solver::Generic &solver)
 User defined method that will be executed before a call to NOX::LineSearch::Generic::compute(). Only to be used in NOX::Solver::LineSearchBased!
void runPostLineSearch (const NOX::Solver::Generic &solver)
 User defined method that will be executed after a call to NOX::LineSearch::Generic::compute(). Only to be used in NOX::Solver::LineSearchBased!
int preIterateCount () const
int postIterateCount () const
int preSolveCount () const
int postSolveCount () const
int preSolutionUpdateCount () const
int postSolutionUpdateCount () const
int preLineSearchCount () const
int postLineSearchCount () const
const std::vector< std::string > & getCallOrder () const
Public Member Functions inherited from NOX::Observer
 Observer ()
 Constructor.
virtual ~Observer ()
 Destructor.

Detailed Description

Logs observer calls. Useful for unit testing and debugging.

Member Function Documentation

◆ runPostIterate()

void NOX::ObserverLog::runPostIterate ( const NOX::Solver::Generic & )
virtual

User defined method that will be executed at the end of a call to NOX::Solver::Generic::step().

Reimplemented from NOX::Observer.

References runPostIterate().

Referenced by runPostIterate().

◆ runPostLineSearch()

void NOX::ObserverLog::runPostLineSearch ( const NOX::Solver::Generic & )
virtual

User defined method that will be executed after a call to NOX::LineSearch::Generic::compute(). Only to be used in NOX::Solver::LineSearchBased!

Reimplemented from NOX::Observer.

References runPostLineSearch().

Referenced by runPostLineSearch().

◆ runPostSolutionUpdate()

void NOX::ObserverLog::runPostSolutionUpdate ( const NOX::Solver::Generic & )
virtual

User defined method that will be executed after the update of the solution vector during a call to NOX::Solver::Generic::step(). This is intended to allow users to adjust the direction after the solution update, typically based on knowledge of the problem formulation (e.g. clipping negative mass fractions). The direction is const as we can't guarantee that changes to the direction won't violate assumptions of the solution algorithm. Users can change the update/direciton after a const cast, but NOX may not function as expected. Use at your own risk!

Parameters
[in]solver- the nox solver

Reimplemented from NOX::Observer.

References runPostSolutionUpdate().

Referenced by runPostSolutionUpdate().

◆ runPostSolve()

void NOX::ObserverLog::runPostSolve ( const NOX::Solver::Generic & )
virtual

User defined method that will be executed at the end of a call to NOX::Solver::Generic::solve().

Reimplemented from NOX::Observer.

References runPostSolve().

Referenced by runPostSolve().

◆ runPreIterate()

void NOX::ObserverLog::runPreIterate ( const NOX::Solver::Generic & )
virtual

User defined method that will be executed at the start of a call to NOX::Solver::Generic::step().

Reimplemented from NOX::Observer.

◆ runPreLineSearch()

void NOX::ObserverLog::runPreLineSearch ( const NOX::Solver::Generic & )
virtual

User defined method that will be executed before a call to NOX::LineSearch::Generic::compute(). Only to be used in NOX::Solver::LineSearchBased!

Reimplemented from NOX::Observer.

References runPreLineSearch().

Referenced by runPreLineSearch().

◆ runPreSolutionUpdate()

void NOX::ObserverLog::runPreSolutionUpdate ( const NOX::Abstract::Vector & ,
const NOX::Solver::Generic &  )
virtual

User defined method that will be executed prior to the update of the solution vector during a call to NOX::Solver::Generic::step(). This is intended to allow users to adjust the direction before the solution update, typically based on knowledge of the problem formulation. The direction is const as we can't guarantee that changes to the direction won't violate assumptions of the solution algorithm. Users can change the update/direciton after a const cast, but NOX may not function as expected. Use at your own risk!

Parameters
[in]update- the direction vector that will be used to update the solution.
[in]solver- the nox solver

Reimplemented from NOX::Observer.

References runPreSolutionUpdate().

Referenced by runPreSolutionUpdate().

◆ runPreSolve()

void NOX::ObserverLog::runPreSolve ( const NOX::Solver::Generic & )
virtual

User defined method that will be executed at the start of a call to NOX::Solver::Generic::solve().

Reimplemented from NOX::Observer.

References runPreSolve().

Referenced by runPreSolve().


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