libMesh
steady_solver.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2024 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
66 
70  virtual ~SteadySolver ();
71 
76  virtual Real error_order() const { return 0.; }
77 
83  virtual bool element_residual (bool request_jacobian,
84  DiffContext &) override;
85 
91  virtual bool side_residual (bool request_jacobian,
92  DiffContext &) override;
93 
99  virtual bool nonlocal_residual (bool request_jacobian,
100  DiffContext &) override;
101 
107  virtual Real du(const SystemNorm &) const override { return 0; }
108 
112  virtual bool is_steady() const override { return true; }
113 
117  virtual void integrate_qoi_timestep() override;
118 
123  virtual void integrate_adjoint_sensitivity(const QoISet & qois, const ParameterVector & parameter_vector, SensitivityData & sensitivities) override;
124 
125 #ifdef LIBMESH_ENABLE_AMR
126 
133  virtual void integrate_adjoint_refinement_error_estimate(AdjointRefinementEstimator & adjoint_refinement_error_estimator, ErrorVector & QoI_elementwise_error) override;
134 #endif // LIBMESH_ENABLE_AMR
135 
136 protected:
137 
142  virtual bool _general_residual (bool request_jacobian,
143  DiffContext &,
144  ResFuncType time_deriv,
145  ResFuncType constraint);
146 };
147 
148 
149 } // namespace libMesh
150 
151 
152 #endif // LIBMESH_STEADY_SOLVER_H
virtual Real du(const SystemNorm &) const override
This class provides all data required for a physics package (e.g.
Definition: diff_context.h:55
virtual ~SteadySolver()
Destructor.
Data structure for specifying which Parameters should be independent variables in a parameter sensiti...
This is a generic class that defines a solver to handle time integration of DifferentiableSystems.
Definition: time_solver.h:63
This class implements a "brute force" goal-oriented error estimator which computes an estimate of err...
virtual void integrate_qoi_timestep() override
A method to integrate the system::QoI functionals.
Definition: steady_solver.C:96
Data structure for specifying which Quantities of Interest should be calculated in an adjoint or a pa...
Definition: qoi_set.h:45
The ErrorVector is a specialization of the StatisticsVector for error data computed on a finite eleme...
Definition: error_vector.h:50
DifferentiableSystem sys_type
The type of system.
Definition: steady_solver.h:53
virtual void integrate_adjoint_refinement_error_estimate(AdjointRefinementEstimator &adjoint_refinement_error_estimator, ErrorVector &QoI_elementwise_error) override
A method to compute the adjoint refinement error estimate at the current timestep.
This class defines a norm/seminorm to be applied to a NumericVector which contains coefficients in a ...
Definition: system_norm.h:45
The libMesh namespace provides an interface to certain functionality in the library.
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 a specific system class.
Definition: diff_system.h:54
Data structure for holding completed parameter sensitivity calculations.
SteadySolver(sys_type &s)
Constructor.
Definition: steady_solver.h:65
virtual bool is_steady() const override
This is a steady-state solver.
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:325
TimeSolver Parent
The parent class.
Definition: steady_solver.h:58
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:68
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual bool nonlocal_residual(bool request_jacobian, DiffContext &) override
This method uses the DifferentiablePhysics' nonlocal_time_derivative() and nonlocal_constraint() to b...
Definition: steady_solver.C:57
virtual bool element_residual(bool request_jacobian, DiffContext &) override
This method uses the DifferentiablePhysics' element_time_derivative() and element_constraint() to bui...
Definition: steady_solver.C:35
virtual bool side_residual(bool request_jacobian, DiffContext &) override
This method uses the DifferentiablePhysics' side_time_derivative() and side_constraint() to build a f...
Definition: steady_solver.C:46
virtual void integrate_adjoint_sensitivity(const QoISet &qois, const ParameterVector &parameter_vector, SensitivityData &sensitivities) override
A method to integrate the adjoint sensitivity w.r.t a given parameter vector.