Neko 1.99.3
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
37 use stack, only: stack_i4_t
38 use mpi_f08, only: mpi_comm
39 use point, only: point_t
40 implicit none
41 private
42
44 type, public, abstract :: pe_finder_t
45 integer :: pe_size
46 integer :: pe_rank
47 type(mpi_comm):: comm
48 contains
49 procedure(pe_finder_free), pass(this), deferred :: free
50 procedure(pe_finder_find), pass(this), deferred :: find
51 procedure(pe_finder_find_batch), pass(this), deferred :: find_batch
52 end type pe_finder_t
53
55 abstract interface
56 subroutine pe_finder_free(this)
57 import pe_finder_t
58 class(pe_finder_t), intent(inout) :: this
59 end subroutine pe_finder_free
60 end interface
61
63 abstract interface
64 subroutine pe_finder_find(this, my_point, pe_candidates)
65 import rp
66 import stack_i4_t
67 import point_t
68 import pe_finder_t
69 implicit none
70 class(pe_finder_t), intent(inout) :: this
71 type(point_t), intent(in) :: my_point
72 type(stack_i4_t), intent(inout) :: pe_candidates
73 end subroutine pe_finder_find
74 end interface
76 abstract interface
77 subroutine pe_finder_find_batch(this, points, n_points, points_at_pe, n_points_pe)
78 import rp
79 import stack_i4_t
80 import point_t
81 import pe_finder_t
82 implicit none
83 class(pe_finder_t), intent(inout) :: this
84 integer, intent(in) :: n_points
85 real(kind=rp), intent(in) :: points(3,n_points)
86 type(stack_i4_t), intent(inout) :: points_at_pe(0:(this%pe_size-1))
87 integer, intent(inout) :: n_points_pe(0:(this%pe_size-1))
88 end subroutine pe_finder_find_batch
89 end interface
90
91end module pe_finder
92
Find rank candidates for a batch of points in the domain.
Definition pe_finder.f90:77
Find rank candidates for a given point in the domain.
Definition pe_finder.f90:64
Definition comm.F90:1
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:44
A point in with coordinates .
Definition point.f90:43
Integer based stack.
Definition stack.f90:63