libMesh
solid_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 // \author Robert Weidlich
21 // \date Copyright 2012
22 
23 #ifndef SOLID_SYSTEM_H_
24 #define SOLID_SYSTEM_H_
25 
26 #include "libmesh/fem_system.h"
27 #include "libmesh/auto_ptr.h"
28 
29 using namespace libMesh;
30 
31 class SolidSystem: public FEMSystem
32 {
33 public:
34  // Constructor
36  const std::string & name,
37  const unsigned int number);
38 
39  // System initialization
40  virtual void init_data();
41 
42  // Context initialization
43  virtual void init_context(DiffContext & context);
44 
45  // Element residual and jacobian calculations
46  virtual bool element_time_derivative(bool request_jacobian,
47  DiffContext & context);
48 
49  // Contributions for adding boundary conditions
50  virtual bool side_time_derivative(bool request_jacobian,
51  DiffContext & context);
52 
53  virtual bool eulerian_residual(bool, DiffContext &)
54  {
55  return false;
56  }
57 
58  // Simulation parameters
59  GetPot args;
60 
61  // Custom Identifier
62  virtual std::string system_type() const
63  {
64  return "Solid";
65  }
66 
67  // override method to update mesh also
68  virtual void update();
69 
70  // save the undeformed mesh to an auxiliary system
71  void save_initial_mesh();
72 
73  // variable numbers of primary variables in the current system
74  unsigned int var[3];
75 
76  // variable numbers of primary variables in auxiliary system (for accessing the
77  // undeformed configuration)
78  unsigned int undefo_var[3];
79 };
80 
81 #endif /* SOLID_SYSTEM_H_ */
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:39
This is the EquationSystems class.
This class provides all data required for a physics package (e.g.
Definition: diff_context.h:54
The libMesh namespace provides an interface to certain functionality in the library.
This class provides a specific system class.
Definition: fem_system.h:53
GetPot args
Definition: solid_system.h:59
virtual std::string system_type() const
Definition: solid_system.h:62
virtual bool eulerian_residual(bool, DiffContext &)
Adds a pseudo-convection contribution on elem to elem_residual, if the nodes of elem are being transl...
Definition: solid_system.h:53