@@ -6,16 +6,8 @@ program test
66
77 implicit none
88
9- real (wp) :: L(8 )[* ]
10-
11- if (this_image()==1 ) then
12- call test_lineclip()
13-
14- call test_array_lineclip()
15- endif
16-
17- call coarray_lineclip(L)
18- ! if(this_image()==1) print *,L
9+ call test_lineclip()
10+ call test_array_lineclip()
1911
2012contains
2113
@@ -80,47 +72,5 @@ subroutine test_lineclip()
8072
8173end subroutine test_lineclip
8274
83- !- ---------------------------
84-
85- subroutine coarray_lineclip (length )
86-
87- integer , parameter :: Np= 8
88- real (wp), dimension (Np) :: x1,x2,y1,y2
89- real (wp),parameter :: xmin= 1 ., ymax= 5 .,xmax= 4 ., ymin= 3 .
90- real (wp) :: truelength(Np) = [2.40370083 , 3 .,0 .,0 .,0 .,0 .,2 .,2.5 ]
91- real (wp) :: nan
92- integer :: Ni, im, s0,s1
93- real (wp),intent (out ) :: length(Np)[* ]
94-
95- Ni = num_images()
96- im= this_image()
97-
98- nan = ieee_value(1 .,ieee_quiet_nan)
99- truelength(3 :6 ) = nan
100-
101- x1= [0 .,0 .,0 .,0 .,0 .,0 .,0 .,0 .]
102- y1= [0 .,4 .,1 .,1.5 ,2 .,2.5 ,3.0 ,3.5 ]
103- x2= [4 .,5 .,1 .,1.5 ,2 .,2.5 ,3.0 ,3.5 ]
104- y2= [6 .,4 .,1 .,1.5 ,2 .,2.5 ,3.0 ,3.5 ]
105-
106- !- ----- slice problem
107- s0 = (im-1 )* Np/ Ni+1
108- s1 = im* Np/ Ni
109- print ' (A,I3,A,I3,A,I3)' ,' Image' ,im,' solved over indices ' ,s0,' :' ,s1
110- !- ------ solve problem
111- call cohensutherland(xmin,ymax,xmax,ymin, &
112- x1(s0:s1), y1(s0:s1), x2(s0:s1), y2(s0:s1))
113-
114- length(s0:s1)[1 ] = hypot(x2(s0:s1) - x1(s0:s1), y2(s0:s1) - y1(s0:s1))
115- !- ------- finish up
116- sync all
117-
118- if (im== 1 ) then
119- call assert_isclose(length, truelength, equal_nan= .true. )
120- print * , ' OK coarray_lineclip'
121- endif
122-
123-
124- end subroutine coarray_lineclip
12575
12676end program
0 commit comments