adaptive_time_solver.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_ADAPTIVE_TIME_SOLVER_H 00021 #define LIBMESH_ADAPTIVE_TIME_SOLVER_H 00022 00023 // Local includes 00024 #include "libmesh/system_norm.h" 00025 #include "libmesh/unsteady_solver.h" 00026 00027 // C++ includes 00028 00029 namespace libMesh 00030 { 00031 00032 // Forward declarations 00033 class System; 00034 00049 // ------------------------------------------------------------ 00050 // Solver class definition 00051 class AdaptiveTimeSolver : public UnsteadySolver 00052 { 00053 public: 00057 typedef UnsteadySolver Parent; 00058 00063 explicit 00064 AdaptiveTimeSolver (sys_type& s); 00065 00069 virtual ~AdaptiveTimeSolver (); 00070 00071 virtual void init(); 00072 00073 virtual void reinit(); 00074 00075 virtual void solve() = 0; 00076 00077 virtual void advance_timestep(); 00078 00082 virtual Real error_order () const; 00083 00087 virtual bool element_residual (bool get_jacobian, 00088 DiffContext&); 00089 00093 virtual bool side_residual (bool get_jacobian, 00094 DiffContext&); 00095 00099 virtual AutoPtr<DiffSolver> &diff_solver(); 00100 00104 AutoPtr<UnsteadySolver> core_time_solver; 00105 00109 SystemNorm component_norm; 00110 00117 std::vector<float> component_scale; 00118 00128 Real target_tolerance; 00129 00137 Real upper_tolerance; 00138 00143 Real max_deltat; 00144 00149 Real min_deltat; 00150 00157 Real max_growth; 00158 00173 bool global_tolerance; 00174 00175 protected: 00176 00182 Real last_deltat; 00183 00187 virtual Real calculate_norm(System &, NumericVector<Number> &); 00188 }; 00189 00190 00191 } // namespace libMesh 00192 00193 00194 #endif // LIBMESH_ADAPTIVE_TIME_SOLVER_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:45 UTC
Hosted By: