www.mooseframework.org
NonlinearSystem.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef NONLINEARSYSTEM_H
16 #define NONLINEARSYSTEM_H
17 
18 #include "NonlinearSystemBase.h"
19 
26 {
27 public:
28  NonlinearSystem(FEProblemBase & problem, const std::string & name);
29  virtual ~NonlinearSystem();
30 
31  virtual void solve() override;
32 
36  virtual void stopSolve() override;
37 
42  virtual unsigned int getCurrentNonlinearIterationNumber() override
43  {
44  return _transient_sys.get_current_nonlinear_iteration_number();
45  }
46 
47  virtual void setupFiniteDifferencedPreconditioner() override;
48 
53  virtual bool converged() override;
54 
55  virtual NumericVector<Number> & RHS() override { return *_transient_sys.rhs; }
56 
57  virtual NonlinearSolver<Number> * nonlinearSolver() override
58  {
59  return _transient_sys.nonlinear_solver.get();
60  }
61 
62  virtual NumericVector<Number> & solutionOld() override
63  {
64  return *_transient_sys.old_local_solution;
65  }
66 
67  virtual NumericVector<Number> & solutionOlder() override
68  {
69  return *_transient_sys.older_local_solution;
70  }
71 
72  virtual TransientNonlinearImplicitSystem & sys() { return _transient_sys; }
73 
74 protected:
75  TransientNonlinearImplicitSystem & _transient_sys;
76 
77 private:
84 
96 
98 };
99 
100 #endif /* NONLINEARSYSTEM_H */
virtual void solve() override
Solve the system (using libMesh magic)
virtual const std::string & name()
Definition: SystemBase.h:453
virtual NumericVector< Number > & solutionOld() override
NonlinearSystem(FEProblemBase &problem, const std::string &name)
virtual void setupFiniteDifferencedPreconditioner() override
virtual void stopSolve() override
Quit the current solve as soon as possible.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual NonlinearSolver< Number > * nonlinearSolver() override
Nonlinear system to be solved.
virtual NumericVector< Number > & solutionOlder() override
void setupColoringFiniteDifferencedPreconditioner()
According to the nonzero pattern provided in the matrix, a graph is constructed.
virtual unsigned int getCurrentNonlinearIterationNumber() override
Returns the current nonlinear iteration number.
bool _use_coloring_finite_difference
TransientNonlinearImplicitSystem & _transient_sys
virtual NumericVector< Number > & RHS() override
virtual bool converged() override
Returns the convergence state.
virtual TransientNonlinearImplicitSystem & sys()
Nonlinear system to be solved.
void setupStandardFiniteDifferencedPreconditioner()
Form preconditioning matrix via a standard finite difference method column-by-column.
virtual ~NonlinearSystem()