Neko 1.99.1
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
pe_finder.f90
Go to the documentation of this file.
1! Copyright (c) 2020-2023, The Neko Authors
2! All rights reserved.
3!
4! Redistribution and use in source and binary forms, with or without
5! modification, are permitted provided that the following conditions
6! are met:
7!
8! * Redistributions of source code must retain the above copyright
9! notice, this list of conditions and the following disclaimer.
10!
11! * Redistributions in binary form must reproduce the above
12! copyright notice, this list of conditions and the following
13! disclaimer in the documentation and/or other materials provided
14! with the distribution.
15!
16! * Neither the name of the authors nor the names of its
17! contributors may be used to endorse or promote products derived
18! from this software without specific prior written permission.
19!
20! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23! FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24! COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25! INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26! BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27! LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30! ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31! POSSIBILITY OF SUCH DAMAGE.
32!
36 use num_types, only: rp, dp, xp
38 use stack, only: stack_i4_t
39 use mpi_f08, only: mpi_comm
40 use point, only: point_t
41 implicit none
42 private
43
45 type, public, abstract :: pe_finder_t
46 integer :: pe_size
47 integer :: pe_rank
48 type(mpi_comm):: comm
49 contains
50 procedure(pe_finder_free), pass(this), deferred :: free
51 procedure(pe_finder_find), pass(this), deferred :: find
52 procedure(pe_finder_find_batch), pass(this), deferred :: find_batch
53 end type pe_finder_t
54
56 abstract interface
57 subroutine pe_finder_free(this)
58 import pe_finder_t
59 class(pe_finder_t), intent(inout) :: this
60 end subroutine pe_finder_free
61 end interface
62
64 abstract interface
65 subroutine pe_finder_find(this, my_point, pe_candidates)
66 import rp
67 import stack_i4_t
68 import point_t
69 import pe_finder_t
70 implicit none
71 class(pe_finder_t), intent(inout) :: this
72 type(point_t), intent(in) :: my_point
73 type(stack_i4_t), intent(inout) :: pe_candidates
74 end subroutine pe_finder_find
75 end interface
77 abstract interface
78 subroutine pe_finder_find_batch(this, points, n_points, points_at_pe, n_points_pe)
79 import rp
80 import stack_i4_t
81 import point_t
82 import pe_finder_t
83 implicit none
84 class(pe_finder_t), intent(inout) :: this
85 integer, intent(in) :: n_points
86 real(kind=rp), intent(in) :: points(3,n_points)
87 type(stack_i4_t), intent(inout) :: points_at_pe(0:(this%pe_size-1))
88 integer, intent(inout) :: n_points_pe(0:(this%pe_size-1))
89 end subroutine pe_finder_find_batch
90 end interface
91
92end module pe_finder
93
Find rank candidates for a batch of points in the domain.
Definition pe_finder.f90:78
Find rank candidates for a given point in the domain.
Definition pe_finder.f90:65
Definition comm.F90:1
Build configurations.
integer, parameter neko_bcknd_device
integer, parameter, public xp
Definition num_types.f90:14
integer, parameter, public dp
Definition num_types.f90:9
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:12
Implements pe_finder given a dofmap.
Definition pe_finder.f90:35
Implements a point.
Definition point.f90:35
Implements a dynamic stack ADT.
Definition stack.f90:35
Implements global interpolation for arbitrary points in the domain.
Definition pe_finder.f90:45
A point in with coordinates .
Definition point.f90:43
Integer based stack.
Definition stack.f90:63