NOX  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
NOX::Multiphysics::Solver::FixedPointBased Class Reference

Nonlinear solver based on a line search (i.e., damping) More...

#include <NOX_Multiphysics_Solver_FixedPointBased.H>

Inheritance diagram for NOX::Multiphysics::Solver::FixedPointBased:
Inheritance graph
[legend]
Collaboration diagram for NOX::Multiphysics::Solver::FixedPointBased:
Collaboration graph
[legend]

Public Types

enum  SOLVE_TYPE { JACOBI, SEIDEL }
 

Public Member Functions

 FixedPointBased (const Teuchos::RCP< std::vector< Teuchos::RCP< NOX::Solver::Generic > > > &solvers, const Teuchos::RCP< NOX::Multiphysics::DataExchange::Interface > &interface, const Teuchos::RCP< NOX::StatusTest::Generic > &tests, const Teuchos::RCP< Teuchos::ParameterList > &params)
 Constructor. More...
 
virtual ~FixedPointBased ()
 Destructor.
 
virtual bool reset (const Teuchos::RCP< std::vector< Teuchos::RCP< NOX::Solver::Generic > > > &solvers, const Teuchos::RCP< NOX::Multiphysics::DataExchange::Interface > &interface, const Teuchos::RCP< NOX::StatusTest::Generic > &tests, const Teuchos::RCP< Teuchos::ParameterList > &params)
 Reset the nonlinear solver for a new solve. More...
 
virtual void reset (const NOX::Abstract::Vector &initialGuess, const Teuchos::RCP< NOX::StatusTest::Generic > &tests)
 Resets the solver, sets a new status test, and sets a new initial guess.
 
virtual void reset (const NOX::Abstract::Vector &initialGuess)
 reset methods inherited from NOX::Solver::Generic and needed here to avoid hiding this overloaded virtual method
 
virtual void reset ()
 Resets the solver for another solve. This resets the counters and status only. Uses the final solution from the last solve as the initial guess for the next solve. More...
 
virtual NOX::StatusTest::StatusType getStatus () const
 Returns the current status of the solver.
 
virtual NOX::StatusTest::StatusType step ()
 Do one nonlinear step in the iteration sequence and return status.
 
virtual NOX::StatusTest::StatusType solve ()
 Solve the nonlinear problem and return final status. More...
 
virtual const
NOX::Abstract::Group
getSolutionGroup () const
 Return a reference to the current solution group.
 
virtual const
NOX::Abstract::Group
getPreviousSolutionGroup () const
 Return a reference to the previous solution group.
 
virtual int getNumIterations () const
 Get number of iterations.
 
virtual const
Teuchos::ParameterList
getList () const
 Return a reference to the solver parameters.
 
virtual Teuchos::RCP< const
NOX::Abstract::Group
getSolutionGroupPtr () const
 Return a RCP to the solution group.
 
virtual Teuchos::RCP< const
NOX::Abstract::Group
getPreviousSolutionGroupPtr () const
 Return a RCP to the previous solution group.
 
virtual Teuchos::RCP< const
Teuchos::ParameterList
getListPtr () const
 Return a RCP to the solver parameters.
 
virtual Teuchos::RCP< const
NOX::SolverStats
getSolverStatistics () const
 Return a RCP to the solver statistics.
 
- Public Member Functions inherited from NOX::Multiphysics::Solver::Generic
 Generic ()
 Constructor (does nothing)
 
virtual ~Generic ()
 Destructor (does nothing)
 
- Public Member Functions inherited from NOX::Solver::Generic
 Generic ()
 Constructor (does nothing)
 

Protected Member Functions

virtual void init ()
 Print out initialization information and calcuate the RHS.
 
virtual void printUpdate ()
 Prints the current iteration information.
 

Protected Attributes

SOLVE_TYPE solveType
 Type of fixed-point solve to perform.
 
Teuchos::RCP< std::vector
< Teuchos::RCP
< NOX::Solver::Generic > > > 
solversVecPtr
 Pointer to the container of solvers for each problem to be coupled.
 
Teuchos::RCP
< NOX::Multiphysics::DataExchange::Interface
dataExInterface
 Pointer to the callback interface needed to echange data among solvers.
 
Teuchos::RCP< NOX::GlobalDataglobalDataPtr
 Pointer to the global data object.
 
Teuchos::RCP< NOX::UtilsutilsPtr
 Utils.
 
Teuchos::RCP
< NOX::Multiphysics::Group
solnPtr
 Current solution.
 
Teuchos::RCP
< NOX::StatusTest::Generic
testPtr
 Stopping test.
 
Teuchos::RCP
< Teuchos::ParameterList
paramsPtr
 Input parameters.
 
int nIter
 Number of nonlinear iterations.
 
NOX::StatusTest::StatusType status
 Status of nonlinear solver.
 
NOX::StatusTest::CheckType checkType
 Type of check to use for status tests. See NOX::StatusTest for more details.
 
Teuchos::RCP< NOX::Observerobserver
 Pointer to a user defined NOX::Observer object.
 

Detailed Description

Nonlinear solver based on a line search (i.e., damping)

Solves $F(x)=0$ using an iterative line-search-based method.

Each iteration, the solver does the following.

The iterations progress until the status tests (see NOX::StatusTest) determine either failure or convergence.

Note
To support several line searches and status tests, this version of the solver has a getStepSize() function that returns $\lambda$.

Input Parameters

The following parameter list entries are valid for this solver:

Output Parameters

Every time solve() is called, a sublist for output parameters called "Output" will be created and contain the following parameters.

"Output":

Author
Tammy Kolda (SNL 8950), Roger Pawlowski (SNL 9233)

Constructor & Destructor Documentation

NOX::Multiphysics::Solver::FixedPointBased::FixedPointBased ( const Teuchos::RCP< std::vector< Teuchos::RCP< NOX::Solver::Generic > > > &  solvers,
const Teuchos::RCP< NOX::Multiphysics::DataExchange::Interface > &  interface,
const Teuchos::RCP< NOX::StatusTest::Generic > &  tests,
const Teuchos::RCP< Teuchos::ParameterList > &  params 
)

Constructor.

See reset(NOX::Abstract::Group&, NOX::StatusTest::Generic&, Teuchos::ParameterList&) for description

References init(), observer, paramsPtr, NOX::Solver::parseObserver(), rcp(), Teuchos::ParameterList::sublist(), and NOX::Solver::validateSolverOptionsSublist().

Member Function Documentation

bool NOX::Multiphysics::Solver::FixedPointBased::reset ( const Teuchos::RCP< std::vector< Teuchos::RCP< NOX::Solver::Generic > > > &  solvers,
const Teuchos::RCP< NOX::Multiphysics::DataExchange::Interface > &  interface,
const Teuchos::RCP< NOX::StatusTest::Generic > &  tests,
const Teuchos::RCP< Teuchos::ParameterList > &  params 
)
virtual

Reset the nonlinear solver for a new solve.

Parameters
testsStatus tests to check for convergence or failure. These tests will be modified by the solver.
paramsList of parameters. These parameters will be modified by the solver.
Note
All the objects passed to reset() will be modified.
The group object will be cloned via NOX::Abstract::Group::clone(), and the vectors within will also be individually cloned via NOX::Abstract::Vector::clone().
Warning
If the contents of grp, tests, or params are modified by the calling program after calling reset(), then the behavior of iterate() and solve() are completely undefined. To remedy this, call reset() again with the modified objects.

Implements NOX::Multiphysics::Solver::Generic.

References NOX::Solver::parseObserver(), Teuchos::rcp(), Teuchos::ParameterList::sublist(), and NOX::Solver::validateSolverOptionsSublist().

void NOX::Multiphysics::Solver::FixedPointBased::reset ( )
virtual

Resets the solver for another solve. This resets the counters and status only. Uses the final solution from the last solve as the initial guess for the next solve.

NOTE: All NOX solvers will call reset() automatically at teh beginning of the solve() method. We add the reset() method to the solver interface for the application to call in case the application needs to reset counters and status manually before the next call to solve() is made.

Implements NOX::Solver::Generic.

References TEUCHOS_TEST_FOR_EXCEPTION.

NOX::StatusTest::StatusType NOX::Multiphysics::Solver::FixedPointBased::solve ( )
virtual

Solve the nonlinear problem and return final status.

By "solve", we call iterate() until the NOX::StatusTest value is either NOX::StatusTest::Converged or NOX::StatusTest::Failed.

Implements NOX::Solver::Generic.

References Teuchos::ParameterList::set(), Teuchos::ParameterList::sublist(), and NOX::StatusTest::Unconverged.


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