https://mooseframework.inl.gov
Loading...
Searching...
No Matches
DumpObjectsNonlinearSystem.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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
15namespace libMesh
16{
17template <typename T>
18class NumericVector;
19}
20
25{
26public:
27 DumpObjectsNonlinearSystem(FEProblemBase & problem, const std::string & name);
28
29 virtual libMesh::NonlinearSolver<Number> * nonlinearSolver() override { return NULL; }
30 virtual void solve() override {}
31 virtual void stopSolve(const ExecFlagType &, const std::set<TagID> &) 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(libMesh::Preconditioner<Number> * /* preconditioner */) override
39 {
40 }
41 void residualAndJacobianTogether() override {}
42
43protected:
44 void computeScalingJacobian() override {}
45 void computeScalingResidual() override {}
46
47 NumericVector<Number> * _dummy;
48};
Nonlinear system for dumping objects.
void residualAndJacobianTogether() override
Call this method if you want the residual and Jacobian to be computed simultaneously.
void computeScalingJacobian() override
Compute a "Jacobian" for automatic scaling purposes.
virtual void stopSolve(const ExecFlagType &, const std::set< TagID > &) override
Quit the current solve as soon as possible.
virtual NumericVector< Number > & RHS() override
virtual unsigned int getCurrentNonlinearIterationNumber() override
virtual bool converged() override
Returns the convergence state.
virtual void solve() override
Solve the system (using libMesh magic)
virtual void attachPreconditioner(libMesh::Preconditioner< Number > *) override
Attach a customized preconditioner that requires physics knowledge.
virtual libMesh::NonlinearSolver< Number > * nonlinearSolver() override
void computeScalingResidual() override
Compute a "residual" for automatic scaling purposes.
virtual void setupFiniteDifferencedPreconditioner() override
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Class for containing MooseEnum item information.
Nonlinear system to be solved.
virtual const std::string & name() const
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...