@@ -503,7 +503,7 @@ contains
503503 !! from GPU routines/ functions
504504 function f_model_random_number (seed ) result(rval)
505505
506- $:GPU_ROUTINE(parallelism= ' [seq]' )
506+ ! $:GPU_ROUTINE(parallelism= ' [seq]' )
507507
508508 integer , intent (inout ) :: seed
509509 real (wp) :: rval
@@ -585,20 +585,18 @@ contains
585585 !! @param pid Patch ID od this model
586586 !! @param point Point to test.
587587 !! @return fraction The perfentage of candidate rays cast indicate that we are inside the model
588- impure function f_model_is_inside_flat (ntrs , trs_v , trs_n , pid , point ) result(fraction)
588+ function f_model_is_inside_flat (ntrs , pid , point ) result(fraction)
589589
590590 $:GPU_ROUTINE(parallelism= ' [seq]' )
591591
592592 integer , intent (in ) :: ntrs
593- real (wp), dimension (:, :, :, :), intent (in ) :: trs_v
594- real (wp), dimension (:, :, :), intent (in ) :: trs_n
595593 integer , intent (in ) :: pid
596594 real (wp), dimension (1 :3 ), intent (in ) :: point
597595
598596 real (wp) :: fraction
599597 type(t_ray) :: ray
600598 type(t_triangle) :: tri
601- integer :: i, j, k, q, nInOrOut, nHits, spc
599+ integer :: i, j, k, q, nInOrOut, nHits
602600
603601 ! cast 26 rays from the point and count the number at leave the boundary
604602 nInOrOut = 0
@@ -617,8 +615,8 @@ contains
617615 ! count the number of intersections
618616 nHits = 0
619617 do q = 1 , ntrs
620- tri%v(:, :) = trs_v (:, :, q, pid)
621- tri%n(:) = trs_n (:, q, pid)
618+ tri%v(:, :) = gpu_trs_v (:, :, q, pid)
619+ tri%n(:) = gpu_trs_n (:, q, pid)
622620 if (f_intersects_triangle(ray, tri)) then
623621 nHits = nHits + 1
624622 end if
0 commit comments