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
include('./extractor/ExioExtractor.jl')
import ExioExtractor
export ExioH, exio_init
mutable struct Exio
include("extractor/extractor.jl")
mutable struct ExioH
extractor::AbstractExtractor
end
function exio_init(app::String, outputPrefix::String)
function exio_init(app::String, outputPrefix::String)::Exio
if app == 'AmrexCastro'
if app == "AmrexCastro"
println("Hello AmrexCastro")
extractor::AmrexCastro
init(extractor, outputPrefix)
end
return Exio(extractor)
return ExioH(extractor)
end
end
\ No newline at end of file
export Amrex
mutable struct Amrex <: AbstractExtractor
app::String
outputPrefix::String
degreesOfFreedom::String[]
degreesOfFreedom
end
function init!(extractor::Amrex, outputPrefix::String)::
extractor.app = 'Amrex'
function init(extractor::Amrex, outputPrefix::String)
extractor.app = "Amrex"
extractor.outputPrefix = outputPrefix
extractor.degressOfFreedom = [
'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"
]
end
\ No newline at end of file
export AmrexCastro
mutable struct AmrexCastro <: AbstractExtractor
app::String
degreesOfFreedom
outputPrefix::String
degreesOfFreedom::String[]
end
function init!(extractor::AmrexCastro, outputPrefix::String)
extractor.app = 'AmrexCastro'
extractor.outputPrefix = outputPrefix
function init(extractor::AmrexCastro, outputPrefix::String)
extractor.app = "AmrexCastro"
extractor.degressOfFreedom = [
'max_step',
'amr.check_int',
'amr.plot_int',
'amr.n_cell',
'amr.max_level',
'castro.cfl',
'castro.max_grid_size'
"max_step",
"amr.check_int",
"amr.plot_int",
"amr.n_cell",
"amr.max_level",
"castro.cfl",
"castro.max_grid_size"
]
extractor.outputPrefix = outputPrefix
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