-
Notifications
You must be signed in to change notification settings - Fork 3
/
test_divread.f90
52 lines (34 loc) · 1023 Bytes
/
test_divread.f90
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
40
41
42
43
44
45
46
47
48
49
50
51
52
program test_divread
use div_module
implicit none
integer :: num_files, i,j,k, inside_div, dummy, isin
character*144, dimension(:), allocatable :: filenames
character*144 :: axis_file
real :: dum1, dum2
num_files = 1
allocate(filenames(num_files))
filenames(1) = 'DIV_island4x25'
call alloc_div(filenames, num_files)
do i = 1,num_files
!print *,div_tor_num(i), div_seg_num(i)
end do
call load_div(filenames)
i = 1
do j = 1,div_tor_num(i)
!print *, div_tor_vals(i,j)
do k = 1,div_seg_num(i)
!print *, divertor(i,j,k,:)
end do
end do
axis_file = 'mag_axis.dat'
call load_axis(axis_file)
do i=1,axis_points
!print *,mag_axis(i,:)
end do
!dummy = inside_div(1., 1., 0.0085)
!does_intersect = intersection(0.,0.,1.1,1.,0.5,0.,1.,1.,dum1,dum2)
!print *,dum1, dum2, does_intersect
!isin = inside_div(1.143,0.284,0.3927)
isin = inside_div(1.2413, -0.0301, 3.9297)
call deallocate_div_and_axis()
end program test_divread