test_amrexCastro.jl 947 Bytes
Newer Older
1
2
3
4


exio = Exio.exio_init("AmrexCastro", ".")

William F Godoy's avatar
William F Godoy committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@test typeof(exio) == Exio.ExioH

println("Current directory: ", Filesystem.pwd() )
inputFile = string(Filesystem.pwd(),"/test/data/amrexCastro/test_data_AmrexCastro_inputs.2d.cyl_in_cartcoords")
println( "Input file: ", inputFile )

parameters = Exio.input_parser(exio.extractor, inputFile)

# keys counter
n = 0

for parameter in parameters
  
  key = parameter[1]
  value = parameter[2]
  
      if isequal(key, "amr.regrid_int") global n += 1; @test isequal(value, "2")
  elseif isequal(key, "amr.plot_file") global n += 1; @test isequal(value,"sedov_2d_cyl_in_cart_plt")
  elseif isequal(key, "amr.max_level") global n += 1; @test isequal(value, "2")  
  elseif isequal(key, "amr.plot_int") global n += 1; @test isequal(value, "20")  
  elseif isequal(key, "amr.n_cell") global n += 1; @test isequal(value, "16   16") 
    
  end
  
  println(parameter[1], "...", parameter[2])
end

# @test n == 5