libMesh
newmark_system.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 
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 () override;
78 
83  virtual void reinit () override;
84 
89  virtual void assemble () override;
90 
95  virtual std::string system_type () const 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
libMesh::NewmarkSystem::_a_3
Real _a_3
Definition: newmark_system.h:140
libMesh::NewmarkSystem::initial_conditions
void initial_conditions()
Apply initial conditions.
Definition: newmark_system.C:154
libMesh::NewmarkSystem::_default_alpha
static const Real _default_alpha
Default Newmark alpha.
Definition: newmark_system.h:154
libMesh::NewmarkSystem::update_u_v_a
void update_u_v_a()
Update displacement, velocity and acceleration.
Definition: newmark_system.C:223
libMesh::NewmarkSystem::_a_4
Real _a_4
Definition: newmark_system.h:141
libMesh::NewmarkSystem
This class contains a specific system class.
Definition: newmark_system.h:51
libMesh
The libMesh namespace provides an interface to certain functionality in the library.
Definition: factoryfunction.C:55
libMesh::NewmarkSystem::set_newmark_parameters
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...
Definition: newmark_system.C:254
libMesh::System::number
unsigned int number() const
Definition: system.h:2075
libMesh::NewmarkSystem::system_type
virtual std::string system_type() const override
Definition: newmark_system.h:95
libMesh::NewmarkSystem::~NewmarkSystem
~NewmarkSystem()
Destructor.
Definition: newmark_system.C:98
libMesh::NewmarkSystem::_a_7
Real _a_7
Definition: newmark_system.h:144
libMesh::NewmarkSystem::_default_timestep
static const Real _default_timestep
Default Newmark time step.
Definition: newmark_system.h:164
libMesh::NewmarkSystem::_a_0
Real _a_0
Constants used for the time integration.
Definition: newmark_system.h:137
libMesh::NewmarkSystem::_a_5
Real _a_5
Definition: newmark_system.h:142
libMesh::NewmarkSystem::compute_matrix
void compute_matrix()
Compute the global matrix by adding up scaled mass damping and stiffness matrix.
Definition: newmark_system.C:171
libMesh::NewmarkSystem::NewmarkSystem
NewmarkSystem(EquationSystems &es, const std::string &name, const unsigned int number)
Constructor.
Definition: newmark_system.C:45
libMesh::NewmarkSystem::reinit
virtual void reinit() override
Reinitializes the member data fields associated with the system, so that, e.g., assemble() may be use...
Definition: newmark_system.C:128
libMesh::NewmarkSystem::_a_2
Real _a_2
Definition: newmark_system.h:139
libMesh::NewmarkSystem::sys_type
NewmarkSystem sys_type
The type of system.
Definition: newmark_system.h:71
libMesh::EquationSystems
This is the EquationSystems class.
Definition: equation_systems.h:74
libMesh::NewmarkSystem::update_rhs
void update_rhs()
Update the rhs.
Definition: newmark_system.C:190
libMesh::NewmarkSystem::clear
virtual void clear() override
Clear all the data structures associated with the system.
Definition: newmark_system.C:105
libMesh::NewmarkSystem::_finished_assemble
bool _finished_assemble
true if the matrix assembly is finished.
Definition: newmark_system.h:149
libMesh::System::name
const std::string & name() const
Definition: system.h:2067
libMesh::NewmarkSystem::assemble
virtual void assemble() override
Assemble the linear system.
Definition: newmark_system.C:135
libMesh::NewmarkSystem::_a_6
Real _a_6
Definition: newmark_system.h:143
libMesh::Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Definition: libmesh_common.h:121
libMesh::LinearImplicitSystem
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and linear solvers ...
Definition: linear_implicit_system.h:55
libMesh::NewmarkSystem::_a_1
Real _a_1
Definition: newmark_system.h:138
libMesh::NewmarkSystem::_default_delta
static const Real _default_delta
Default Newmark delta.
Definition: newmark_system.h:159