Skip to content
Snippets Groups Projects
Commit d92b68db authored by Michele Compostella's avatar Michele Compostella
Browse files

Fixed FaVAD for the new output names in kdtree

parent 9d31eab1
No related branches found
No related tags found
No related merge requests found
...@@ -318,7 +318,7 @@ subprocess.call(cmd,shell=True) ...@@ -318,7 +318,7 @@ subprocess.call(cmd,shell=True)
cmd = '(echo "\''+str(param['KDTREE_PAR'])+'\'") | '+str(param['KDTREE_PATH']) cmd = '(echo "\''+str(param['KDTREE_PAR'])+'\'") | '+str(param['KDTREE_PATH'])
subprocess.call(cmd,shell=True) subprocess.call(cmd,shell=True)
# Running kdtree to produce fort.60 output file # Running kdtree to produce fort.60/sample_points_in_voids.dat output file
cmd = 'sed -ri "1s|^(.{0})(.{4})|'+str(param['KDTREE_THR'])+'|" '+str(param['KDTREE_PAR']) cmd = 'sed -ri "1s|^(.{0})(.{4})|'+str(param['KDTREE_THR'])+'|" '+str(param['KDTREE_PAR'])
subprocess.call(cmd,shell=True) subprocess.call(cmd,shell=True)
cmd = 'sed -ri "8s|^(.{0})(.{7})|1 0 0 0|" '+str(param['KDTREE_PAR']) cmd = 'sed -ri "8s|^(.{0})(.{7})|1 0 0 0|" '+str(param['KDTREE_PAR'])
...@@ -327,14 +327,14 @@ cmd = '(echo "\''+str(param['KDTREE_PAR'])+'\'") | '+str(param['KDTREE_PATH']) ...@@ -327,14 +327,14 @@ cmd = '(echo "\''+str(param['KDTREE_PAR'])+'\'") | '+str(param['KDTREE_PATH'])
subprocess.call(cmd,shell=True) subprocess.call(cmd,shell=True)
# Moving output files to output directory # Moving output files to output directory
cmd = 'mv ./fort.52 '+str(param['OUTPUT_PATH']) cmd = 'mv ./fort.* '+str(param['OUTPUT_PATH'])
subprocess.call(cmd,shell=True) subprocess.call(cmd,shell=True)
cmd = 'mv ./fort.60 '+str(param['OUTPUT_PATH']) cmd = 'mv ./sample_points_in_voids.dat '+str(param['OUTPUT_PATH'])
subprocess.call(cmd,shell=True) subprocess.call(cmd,shell=True)
print() print()
print("Results are stored in "+str(param['OUTPUT_PATH'])+"fort.52") print("Results are stored in "+str(param['OUTPUT_PATH'])+"fort.*")
print(" and "+str(param['OUTPUT_PATH'])+"fort.60") print(" and "+str(param['OUTPUT_PATH'])+"sample_points_in_voids.dat")
print() print()
...@@ -345,7 +345,7 @@ print() ...@@ -345,7 +345,7 @@ print()
print("Creating mesh for the NN distance") print("Creating mesh for the NN distance")
print() print()
# Conversion of fort.60 into grid VTK for visualization # Conversion of sample_points_in_voids.dat into grid VTK for visualization
import tvtk.api as ta import tvtk.api as ta
# Reading kdtree parameters # Reading kdtree parameters
...@@ -370,8 +370,8 @@ with open(param['KDTREE_PAR'],'r') as parameter: ...@@ -370,8 +370,8 @@ with open(param['KDTREE_PAR'],'r') as parameter:
ystepi = int(p[1]) ystepi = int(p[1])
zstepi = int(p[2]) zstepi = int(p[2])
# Reading fort.60 file # Reading sample_points_in_voids.dat file
near_d= str(param['OUTPUT_PATH'])+'/fort.60' near_d= str(param['OUTPUT_PATH'])+'/sample_points_in_voids.dat'
with open(near_d, 'r') as data: with open(near_d, 'r') as data:
ind = [] ind = []
x = [] x = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment