libMesh
newmark_system.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2024 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 
19 
20 #ifndef LIBMESH_NEWMARK_SYSTEM_H
21 #define LIBMESH_NEWMARK_SYSTEM_H
22 
23 // Local Includes
24 #include "libmesh/linear_implicit_system.h"
25 
26 // C++ includes
27 
28 namespace libMesh
29 {
30 
52 {
53 public:
54 
59  const std::string & name,
60  const unsigned int number);
61 
67  NewmarkSystem (const NewmarkSystem &) = delete;
68  NewmarkSystem & operator= (const NewmarkSystem &) = delete;
69  NewmarkSystem (NewmarkSystem &&) = default;
70  NewmarkSystem & operator= (NewmarkSystem &&) = delete;
71  virtual ~NewmarkSystem ();
72 
77 
82  virtual void clear () override;
83 
88  virtual void reinit () override;
89 
94  virtual void assemble () override;
95 
100  virtual std::string system_type () const override { return "Newmark"; }
101 
102 
103  //---------------------------------------------------------
104  // These members are specific to the Newmark system
105  //
106 
110  void initial_conditions ();
111 
116  void compute_matrix ();
117 
121  void update_rhs ();
122 
126  void update_u_v_a ();
127 
133  void set_newmark_parameters (const Real delta_T = _default_timestep,
134  const Real alpha = _default_alpha,
135  const Real delta = _default_delta);
136 
137 private:
138 
150 
155 
159  static const Real _default_alpha;
160 
164  static const Real _default_delta;
165 
169  static const Real _default_timestep;
170 };
171 
172 } // namespace libMesh
173 
174 #endif // LIBMESH_NEWMARK_SYSTEM_H
This is the EquationSystems class.
void set_newmark_parameters(const Real delta_T=_default_timestep, const Real alpha=_default_alpha, const Real delta=_default_delta)
Set the time step size and the newmark parameter alpha and delta and calculate the constant parameter...
virtual std::string system_type() const override
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and linear solvers ...
bool _finished_assemble
true if the matrix assembly is finished.
NewmarkSystem & operator=(const NewmarkSystem &)=delete
NewmarkSystem sys_type
The type of system.
The libMesh namespace provides an interface to certain functionality in the library.
virtual void assemble() override
Assemble the linear system.
virtual void clear() override
Clear all the data structures associated with the system.
void update_rhs()
Update the rhs.
Real _a_0
Constants used for the time integration.
unsigned int number() const
Definition: system.h:2269
virtual void reinit() override
Reinitializes the member data fields associated with the system, so that, e.g., assemble() may be use...
static const Real _default_delta
Default Newmark delta.
void initial_conditions()
Apply initial conditions.
void update_u_v_a()
Update displacement, velocity and acceleration.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const Real _default_timestep
Default Newmark time step.
NewmarkSystem(EquationSystems &es, const std::string &name, const unsigned int number)
Constructor.
void compute_matrix()
Compute the global matrix by adding up scaled mass damping and stiffness matrix.
static const Real _default_alpha
Default Newmark alpha.
This class contains a specific system class.
const std::string & name() const
Definition: system.h:2261