$extrastylesheet
unsteady_solver.h
Go to the documentation of this file.
00001 // The libMesh Finite Element Library.
00002 // Copyright (C) 2002-2014 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_UNSTEADY_SOLVER_H
00021 #define LIBMESH_UNSTEADY_SOLVER_H
00022 
00023 // Local includes
00024 #include "libmesh/auto_ptr.h"
00025 #include "libmesh/libmesh_common.h"
00026 #include "libmesh/numeric_vector.h"
00027 #include "libmesh/time_solver.h"
00028 
00029 // C++ includes
00030 
00031 namespace libMesh
00032 {
00033 
00048 // ------------------------------------------------------------
00049 // UnsteadySolver class definition
00050 class UnsteadySolver : public TimeSolver
00051 {
00052 public:
00057   explicit
00058   UnsteadySolver (sys_type& s);
00059 
00063   virtual ~UnsteadySolver ();
00064 
00069   virtual void init ();
00070 
00076   virtual void init_data ();
00077 
00082   virtual void reinit ();
00083 
00089   virtual void solve ();
00090 
00097   virtual void advance_timestep ();
00098 
00104   virtual void adjoint_advance_timestep ();
00105 
00110   virtual void retrieve_timestep ();
00111 
00119   virtual Real error_order () const = 0;
00120 
00125   Number old_nonlinear_solution (const dof_id_type global_dof_number) const;
00126 
00130   UniquePtr<NumericVector<Number> > old_local_nonlinear_solution;
00131 
00141   virtual Real du(const SystemNorm& norm) const;
00142 
00146   virtual bool is_steady() const { return false; }
00147 
00148 protected:
00149 
00154   bool first_solve;
00155 
00160   bool first_adjoint_step;
00161 };
00162 
00163 
00164 
00165 } // namespace libMesh
00166 
00167 
00168 #endif // LIBMESH_UNSTEADY_SOLVER_H