libMesh
Loading...
Searching...
No Matches
second_order_unsteady_solver.h
Go to the documentation of this file.
1// The libMesh Finite Element Library.
2// Copyright (C) 2002-2026 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
23namespace libMesh
24{
25
26// Forward declarations
27template <typename T> class FunctionBase;
28template <typename T> class VectorValue;
29typedef VectorValue<Number> NumberVectorValue;
31
46{
47public:
52 explicit
54
59
60 virtual unsigned int time_order() const override
61 { return 2; }
62
67 virtual void init () override;
68
74 virtual void init_data () override;
75
80 virtual void reinit () override;
81
86 virtual void retrieve_timestep () override;
87
95 FunctionBase<Gradient> * g = nullptr);
96
101 Number old_solution_rate (const dof_id_type global_dof_number) const;
102
107 Number old_solution_accel (const dof_id_type global_dof_number) const;
108
109protected:
110
114 std::unique_ptr<NumericVector<Number>> _old_local_solution_rate;
115
119 std::unique_ptr<NumericVector<Number>> _old_local_solution_accel;
120};
121
122} // end namespace libMesh
123
124# endif // LIBMESH_SECOND_ORDER_UNSTEADY_SOLVER_H
This class provides a specific system class.
Definition diff_system.h:57
Base class for functors that can be evaluated at a point and (optionally) time.
Generic class from which second order UnsteadySolvers should subclass.
std::unique_ptr< NumericVector< Number > > _old_local_solution_rate
Serial vector of previous time step velocity .
Number old_solution_accel(const dof_id_type global_dof_number) const
virtual void reinit() override
The reinitialization function.
virtual void init_data() override
The data initialization function.
Number old_solution_rate(const dof_id_type global_dof_number) const
virtual unsigned int time_order() const override
virtual void init() override
The initialization function.
std::unique_ptr< NumericVector< Number > > _old_local_solution_accel
Serial vector of previous time step acceleration .
virtual void retrieve_timestep() override
This method retrieves all the stored solutions at the current system.time.
void project_initial_rate(FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr)
Specify non-zero initial velocity.
virtual ~SecondOrderUnsteadySolver()
Destructor.
This is a generic class that defines a solver to handle time integration of DifferentiableSystems.
The libMesh namespace provides an interface to certain functionality in the library.
NumberVectorValue Gradient
uint8_t dof_id_type
Definition id_types.h:67
VectorValue< Number > NumberVectorValue