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
bf05d689
Commit
bf05d689
authored
Jun 09, 2020
by
William F Godoy
Browse files
Initial skeleton of the project
parent
0a13dc55
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/Exio.jl
View file @
bf05d689
...
...
@@ -6,18 +6,21 @@ include("extractor/extractor.jl")
mutable struct
ExioH
extractor
::
AbstractExtractor
ExioH
()
=
new
()
end
function
exio_init
(
app
::
String
,
outputPrefix
::
String
)
exioH
=
ExioH
()
if
app
==
"AmrexCastro"
println
(
"Hello AmrexCastro"
)
extractor
::
AmrexCastro
init
(
extractor
,
outputPrefix
)
exioH
.
extractor
=
AmrexCastro
()
init
(
exioH
.
extractor
,
outputPrefix
)
end
return
E
xioH
(
extractor
)
return
e
xioH
end
...
...
src/extractor/amrex.jl
View file @
bf05d689
mutable struct
Amrex
<:
AbstractExtractor
abstract type
AbstractAmrex
<:
AbstractExtractor
end
mutable struct
Amrex
<:
AbstractAmrex
app
::
String
outputPrefix
::
String
degreesOfFreedom
Amrex
()
=
new
()
end
function
init
(
extractor
::
Amrex
,
outputPrefix
::
String
)
extractor
.
app
=
"Amrex"
extractor
.
outputPrefix
=
outputPrefix
extractor
.
degre
s
sOfFreedom
=
[
extractor
.
degre
e
sOfFreedom
=
[
"max_step"
,
"amr.check_int"
,
"amr.plot_int"
,
"amr.n_cell"
,
"amr.max_level"
]
end
function
input_parser
(
inputFile
::
String
)
parameters
=
Dict
{
String
,
String
}()
fileContents
=
readlines
(
inputFile
)
print
(
fileContents
)
end
\ No newline at end of file
src/extractor/amrexCastro.jl
View file @
bf05d689
mutable struct
AmrexCastro
<:
Abstract
Extractor
mutable struct
AmrexCastro
<:
Abstract
Amrex
app
::
String
degreesOfFreedom
outputPrefix
::
String
AmrexCastro
()
=
new
()
end
function
init
(
extractor
::
AmrexCastro
,
outputPrefix
::
String
)
extractor
.
app
=
"AmrexCastro"
extractor
.
degre
s
sOfFreedom
=
[
extractor
.
degre
e
sOfFreedom
=
[
"max_step"
,
"amr.check_int"
,
"amr.plot_int"
,
...
...
test/data/amrexCastro/LICENSE
0 → 100644
View file @
bf05d689
Copyright (c) 2017, The Regents of the University of California,
through Lawrence Berkeley National Laboratory and the Alliance for
Sustainable Energy, LLC., through National Renewable Energy Laboratory
(subject to receipt of any required approvals from the U.S. Dept. of
Energy). All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
(1) Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
(2) Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
(3) Neither the name of the University of California, Lawrence
Berkeley National Laboratory, Alliance for Sustainable Energy, LLC.,
National Renewable Energy Laboratory, U.S. Dept. of Energy nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
test/data/amrexCastro/test_data_amrex_castro_inputs.2d.cyl_in_cartcoords
0 → 100644
View file @
bf05d689
# ------------------ INPUTS TO MAIN PROGRAM -------------------
max_step = 20
stop_time = 0.1
# PROBLEM SIZE & GEOMETRY
geometry.is_periodic = 0 0
geometry.coord_sys = 0 # 0 => cart
geometry.prob_lo = 0 0
geometry.prob_hi = 1 1
amr.n_cell = 16 16
# >>>>>>>>>>>>> BC FLAGS <<<<<<<<<<<<<<<<
# 0 = Interior 3 = Symmetry
# 1 = Inflow 4 = SlipWall
# 2 = Outflow 5 = NoSlipWall
# >>>>>>>>>>>>> BC FLAGS <<<<<<<<<<<<<<<<
castro.lo_bc = 2 2
castro.hi_bc = 2 2
# WHICH PHYSICS
castro.do_hydro = 1
castro.do_react = 0
# TIME STEP CONTROL
castro.cfl = 0.5 # cfl number for hyperbolic system Courant-Friedrichs-Lewy condition
castro.init_shrink = 0.01 # scale back initial timestep
castro.change_max = 1.1 # maximum increase in dt over successive steps
# DIAGNOSTICS & VERBOSITY
castro.sum_interval = 1 # timesteps between computing mass
castro.v = 1 # verbosity in Castro.cpp
amr.v = 1 # verbosity in Amr.cpp
#amr.grid_log = grdlog # name of grid logging file
# REFINEMENT / REGRIDDING
amr.max_level = 2 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 # how often to regrid
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 128
# CHECKPOINT FILES
amr.check_file = sedov_2d_cyl_in_cart_chk # root name of checkpoint file
amr.check_int = 20 # number of timesteps between checkpoints
# PLOTFILES
amr.plot_file = sedov_2d_cyl_in_cart_plt
amr.plot_int = 20
amr.derive_plot_vars=ALL
# PROBIN FILENAME
amr.probin_file = probin.2d.cyl_in_cartcoords
test/runtests.jl
View file @
bf05d689
using
Test
import
Exio
import
Exio
exio
=
Exio
.
exio_init
(
"AmrexCastro"
,
"."
)
@testset
"test_amrexCastro"
begin
include
(
"test_amrexCastro.jl"
)
end
;
test/test_amrexCastro.jl
0 → 100644
View file @
bf05d689
exio
=
Exio
.
exio_init
(
"AmrexCastro"
,
"."
)
@test
typeof
(
exio
)
==
Exio
.
ExioH
\ No newline at end of file
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