unsteady_solver.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2018 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_UNSTEADY_SOLVER_H
21 #define LIBMESH_UNSTEADY_SOLVER_H
22 
23 // Local includes
24 #include "libmesh/auto_ptr.h" // deprecated
25 #include "libmesh/libmesh_common.h"
26 #include "libmesh/numeric_vector.h"
27 #include "libmesh/time_solver.h"
28 
29 // C++ includes
30 #include <memory>
31 
32 namespace libMesh
33 {
34 
49 class UnsteadySolver : public TimeSolver
50 {
51 public:
56  explicit
58 
62  virtual ~UnsteadySolver ();
63 
68  virtual void init () override;
69 
75  virtual void init_data () override;
76 
81  virtual void reinit () override;
82 
88  virtual void solve () override;
89 
96  virtual void advance_timestep () override;
97 
103  virtual void adjoint_advance_timestep () override;
104 
109  virtual void retrieve_timestep () override;
110 
118  virtual Real error_order () const = 0;
119 
127  virtual unsigned int time_order () const = 0;
128 
133  Number old_nonlinear_solution (const dof_id_type global_dof_number) const;
134 
138  std::unique_ptr<NumericVector<Number>> old_local_nonlinear_solution;
139 
149  virtual Real du(const SystemNorm & norm) const override;
150 
154  virtual bool is_steady() const override { return false; }
155 
156 protected:
157 
163 
169 };
170 
171 
172 
173 } // namespace libMesh
174 
175 
176 #endif // LIBMESH_UNSTEADY_SOLVER_H
virtual void reinit() override
std::unique_ptr< NumericVector< Number > > old_local_nonlinear_solution
virtual bool is_steady() const override
virtual void init_data() override
Number old_nonlinear_solution(const dof_id_type global_dof_number) const
virtual Real error_order() const =0
virtual void adjoint_advance_timestep() override
virtual unsigned int time_order() const =0
virtual void retrieve_timestep() override
virtual void solve() override
virtual void advance_timestep() override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real du(const SystemNorm &norm) const override
virtual void init() override
uint8_t dof_id_type
Definition: id_types.h:64