Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tom Fischer
smallscripts
Commits
a81116d3
Commit
a81116d3
authored
Oct 14, 2022
by
Tom Fischer
Browse files
Improve compareParallelResults.py script
parent
080ab0ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
model_generation/LF_flux_test_models/compareParallelResults.py
View file @
a81116d3
...
...
@@ -4,9 +4,9 @@ import os
import
sys
import
pandas
as
pd
data_path
=
sys
.
argv
[
1
]
meta_data_path
=
data_path
+
'/MetaData'
postprocessed_data_path
=
data_path
+
'/PostprocessedData'
data_
base_
path
=
sys
.
argv
[
1
]
meta_data_path
=
data_
base_
path
+
'/MetaData'
postprocessed_data_path
=
data_
base_
path
+
'/PostprocessedData'
ogs_bin_path
=
'/p/project/ogs6hpc4/w/o/br_petsc/bin'
...
...
@@ -19,19 +19,22 @@ def readExperiments(experiments):
def
reorderToOriginalNodesElementsSequence
(
solver
,
preconditioner
,
juwels_id
):
petsc_key
=
solver
.
strip
().
replace
(
" "
,
"_"
)
+
'_'
+
preconditioner
.
strip
().
replace
(
" "
,
"_"
)
submit_script_name
=
data_path
+
'/'
+
petsc_key
+
'.sh'
submit_script_name
=
data_
base_
path
+
'/'
+
petsc_key
+
'.sh'
for
(
root
,
dirs
,
file
)
in
os
.
walk
(
submit_script_name
):
for
directory
in
dirs
:
pvtu_path
=
submit_script_name
+
'/'
+
str
(
juwels_id
)
+
'/MOD_01_Subsurface3D_IC_ts_853_t_2241684000_000000.pvtu'
vtu_path
=
submit_script_name
+
'/'
+
str
(
juwels_id
)
+
'/MOD_01_Subsurface3D_IC_ts_853_t_2241684000_000000.vtu'
data_path
=
submit_script_name
+
'/'
+
str
(
juwels_id
)
+
'/'
pvtu_path
=
data_path
+
'MOD_01_Subsurface3D_IC_ts_853_t_2241684000_000000.pvtu'
vtu_name
=
'MOD_01_Subsurface3D_IC_ts_853_t_2241684000.000000.vtu'
vtu_path
=
data_path
+
vtu_name
# Check if pvtu file exists
if
(
os
.
path
.
exists
(
pvtu_path
)):
print
(
pvtu_path
)
# Remove the ghost data: pvtu -> vtu
#
os.system(ogs_bin_path/ + '/RemoveGhostData -i ' + pvtu_path + ' -o ' + vtu_path)
os
.
system
(
ogs_bin_path
/
+
'/RemoveGhostData -i '
+
pvtu_path
+
' -o '
+
vtu_path
)
# Identify the subdomain based on original ordered mesh
#
os.system(ogs_bin_path/ + '/identifySubdomains -m ' + vtu_path + ' -f -o x -- ' + vtu_path)
os
.
system
(
ogs_bin_path
/
+
'/identifySubdomains -m '
+
vtu_path
+
' -f -o x -- '
+
vtu_path
)
# Reordering based on bulk ids
os
.
system
(
ogs_bin_path
/
+
'/ReorderNodesElements -i '
+
data_path
+
'/x'
+
vtu_name
+
' -o '
+
data_path
+
vtu_name
)
else
:
print
(
'file '
+
pvtu_path
+
' does not exist'
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment