continuation_system.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_CONTINUATION_SYSTEM_H
21 #define LIBMESH_CONTINUATION_SYSTEM_H
22 
23 // Local Includes
24 #include "libmesh/fem_system.h"
25 
26 // C++ includes
27 
28 namespace libMesh
29 {
30 
31 // Forward Declarations
32 template <typename T> class LinearSolver;
33 class NewtonSolver;
34 
56 {
57 public:
63  const std::string & name,
64  const unsigned int number);
65 
69  virtual ~ContinuationSystem ();
70 
75 
79  typedef FEMSystem Parent;
80 
85  virtual void clear () override;
86 
90  virtual void solve () override;
91 
98  void continuation_solve();
99 
104  void advance_arcstep();
105 
116 
121  bool quiet;
122 
128  void set_max_arclength_stepsize(Real maxds) { ds=maxds; ds_current=maxds; }
129 
135 
141 
148 
156  void save_current_solution();
157 
162 
168 
175 
182 
189 
195  //Real tau;
196 
202  unsigned int n_backtrack_steps;
203 
210 
215 
221  enum Predictor {
226 
231 
236  };
237 
239 
248 
257 
258 protected:
263  virtual void init_data () override;
264 
288 
290 
291 
292 
293 private:
300  void initialize_tangent();
301 
305  void solve_tangent();
306 
312  void update_solution();
313 
317  void set_Theta();
318 
323  void set_Theta_LOCA();
324 
329  void apply_predictor();
330 
339 
344 
349 
354 
360 
365 
371 
377  std::unique_ptr<LinearSolver<Number>> linear_solver;
378 
383 
390 
397 
404 
410 
415 
420 
424  unsigned int newton_step;
425 };
426 
427 } // namespace libMesh
428 
429 #endif // LIBMESH_CONTINUATION_SYSTEM_H
Manages multiples systems of equations.
void set_max_arclength_stepsize(Real maxds)
NumericVector< Number > * previous_u
virtual void clear() override
std::unique_ptr< LinearSolver< Number > > linear_solver
NumericVector< Number > * previous_du_ds
NumericVector< Number > * delta_u
NumericVector< Number > * du_ds
unsigned int number() const
Definition: system.h:2025
NumericVector< Number > * z
NumericVector< Number > * y_old
NumericVector< Number > * y
virtual void solve() override
ContinuationSystem(EquationSystems &es, const std::string &name, const unsigned int number)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const std::string & name() const
Definition: system.h:2017
virtual void init_data() override