Commit d92b68db authored by Michele Compostella's avatar Michele Compostella

Fixed FaVAD for the new output names in kdtree

parent 9d31eab1
......@@ -318,7 +318,7 @@ subprocess.call(cmd,shell=True)
cmd = '(echo "\''+str(param['KDTREE_PAR'])+'\'") | '+str(param['KDTREE_PATH'])
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'])
subprocess.call(cmd,shell=True)
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'])
subprocess.call(cmd,shell=True)
# 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)
cmd = 'mv ./fort.60 '+str(param['OUTPUT_PATH'])
cmd = 'mv ./sample_points_in_voids.dat '+str(param['OUTPUT_PATH'])
subprocess.call(cmd,shell=True)
print()
print("Results are stored in "+str(param['OUTPUT_PATH'])+"fort.52")
print(" and "+str(param['OUTPUT_PATH'])+"fort.60")
print("Results are stored in "+str(param['OUTPUT_PATH'])+"fort.*")
print(" and "+str(param['OUTPUT_PATH'])+"sample_points_in_voids.dat")
print()
......@@ -345,7 +345,7 @@ print()
print("Creating mesh for the NN distance")
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
# Reading kdtree parameters
......@@ -370,8 +370,8 @@ with open(param['KDTREE_PAR'],'r') as parameter:
ystepi = int(p[1])
zstepi = int(p[2])
# Reading fort.60 file
near_d= str(param['OUTPUT_PATH'])+'/fort.60'
# Reading sample_points_in_voids.dat file
near_d= str(param['OUTPUT_PATH'])+'/sample_points_in_voids.dat'
with open(near_d, 'r') as data:
ind = []
x = []
......
Markdown is supported
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