Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F79891354
patch_test_linear_elastic_explicit.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Aug 28, 20:09
Size
1 KB
Mime Type
text/x-python
Expires
Fri, Aug 30, 20:09 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20146820
Attached To
rAKA akantu
patch_test_linear_elastic_explicit.py
View Options
#!/usr/bin/env python3
# ------------------------------------------------------------------------------
__author__
=
"Guillaume Anciaux"
__copyright__
=
"Copyright (C) 2016-2018, EPFL (Ecole Polytechnique Fédérale"
\
" de Lausanne) Laboratory (LSMS - Laboratoire de Simulation"
\
" en Mécanique des Solides)"
__credits__
=
[
"Guillaume Anciaux"
]
__license__
=
"L-GPLv3"
__maintainer__
=
"Guillaume Anciaux"
__email__
=
"guillaume.anciaux@epfl.ch"
# ------------------------------------------------------------------------------
from
patch_test_linear_solid_mechanics_fixture
import
TestPatchTestSMMLinear
import
akantu
def
foo
(
self
):
filename
=
"material_check_stress_plane_stress.dat"
if
self
.
plane_strain
:
filename
=
"material_check_stress_plane_strain.dat"
self
.
initModel
(
akantu
.
SolidMechanicsModelOptions
(
akantu
.
_explicit_lumped_mass
),
filename
)
coordinates
=
self
.
mesh
.
getNodes
()
displacement
=
self
.
model
.
getDisplacement
()
# set the position of all nodes to the static solution
self
.
setLinearDOF
(
displacement
,
coordinates
)
for
s
in
range
(
0
,
100
):
self
.
model
.
solveStep
()
ekin
=
self
.
model
.
getEnergy
(
"kinetic"
)
self
.
assertAlmostEqual
(
0
,
ekin
,
delta
=
1e-16
)
self
.
checkAll
()
TestPatchTestSMMLinear
.
TYPED_TEST
(
foo
,
"Explicit"
)
Event Timeline
Log In to Comment