49 real(kind=
dp) :: padding
51 type(
aabb_t),
allocatable :: local_aabb(:)
68 real(kind=
rp),
intent(in),
target :: x(:), y(:), z(:)
69 integer,
intent(in) :: nel
70 real(kind=
dp),
intent(in) :: padding
71 integer :: id1, id2, i, lx, ly, lz
72 this%padding = padding
76 if (
allocated(this%local_aabb))
deallocate(this%local_aabb)
77 allocate(this%local_aabb(nel))
79 call this%local_aabb_tree%init(nel)
81 id1 = lx*ly*lz*(i-1)+1
83 call this%local_aabb(i)%init(
real((/minval(x(id1:id2)), &
85 minval(z(id1:id2))/),
dp), &
86 real((/maxval(x(id1:id2)), &
88 maxval(z(id1:id2))/), dp))
90 call this%local_aabb_tree%build_from_aabb(this%local_aabb, padding)
98 if (
allocated(this%local_aabb))
deallocate(this%local_aabb)
107 type(
point_t),
intent(in) :: my_point
108 type(
stack_i4_t),
intent(inout) :: el_candidates
111 call this%local_aabb_tree%query_overlaps(my_point, -1, el_candidates)
118 all_el_candidates, n_el_cands)
120 integer,
intent(in) :: n_points
121 real(kind=
rp),
intent(in) :: points(3, n_points)
122 type(
stack_i4_t),
intent(inout) :: all_el_candidates
123 integer,
intent(inout) :: n_el_cands(n_points)
127 integer,
pointer :: el_cands(:)
128 integer :: stupid_intent
129 real(kind=
dp) :: pt_xyz(3)
131 call all_el_candidates%clear()
132 call el_candidates%init()
136 pt_xyz = (/ points(1,i), points(2,i), points(3,i) /)
137 call my_point%init(pt_xyz)
138 call el_candidates%clear()
139 call this%find(my_point, el_candidates)
140 el_cands => el_candidates%array()
141 do j = 1, el_candidates%size()
142 stupid_intent = el_cands(j) - 1
143 call all_el_candidates%push(stupid_intent)
145 n_el_cands(i) = el_candidates%size()
subroutine aabb_el_finder_find_candidates_batch(this, points, n_points, all_el_candidates, n_el_cands)
subroutine aabb_el_finder_find_candidates(this, my_point, el_candidates)
It uses the AABB tree to find the elements that overlap with the point.
subroutine aabb_el_finder_free(this)
Free the AABB element finder.
subroutine aabb_el_finder_init(this, x, y, z, nel, xh, padding)
Initialize the AABB element finder.
Axis Aligned Bounding Box (aabb) Tree data structure.
integer, parameter, public aabb_null_node
Axis Aligned Bounding Box (aabb) implementation in Fortran.
integer, parameter neko_bcknd_device
integer, parameter, public xp
integer, parameter, public dp
integer, parameter, public rp
Global precision used in computations.
Defines a function space.
Implements a dynamic stack ADT.
Axis Aligned Bounding Box (aabb) data structure.
Implements global interpolation for arbitrary points in the domain.
Node type for the Axis Aligned Bounding Box (aabb) Tree.
Axis Aligned Bounding Box (aabb) Tree.
Base type for element finder providing element candidates for a given point in the domain.
A point in with coordinates .
The function space for the SEM solution fields.