Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fossils
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Boman Romain
fossils
Commits
d332e64c
Commit
d332e64c
authored
2 years ago
by
Boman Romain
Browse files
Options
Downloads
Patches
Plain Diff
add postpro
parent
5c0a0efe
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cxxfem/tests/beam2d.py
+5
-2
5 additions, 2 deletions
cxxfem/tests/beam2d.py
cxxfem/tests/beam3d.py
+4
-1
4 additions, 1 deletion
cxxfem/tests/beam3d.py
fossils.py
+38
-5
38 additions, 5 deletions
fossils.py
with
47 additions
and
8 deletions
cxxfem/tests/beam2d.py
+
5
−
2
View file @
d332e64c
...
...
@@ -96,7 +96,10 @@ if __name__ == "__main__":
post
.
build_views
()
post
.
show_views
(
[
"
stress_tensor
"
,
"
force_vector
"
]
)
post
.
deform
(
5
)
post
.
probe
(
"
force_vector
"
,
1
)
post
.
view
()
post
.
probe
(
"
force_vector
"
,
1
)
args
=
fem
.
parseargs
()
if
not
args
.
nogui
:
post
.
view
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
cxxfem/tests/beam3d.py
+
4
−
1
View file @
d332e64c
...
...
@@ -69,5 +69,8 @@ if __name__ == "__main__":
post
.
set_camera_3D
()
# post.write()
post
.
deform
()
post
.
view
()
args
=
fem
.
parseargs
()
if
not
args
.
nogui
:
post
.
view
()
This diff is collapsed.
Click to expand it.
fossils.py
+
38
−
5
View file @
d332e64c
...
...
@@ -110,6 +110,7 @@ if __name__ == "__main__":
# ask for a file if not given
if
not
args
.
file
:
# QApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
app
=
QApplication
(
sys
.
argv
)
app
.
setOrganizationName
(
"
ULiege
"
)
app
.
setApplicationName
(
"
fossils
"
)
...
...
@@ -125,7 +126,7 @@ if __name__ == "__main__":
testname
=
os
.
path
.
abspath
(
args
.
file
)
print
(
f
'
action=
{
action
}
'
)
if
action
==
'
run
'
:
if
action
==
'
run
'
or
action
==
'
post
'
:
testname
=
os
.
path
.
normcase
(
testname
)
# F:/ => f:/ on Windows
print
(
f
'
testname =
{
testname
}
'
)
...
...
@@ -135,13 +136,45 @@ if __name__ == "__main__":
resdir
,
ext
=
os
.
path
.
splitext
(
resdir
)
wdir
=
os
.
path
.
join
(
'
workspace
'
,
resdir
)
print
(
'
workspace=
'
,
wdir
)
if
not
os
.
path
.
isdir
(
wdir
):
os
.
makedirs
(
wdir
)
os
.
chdir
(
wdir
)
tee
=
cxxfem
.
Tee
(
'
stdout.txt
'
)
# split streams
if
ext
==
'
.py
'
:
# run python script
__file__
=
testname
exec
(
open
(
testname
,
encoding
=
'
utf-8
'
).
read
())
if
action
==
'
run
'
:
if
ext
==
'
.py
'
:
# run python script
__file__
=
testname
exec
(
open
(
testname
,
encoding
=
'
utf-8
'
).
read
())
elif
action
==
'
post
'
:
import
gmsh
gmsh
.
initialize
()
# gmsh.merge('mesh.msh')
# print('loading options...')
# gmsh.merge('mesh.opt')
gmsh
.
option
.
setNumber
(
"
General.Verbosity
"
,
3
)
views
=
[]
with
open
(
'
mesh.opt
'
)
as
f
:
import
re
viewregex
=
re
.
compile
(
'
View\[(.+)\].FileName =
"
(.+)
"
;
'
)
for
l
in
f
.
readlines
():
match
=
viewregex
.
search
(
l
)
if
match
:
g
=
match
.
groups
()
views
.
append
(
g
)
for
v
in
views
:
print
(
f
'
loading
"
{
v
[
1
]
}
"'
)
gmsh
.
merge
(
v
[
1
])
# gmsh.view.combine("elements",
# "all",
# True,
# True)
print
(
'
loading options...
'
)
gmsh
.
merge
(
'
mesh.opt
'
)
print
(
'
please wait...
'
)
# for f in os.listdir():
# print(f)
gmsh
.
fltk
.
run
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment