libMesh
Loading...
Searching...
No Matches
examples
fem_system
fem_system_ex2
solid_system.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
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
28
using namespace
libMesh
;
29
30
class
SolidSystem
:
public
FEMSystem
31
{
32
public
:
33
// Constructor
34
SolidSystem
(
EquationSystems
& es,
35
const
std::string &
name
,
36
const
unsigned
int
number
);
37
38
// System initialization
39
virtual
void
init_data
();
40
41
// Context initialization
42
virtual
void
init_context
(
DiffContext
& context);
43
44
// Element residual and jacobian calculations
45
virtual
bool
element_time_derivative
(
bool
request_jacobian,
46
DiffContext
& context);
47
48
// Contributions for adding boundary conditions
49
virtual
bool
side_time_derivative
(
bool
request_jacobian,
50
DiffContext
& context);
51
52
virtual
bool
eulerian_residual
(
bool
,
DiffContext
&)
53
{
54
return
false
;
55
}
56
57
// Simulation parameters
58
GetPot
args
;
59
60
// Custom Identifier
61
virtual
std::string
system_type
()
const
62
{
63
return
"Solid"
;
64
}
65
66
// override method to update mesh also
67
virtual
void
update
();
68
69
// save the undeformed mesh to an auxiliary system
70
void
save_initial_mesh
();
71
72
// variable numbers of primary variables in the current system
73
unsigned
int
var
[3];
74
75
// variable numbers of primary variables in auxiliary system (for accessing the
76
// undeformed configuration)
77
unsigned
int
undefo_var
[3];
78
};
79
80
#endif
/* SOLID_SYSTEM_H_ */
SolidSystem
Definition
solid_system.h:31
SolidSystem::system_type
virtual std::string system_type() const
Definition
solid_system.h:61
SolidSystem::save_initial_mesh
void save_initial_mesh()
Definition
solid_system.C:58
SolidSystem::args
GetPot args
Definition
solid_system.h:58
SolidSystem::init_context
virtual void init_context(DiffContext &context)
Definition
solid_system.C:146
SolidSystem::eulerian_residual
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:52
SolidSystem::update
virtual void update()
Update the local values to reflect the solution on neighboring processors.
Definition
solid_system.C:140
SolidSystem::side_time_derivative
virtual bool side_time_derivative(bool request_jacobian, DiffContext &context)
Adds the time derivative contribution on side of elem to elem_residual.
Definition
solid_system.C:274
SolidSystem::element_time_derivative
virtual bool element_time_derivative(bool request_jacobian, DiffContext &context)
Compute contribution from internal forces in elem_residual and contribution from linearized internal ...
Definition
solid_system.C:171
SolidSystem::undefo_var
unsigned int undefo_var[3]
Definition
solid_system.h:77
SolidSystem::var
unsigned int var[3]
Definition
solid_system.h:73
SolidSystem::init_data
virtual void init_data()
Initializes the member data fields associated with the system, so that, e.g., assemble() may be used.
Definition
solid_system.C:76
libMesh::DiffContext
This class provides all data required for a physics package (e.g.
Definition
diff_context.h:56
libMesh::EquationSystems
This is the EquationSystems class.
Definition
equation_systems.h:72
libMesh::FEMSystem
This class provides a specific system class.
Definition
fem_system.h:55
libMesh::System::name
const std::string & name() const
Definition
system.h:2385
libMesh::System::number
unsigned int number() const
Definition
system.h:2393
libMesh
The libMesh namespace provides an interface to certain functionality in the library.
Generated on Mon Aug 24 2026 19:00:32 for libMesh by
1.9.8