www.mooseframework.org
DumpObjectsNonlinearSystem.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "NonlinearSystemBase.h"
13 #include "libmesh/nonlinear_solver.h"
14 
15 namespace libMesh
16 {
17 template <typename T>
18 class NumericVector;
19 }
20 
25 {
26 public:
27  DumpObjectsNonlinearSystem(FEProblemBase & problem, const std::string & name);
28 
29  virtual NonlinearSolver<Number> * nonlinearSolver() override { return NULL; }
30  virtual void solve() override {}
31  virtual void stopSolve(const ExecFlagType &) override {}
32  virtual bool converged() override { return true; }
33  virtual NumericVector<Number> & RHS() override { return *_dummy; }
34  virtual SNES getSNES() override { return nullptr; }
35 
36  virtual unsigned int getCurrentNonlinearIterationNumber() override { return 0; }
37  virtual void setupFiniteDifferencedPreconditioner() override {}
38  virtual void attachPreconditioner(Preconditioner<Number> * /* preconditioner */) override {}
39  void residualAndJacobianTogether() override {}
40 
41 protected:
42  void computeScalingJacobian() override {}
43  void computeScalingResidual() override {}
44 
46 };
virtual void attachPreconditioner(Preconditioner< Number > *) override
Attach a customized preconditioner that requires physics knowledge.
virtual NonlinearSolver< Number > * nonlinearSolver() override
DumpObjectsNonlinearSystem(FEProblemBase &problem, const std::string &name)
virtual void stopSolve(const ExecFlagType &) override
Quit the current solve as soon as possible.
virtual void solve() override
Solve the system (using libMesh magic)
virtual NumericVector< Number > & RHS() override
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
virtual bool converged() override
Returns the convergence state.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual void setupFiniteDifferencedPreconditioner() override
NumericVector< Number > * _dummy
Nonlinear system to be solved.
virtual const std::string & name() const
Definition: SystemBase.C:1293
Nonlinear system for dumping objects.
void residualAndJacobianTogether() override
Call this method if you want the residual and Jacobian to be computed simultaneously.
virtual unsigned int getCurrentNonlinearIterationNumber() override
Class for containing MooseEnum item information.
Definition: MooseEnumItem.h:18
void computeScalingJacobian() override
Compute a "Jacobian" for automatic scaling purposes.
void computeScalingResidual() override
Compute a "residual" for automatic scaling purposes.