libMesh
newmark_system.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2017 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 
60  const std::string & name,
61  const unsigned int number);
62 
66  ~NewmarkSystem ();
67 
72 
77  virtual void clear () libmesh_override;
78 
83  virtual void reinit () libmesh_override;
84 
89  virtual void assemble () libmesh_override;
90 
95  virtual std::string system_type () const libmesh_override { return "Newmark"; }
96 
97 
98  //---------------------------------------------------------
99  // These members are specific to the Newmark system
100  //
101 
105  void initial_conditions ();
106 
111  void compute_matrix ();
112 
116  void update_rhs ();
117 
121  void update_u_v_a ();
122 
128  void set_newmark_parameters (const Real delta_T = _default_timestep,
129  const Real alpha = _default_alpha,
130  const Real delta = _default_delta);
131 
132 private:
133 
145 
150 
154  static const Real _default_alpha;
155 
159  static const Real _default_delta;
160 
164  static const Real _default_timestep;
165 };
166 
167 } // namespace libMesh
168 
169 #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...
~NewmarkSystem()
Destructor.
virtual std::string system_type() const libmesh_override
virtual void clear() libmesh_override
Clear all the data structures associated with the system.
This class provides a specific system class.
bool _finished_assemble
true if the matrix assembly is finished.
NewmarkSystem sys_type
The type of system.
The libMesh namespace provides an interface to certain functionality in the library.
const std::string & name() const
Definition: system.h:1998
void update_rhs()
Update the rhs.
Real _a_0
Constants used for the time integration.
static const Real _default_delta
Default Newmark delta.
void initial_conditions()
Apply initial conditions.
virtual void reinit() libmesh_override
Reinitializes the member data fields associated with the system, so that, e.g., assemble() may be use...
void update_u_v_a()
Update displacement, velocity and acceleration.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned int number() const
Definition: system.h:2006
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.
virtual void assemble() libmesh_override
Assemble the linear system.