libMesh
trilinos_nox_nonlinear_solver.C
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2019 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #include "libmesh/libmesh_common.h"
21 
22 #if defined(LIBMESH_TRILINOS_HAVE_NOX) && defined(LIBMESH_TRILINOS_HAVE_EPETRA)
23 
24 // Local Includes
25 #include "libmesh/libmesh_logging.h"
26 #include "libmesh/dof_map.h"
27 #include "libmesh/nonlinear_implicit_system.h"
28 #include "libmesh/trilinos_nox_nonlinear_solver.h"
29 #include "libmesh/system.h"
30 #include "libmesh/trilinos_epetra_vector.h"
31 #include "libmesh/trilinos_epetra_matrix.h"
32 #include "libmesh/trilinos_preconditioner.h"
33 
34 // Trilinos includes
35 #include "libmesh/ignore_warnings.h"
36 #include "NOX_Epetra_MatrixFree.H"
37 #include "NOX_Epetra_LinearSystem_AztecOO.H"
38 #include "NOX_Epetra_Group.H"
39 #include "NOX_Epetra_Vector.H"
40 #include "libmesh/restore_warnings.h"
41 
42 namespace libMesh
43 {
44 
45 class Problem_Interface : public NOX::Epetra::Interface::Required,
46  public NOX::Epetra::Interface::Jacobian,
47  public NOX::Epetra::Interface::Preconditioner
48 {
49 public:
50  explicit
52 
54 
56  bool computeF(const Epetra_Vector & x,
57  Epetra_Vector & FVec,
58  NOX::Epetra::Interface::Required::FillType fillType);
59 
61  bool computeJacobian(const Epetra_Vector & x,
62  Epetra_Operator & Jac);
63 
70  bool computePrecMatrix(const Epetra_Vector & x,
71  Epetra_RowMatrix & M);
72 
75  bool computePreconditioner(const Epetra_Vector & x,
76  Epetra_Operator & Prec,
77  Teuchos::ParameterList * p);
78 
80 };
81 
82 
83 
85  _solver(solver)
86 {}
87 
88 
89 
91 {}
92 
93 
94 
95 bool Problem_Interface::computeF(const Epetra_Vector & x,
96  Epetra_Vector & r,
97  NOX::Epetra::Interface::Required::FillType /*fillType*/)
98 {
99  LOG_SCOPE("residual()", "TrilinosNoxNonlinearSolver");
100 
102 
103  EpetraVector<Number> X_global(*const_cast<Epetra_Vector *>(&x), sys.comm()), R(r, sys.comm());
104  EpetraVector<Number> & X_sys = *cast_ptr<EpetraVector<Number> *>(sys.solution.get());
105  EpetraVector<Number> & R_sys = *cast_ptr<EpetraVector<Number> *>(sys.rhs);
106 
107  // Use the systems update() to get a good local version of the parallel solution
108  X_global.swap(X_sys);
109  R.swap(R_sys);
110 
112  sys.update();
113 
114  // Swap back
115  X_global.swap(X_sys);
116  R.swap(R_sys);
117 
118  R.zero();
119 
120  //-----------------------------------------------------------------------------
121  // if the user has provided both function pointers and objects only the pointer
122  // will be used, so catch that as an error
123 
125  libmesh_error_msg("ERROR: cannot specify both a function and object to compute the Residual!");
126 
128  libmesh_error_msg("ERROR: cannot specify both a function and object to compute the combined Residual & Jacobian!");
129 
130  if (_solver->residual != nullptr)
131  _solver->residual(*sys.current_local_solution.get(), R, sys);
132 
133  else if (_solver->residual_object != nullptr)
135 
136  else if (_solver->matvec != nullptr)
137  _solver->matvec(*sys.current_local_solution.get(), &R, nullptr, sys);
138 
139  else if (_solver->residual_and_jacobian_object != nullptr)
141 
142  else
143  return false;
144 
145  R.close();
146  X_global.close();
147 
148  return true;
149 }
150 
151 
152 
153 bool Problem_Interface::computeJacobian(const Epetra_Vector & x,
154  Epetra_Operator & jac)
155 {
156  LOG_SCOPE("jacobian()", "TrilinosNoxNonlinearSolver");
157 
159 
160  EpetraMatrix<Number> J(&dynamic_cast<Epetra_FECrsMatrix &>(jac), sys.comm());
161  EpetraVector<Number> & X_sys = *cast_ptr<EpetraVector<Number> *>(sys.solution.get());
162  EpetraVector<Number> X_global(*const_cast<Epetra_Vector *>(&x), sys.comm());
163 
164  // Set the dof maps
165  J.attach_dof_map(sys.get_dof_map());
166 
167  // Use the systems update() to get a good local version of the parallel solution
168  X_global.swap(X_sys);
169 
171  sys.update();
172 
173  X_global.swap(X_sys);
174 
175  //-----------------------------------------------------------------------------
176  // if the user has provided both function pointers and objects only the pointer
177  // will be used, so catch that as an error
179  libmesh_error_msg("ERROR: cannot specify both a function and object to compute the Jacobian!");
180 
182  libmesh_error_msg("ERROR: cannot specify both a function and object to compute the combined Residual & Jacobian!");
183 
184  if (_solver->jacobian != nullptr)
185  _solver->jacobian(*sys.current_local_solution.get(), J, sys);
186 
187  else if (_solver->jacobian_object != nullptr)
189 
190  else if (_solver->matvec != nullptr)
191  _solver->matvec(*sys.current_local_solution.get(), nullptr, &J, sys);
192 
193  else if (_solver->residual_and_jacobian_object != nullptr)
195 
196  else
197  libmesh_error_msg("Error! Unable to compute residual and/or Jacobian!");
198 
199  J.close();
200  X_global.close();
201 
202  return true;
203 }
204 
205 
206 
207 bool Problem_Interface::computePrecMatrix(const Epetra_Vector & /*x*/, Epetra_RowMatrix & /*M*/)
208 {
209  // libMesh::out << "ERROR: Problem_Interface::preconditionVector() - Use Explicit Jacobian only for this test problem!" << endl;
210  throw 1;
211 }
212 
213 
214 
215 bool Problem_Interface::computePreconditioner(const Epetra_Vector & x,
216  Epetra_Operator & prec,
217  Teuchos::ParameterList * /*p*/)
218 {
219  LOG_SCOPE("preconditioner()", "TrilinosNoxNonlinearSolver");
220 
223 
224  EpetraMatrix<Number> J(dynamic_cast<Epetra_FECrsMatrix *>(tpc.mat()),sys.comm());
225  EpetraVector<Number> & X_sys = *cast_ptr<EpetraVector<Number> *>(sys.solution.get());
226  EpetraVector<Number> X_global(*const_cast<Epetra_Vector *>(&x), sys.comm());
227 
228  // Set the dof maps
229  J.attach_dof_map(sys.get_dof_map());
230 
231  // Use the systems update() to get a good local version of the parallel solution
232  X_global.swap(X_sys);
233 
235  sys.update();
236 
237  X_global.swap(X_sys);
238 
239  //-----------------------------------------------------------------------------
240  // if the user has provided both function pointers and objects only the pointer
241  // will be used, so catch that as an error
243  libmesh_error_msg("ERROR: cannot specify both a function and object to compute the Jacobian!");
244 
246  libmesh_error_msg("ERROR: cannot specify both a function and object to compute the combined Residual & Jacobian!");
247 
248  if (_solver->jacobian != nullptr)
249  _solver->jacobian(*sys.current_local_solution.get(), J, sys);
250 
251  else if (_solver->jacobian_object != nullptr)
253 
254  else if (_solver->matvec != nullptr)
255  _solver->matvec(*sys.current_local_solution.get(), nullptr, &J, sys);
256 
257  else if (_solver->residual_and_jacobian_object != nullptr)
259 
260  else
261  libmesh_error_msg("Error! Unable to compute residual and/or Jacobian!");
262 
263  J.close();
264  X_global.close();
265 
266  tpc.compute();
267 
268  return true;
269 }
270 
271 
272 
273 //---------------------------------------------------------------------
274 // NoxNonlinearSolver<> methods
275 template <typename T>
277 {
278 }
279 
280 
281 
282 template <typename T>
283 void NoxNonlinearSolver<T>::init (const char * /*name*/)
284 {
285  if (!this->initialized())
286  _interface = new Problem_Interface(this);
287 }
288 
289 
290 
291 #include <libmesh/ignore_warnings.h> // deprecated-copy in Epetra_Vector
292 
293 template <typename T>
294 std::pair<unsigned int, Real>
295 NoxNonlinearSolver<T>::solve (SparseMatrix<T> & /* jac_in */, // System Jacobian Matrix
296  NumericVector<T> & x_in, // Solution vector
297  NumericVector<T> & /* r_in */, // Residual vector
298  const double, // Stopping tolerance
299  const unsigned int)
300 {
301  this->init ();
302 
303  if (this->user_presolve)
304  this->user_presolve(this->system());
305 
306  EpetraVector<T> * x_epetra = cast_ptr<EpetraVector<T> *>(&x_in);
307  // Creating a Teuchos::RCP as they do in NOX examples does not work here - we get some invalid memory references
308  // thus we make a local copy
309  NOX::Epetra::Vector x(*x_epetra->vec());
310 
311  Teuchos::RCP<Teuchos::ParameterList> nlParamsPtr = Teuchos::rcp(new Teuchos::ParameterList);
312  Teuchos::ParameterList & nlParams = *(nlParamsPtr.get());
313  nlParams.set("Nonlinear Solver", "Line Search Based");
314 
315  //print params
316  Teuchos::ParameterList & printParams = nlParams.sublist("Printing");
317  printParams.set("Output Precision", 3);
318  printParams.set("Output Processor", 0);
319  printParams.set("Output Information",
320  NOX::Utils::OuterIteration +
321  NOX::Utils::OuterIterationStatusTest +
322  NOX::Utils::InnerIteration +
323  NOX::Utils::LinearSolverDetails +
324  NOX::Utils::Parameters +
325  NOX::Utils::Details +
326  NOX::Utils::Warning);
327 
328  Teuchos::ParameterList & dirParams = nlParams.sublist("Direction");
329  dirParams.set("Method", "Newton");
330  Teuchos::ParameterList & newtonParams = dirParams.sublist("Newton");
331  newtonParams.set("Forcing Term Method", "Constant");
332 
333  Teuchos::ParameterList & lsParams = newtonParams.sublist("Linear Solver");
334  lsParams.set("Aztec Solver", "GMRES");
335  lsParams.set("Max Iterations", static_cast<int>(this->max_linear_iterations));
336  lsParams.set("Tolerance", this->initial_linear_tolerance);
337  lsParams.set("Output Frequency", 1);
338  lsParams.set("Size of Krylov Subspace", 1000);
339 
340  //create linear system
341  Teuchos::RCP<NOX::Epetra::Interface::Required> iReq(_interface);
342  Teuchos::RCP<NOX::Epetra::LinearSystemAztecOO> linSys;
343  Teuchos::RCP<Epetra_Operator> pc;
344 
345  if (this->jacobian || this->jacobian_object || this->residual_and_jacobian_object)
346  {
347  if (this->_preconditioner)
348  {
349  // PJNFK
350  lsParams.set("Preconditioner", "User Defined");
351 
352  TrilinosPreconditioner<Number> * trilinos_pc =
353  cast_ptr<TrilinosPreconditioner<Number> *>(this->_preconditioner);
354  pc = Teuchos::rcp(trilinos_pc);
355 
356  Teuchos::RCP<NOX::Epetra::Interface::Preconditioner> iPrec(_interface);
357  linSys = Teuchos::rcp(new NOX::Epetra::LinearSystemAztecOO(printParams, lsParams, iReq, iPrec, pc, x));
358  }
359  else
360  {
361  lsParams.set("Preconditioner", "None");
362  // lsParams.set("Preconditioner", "Ifpack");
363  // lsParams.set("Preconditioner", "AztecOO");
364 
365  // full jacobian
366  NonlinearImplicitSystem & sys = _interface->_solver->system();
367  EpetraMatrix<Number> & jacSys = *cast_ptr<EpetraMatrix<Number> *>(sys.matrix);
368  Teuchos::RCP<Epetra_RowMatrix> jacMat = Teuchos::rcp(jacSys.mat());
369 
370  Teuchos::RCP<NOX::Epetra::Interface::Jacobian> iJac(_interface);
371  linSys = Teuchos::rcp(new NOX::Epetra::LinearSystemAztecOO(printParams, lsParams, iReq, iJac, jacMat, x));
372  }
373  }
374  else
375  {
376  // matrix free
377  Teuchos::RCP<NOX::Epetra::MatrixFree> MF = Teuchos::rcp(new NOX::Epetra::MatrixFree(printParams, iReq, x));
378 
379  Teuchos::RCP<NOX::Epetra::Interface::Jacobian> iJac(MF);
380  linSys = Teuchos::rcp(new NOX::Epetra::LinearSystemAztecOO(printParams, lsParams, iReq, iJac, MF, x));
381  }
382 
383  //create group
384  Teuchos::RCP<NOX::Epetra::Group> grpPtr = Teuchos::rcp(new NOX::Epetra::Group(printParams, iReq, x, linSys));
385  NOX::Epetra::Group & grp = *(grpPtr.get());
386 
387  Teuchos::RCP<NOX::StatusTest::NormF> absresid =
388  Teuchos::rcp(new NOX::StatusTest::NormF(this->absolute_residual_tolerance, NOX::StatusTest::NormF::Unscaled));
389  Teuchos::RCP<NOX::StatusTest::NormF> relresid =
390  Teuchos::rcp(new NOX::StatusTest::NormF(grp, this->relative_residual_tolerance));
391  Teuchos::RCP<NOX::StatusTest::MaxIters> maxiters =
392  Teuchos::rcp(new NOX::StatusTest::MaxIters(this->max_nonlinear_iterations));
393  Teuchos::RCP<NOX::StatusTest::FiniteValue> finiteval =
394  Teuchos::rcp(new NOX::StatusTest::FiniteValue());
395  Teuchos::RCP<NOX::StatusTest::NormUpdate> normupdate =
396  Teuchos::rcp(new NOX::StatusTest::NormUpdate(this->absolute_step_tolerance));
397  Teuchos::RCP<NOX::StatusTest::Combo> combo =
398  Teuchos::rcp(new NOX::StatusTest::Combo(NOX::StatusTest::Combo::OR));
399  combo->addStatusTest(absresid);
400  combo->addStatusTest(relresid);
401  combo->addStatusTest(maxiters);
402  combo->addStatusTest(finiteval);
403  combo->addStatusTest(normupdate);
404 
405  Teuchos::RCP<Teuchos::ParameterList> finalPars = nlParamsPtr;
406 
407  Teuchos::RCP<NOX::Solver::Generic> solver = NOX::Solver::buildSolver(grpPtr, combo, nlParamsPtr);
408  NOX::StatusTest::StatusType status = solver->solve();
409  this->converged = (status == NOX::StatusTest::Converged);
410 
411  const NOX::Epetra::Group & finalGroup = dynamic_cast<const NOX::Epetra::Group &>(solver->getSolutionGroup());
412  const NOX::Epetra::Vector & noxFinalSln = dynamic_cast<const NOX::Epetra::Vector &>(finalGroup.getX());
413 
414  *x_epetra->vec() = noxFinalSln.getEpetraVector();
415  x_in.close();
416 
417  Real residual_norm = finalGroup.getNormF();
418  unsigned int total_iters = solver->getNumIterations();
419  _n_linear_iterations = finalPars->sublist("Direction").sublist("Newton").sublist("Linear Solver").sublist("Output").get("Total Number of Linear Iterations", -1);
420 
421  // do not let Trilinos to deallocate what we allocated
422  pc.release();
423  iReq.release();
424 
425  return std::make_pair(total_iters, residual_norm);
426 }
427 
428 #include <libmesh/restore_warnings.h>
429 
430 
431 
432 template <typename T>
433 int
435 {
436  return _n_linear_iterations;
437 }
438 
439 
440 
441 //------------------------------------------------------------------
442 // Explicit instantiations
443 template class NoxNonlinearSolver<Number>;
444 
445 } // namespace libMesh
446 
447 
448 
449 #endif // LIBMESH_TRILINOS_HAVE_NOX && LIBMESH_TRILINOS_HAVE_EPETRA
libMesh::Problem_Interface::computeJacobian
bool computeJacobian(const Epetra_Vector &x, Epetra_Operator &Jac)
Compute an explicit Jacobian.
Definition: trilinos_nox_nonlinear_solver.C:153
libMesh::NonlinearImplicitSystem::ComputeJacobian::jacobian
virtual void jacobian(const NumericVector< Number > &X, SparseMatrix< Number > &J, sys_type &S)=0
Jacobian function.
libMesh::ExplicitSystem::rhs
NumericVector< Number > * rhs
The system matrix.
Definition: explicit_system.h:114
libMesh::TrilinosPreconditioner
This class provides an interface to the suite of preconditioners available from Trilinos.
Definition: trilinos_preconditioner.h:70
libMesh::TrilinosPreconditioner::mat
Epetra_FECrsMatrix * mat()
Definition: trilinos_preconditioner.h:100
libMesh
The libMesh namespace provides an interface to certain functionality in the library.
Definition: factoryfunction.C:55
libMesh::NonlinearSolver::residual
void(* residual)(const NumericVector< Number > &X, NumericVector< Number > &R, sys_type &S)
Function that computes the residual R(X) of the nonlinear system at the input iterate X.
Definition: nonlinear_solver.h:137
libMesh::NumericVector::close
virtual void close()=0
Calls the NumericVector's internal assembly routines, ensuring that the values are consistent across ...
libMesh::ParallelObject::comm
const Parallel::Communicator & comm() const
Definition: parallel_object.h:94
libMesh::TrilinosPreconditioner::compute
void compute()
Compute the preconditioner.
Definition: trilinos_preconditioner.C:86
libMesh::NonlinearImplicitSystem::ComputeResidual::residual
virtual void residual(const NumericVector< Number > &X, NumericVector< Number > &R, sys_type &S)=0
Residual function.
libMesh::NonlinearSolver::matvec
void(* matvec)(const NumericVector< Number > &X, NumericVector< Number > *R, SparseMatrix< Number > *J, sys_type &S)
Function that computes either the residual or the Jacobian of the nonlinear system at the input ite...
Definition: nonlinear_solver.h:181
libMesh::NonlinearImplicitSystem
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and non-linear solv...
Definition: nonlinear_implicit_system.h:54
libMesh::SparseMatrix
Generic sparse matrix.
Definition: vector_fe_ex5.C:45
libMesh::NoxNonlinearSolver::init
virtual void init(const char *name=nullptr) override
Initialize data structures if not done so already.
Definition: trilinos_nox_nonlinear_solver.C:283
libMesh::Problem_Interface::computePreconditioner
bool computePreconditioner(const Epetra_Vector &x, Epetra_Operator &Prec, Teuchos::ParameterList *p)
Computes a user supplied preconditioner based on input vector x.
Definition: trilinos_nox_nonlinear_solver.C:215
libMesh::NumericVector
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
Definition: vector_fe_ex5.C:43
libMesh::NonlinearSolver::jacobian_object
NonlinearImplicitSystem::ComputeJacobian * jacobian_object
Object that computes the Jacobian J(X) of the nonlinear system at the input iterate X.
Definition: nonlinear_solver.h:172
libMesh::EpetraVector
This class provides a nice interface to the Trilinos Epetra_Vector object.
Definition: trilinos_epetra_vector.h:63
libMesh::TriangleWrapper::init
void init(triangulateio &t)
Initializes the fields of t to nullptr/0 as necessary.
libMesh::NoxNonlinearSolver::clear
virtual void clear() override
Release all memory and clear data structures.
Definition: trilinos_nox_nonlinear_solver.C:276
libMesh::NoxNonlinearSolver::get_total_linear_iterations
virtual int get_total_linear_iterations() override
Get the total number of linear iterations done in the last solve.
Definition: trilinos_nox_nonlinear_solver.C:434
libMesh::EpetraMatrix
This class provides a nice interface to the Epetra data structures for parallel, sparse matrices.
Definition: trilinos_epetra_matrix.h:63
libMesh::NoxNonlinearSolver::solve
virtual std::pair< unsigned int, Real > solve(SparseMatrix< T > &, NumericVector< T > &, NumericVector< T > &, const double, const unsigned int) override
Call the Nox solver.
Definition: trilinos_nox_nonlinear_solver.C:295
libMesh::DofMap::enforce_constraints_exactly
void enforce_constraints_exactly(const System &system, NumericVector< Number > *v=nullptr, bool homogeneous=false) const
Constrains the numeric vector v, which represents a solution defined on the mesh.
Definition: dof_map.h:2054
libMesh::System::current_local_solution
std::unique_ptr< NumericVector< Number > > current_local_solution
All the values I need to compute my contribution to the simulation at hand.
Definition: system.h:1551
libMesh::EpetraVector::vec
Epetra_Vector * vec()
Definition: trilinos_epetra_vector.h:264
libMesh::ImplicitSystem::matrix
SparseMatrix< Number > * matrix
The system matrix.
Definition: implicit_system.h:393
libMesh::EpetraVector::swap
virtual void swap(NumericVector< T > &v) override
Swaps the contents of this with v.
Definition: trilinos_epetra_vector.h:812
libMesh::Problem_Interface::computePrecMatrix
bool computePrecMatrix(const Epetra_Vector &x, Epetra_RowMatrix &M)
Compute the Epetra_RowMatrix M, that will be used by the Aztec preconditioner instead of the Jacobian...
Definition: trilinos_nox_nonlinear_solver.C:207
libMesh::Problem_Interface::Problem_Interface
Problem_Interface(NoxNonlinearSolver< Number > *solver)
Definition: trilinos_nox_nonlinear_solver.C:84
libMesh::NonlinearSolver::residual_object
NonlinearImplicitSystem::ComputeResidual * residual_object
Object that computes the residual R(X) of the nonlinear system at the input iterate X.
Definition: nonlinear_solver.h:145
libMesh::EpetraMatrix::mat
Epetra_FECrsMatrix * mat()
Definition: trilinos_epetra_matrix.h:192
libMesh::initialized
bool initialized()
Checks that library initialization has been done.
Definition: libmesh.C:265
libMesh::NonlinearSolver::residual_and_jacobian_object
NonlinearImplicitSystem::ComputeResidualandJacobian * residual_and_jacobian_object
Object that computes either the residual or the Jacobian of the nonlinear system at the input itera...
Definition: nonlinear_solver.h:193
libMesh::Problem_Interface
Definition: trilinos_nox_nonlinear_solver.C:45
libMesh::System::solution
std::unique_ptr< NumericVector< Number > > solution
Data structure to hold solution values.
Definition: system.h:1539
libMesh::NonlinearSolver::jacobian
void(* jacobian)(const NumericVector< Number > &X, SparseMatrix< Number > &J, sys_type &S)
Function that computes the Jacobian J(X) of the nonlinear system at the input iterate X.
Definition: nonlinear_solver.h:164
libMesh::Problem_Interface::computeF
bool computeF(const Epetra_Vector &x, Epetra_Vector &FVec, NOX::Epetra::Interface::Required::FillType fillType)
Compute and return F.
Definition: trilinos_nox_nonlinear_solver.C:95
libMesh::NoxNonlinearSolver< Number >
libMesh::System::get_dof_map
const DofMap & get_dof_map() const
Definition: system.h:2099
libMesh::Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Definition: libmesh_common.h:121
libMesh::NonlinearSolver::system
const sys_type & system() const
Definition: nonlinear_solver.h:279
libMesh::NonlinearImplicitSystem::system
sys_type & system()
Definition: nonlinear_implicit_system.h:213
libMesh::System::update
virtual void update()
Update the local values to reflect the solution on neighboring processors.
Definition: system.C:408
libMesh::Problem_Interface::_solver
NoxNonlinearSolver< Number > * _solver
Definition: trilinos_nox_nonlinear_solver.C:79
libMesh::Problem_Interface::~Problem_Interface
~Problem_Interface()
Definition: trilinos_nox_nonlinear_solver.C:90
libMesh::NonlinearImplicitSystem::ComputeResidualandJacobian::residual_and_jacobian
virtual void residual_and_jacobian(const NumericVector< Number > &X, NumericVector< Number > *R, SparseMatrix< Number > *J, sys_type &S)=0
Residual & Jacobian function, calculated simultaneously.