second_order_unsteady_solver.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 #ifndef LIBMESH_SECOND_ORDER_UNSTEADY_SOLVER_H
19 #define LIBMESH_SECOND_ORDER_UNSTEADY_SOLVER_H
20 
22 
23 namespace libMesh
24 {
39 {
40 public:
45  explicit
47 
51  virtual ~SecondOrderUnsteadySolver ();
52 
53  virtual unsigned int time_order() const override
54  { return 2; }
55 
60  virtual void init () override;
61 
67  virtual void init_data () override;
68 
73  virtual void reinit () override;
74 
79  virtual void retrieve_timestep () override;
80 
88  FunctionBase<Gradient> * g = nullptr);
89 
94  Number old_solution_rate (const dof_id_type global_dof_number) const;
95 
100  Number old_solution_accel (const dof_id_type global_dof_number) const;
101 
102 protected:
103 
107  std::unique_ptr<NumericVector<Number>> _old_local_solution_rate;
108 
112  std::unique_ptr<NumericVector<Number>> _old_local_solution_accel;
113 };
114 
115 } // end namespace libMesh
116 
117 # endif // LIBMESH_SECOND_ORDER_UNSTEADY_SOLVER_H
Number old_solution_accel(const dof_id_type global_dof_number) const
std::unique_ptr< NumericVector< Number > > _old_local_solution_accel
Number old_solution_rate(const dof_id_type global_dof_number) const
virtual unsigned int time_order() const override
void project_initial_rate(FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr)
std::unique_ptr< NumericVector< Number > > _old_local_solution_rate
uint8_t dof_id_type
Definition: id_types.h:64