continuation_system.h
Go to the documentation of this file.00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2012 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner 00003 00004 // This library is free software; you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public 00006 // License as published by the Free Software Foundation; either 00007 // version 2.1 of the License, or (at your option) any later version. 00008 00009 // This library is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 // Lesser General Public License for more details. 00013 00014 // You should have received a copy of the GNU Lesser General Public 00015 // License along with this library; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 00019 00020 #ifndef LIBMESH_CONTINUATION_SYSTEM_H 00021 #define LIBMESH_CONTINUATION_SYSTEM_H 00022 00023 // Local Includes 00024 #include "libmesh/fem_system.h" 00025 00026 // C++ includes 00027 00028 namespace libMesh 00029 { 00030 00031 // Forward Declarations 00032 template <typename T> class LinearSolver; 00033 class NewtonSolver; 00034 00035 00036 00037 00038 00057 class ContinuationSystem : public FEMSystem 00058 { 00059 public: 00064 ContinuationSystem (EquationSystems& es, 00065 const std::string& name, 00066 const unsigned int number); 00067 00071 virtual ~ContinuationSystem (); 00072 00076 typedef ContinuationSystem sys_type; 00077 00081 typedef FEMSystem Parent; 00082 00087 virtual void clear (); 00088 00092 virtual void solve(); 00093 00100 void continuation_solve(); 00101 00106 void advance_arcstep(); 00107 00117 Real* continuation_parameter; 00118 00123 bool quiet; 00124 00130 void set_max_arclength_stepsize(Real maxds) { ds=maxds; ds_current=maxds; } 00131 00136 Real continuation_parameter_tolerance; 00137 00142 Real solution_tolerance; 00143 00149 Real initial_newton_tolerance; 00150 00158 void save_current_solution(); 00159 00163 Real old_continuation_parameter; 00164 00169 Real min_continuation_parameter; 00170 00176 Real max_continuation_parameter; 00177 00183 Real Theta; 00184 00190 Real Theta_LOCA; 00191 00197 //Real tau; 00198 00204 unsigned int n_backtrack_steps; 00205 00211 unsigned int n_arclength_reductions; 00212 00216 Real ds_min; 00217 00223 enum Predictor { 00227 Euler, 00228 00232 AB2, 00233 00237 Invalid_Predictor 00238 }; 00239 00240 Predictor predictor; 00241 00249 Real newton_stepgrowth_aggressiveness; 00250 00258 bool newton_progress_check; 00259 00260 protected: 00265 virtual void init_data (); 00266 00288 enum RHS_Mode {Residual, 00289 G_Lambda}; 00290 00291 RHS_Mode rhs_mode; 00292 00293 00294 00295 private: 00302 void initialize_tangent(); 00303 00307 void solve_tangent(); 00308 00314 void update_solution(); 00315 00319 void set_Theta(); 00320 00325 void set_Theta_LOCA(); 00326 00331 void apply_predictor(); 00332 00340 NumericVector<Number>* du_ds; 00341 00345 NumericVector<Number>* previous_du_ds; 00346 00350 NumericVector<Number>* previous_u; 00351 00355 NumericVector<Number>* y; 00356 00361 NumericVector<Number>* y_old; 00362 00366 NumericVector<Number>* z; 00367 00372 NumericVector<Number>* delta_u; 00373 00379 AutoPtr<LinearSolver<Number> > linear_solver; 00380 00384 bool tangent_initialized; 00385 00391 NewtonSolver* newton_solver; 00392 00398 Real dlambda_ds; 00399 00405 Real ds; 00406 00411 Real ds_current; 00412 00416 Real previous_dlambda_ds; 00417 00421 Real previous_ds; 00422 00426 unsigned int newton_step; 00427 }; 00428 00429 } // namespace libMesh 00430 00431 #endif // LIBMESH_CONTINUATION_SYSTEM_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:46 UTC
Hosted By: