libMesh::NoxNonlinearSolver< T > Class Template Reference
#include <trilinos_nox_nonlinear_solver.h>

Detailed Description
template<typename T>
class libMesh::NoxNonlinearSolver< T >
This class provides an interface to nox iterative solvers that is compatible with the libMesh NonlinearSolver<>
Definition at line 56 of file trilinos_nox_nonlinear_solver.h.
Member Typedef Documentation
typedef std::map<std::string, std::pair<unsigned int, unsigned int> > libMesh::ReferenceCounter::Counts [protected, inherited] |
Data structure to log the information. The log is identified by the class name.
Definition at line 113 of file reference_counter.h.
| typedef NonlinearImplicitSystem libMesh::NoxNonlinearSolver< T >::sys_type |
The type of system
Reimplemented from libMesh::NonlinearSolver< T >.
Definition at line 62 of file trilinos_nox_nonlinear_solver.h.
Constructor & Destructor Documentation
| libMesh::NoxNonlinearSolver< T >::NoxNonlinearSolver | ( | sys_type & | system | ) | [inline, explicit] |
Constructor. Initializes Nox data structures
Definition at line 128 of file trilinos_nox_nonlinear_solver.h.
00128 : 00129 NonlinearSolver<T>(system), 00130 _solver(NULL), 00131 _interface(NULL), 00132 _n_linear_iterations(0) 00133 { 00134 }
| libMesh::NoxNonlinearSolver< T >::~NoxNonlinearSolver | ( | ) | [inline, virtual] |
Destructor.
Definition at line 140 of file trilinos_nox_nonlinear_solver.h.
References libMesh::NoxNonlinearSolver< T >::clear().
00141 { 00142 this->clear (); 00143 }
Member Function Documentation
| void libMesh::NonlinearSolver< T >::attach_preconditioner | ( | Preconditioner< T > * | preconditioner | ) | [inline, inherited] |
Attaches a Preconditioner object to be used during the linear solves.
Definition at line 91 of file nonlinear_solver.C.
References libMesh::NonlinearSolver< T >::_is_initialized, libMesh::NonlinearSolver< T >::_preconditioner, and libMesh::err.
00092 { 00093 if(this->_is_initialized) 00094 { 00095 libMesh::err << "Preconditioner must be attached before the solver is initialized!"<<std::endl; 00096 libmesh_error(); 00097 } 00098 00099 _preconditioner = preconditioner; 00100 }
| AutoPtr< NonlinearSolver< T > > libMesh::NonlinearSolver< T >::build | ( | sys_type & | s, | |
| const SolverPackage | solver_package = libMesh::default_solver_package() | |||
| ) | [inline, static, inherited] |
Builds a NonlinearSolver using the nonlinear solver package specified by solver_package
Definition at line 38 of file nonlinear_solver.C.
References libMesh::err, libMesh::on_command_line(), libMeshEnums::PETSC_SOLVERS, libMesh::AutoPtr< Tp >::reset(), and libMesh::TRILINOS_SOLVERS.
00039 { 00040 AutoPtr<NonlinearSolver<T> > ap; 00041 00042 // Build the appropriate solver 00043 switch (solver_package) 00044 { 00045 00046 #ifdef LIBMESH_HAVE_PETSC 00047 case PETSC_SOLVERS: 00048 #if PETSC_VERSION_LESS_THAN(3,3,0) 00049 ap.reset(new PetscNonlinearSolver<T>(s)); 00050 break; 00051 #else 00052 if (libMesh::on_command_line ("--use-petsc-dm")){ 00053 ap.reset(new PetscDMNonlinearSolver<T>(s)); 00054 } 00055 else { 00056 ap.reset(new PetscNonlinearSolver<T>(s)); 00057 } 00058 break; 00059 #endif 00060 #endif // LIBMESH_HAVE_PETSC 00061 00062 #ifdef LIBMESH_HAVE_NOX 00063 case TRILINOS_SOLVERS: 00064 ap.reset(new NoxNonlinearSolver<T>(s)); 00065 break; 00066 #endif 00067 00068 default: 00069 libMesh::err << "ERROR: Unrecognized solver package: " 00070 << solver_package 00071 << std::endl; 00072 libmesh_error(); 00073 } 00074 00075 return ap; 00076 }
| void libMesh::NoxNonlinearSolver< T >::clear | ( | ) | [inline, virtual] |
Release all memory and clear data structures.
Reimplemented from libMesh::NonlinearSolver< T >.
Definition at line 261 of file trilinos_nox_nonlinear_solver.C.
Referenced by libMesh::NoxNonlinearSolver< T >::~NoxNonlinearSolver().
| void libMesh::ReferenceCounter::disable_print_counter_info | ( | ) | [static, inherited] |
Definition at line 106 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
00107 { 00108 _enable_print_counter = false; 00109 return; 00110 }
| void libMesh::ReferenceCounter::enable_print_counter_info | ( | ) | [static, inherited] |
Methods to enable/disable the reference counter output from print_info()
Definition at line 100 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
00101 { 00102 _enable_print_counter = true; 00103 return; 00104 }
| virtual unsigned libMesh::NoxNonlinearSolver< T >::get_current_nonlinear_iteration_number | ( | ) | const [inline, virtual] |
If called *during* the solve(), for example by the user-specified residual or Jacobian function, returns the current nonlinear iteration number. Not currently implemented.
Implements libMesh::NonlinearSolver< T >.
Definition at line 104 of file trilinos_nox_nonlinear_solver.h.
| std::string libMesh::ReferenceCounter::get_info | ( | ) | [static, inherited] |
Gets a string containing the reference information.
Definition at line 47 of file reference_counter.C.
References libMesh::ReferenceCounter::_counts, and libMesh::Quality::name().
Referenced by libMesh::ReferenceCounter::print_info().
00048 { 00049 #if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG) 00050 00051 std::ostringstream oss; 00052 00053 oss << '\n' 00054 << " ---------------------------------------------------------------------------- \n" 00055 << "| Reference count information |\n" 00056 << " ---------------------------------------------------------------------------- \n"; 00057 00058 for (Counts::iterator it = _counts.begin(); 00059 it != _counts.end(); ++it) 00060 { 00061 const std::string name(it->first); 00062 const unsigned int creations = it->second.first; 00063 const unsigned int destructions = it->second.second; 00064 00065 oss << "| " << name << " reference count information:\n" 00066 << "| Creations: " << creations << '\n' 00067 << "| Destructions: " << destructions << '\n'; 00068 } 00069 00070 oss << " ---------------------------------------------------------------------------- \n"; 00071 00072 return oss.str(); 00073 00074 #else 00075 00076 return ""; 00077 00078 #endif 00079 }
| int libMesh::NoxNonlinearSolver< T >::get_total_linear_iterations | ( | ) | [inline, virtual] |
Get the total number of linear iterations done in the last solve
Implements libMesh::NonlinearSolver< T >.
Definition at line 417 of file trilinos_nox_nonlinear_solver.C.
References libMesh::NoxNonlinearSolver< T >::_n_linear_iterations.
00418 { 00419 return _n_linear_iterations; 00420 }
| void libMesh::ReferenceCounter::increment_constructor_count | ( | const std::string & | name | ) | [inline, protected, inherited] |
Increments the construction counter. Should be called in the constructor of any derived class that will be reference counted.
Definition at line 163 of file reference_counter.h.
References libMesh::ReferenceCounter::_counts, and libMesh::Threads::spin_mtx.
Referenced by libMesh::ReferenceCountedObject< RBParametrized >::ReferenceCountedObject().
00164 { 00165 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx); 00166 std::pair<unsigned int, unsigned int>& p = _counts[name]; 00167 00168 p.first++; 00169 }
| void libMesh::ReferenceCounter::increment_destructor_count | ( | const std::string & | name | ) | [inline, protected, inherited] |
Increments the destruction counter. Should be called in the destructor of any derived class that will be reference counted.
Definition at line 176 of file reference_counter.h.
References libMesh::ReferenceCounter::_counts, and libMesh::Threads::spin_mtx.
Referenced by libMesh::ReferenceCountedObject< RBParametrized >::~ReferenceCountedObject().
00177 { 00178 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx); 00179 std::pair<unsigned int, unsigned int>& p = _counts[name]; 00180 00181 p.second++; 00182 }
| void libMesh::NoxNonlinearSolver< T >::init | ( | ) | [inline, virtual] |
Initialize data structures if not done so already.
Implements libMesh::NonlinearSolver< T >.
Definition at line 275 of file trilinos_nox_nonlinear_solver.C.
References libMesh::NoxNonlinearSolver< T >::_interface, and libMesh::NonlinearSolver< T >::initialized().
Referenced by libMesh::NoxNonlinearSolver< T >::solve().
00276 { 00277 if (!this->initialized()) 00278 _interface = new Problem_Interface(this); 00279 }
| bool libMesh::NonlinearSolver< T >::initialized | ( | ) | const [inline, inherited] |
- Returns:
- true if the data structures are initialized, false otherwise.
Definition at line 84 of file nonlinear_solver.h.
Referenced by libMesh::PetscNonlinearSolver< T >::clear(), libMesh::PetscNonlinearSolver< T >::get_converged_reason(), libMesh::NoxNonlinearSolver< T >::init(), and libMesh::PetscNonlinearSolver< T >::init().
00084 { return _is_initialized; }
| static unsigned int libMesh::ReferenceCounter::n_objects | ( | ) | [inline, static, inherited] |
Prints the number of outstanding (created, but not yet destroyed) objects.
Definition at line 79 of file reference_counter.h.
References libMesh::ReferenceCounter::_n_objects.
00080 { return _n_objects; }
| virtual void libMesh::NonlinearSolver< T >::print_converged_reason | ( | ) | [inline, virtual, inherited] |
Prints a useful message about why the latest nonlinear solve con(di)verged.
Reimplemented in libMesh::PetscNonlinearSolver< T >.
Definition at line 109 of file nonlinear_solver.h.
| void libMesh::ReferenceCounter::print_info | ( | std::ostream & | out = libMesh::out |
) | [static, inherited] |
Prints the reference information, by default to libMesh::out.
Definition at line 88 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter, and libMesh::ReferenceCounter::get_info().
00089 { 00090 if( _enable_print_counter ) out_stream << ReferenceCounter::get_info(); 00091 }
| std::pair< unsigned int, Real > libMesh::NoxNonlinearSolver< T >::solve | ( | SparseMatrix< T > & | , | |
| NumericVector< T > & | x_in, | |||
| NumericVector< T > & | , | |||
| const | double, | |||
| const unsigned | int | |||
| ) | [inline, virtual] |
Call the Nox solver. It calls the method below, using the same matrix for the system and preconditioner matrices.
Implements libMesh::NonlinearSolver< T >.
Definition at line 283 of file trilinos_nox_nonlinear_solver.C.
References libMesh::NoxNonlinearSolver< T >::_interface, libMesh::NoxNonlinearSolver< T >::_n_linear_iterations, libMesh::NonlinearSolver< T >::_preconditioner, libMesh::Problem_Interface::_solver, libMesh::NonlinearSolver< T >::absolute_residual_tolerance, libMesh::NonlinearSolver< T >::absolute_step_tolerance, libMesh::NumericVector< T >::close(), libMesh::NonlinearSolver< T >::converged, libMesh::NoxNonlinearSolver< T >::init(), libMesh::NonlinearSolver< T >::initial_linear_tolerance, libMesh::NonlinearSolver< T >::jacobian, libMesh::NonlinearSolver< T >::jacobian_object, libMesh::EpetraMatrix< T >::mat(), libMesh::ImplicitSystem::matrix, libMesh::NonlinearSolver< T >::max_linear_iterations, libMesh::NonlinearSolver< T >::max_nonlinear_iterations, libMesh::Real, libMesh::NonlinearSolver< T >::relative_residual_tolerance, libMesh::NonlinearSolver< T >::residual_and_jacobian_object, libMesh::NonlinearSolver< T >::system(), libMesh::NonlinearSolver< T >::user_presolve, and libMesh::EpetraVector< T >::vec().
00288 { 00289 this->init (); 00290 00291 if (this->user_presolve) 00292 this->user_presolve(this->system()); 00293 00294 EpetraVector<T> * x_epetra = libmesh_cast_ptr<EpetraVector<T>*>(&x_in); 00295 // Creating a Teuchos::RCP as they do in NOX examples does not work here - we get some invalid memory references 00296 // thus we make a local copy 00297 NOX::Epetra::Vector x(*x_epetra->vec()); 00298 00299 Teuchos::RCP<Teuchos::ParameterList> nlParamsPtr = Teuchos::rcp(new Teuchos::ParameterList); 00300 Teuchos::ParameterList& nlParams = *(nlParamsPtr.get()); 00301 nlParams.set("Nonlinear Solver", "Line Search Based"); 00302 00303 //print params 00304 Teuchos::ParameterList& printParams = nlParams.sublist("Printing"); 00305 printParams.set("Output Precision", 3); 00306 printParams.set("Output Processor", 0); 00307 printParams.set("Output Information", 00308 NOX::Utils::OuterIteration + 00309 NOX::Utils::OuterIterationStatusTest + 00310 NOX::Utils::InnerIteration + 00311 NOX::Utils::LinearSolverDetails + 00312 NOX::Utils::Parameters + 00313 NOX::Utils::Details + 00314 NOX::Utils::Warning); 00315 00316 Teuchos::ParameterList& dirParams = nlParams.sublist("Direction"); 00317 dirParams.set("Method", "Newton"); 00318 Teuchos::ParameterList& newtonParams = dirParams.sublist("Newton"); 00319 newtonParams.set("Forcing Term Method", "Constant"); 00320 00321 Teuchos::ParameterList& lsParams = newtonParams.sublist("Linear Solver"); 00322 lsParams.set("Aztec Solver", "GMRES"); 00323 lsParams.set("Max Iterations", static_cast<int>(this->max_linear_iterations)); 00324 lsParams.set("Tolerance", this->initial_linear_tolerance); 00325 lsParams.set("Output Frequency", 1); 00326 lsParams.set("Size of Krylov Subspace", 1000); 00327 00328 //create linear system 00329 Teuchos::RCP<NOX::Epetra::Interface::Required> iReq(_interface); 00330 Teuchos::RCP<NOX::Epetra::LinearSystemAztecOO> linSys; 00331 Teuchos::RCP<Epetra_Operator> pc; 00332 00333 if (this->jacobian || this->jacobian_object || this->residual_and_jacobian_object) 00334 { 00335 if(this->_preconditioner) 00336 { 00337 // PJNFK 00338 lsParams.set("Preconditioner", "User Defined"); 00339 00340 TrilinosPreconditioner<Number> * trilinos_pc = libmesh_cast_ptr<TrilinosPreconditioner<Number> *>(this->_preconditioner); 00341 pc = Teuchos::rcp(trilinos_pc); 00342 00343 Teuchos::RCP<NOX::Epetra::Interface::Preconditioner> iPrec(_interface); 00344 linSys = Teuchos::rcp(new NOX::Epetra::LinearSystemAztecOO(printParams, lsParams, iReq, iPrec, pc, x)); 00345 } 00346 else 00347 { 00348 lsParams.set("Preconditioner", "None"); 00349 // lsParams.set("Preconditioner", "Ifpack"); 00350 // lsParams.set("Preconditioner", "AztecOO"); 00351 00352 // full jacobian 00353 NonlinearImplicitSystem & sys = _interface->_solver->system(); 00354 EpetraMatrix<Number> & jacSys = *libmesh_cast_ptr<EpetraMatrix<Number>*>(sys.matrix); 00355 Teuchos::RCP<Epetra_RowMatrix> jacMat = Teuchos::rcp(jacSys.mat()); 00356 00357 Teuchos::RCP<NOX::Epetra::Interface::Jacobian> iJac(_interface); 00358 linSys = Teuchos::rcp(new NOX::Epetra::LinearSystemAztecOO(printParams, lsParams, iReq, iJac, jacMat, x)); 00359 } 00360 } 00361 else 00362 { 00363 // matrix free 00364 Teuchos::RCP<NOX::Epetra::MatrixFree> MF = Teuchos::rcp(new NOX::Epetra::MatrixFree(printParams, iReq, x)); 00365 00366 Teuchos::RCP<NOX::Epetra::Interface::Jacobian> iJac(MF); 00367 linSys = Teuchos::rcp(new NOX::Epetra::LinearSystemAztecOO(printParams, lsParams, iReq, iJac, MF, x)); 00368 } 00369 00370 //create group 00371 Teuchos::RCP<NOX::Epetra::Group> grpPtr = Teuchos::rcp(new NOX::Epetra::Group(printParams, iReq, x, linSys)); 00372 NOX::Epetra::Group& grp = *(grpPtr.get()); 00373 00374 Teuchos::RCP<NOX::StatusTest::NormF> absresid = 00375 Teuchos::rcp(new NOX::StatusTest::NormF(this->absolute_residual_tolerance, NOX::StatusTest::NormF::Unscaled)); 00376 Teuchos::RCP<NOX::StatusTest::NormF> relresid = 00377 Teuchos::rcp(new NOX::StatusTest::NormF(grp, this->relative_residual_tolerance)); 00378 Teuchos::RCP<NOX::StatusTest::MaxIters> maxiters = 00379 Teuchos::rcp(new NOX::StatusTest::MaxIters(this->max_nonlinear_iterations)); 00380 Teuchos::RCP<NOX::StatusTest::FiniteValue> finiteval = 00381 Teuchos::rcp(new NOX::StatusTest::FiniteValue()); 00382 Teuchos::RCP<NOX::StatusTest::NormUpdate> normupdate = 00383 Teuchos::rcp(new NOX::StatusTest::NormUpdate(this->absolute_step_tolerance)); 00384 Teuchos::RCP<NOX::StatusTest::Combo> combo = 00385 Teuchos::rcp(new NOX::StatusTest::Combo(NOX::StatusTest::Combo::OR)); 00386 combo->addStatusTest(absresid); 00387 combo->addStatusTest(relresid); 00388 combo->addStatusTest(maxiters); 00389 combo->addStatusTest(finiteval); 00390 combo->addStatusTest(normupdate); 00391 00392 Teuchos::RCP<Teuchos::ParameterList> finalPars = nlParamsPtr; 00393 00394 Teuchos::RCP<NOX::Solver::Generic> solver = NOX::Solver::buildSolver(grpPtr, combo, nlParamsPtr); 00395 NOX::StatusTest::StatusType status = solver->solve(); 00396 this->converged = (status == NOX::StatusTest::Converged); 00397 00398 const NOX::Epetra::Group& finalGroup = dynamic_cast<const NOX::Epetra::Group&>(solver->getSolutionGroup()); 00399 const NOX::Epetra::Vector& noxFinalSln = dynamic_cast<const NOX::Epetra::Vector&>(finalGroup.getX()); 00400 00401 *x_epetra->vec() = noxFinalSln.getEpetraVector(); 00402 x_in.close(); 00403 00404 Real residual_norm = finalGroup.getNormF(); 00405 unsigned int total_iters = solver->getNumIterations(); 00406 _n_linear_iterations = finalPars->sublist("Direction").sublist("Newton").sublist("Linear Solver").sublist("Output").get("Total Number of Linear Iterations", -1); 00407 00408 // do not let Trilinos to deallocate what we allocated 00409 pc.release(); 00410 iReq.release(); 00411 00412 return std::make_pair(total_iters, residual_norm); 00413 }
| sys_type& libMesh::NonlinearSolver< T >::system | ( | ) | [inline, inherited] |
- Returns:
- a writeable reference to the system we are solving.
Definition at line 222 of file nonlinear_solver.h.
00222 { return _system; }
| const sys_type& libMesh::NonlinearSolver< T >::system | ( | ) | const [inline, inherited] |
- Returns:
- a constant reference to the system we are solving.
Definition at line 217 of file nonlinear_solver.h.
Referenced by libMesh::PetscNonlinearSolver< T >::build_mat_null_space(), libMesh::Problem_Interface::computeF(), libMesh::Problem_Interface::computeJacobian(), libMesh::Problem_Interface::computePreconditioner(), libMesh::PetscDMNonlinearSolver< T >::init(), libMesh::NoxNonlinearSolver< T >::solve(), libMesh::PetscNonlinearSolver< T >::solve(), and libMesh::PetscDMNonlinearSolver< T >::solve().
00217 { return _system; }
Member Data Documentation
ReferenceCounter::Counts libMesh::ReferenceCounter::_counts [static, protected, inherited] |
Actually holds the data.
Definition at line 118 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::get_info(), libMesh::ReferenceCounter::increment_constructor_count(), and libMesh::ReferenceCounter::increment_destructor_count().
bool libMesh::ReferenceCounter::_enable_print_counter = true [static, protected, inherited] |
Flag to control whether reference count information is printed when print_info is called.
Definition at line 137 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::disable_print_counter_info(), libMesh::ReferenceCounter::enable_print_counter_info(), and libMesh::ReferenceCounter::print_info().
Problem_Interface* libMesh::NoxNonlinearSolver< T >::_interface [private] |
Solver interface
Definition at line 116 of file trilinos_nox_nonlinear_solver.h.
Referenced by libMesh::NoxNonlinearSolver< T >::init(), and libMesh::NoxNonlinearSolver< T >::solve().
bool libMesh::NonlinearSolver< T >::_is_initialized [protected, inherited] |
Flag indicating if the data structures have been initialized.
Definition at line 298 of file nonlinear_solver.h.
Referenced by libMesh::NonlinearSolver< T >::attach_preconditioner(), libMesh::PetscNonlinearSolver< T >::clear(), libMesh::PetscNonlinearSolver< T >::init(), and libMesh::NonlinearSolver< Number >::initialized().
Threads::spin_mutex libMesh::ReferenceCounter::_mutex [static, protected, inherited] |
Mutual exclusion object to enable thread-safe reference counting.
Definition at line 131 of file reference_counter.h.
int libMesh::NoxNonlinearSolver< T >::_n_linear_iterations [private] |
Stores the total number of linear iterations from the last solve.
Definition at line 121 of file trilinos_nox_nonlinear_solver.h.
Referenced by libMesh::NoxNonlinearSolver< T >::get_total_linear_iterations(), and libMesh::NoxNonlinearSolver< T >::solve().
Threads::atomic< unsigned int > libMesh::ReferenceCounter::_n_objects [static, protected, inherited] |
The number of objects. Print the reference count information when the number returns to 0.
Definition at line 126 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::n_objects(), libMesh::ReferenceCounter::ReferenceCounter(), and libMesh::ReferenceCounter::~ReferenceCounter().
Preconditioner<T>* libMesh::NonlinearSolver< T >::_preconditioner [protected, inherited] |
Holds the Preconditioner object to be used for the linear solves.
Definition at line 303 of file nonlinear_solver.h.
Referenced by libMesh::NonlinearSolver< T >::attach_preconditioner(), libMesh::PetscNonlinearSolver< T >::init(), libMesh::NoxNonlinearSolver< T >::solve(), libMesh::PetscNonlinearSolver< T >::solve(), and libMesh::PetscDMNonlinearSolver< T >::solve().
NOX::Solver::Generic* libMesh::NoxNonlinearSolver< T >::_solver [private] |
Nonlinear solver context
Definition at line 111 of file trilinos_nox_nonlinear_solver.h.
sys_type& libMesh::NonlinearSolver< T >::_system [protected, inherited] |
A reference to the system we are solving.
Definition at line 293 of file nonlinear_solver.h.
Referenced by libMesh::NonlinearSolver< Number >::system().
Real libMesh::NonlinearSolver< T >::absolute_residual_tolerance [inherited] |
The NonlinearSolver should exit after the residual is reduced to either less than absolute_residual_tolerance or less than relative_residual_tolerance times the initial residual.
Users should increase any of these tolerances that they want to use for a stopping condition.
Definition at line 249 of file nonlinear_solver.h.
Referenced by libMesh::PetscDMNonlinearSolver< T >::init(), libMesh::NoxNonlinearSolver< T >::solve(), and libMesh::PetscNonlinearSolver< T >::solve().
Real libMesh::NonlinearSolver< T >::absolute_step_tolerance [inherited] |
The NonlinearSolver should exit after the full nonlinear step norm is reduced to either less than absolute_step_tolerance or less than relative_step_tolerance times the largest nonlinear solution which has been seen so far.
Users should increase any of these tolerances that they want to use for a stopping condition.
Note that not all NonlinearSolvers support relative_step_tolerance!
Definition at line 263 of file nonlinear_solver.h.
Referenced by libMesh::PetscDMNonlinearSolver< T >::init(), and libMesh::NoxNonlinearSolver< T >::solve().
void(* libMesh::NonlinearSolver< T >::bounds)(NumericVector< Number > &XL, NumericVector< Number > &XU, sys_type &S) [inherited] |
Function that computes the lower and upper bounds XL and XU on the solution of the nonlinear system.
NonlinearImplicitSystem::ComputeBounds* libMesh::NonlinearSolver< T >::bounds_object [inherited] |
Object that computes the bounds vectors
and
.
Definition at line 179 of file nonlinear_solver.h.
bool libMesh::NonlinearSolver< T >::converged [inherited] |
After a call to solve this will reflect whether or not the nonlinear solve was successful.
Definition at line 287 of file nonlinear_solver.h.
Referenced by libMesh::NoxNonlinearSolver< T >::solve(), libMesh::PetscNonlinearSolver< T >::solve(), and libMesh::PetscDMNonlinearSolver< T >::solve().
Real libMesh::NonlinearSolver< T >::initial_linear_tolerance [inherited] |
Any required linear solves will at first be done with this tolerance; the NonlinearSolver may tighten the tolerance for later solves.
Definition at line 276 of file nonlinear_solver.h.
Referenced by libMesh::PetscDMNonlinearSolver< T >::init(), libMesh::NoxNonlinearSolver< T >::solve(), and libMesh::PetscNonlinearSolver< T >::solve().
void(* libMesh::NonlinearSolver< T >::jacobian)(const NumericVector< Number > &X, SparseMatrix< Number > &J, sys_type &S) [inherited] |
Function that computes the Jacobian J(X) of the nonlinear system at the input iterate X.
Referenced by libMesh::Problem_Interface::computeJacobian(), libMesh::Problem_Interface::computePreconditioner(), libMesh::NoxNonlinearSolver< T >::solve(), and libMesh::PetscNonlinearSolver< T >::solve().
NonlinearImplicitSystem::ComputeJacobian* libMesh::NonlinearSolver< T >::jacobian_object [inherited] |
Object that computes the Jacobian J(X) of the nonlinear system at the input iterate X.
Definition at line 149 of file nonlinear_solver.h.
Referenced by libMesh::Problem_Interface::computeJacobian(), libMesh::Problem_Interface::computePreconditioner(), libMesh::NoxNonlinearSolver< T >::solve(), and libMesh::PetscNonlinearSolver< T >::solve().
void(* libMesh::NonlinearSolver< T >::matvec)(const NumericVector< Number > &X, NumericVector< Number > *R, SparseMatrix< Number > *J, sys_type &S) [inherited] |
Function that computes either the residual
or the Jacobian
of the nonlinear system at the input iterate
. Note that either R or J could be XSNULL.
Referenced by libMesh::Problem_Interface::computeF(), libMesh::Problem_Interface::computeJacobian(), and libMesh::Problem_Interface::computePreconditioner().
unsigned int libMesh::NonlinearSolver< T >::max_function_evaluations [inherited] |
Maximum number of function evaluations.
Definition at line 237 of file nonlinear_solver.h.
Referenced by libMesh::PetscDMNonlinearSolver< T >::init(), and libMesh::PetscNonlinearSolver< T >::solve().
unsigned int libMesh::NonlinearSolver< T >::max_linear_iterations [inherited] |
Each linear solver step should exit after max_linear_iterations is exceeded.
Definition at line 270 of file nonlinear_solver.h.
Referenced by libMesh::PetscDMNonlinearSolver< T >::init(), libMesh::NoxNonlinearSolver< T >::solve(), and libMesh::PetscNonlinearSolver< T >::solve().
unsigned int libMesh::NonlinearSolver< T >::max_nonlinear_iterations [inherited] |
Maximum number of non-linear iterations.
Definition at line 232 of file nonlinear_solver.h.
Referenced by libMesh::PetscDMNonlinearSolver< T >::init(), libMesh::NoxNonlinearSolver< T >::solve(), and libMesh::PetscNonlinearSolver< T >::solve().
Real libMesh::NonlinearSolver< T >::minimum_linear_tolerance [inherited] |
The tolerance for linear solves is kept above this minimum
Definition at line 281 of file nonlinear_solver.h.
void(* libMesh::NonlinearSolver< T >::nearnullspace)(std::vector< NumericVector< Number > * > &sp, sys_type &S) [inherited] |
Function that computes a basis for the Jacobian's near nullspace -- the set of "low energy modes" -- that can be used for AMG coarsening, if the solver supports it (e.g., ML, PETSc's GAMG).
Referenced by libMesh::PetscNonlinearSolver< T >::solve().
NonlinearImplicitSystem::ComputeVectorSubspace* libMesh::NonlinearSolver< T >::nearnullspace_object [inherited] |
A callable object that computes a basis for the Jacobian's near nullspace -- the set of "low energy modes" -- that can be used for AMG coarsening, if the solver supports it (e.g., ML, PETSc's GAMG).
Definition at line 209 of file nonlinear_solver.h.
Referenced by libMesh::PetscNonlinearSolver< T >::solve().
void(* libMesh::NonlinearSolver< T >::nullspace)(std::vector< NumericVector< Number > * > &sp, sys_type &S) [inherited] |
Function that computes a basis for the Jacobian's nullspace -- the kernel or the "zero energy modes" -- that can be used in solving a degenerate problem iteratively, if the solver supports it (e.g., PETSc's KSP).
Referenced by libMesh::PetscNonlinearSolver< T >::solve().
NonlinearImplicitSystem::ComputeVectorSubspace* libMesh::NonlinearSolver< T >::nullspace_object [inherited] |
A callable object that computes a basis for the Jacobian's nullspace -- the kernel or the "zero energy modes" -- that can be used in solving a degenerate problem iteratively, if the solver supports it (e.g., PETSc's KSP).
Definition at line 195 of file nonlinear_solver.h.
Referenced by libMesh::PetscNonlinearSolver< T >::solve().
Real libMesh::NonlinearSolver< T >::relative_residual_tolerance [inherited] |
Definition at line 250 of file nonlinear_solver.h.
Referenced by libMesh::PetscDMNonlinearSolver< T >::init(), libMesh::NoxNonlinearSolver< T >::solve(), and libMesh::PetscNonlinearSolver< T >::solve().
Real libMesh::NonlinearSolver< T >::relative_step_tolerance [inherited] |
Definition at line 264 of file nonlinear_solver.h.
Referenced by libMesh::PetscNonlinearSolver< T >::solve().
void(* libMesh::NonlinearSolver< T >::residual)(const NumericVector< Number > &X, NumericVector< Number > &R, sys_type &S) [inherited] |
Function that computes the residual R(X) of the nonlinear system at the input iterate X.
Referenced by libMesh::Problem_Interface::computeF().
NonlinearImplicitSystem::ComputeResidualandJacobian* libMesh::NonlinearSolver< T >::residual_and_jacobian_object [inherited] |
Object that computes either the residual
or the Jacobian
of the nonlinear system at the input iterate
. Note that either R or J could be XSNULL.
Definition at line 168 of file nonlinear_solver.h.
Referenced by libMesh::Problem_Interface::computeF(), libMesh::Problem_Interface::computeJacobian(), libMesh::Problem_Interface::computePreconditioner(), libMesh::NoxNonlinearSolver< T >::solve(), and libMesh::PetscNonlinearSolver< T >::solve().
NonlinearImplicitSystem::ComputeResidual* libMesh::NonlinearSolver< T >::residual_object [inherited] |
Object that computes the residual R(X) of the nonlinear system at the input iterate X.
Definition at line 135 of file nonlinear_solver.h.
Referenced by libMesh::Problem_Interface::computeF().
void(* libMesh::NonlinearSolver< T >::user_presolve)(sys_type &S) [inherited] |
The documentation for this class was generated from the following files:
Site Created By: libMesh Developers
Last modified: February 05 2013 19:55:42 UTC
Hosted By: