Commit 0a13dc55 authored by William F Godoy's avatar William F Godoy
Browse files

Restructure project

Added:
Project.toml
test/runtests.jl
parent dfb416af
name = "Exio"
uuid = "0525473d-17b7-4fd3-beb1-bf17216ddbac"
version = "0.0.1"
[compat]
julia = "1"
[extras]
Test = "eaa6fafa-8011-46e2-b288-c2f1e2a8ee56"
[targets]
test = ["Test"]
module ExioExtractor
export AbstractExtractor
abstract struct AbstractExtractor end
include('./amrex')
include('./amrex_castro')
end
\ No newline at end of file
module Exio module Exio
include('./extractor/ExioExtractor.jl') export ExioH, exio_init
import ExioExtractor
mutable struct Exio include("extractor/extractor.jl")
mutable struct ExioH
extractor::AbstractExtractor extractor::AbstractExtractor
end end
function exio_init(app::String, outputPrefix::String)::Exio function exio_init(app::String, outputPrefix::String)
if app == 'AmrexCastro' if app == "AmrexCastro"
println("Hello AmrexCastro")
extractor::AmrexCastro extractor::AmrexCastro
init(extractor, outputPrefix) init(extractor, outputPrefix)
end end
return Exio(extractor) return ExioH(extractor)
end end
......
export Amrex
mutable struct Amrex <: AbstractExtractor mutable struct Amrex <: AbstractExtractor
app::String app::String
outputPrefix::String outputPrefix::String
degreesOfFreedom::String[] degreesOfFreedom
end end
function init!(extractor::Amrex, outputPrefix::String):: function init(extractor::Amrex, outputPrefix::String)
extractor.app = 'Amrex' extractor.app = "Amrex"
extractor.outputPrefix = outputPrefix extractor.outputPrefix = outputPrefix
extractor.degressOfFreedom = [ extractor.degressOfFreedom = [
'max_step', "max_step",
'amr.check_int', "amr.check_int",
'amr.plot_int', "amr.plot_int",
'amr.n_cell', "amr.n_cell",
'amr.max_level' "amr.max_level"
] ]
end end
\ No newline at end of file
export AmrexCastro
mutable struct AmrexCastro <: AbstractExtractor mutable struct AmrexCastro <: AbstractExtractor
app::String app::String
degreesOfFreedom
outputPrefix::String outputPrefix::String
degreesOfFreedom::String[]
end end
function init!(extractor::AmrexCastro, outputPrefix::String) function init(extractor::AmrexCastro, outputPrefix::String)
extractor.app = 'AmrexCastro' extractor.app = "AmrexCastro"
extractor.outputPrefix = outputPrefix
extractor.degressOfFreedom = [ extractor.degressOfFreedom = [
'max_step', "max_step",
'amr.check_int', "amr.check_int",
'amr.plot_int', "amr.plot_int",
'amr.n_cell', "amr.n_cell",
'amr.max_level', "amr.max_level",
'castro.cfl', "castro.cfl",
'castro.max_grid_size' "castro.max_grid_size"
] ]
extractor.outputPrefix = outputPrefix
end end
abstract type AbstractExtractor end
include("amrex.jl")
include("amrexCastro.jl")
using Test
import Exio
exio = Exio.exio_init("AmrexCastro", ".")
import Exio
exio = exio_init('AmrexCastro', '.')
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