transient_system.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_TRANSIENT_SYSTEM_H
21 #define LIBMESH_TRANSIENT_SYSTEM_H
22 
23 // Local Includes
24 #include "libmesh/system.h"
25 
26 // C++ includes
27 
28 
29 namespace libMesh
30 {
31 
32 // Forward declarations
33 class LinearImplicitSystem;
34 class NonlinearImplicitSystem;
35 class ExplicitSystem;
36 
45 // ------------------------------------------------------------
46 // TransientSystem class definition
47 template <class Base>
48 class TransientSystem : public Base
49 {
50 public:
51 
57  const std::string& name,
58  const unsigned int number);
59 
63  virtual ~TransientSystem ();
64 
69 
73  sys_type & system () { return *this; }
74 
79  virtual void clear ();
80 
85  virtual void reinit ();
86 
92  virtual std::string system_type () const;
93 
94 
95  //-----------------------------------------------------------------
96  // access to the solution data fields
97 
102  Number old_solution (const dof_id_type global_dof_number) const;
103 
108  Number older_solution (const dof_id_type global_dof_number) const;
109 
117 
125 
126 
127 protected:
128 
129 
134  virtual void init_data ();
135 
141  virtual void re_update ();
142 };
143 
144 
145 
146 // -----------------------------------------------------------
147 // Useful typedefs
153 
154 
155 
156 // ------------------------------------------------------------
157 // TransientSystem inline methods
158 template <class Base>
159 inline
161 {
162  std::string type = "Transient";
163  type += Base::system_type ();
164 
165  return type;
166 }
167 
168 
169 
170 } // namespace libMesh
171 
172 
173 
174 
175 #endif // LIBMESH_TRANSIENT_SYSTEM_H

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

Hosted By:
SourceForge.net Logo