time_solver.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2014 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_TIME_SOLVER_H
21 #define LIBMESH_TIME_SOLVER_H
22 
23 // Local includes
24 #include "libmesh/auto_ptr.h"
25 #include "libmesh/libmesh_common.h"
26 #include "libmesh/linear_solver.h"
27 #include "libmesh/numeric_vector.h"
30 
31 // C++ includes
32 
33 namespace libMesh
34 {
35 
36 // Forward Declarations
37 class DiffContext;
38 class DiffSolver;
39 class DifferentiableSystem;
40 class ParameterVector;
41 class SystemNorm;
42 class TimeSolver;
43 
58 // ------------------------------------------------------------
59 // Solver class definition
60 class TimeSolver : public ReferenceCountedObject<TimeSolver>
61 {
62 public:
67 
72  explicit
73  TimeSolver (sys_type& s);
74 
78  virtual ~TimeSolver ();
79 
84  virtual void init ();
85 
91  virtual void init_data ();
92 
97  virtual void reinit ();
98 
105  virtual void solve ();
106 
113  virtual void advance_timestep ();
114 
120  virtual void adjoint_advance_timestep ();
121 
126  virtual void retrieve_timestep();
127 
135  virtual bool element_residual (bool request_jacobian,
136  DiffContext &) = 0;
137 
145  virtual bool side_residual (bool request_jacobian,
146  DiffContext &) = 0;
147 
152  virtual void before_timestep () {}
153 
157  const sys_type & system () const { return _system; }
158 
162  sys_type & system () { return _system; }
163 
168 
173 
177  bool quiet;
178 
188  virtual Real du(const SystemNorm& norm) const = 0;
189 
193  virtual bool is_steady() const = 0;
194 
206 
211  void set_solution_history(const SolutionHistory & _solution_history);
212 
217  bool is_adjoint() const
218  { return _is_adjoint; }
219 
224  void set_is_adjoint(bool _is_adjoint_value)
225  { _is_adjoint = _is_adjoint_value; }
226 
227 protected:
228 
233 
238 
243 
249 
254 
261 
262  private:
263 
269 
270 };
271 
272 
273 } // namespace libMesh
274 
275 
276 #endif // LIBMESH_TIME_SOLVER_H

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:07 UTC

Hosted By:
SourceForge.net Logo