aboutsummaryrefslogtreecommitdiff
path: root/Carpet/LoopControl/src/loopcontrol_types.F90
blob: 393e277872c88aa3eb597c4482119f4f1ca407c7 (plain)
1
2
3
4
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
33
34
35
36
37
38
39
#include "cctk.h"

#include "loopcontrol.h"



module loopcontrol_types
  
  implicit none
  
  ! Note: These types must correspond to the corresponding C types
  ! declared in loopcontrol.h
  
  type, bind(C) :: lc_vec_t
     CCTK_POINTER :: v(LC_DIM)
  end type lc_vec_t
  
  type, bind(C) :: lc_ivec_t
     integer :: v(LC_DIM)
  end type lc_ivec_t
  
  type, bind(C) :: lc_space_t
     type(lc_vec_t)  :: min, max, step, pos
     type(lc_ivec_t) :: count, idx
  end type lc_space_t
  
  type, bind(C) :: lc_control_t
     type(lc_vec_t)   :: ash
     type(lc_space_t) :: overall
     type(lc_space_t) :: coarse_thread
     CCTK_POINTER     :: coarse_thread_info_ptr
     integer          :: coarse_thread_done
     type(lc_space_t) :: coarse_loop
     type(lc_space_t) :: fine_loop
     type(lc_space_t) :: fine_thread
     CCTK_POINTER     :: selftest_array
  end type lc_control_t
  
end module loopcontrol_types