linear_implicit_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_LINEAR_IMPLICIT_SYSTEM_H
21 #define LIBMESH_LINEAR_IMPLICIT_SYSTEM_H
22 
23 // Local Includes
25 
26 // C++ includes
27 #include <cstddef>
28 
29 namespace libMesh
30 {
31 
32 
33 // Forward Declarations
34 template <typename T> class LinearSolver;
35 template <typename T> class ShellMatrix;
36 
37 
46 // ------------------------------------------------------------
47 // LinearImplicitSystem class definition
48 
50 {
51 public:
52 
58  const std::string& name,
59  const unsigned int number);
60 
64  virtual ~LinearImplicitSystem ();
65 
70 
75 
79  sys_type & system () { return *this; }
80 
85  virtual void clear ();
86 
90  virtual void init_data ();
91 
96  virtual void reinit ();
97 
104  virtual void assemble () { ImplicitSystem::assemble(); }
105 
111  virtual void restrict_solve_to (const SystemSubset* subset,
112  const SubsetSolveMode subset_solve_mode=SUBSET_ZERO);
113 
117  virtual void solve ();
118 
123  virtual LinearSolver<Number> *get_linear_solver() const;
124 
129  virtual void release_linear_solver(LinearSolver<Number> *) const;
130 
135  virtual void assembly(bool get_residual, bool get_jacobian);
136 
141  virtual std::string system_type () const { return "LinearImplicit"; }
142 
150 
155  unsigned int n_linear_iterations() const { return _n_linear_iterations; }
156 
161 
171  void attach_shell_matrix (ShellMatrix<Number>* shell_matrix);
172 
177 
183 
184 protected:
185 
190  unsigned int _n_linear_iterations;
191 
196 
201 
206 
212 };
213 
214 
215 } // namespace libMesh
216 
217 
218 // ------------------------------------------------------------
219 // LinearImplicitSystem inline methods
220 
221 
222 #endif // LIBMESH_LINEAR_IMPLICIT_SYSTEM_H

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

Hosted By:
SourceForge.net Logo