Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91088834
test_multiple_init.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
Thu, Nov 7, 19:00
Size
1 KB
Mime Type
text/x-python
Expires
Sat, Nov 9, 19:00 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22044681
Attached To
rAKA akantu
test_multiple_init.py
View Options
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# ===============================================================================
# @file test_multiple_init.py
#
# @author Fabian Barras <fabian.barras@epfl.ch>
#
# @date creation: Tue Jan 5 2016
#
# @brief Testing multiple initialize calls through Python
#
# @section LICENSE
#
# Copyright (©) 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
# Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
#
# Akantu is free software: you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# Akantu is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Akantu. If not, see <http://www.gnu.org/licenses/>.
#
# ===============================================================================
import
sys
import
os
sys
.
path
.
append
(
sys
.
argv
[
1
]
+
'/python/'
)
import
akantu
as
aka
os
.
system
(
'gmsh -order 2 -2 -o mesh_dcb_2d.msh mesh_dcb_2d.geo'
)
print
'First initialisation'
aka
.
initialize
(
'input_test.dat'
)
mesh
=
aka
.
Mesh
(
2
)
mesh
.
read
(
'mesh_dcb_2d.msh'
)
model
=
aka
.
SolidMechanicsModelCohesive
(
mesh
)
model
.
initFull
(
aka
.
SolidMechanicsModelCohesiveOptions
(
aka
.
_static
))
del
model
del
mesh
aka
.
finalize
()
print
'Second initialisation'
aka
.
initialize
(
'input_test.dat'
)
mesh
=
aka
.
Mesh
(
2
)
mesh
.
read
(
'mesh_dcb_2d.msh'
)
model
=
aka
.
SolidMechanicsModelCohesive
(
mesh
)
model
.
initFull
(
aka
.
SolidMechanicsModelCohesiveOptions
(
aka
.
_static
))
del
model
del
mesh
aka
.
finalize
()
print
'All right'
Event Timeline
Log In to Comment