libMesh
steady_solver.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2017 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #ifndef LIBMESH_STEADY_SOLVER_H
21 #define LIBMESH_STEADY_SOLVER_H
22 
23 // Local includes
24 #include "libmesh/time_solver.h"
25 
26 // C++ includes
27 
28 namespace libMesh
29 {
30 
31 // Forward Declarations
32 class DiffContext;
33 class DifferentiableSystem;
34 class TimeSolver;
35 
47 class SteadySolver : public TimeSolver
48 {
49 public:
54 
58  typedef TimeSolver Parent;
59 
64  explicit
65  SteadySolver (sys_type & s) : Parent(s) {}
66 
70  virtual ~SteadySolver ();
71 
76  virtual Real error_order() const { return 0.; }
77 
83  virtual bool element_residual (bool request_jacobian,
84  DiffContext &) libmesh_override;
85 
91  virtual bool side_residual (bool request_jacobian,
92  DiffContext &) libmesh_override;
93 
99  virtual bool nonlocal_residual (bool request_jacobian,
100  DiffContext &) libmesh_override;
101 
107  virtual Real du(const SystemNorm &) const libmesh_override { return 0; }
108 
112  virtual bool is_steady() const libmesh_override { return true; }
113 
114 protected:
115 
120  virtual bool _general_residual (bool request_jacobian,
121  DiffContext &,
122  ResFuncType time_deriv,
123  ResFuncType constraint);
124 };
125 
126 
127 } // namespace libMesh
128 
129 
130 #endif // LIBMESH_STEADY_SOLVER_H
virtual bool side_residual(bool request_jacobian, DiffContext &) libmesh_override
This method uses the DifferentiablePhysics' side_time_derivative() and side_constraint() to build a f...
Definition: steady_solver.C:45
virtual bool nonlocal_residual(bool request_jacobian, DiffContext &) libmesh_override
This method uses the DifferentiablePhysics' nonlocal_time_derivative() and nonlocal_constraint() to b...
Definition: steady_solver.C:56
virtual Real error_order() const
error convergence order against deltat is not applicable to a steady problem.
Definition: steady_solver.h:76
This class provides all data required for a physics package (e.g.
Definition: diff_context.h:54
virtual ~SteadySolver()
Destructor.
Definition: steady_solver.C:28
This is a generic class that defines a solver to handle time integration of DifferentiableSystems.
Definition: time_solver.h:58
DifferentiableSystem sys_type
The type of system.
Definition: steady_solver.h:53
This class defines a norm/seminorm to be applied to a NumericVector which contains coefficients in a ...
Definition: system_norm.h:43
virtual bool is_steady() const libmesh_override
This is a steady-state solver.
The libMesh namespace provides an interface to certain functionality in the library.
This class provides a specific system class.
Definition: diff_system.h:53
SteadySolver(sys_type &s)
Constructor.
Definition: steady_solver.h:65
This class implements a TimeSolver which does a single solve of the steady state problem.
Definition: steady_solver.h:47
bool(DifferentiablePhysics::* ResFuncType)(bool, DiffContext &)
Definitions of argument types for use in refactoring subclasses.
Definition: time_solver.h:270
TimeSolver Parent
The parent class.
Definition: steady_solver.h:58
virtual bool element_residual(bool request_jacobian, DiffContext &) libmesh_override
This method uses the DifferentiablePhysics' element_time_derivative() and element_constraint() to bui...
Definition: steady_solver.C:34
virtual bool _general_residual(bool request_jacobian, DiffContext &, ResFuncType time_deriv, ResFuncType constraint)
This method is the underlying implementation of the public residual methods.
Definition: steady_solver.C:67
virtual Real du(const SystemNorm &) const libmesh_override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real