Report Typos and Errors    
Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
sll_m_meshes_base.F90
Go to the documentation of this file.
2 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 #include "sll_memory.h"
4 #include "sll_working_precision.h"
5 
6  implicit none
7 
8  public :: &
12 
13  private
14 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15 
17  type, abstract :: sll_c_mesh_1d_base
18  contains
19  procedure(get_geometry_1d), deferred, pass(mesh) :: eta1_node
20  procedure(get_geometry_1d), deferred, pass(mesh) :: eta1_cell
21  procedure(display_mesh_1d), deferred, pass :: display
22  procedure(delete_mesh_1d), deferred, pass :: delete
23  end type sll_c_mesh_1d_base
24 
26  type, abstract :: sll_c_mesh_2d_base
27  contains
28  procedure(get_geometry_2d), deferred, pass :: eta1_node
29  procedure(get_geometry_2d), deferred, pass :: eta2_node
30  procedure(get_geometry_2d_one_arg), deferred, pass :: eta1_cell_one_arg
31  procedure(get_geometry_2d), deferred, pass :: eta1_cell_two_arg
32  procedure(get_geometry_2d_one_arg), deferred, pass :: eta2_cell_one_arg
33  procedure(get_geometry_2d), deferred, pass :: eta2_cell_two_arg
34  procedure(display_mesh_2d), deferred, pass :: display
35  procedure(delete_mesh_2d), deferred, pass :: delete
36  generic, public :: eta1_cell => eta1_cell_one_arg, &
37  eta1_cell_two_arg
38  generic, public :: eta2_cell => eta2_cell_one_arg, &
39  eta2_cell_two_arg
40  end type sll_c_mesh_2d_base
41 
43  type, abstract:: sll_c_mesh_3d_base
44  contains
45  procedure(get_geometry_3d), deferred, pass :: eta1_node
46  procedure(get_geometry_3d), deferred, pass :: eta2_node
47  procedure(get_geometry_3d), deferred, pass :: eta3_node
48  procedure(get_geometry_3d), deferred, pass :: eta1_cell
49  procedure(get_geometry_3d), deferred, pass :: eta2_cell
50  procedure(get_geometry_3d), deferred, pass :: eta3_cell
51  procedure(display_mesh_3d), deferred, pass :: display
52  procedure(delete_mesh_3d), deferred, pass :: delete
53  end type sll_c_mesh_3d_base
54 
56  type, abstract :: sll_mesh_4d_base
57  contains
58  procedure(get_geometry_4d), deferred, pass :: eta1_node
59  procedure(get_geometry_4d), deferred, pass :: eta2_node
60  procedure(get_geometry_4d), deferred, pass :: eta3_node
61  procedure(get_geometry_4d), deferred, pass :: eta4_node
62  procedure(get_geometry_4d), deferred, pass :: eta1_cell
63  procedure(get_geometry_4d), deferred, pass :: eta2_cell
64  procedure(get_geometry_4d), deferred, pass :: eta3_cell
65  procedure(get_geometry_4d), deferred, pass :: eta4_cell
66  procedure(display_mesh_4d), deferred, pass :: display
67  procedure(delete_mesh_4d), deferred, pass :: delete
68  end type sll_mesh_4d_base
69 
70  !Abstract functions for 1d
71  abstract interface
72  function get_geometry_1d(mesh, i) result(res)
74  import sll_c_mesh_1d_base
75  class(sll_c_mesh_1d_base), intent(in) :: mesh
76  sll_int32, intent(in) :: i
77  sll_real64 :: res
78  end function get_geometry_1d
79  end interface
80 
81  abstract interface
82  subroutine delete_mesh_1d(mesh)
83  import sll_c_mesh_1d_base
84  class(sll_c_mesh_1d_base), intent(inout) :: mesh
85  end subroutine delete_mesh_1d
86  end interface
87 
88  abstract interface
89  subroutine display_mesh_1d(mesh)
90  import sll_c_mesh_1d_base
91  class(sll_c_mesh_1d_base), intent(in) :: mesh
92  end subroutine display_mesh_1d
93  end interface
94 
95  !Abstract functions for 2d
96  abstract interface
97  function get_geometry_2d(mesh, i, j) result(res)
99  import sll_c_mesh_2d_base
100  class(sll_c_mesh_2d_base), intent(in) :: mesh
101  sll_int32, intent(in) :: i
102  sll_int32, intent(in) :: j
103  sll_real64 :: res
104  end function get_geometry_2d
105  end interface
106 
107  abstract interface
108  function get_geometry_2d_one_arg(mesh, cell_num) result(res)
110  import sll_c_mesh_2d_base
111  class(sll_c_mesh_2d_base), intent(in) :: mesh
112  sll_int32, intent(in) :: cell_num
113  sll_real64 :: res
114  end function get_geometry_2d_one_arg
115  end interface
116 
117  abstract interface
118  subroutine display_mesh_2d(mesh)
119  import sll_c_mesh_2d_base
120  class(sll_c_mesh_2d_base), intent(in) :: mesh
121  end subroutine display_mesh_2d
122  end interface
123 
124  abstract interface
125  subroutine delete_mesh_2d(mesh)
126  import sll_c_mesh_2d_base
127  class(sll_c_mesh_2d_base), intent(inout) :: mesh
128  end subroutine delete_mesh_2d
129  end interface
130 
131  !Abstract functions for 3d
132  abstract interface
133  function get_geometry_3d(mesh, i1, i2, i3) result(res)
135  import sll_c_mesh_3d_base
136  class(sll_c_mesh_3d_base), intent(in) :: mesh
137  sll_int32, intent(in) :: i1
138  sll_int32, intent(in) :: i2
139  sll_int32, intent(in) :: i3
140  sll_real64 :: res
141  end function get_geometry_3d
142  end interface
143 
144  abstract interface
145  subroutine display_mesh_3d(mesh)
146  import sll_c_mesh_3d_base
147  class(sll_c_mesh_3d_base), intent(in) :: mesh
148  end subroutine display_mesh_3d
149  end interface
150 
151  abstract interface
152  subroutine delete_mesh_3d(mesh)
153  import sll_c_mesh_3d_base
154  class(sll_c_mesh_3d_base), intent(inout) :: mesh
155  end subroutine delete_mesh_3d
156  end interface
157 
158  !Abstract functions for 4d
159  abstract interface
160  function get_geometry_4d(mesh, k1, k2, k3, k4) result(res)
162  import sll_mesh_4d_base
163  class(sll_mesh_4d_base), intent(in) :: mesh
164  sll_int32, intent(in) :: k1
165  sll_int32, intent(in) :: k2
166  sll_int32, intent(in) :: k3
167  sll_int32, intent(in) :: k4
168  sll_real64 :: res
169  end function get_geometry_4d
170  end interface
171 
172  abstract interface
173  subroutine display_mesh_4d(mesh)
174  import sll_mesh_4d_base
175  class(sll_mesh_4d_base), intent(in) :: mesh
176  end subroutine display_mesh_4d
177  end interface
178 
179  abstract interface
180  subroutine delete_mesh_4d(mesh)
181  import sll_mesh_4d_base
182  class(sll_mesh_4d_base), intent(inout) :: mesh
183  end subroutine delete_mesh_4d
184  end interface
185 
186 end module sll_m_meshes_base
Module to select the kind parameter.
    Report Typos and Errors