Commit a81116d3 authored by Tom Fischer's avatar Tom Fischer
Browse files

Improve compareParallelResults.py script

parent 080ab0ed
......@@ -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')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment