libMesh
unsteady_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_UNSTEADY_SOLVER_H
21 #define LIBMESH_UNSTEADY_SOLVER_H
22 
23 // Local includes
24 #include "libmesh/auto_ptr.h"
25 #include "libmesh/libmesh_common.h"
26 #include "libmesh/numeric_vector.h"
27 #include "libmesh/time_solver.h"
28 
29 // C++ includes
30 
31 namespace libMesh
32 {
33 
48 class UnsteadySolver : public TimeSolver
49 {
50 public:
55  explicit
57 
61  virtual ~UnsteadySolver ();
62 
67  virtual void init () libmesh_override;
68 
74  virtual void init_data () libmesh_override;
75 
80  virtual void reinit () libmesh_override;
81 
87  virtual void solve () libmesh_override;
88 
95  virtual void advance_timestep () libmesh_override;
96 
102  virtual void adjoint_advance_timestep () libmesh_override;
103 
108  virtual void retrieve_timestep () libmesh_override;
109 
117  virtual Real error_order () const = 0;
118 
126  virtual unsigned int time_order () const = 0;
127 
132  Number old_nonlinear_solution (const dof_id_type global_dof_number) const;
133 
138 
148  virtual Real du(const SystemNorm & norm) const libmesh_override;
149 
153  virtual bool is_steady() const libmesh_override { return false; }
154 
155 protected:
156 
162 
168 };
169 
170 
171 
172 } // namespace libMesh
173 
174 
175 #endif // LIBMESH_UNSTEADY_SOLVER_H
UnsteadySolver(sys_type &s)
Constructor.
This is a generic class that defines a solver to handle time integration of DifferentiableSystems.
Definition: time_solver.h:58
This class defines a norm/seminorm to be applied to a NumericVector which contains coefficients in a ...
Definition: system_norm.h:43
virtual Real error_order() const =0
This method should return the expected convergence order of the (non-local) error of the time discret...
The libMesh namespace provides an interface to certain functionality in the library.
virtual void advance_timestep() libmesh_override
This method advances the solution to the next timestep, after a solve() has been performed.
virtual void retrieve_timestep() libmesh_override
This method retrieves all the stored solutions at the current system.time.
virtual void init() libmesh_override
The initialization function.
std::unique_ptr< T > UniquePtr
Definition: auto_ptr.h:46
This class provides a specific system class.
Definition: diff_system.h:53
Number old_nonlinear_solution(const dof_id_type global_dof_number) const
virtual unsigned int time_order() const =0
virtual ~UnsteadySolver()
Destructor.
virtual void adjoint_advance_timestep() libmesh_override
This method advances the adjoint solution to the previous timestep, after an adjoint_solve() has been...
virtual void reinit() libmesh_override
The reinitialization function.
This is a generic class that defines a solver to handle time integration of DifferentiableSystems.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real du(const SystemNorm &norm) const libmesh_override
Computes the size of ||u^{n+1} - u^{n}|| in some norm.
virtual void init_data() libmesh_override
The data initialization function.
virtual void solve() libmesh_override
This method solves for the solution at the next timestep.
bool first_adjoint_step
A bool that will be true the first time adjoint_advance_timestep() is called, (when the primal soluti...
uint8_t dof_id_type
Definition: id_types.h:64
bool first_solve
A bool that will be true the first time solve() is called, and false thereafter.
virtual bool is_steady() const libmesh_override
This is not a steady-state solver.
UniquePtr< NumericVector< Number > > old_local_nonlinear_solution
Serial vector of _system.get_vector("_old_nonlinear_solution")