Go to the documentation of this file.
20 #ifndef LIBMESH_NONLINEAR_IMPLICIT_SYSTEM_H
21 #define LIBMESH_NONLINEAR_IMPLICIT_SYSTEM_H
24 #include "libmesh/implicit_system.h"
34 template<
typename T>
class NonlinearSolver;
63 const std::string &
name,
64 const unsigned int number);
205 bool & changed_search_direction,
206 bool & changed_new_soln,
219 virtual void clear ()
override;
225 virtual void reinit ()
override;
230 virtual void solve ()
override;
237 virtual std::pair<unsigned int, Real>
244 virtual void assembly(
bool get_residual,
246 bool apply_heterogeneous_constraints =
false,
247 bool apply_no_constraints =
false)
override;
253 virtual std::string
system_type ()
const override {
return "NonlinearImplicit"; }
309 #endif // LIBMESH_NONLINEAR_IMPLICIT_SYSTEM_H
NonlinearImplicitSystem sys_type
The type of system.
virtual ~NonlinearImplicitSystem()
Destructor.
Real final_nonlinear_residual() const
Manages consistently variables, degrees of freedom, coefficient vectors, and matrices for implicit sy...
virtual void jacobian(const NumericVector< Number > &X, SparseMatrix< Number > &J, sys_type &S)=0
Jacobian function.
Real _final_nonlinear_residual
The final residual for the nonlinear system R(x)
virtual void reinit() override
Reinitializes the member data fields associated with the system, so that, e.g., assemble() may be use...
The libMesh namespace provides an interface to certain functionality in the library.
unsigned int _n_nonlinear_iterations
The number of nonlinear iterations required to solve the nonlinear system R(x)=0.
virtual ~ComputePostCheck()
virtual void residual(const NumericVector< Number > &X, NumericVector< Number > &R, sys_type &S)=0
Residual function.
unsigned int number() const
virtual std::string system_type() const override
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and non-linear solv...
Abstract base class to be used to calculate the bounds on the degrees of freedom of a nonlinear syste...
virtual void solve() override
Assembles & solves the nonlinear system R(x) = 0.
std::unique_ptr< DiffSolver > diff_solver
The DiffSolver defines an optional interface used to solve the nonlinear_implicit system.
void set_solver_parameters()
Copies system parameters into nonlinear solver parameters.
virtual ~ComputeJacobian()
virtual void operator()(std::vector< NumericVector< Number > * > &sp, sys_type &s)=0
This function will be called to compute the subspace basis (e.g., nullspace or nearnullspace).
virtual void assembly(bool get_residual, bool get_jacobian, bool apply_heterogeneous_constraints=false, bool apply_no_constraints=false) override
Assembles a residual in rhs and/or a jacobian in matrix, as requested.
virtual ~ComputeResidualandJacobian()
virtual std::pair< unsigned int, Real > get_linear_solve_parameters() const override
unsigned int n_nonlinear_iterations() const
virtual void bounds(NumericVector< Number > &XL, NumericVector< Number > &XU, sys_type &S)=0
This function will be called to compute the bounds vector and must be implemented by the user in a de...
Callable abstract base class to be used as a callback to provide the solver with a basis for the syst...
Abstract base class to be used to calculate the residual and Jacobian simultaneously of a nonlinear s...
This is the EquationSystems class.
std::unique_ptr< NonlinearSolver< Number > > nonlinear_solver
The NonlinearSolver defines the default interface used to solve the nonlinear_implicit system.
Manages consistently variables, degrees of freedom, and coefficient vectors for explicit systems.
virtual ~ComputeVectorSubspace()
const std::string & name() const
Abstract base class to be used to calculate the Jacobian of a nonlinear system.
virtual void postcheck(const NumericVector< Number > &old_soln, NumericVector< Number > &search_direction, NumericVector< Number > &new_soln, bool &changed_search_direction, bool &changed_new_soln, sys_type &S)=0
This interface, which is inspired by PETSc's, passes the user: .) A constant reference to the "old" s...
NonlinearImplicitSystem(EquationSystems &es, const std::string &name, const unsigned int number)
Constructor.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned get_current_nonlinear_iteration_number() const
If called during the solve(), for example by the user-specified residual or Jacobian function,...
ImplicitSystem Parent
The type of the parent.
Abstract base class to be used to calculate the residual of a nonlinear system.
virtual void clear() override
Clear all the data structures associated with the system.
virtual ~ComputeResidual()
Abstract base class to be used for applying user modifications to the solution vector and/or Newton u...
virtual void residual_and_jacobian(const NumericVector< Number > &X, NumericVector< Number > *R, SparseMatrix< Number > *J, sys_type &S)=0
Residual & Jacobian function, calculated simultaneously.