Commits

Harald Klimach committed 89fd6dc

Added the reading of a vector via the vector module

  • Participants
  • Parent commits 7516fb1

Comments (0)

Files changed (2)

File test/aotus_test.f90

   use aotus_module
   use aot_table_module
   use aot_fun_module
+  use aot_vector_module
 
   implicit none
 
   type(flu_State) :: conf
   type(aot_fun_type) :: foo 
   integer :: iError
+  integer :: vErr(3)
   integer :: stl_table
   integer :: stl_tab_len
   integer :: desc_table
   end if
   call aot_table_close(L = conf, thandle = stl_table)
 
+  !> Get a vector, describing the coordinate from the script
+  call get_config_val(conf = conf, var = 'coord', conf_val = coord, &
+    &                 ErrCode = vErr, &
+    &                 default = [0.0_double_k, 0.0_double_k, 0.0_double_k])
+
   !> First open a function with aot_fun_open
   call aot_fun_open(L = conf, fun = foo, key = 'ic_density')
   
   !> Then put required parameters into it with
   !! aot_fun_put
-  coord = 0.0_double_k
   call aot_fun_put_double(L = conf, fun = foo, arg = coord(1))
   call aot_fun_put_double(L = conf, fun = foo, arg = coord(2))
   call aot_fun_put_double(L = conf, fun = foo, arg = coord(3))
 
+
   !> Execute the function with aot_fun_do
   call aot_fun_do(L = conf, fun = foo, nresults = 1) 
 

File test/config.lua

 stl_files = { {'filename', 123, 'binary'},
               {'geomfile', 456, fileformat='ascii'} }
 
+coord = { 0.1, 0.0, 0.0 }
+
 --function 'gausspulse'
 function gauss_pulse(x, y, z, origin, amplitude, hwidth)
   fact = -0.5/(hwidth*hwidth)