Commit fa44717b authored by William F Godoy's avatar William F Godoy
Browse files

Fixing bugs

parent 95c3673e
...@@ -221,17 +221,21 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame ...@@ -221,17 +221,21 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
# caseID # caseID
caseID = helper_get_relative_path(outputDir) caseID = helper_get_relative_path(outputDir)
for plotFileDir in plotFileDirs for (plotIndex,plotFileDir) in enumerate(plotFileDirs)
# Xd # Xd
push!( Xd, counter*ncells) push!( Xd, counter*ncells)
# Yd timesteps # Yd timesteps cumulative
_push_datasize!(plotFileDir, Yd_Timesteps) if plotIndex == 1
push!(Yd_Timesteps, helper_get_directory_size(directory) )
else
push!(Yd_Timesteps, last(Yd_Timesteps) + helper_get_directory_size(directory) )
end
levelDirs = helper_get_prefix_directories(string(plotFileDir,"/Level_")) levelDirs = helper_get_prefix_directories(string(plotFileDir,"/Level_"))
currentLevels = helper_get_relative_path.(levelDirs) currentLevels = helper_get_relative_path.(levelDirs)
println("Current levels: ", currentLevels) #println("Current levels: ", currentLevels)
# Levels # Levels
for (levelKey,levelSizeValues) in Yd_Levels for (levelKey,levelSizeValues) in Yd_Levels
...@@ -240,7 +244,12 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame ...@@ -240,7 +244,12 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
foundArray = findall( x -> x == levelKey, currentLevels) foundArray = findall( x -> x == levelKey, currentLevels)
if size(foundArray,1) == 1 if size(foundArray,1) == 1
_push_datasize!(levelDir, Yd_Levels[levelKey]) # bug _push_datasize!(levelDir, Yd_Levels[levelKey])
if plotIndex == 1
push!( Yd_Levels[levelKey], helper_get_directory_size(levelDir) )
else
push!( Yd_Levels[levelKey], last(Yd_Levels[levelKey]) + helper_get_directory_size(levelDir) )
end
else else
push!(Yd_Levels[levelKey],0) push!(Yd_Levels[levelKey],0)
end end
...@@ -259,6 +268,14 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame ...@@ -259,6 +268,14 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
if isfile( checkFileName ) if isfile( checkFileName )
rankFileSize = filesize(checkFileName) rankFileSize = filesize(checkFileName)
push!(Yd_Ranks[rankKey], rankFileSize) push!(Yd_Ranks[rankKey], rankFileSize)
if plotIndex == 1
push!(Yd_Ranks[rankKey], rankFileSize)
# push!( Yd_Levels[levelKey], helper_get_directory_size(levelDir) )
else
push!( Yd_Ranks[rankKey], last(Yd_Ranks[rankKey]) + rankFileSize )
end
else else
push!(Yd_Ranks[rankKey],0) push!(Yd_Ranks[rankKey],0)
end end
...@@ -292,7 +309,7 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame ...@@ -292,7 +309,7 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
df[!,"caseID"] = caseIDs df[!,"caseID"] = caseIDs
df[!,"caseDir"] = caseDirs df[!,"caseDir"] = caseDirs
println(df) #println(df)
CSV.write("plot_size.csv", df, header=true) CSV.write("plot_size.csv", df, header=true)
#display(Plots.scatter(Xd, Yd)) #display(Plots.scatter(Xd, Yd))
......
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