Line data Source code
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 : 15 : namespace libMesh 16 : { 17 : template <typename T> 18 : class NumericVector; 19 : } 20 : 21 : /** 22 : * Nonlinear system for dumping objects 23 : */ 24 : class DumpObjectsNonlinearSystem : public NonlinearSystemBase 25 : { 26 : public: 27 : DumpObjectsNonlinearSystem(FEProblemBase & problem, const std::string & name); 28 : 29 0 : virtual libMesh::NonlinearSolver<Number> * nonlinearSolver() override { return NULL; } 30 0 : virtual void solve() override {} 31 0 : virtual void stopSolve(const ExecFlagType &, const std::set<TagID> &) override {} 32 0 : virtual bool converged() override { return true; } 33 0 : virtual NumericVector<Number> & RHS() override { return *_dummy; } 34 0 : virtual SNES getSNES() override { return nullptr; } 35 : 36 0 : virtual unsigned int getCurrentNonlinearIterationNumber() override { return 0; } 37 0 : virtual void setupFiniteDifferencedPreconditioner() override {} 38 0 : virtual void attachPreconditioner(libMesh::Preconditioner<Number> * /* preconditioner */) override 39 : { 40 0 : } 41 0 : void residualAndJacobianTogether() override {} 42 : 43 : protected: 44 0 : void computeScalingJacobian() override {} 45 0 : void computeScalingResidual() override {} 46 : 47 : NumericVector<Number> * _dummy; 48 : };