libMesh
second_order_unsteady_solver.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2019 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 
21 #include "libmesh/unsteady_solver.h"
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
libMesh::dof_id_type
uint8_t dof_id_type
Definition: id_types.h:67
libMesh::Number
Real Number
Definition: libmesh_common.h:195
libMesh::FunctionBase< Number >
libMesh::SecondOrderUnsteadySolver::~SecondOrderUnsteadySolver
virtual ~SecondOrderUnsteadySolver()
Destructor.
Definition: second_order_unsteady_solver.C:31
libMesh
The libMesh namespace provides an interface to certain functionality in the library.
Definition: factoryfunction.C:55
libMesh::SecondOrderUnsteadySolver::_old_local_solution_rate
std::unique_ptr< NumericVector< Number > > _old_local_solution_rate
Serial vector of previous time step velocity .
Definition: second_order_unsteady_solver.h:107
libMesh::DifferentiableSystem
This class provides a specific system class.
Definition: diff_system.h:53
libMesh::SecondOrderUnsteadySolver::SecondOrderUnsteadySolver
SecondOrderUnsteadySolver(sys_type &s)
Constructor.
Definition: second_order_unsteady_solver.C:25
libMesh::SecondOrderUnsteadySolver::old_solution_accel
Number old_solution_accel(const dof_id_type global_dof_number) const
Definition: second_order_unsteady_solver.C:116
libMesh::SecondOrderUnsteadySolver::project_initial_rate
void project_initial_rate(FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr)
Specify non-zero initial velocity.
Definition: second_order_unsteady_solver.C:98
libMesh::UnsteadySolver
This is a generic class that defines a solver to handle time integration of DifferentiableSystems.
Definition: unsteady_solver.h:48
libMesh::SecondOrderUnsteadySolver::init_data
virtual void init_data() override
The data initialization function.
Definition: second_order_unsteady_solver.C:42
libMesh::SecondOrderUnsteadySolver::retrieve_timestep
virtual void retrieve_timestep() override
This method retrieves all the stored solutions at the current system.time.
Definition: second_order_unsteady_solver.C:93
libMesh::SecondOrderUnsteadySolver::init
virtual void init() override
The initialization function.
Definition: second_order_unsteady_solver.C:34
libMesh::SecondOrderUnsteadySolver
Generic class from which second order UnsteadySolvers should subclass.
Definition: second_order_unsteady_solver.h:38
libMesh::SecondOrderUnsteadySolver::old_solution_rate
Number old_solution_rate(const dof_id_type global_dof_number) const
Definition: second_order_unsteady_solver.C:107
libMesh::SecondOrderUnsteadySolver::reinit
virtual void reinit() override
The reinitialization function.
Definition: second_order_unsteady_solver.C:60
libMesh::SecondOrderUnsteadySolver::_old_local_solution_accel
std::unique_ptr< NumericVector< Number > > _old_local_solution_accel
Serial vector of previous time step acceleration .
Definition: second_order_unsteady_solver.h:112
libMesh::SecondOrderUnsteadySolver::time_order
virtual unsigned int time_order() const override
Definition: second_order_unsteady_solver.h:53