Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Godoy, William
jexio
Commits
053a0bf9
Commit
053a0bf9
authored
Jul 29, 2020
by
William F Godoy
Browse files
Add name for columns
parent
c03dbf3d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/extractor/Amrex.jl
View file @
053a0bf9
...
...
@@ -11,7 +11,7 @@ mutable struct Amrex <: AbstractAmrex
Amrex
(
outputPrefix
::
String
,
runlogFile
::
String
)
=
new
(
"Amrex"
,
outputPrefix
,
[
"max_step"
,
"amr.check_int"
,
"amr.plot_int"
,
"amr.n_cell"
,
"amr.max_level"
],
[
"max_step"
,
"amr.check_int"
,
"amr.plot_int"
,
"amr.n_cell"
,
"amr.max_level"
,
"caseID"
],
[
"plots_size"
,
"checkpoints_size"
],
runlogFile
,
)
...
...
src/extractor/AmrexCastro.jl
View file @
053a0bf9
...
...
@@ -67,6 +67,7 @@ function _get_input_file(extractor::AmrexCastro, outputDir::String)::String
else
end
# print(inputFiles)
return
inputFiles
[
1
]
end
...
...
@@ -75,7 +76,7 @@ end
function
_get_linear_model_X
(
extractor
::
AmrexCastro
)
::
DataFrames
.
DataFrame
# get directories runs output location
outputDirs
=
helper_get_prefix_directories
(
extractor
.
outputPrefix
)
#
println(outputDirs)
println
(
outputDirs
)
X
::
DataFrames
.
DataFrame
=
DataFrames
.
DataFrame
()
isXInit
::
Bool
=
false
...
...
@@ -84,13 +85,15 @@ function _get_linear_model_X(extractor::AmrexCastro)::DataFrames.DataFrame
inputFile
::
String
=
_get_input_file
(
extractor
,
outputDir
)
# get relevant input parameters
parameters
=
_input_parser
(
extractor
,
inputFile
)
independent_variables
=
_get_independent_variables
(
extractor
,
parameters
)
independentVariables
=
_get_independent_variables
(
extractor
,
parameters
)
# get outputDir name
independentVariables
[
"caseID"
]
=
helper_get_relative_path
(
outputDir
)
if
!
isXInit
X
=
DataFrames
.
DataFrame
(
independent
_v
ariables
)
X
=
DataFrames
.
DataFrame
(
independent
V
ariables
)
isXInit
=
true
else
DataFrames
.
push!
(
X
,
independent
_v
ariables
)
DataFrames
.
push!
(
X
,
independent
V
ariables
)
end
end
...
...
src/helper/helperSystem.jl
View file @
053a0bf9
...
...
@@ -22,6 +22,18 @@ function helper_get_prefix_directories(prefix::String)::Array{String}
end
function
helper_get_relative_path
(
fullName
::
String
)
::
String
findDelimiter
=
findlast
(
"/"
,
fullName
)
# if findDelimiter == Nothing
# return fullName
# end
relativeName
=
string
(
fullName
[
findDelimiter
[
1
]
+
1
:
end
])
return
relativeName
end
"""
Gets the list of files inside a path that meet the prefix criteria.
Example:
...
...
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