Neko  0.8.99
A portable framework for high-order spectral element flow simulations
neko.f90
Go to the documentation of this file.
1 ! Copyright (c) 2019-2024, 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 !
34 module neko
35  use num_types, only : rp, sp, dp, qp
36  use comm
37  use utils
38  use logger
39  use math, only : abscmp, rzero, izero, row_zero, rone, copy, cmult, cadd, &
45  swap, reord, flipv, cadd2, pi
46  use speclib
47  use dofmap, only : dofmap_t
48  use space, only : space_t, gl, gll, gj
49  use htable
50  use uset
51  use stack
52  use tuple
53  use mesh, only : mesh_t
54  use point, only : point_t
55  use mesh_field, only : mesh_fld_t
56  use map
57  use mxm_wrapper, only : mxm
59  use file
60  use field, only : field_t, field_ptr_t
61  use neko_mpi_types
62  use gather_scatter
63  use coefs, only : coef_t
64  use bc
65  use wall, only : no_slip_wall_t
66  use dirichlet, only : dirichlet_t
67  use ax_product, only : ax_t, ax_helm_factory
69  use neko_config
70  use case, only : case_t, case_init, case_free
71  use sampler, only : sampler_t
72  use output, only : output_t
73  use simulation, only : neko_solve
74  use operators, only : dudxyz, opgrad, ortho, cdtp, conv1, curl, cfl,&
77  use projection
78  use user_intf
79  use signal
82  use device
91  use map_1d, only : map_1d_t
92  use cpr, only : cpr_t, cpr_init, cpr_free
93  use fluid_stats, only : fluid_stats_t
94  use field_list, only : field_list_t
97  use vector, only : vector_t, vector_ptr_t
98  use matrix, only : matrix_t
99  use tensor
102  use probes, only : probes_t
104  use system, only : system_cpu_name, system_cpuid
108  use simcomp_executor, only : neko_simcomps
109  use data_streamer, only : data_streamer_t
112  use point_zone, only: point_zone_t
118  use json_module, only : json_file
120  use, intrinsic :: iso_fortran_env
121  !$ use omp_lib
122  implicit none
123 
124 contains
125 
126  subroutine neko_init(C)
127  type(case_t), target, intent(inout), optional :: C
128  character(len=NEKO_FNAME_LEN) :: case_file
129  character(len=LOG_SIZE) :: log_buf
130  character(len=10) :: suffix
131  character(10) :: time
132  character(8) :: date
133  integer :: argc, nthrds, rw, sw
134 
135  call date_and_time(time = time, date = date)
136 
137  call comm_init
139  call jobctrl_init
140  call device_init
141 
142  call neko_log%init()
143  call neko_field_registry%init()
144 
145  if (pe_rank .eq. 0) then
146  write(*,*) ''
147  write(*,*) ' _ __ ____ __ __ ____ '
148  write(*,*) ' / |/ / / __/ / //_/ / __ \ '
149  write(*,*) ' / / / _/ / ,< / /_/ / '
150  write(*,*) '/_/|_/ /___/ /_/|_| \____/ '
151  write(*,*) ''
152  write(*,*) '(version: ', trim(neko_version), ')'
153  write(*,*) trim(neko_build_info)
154  write(*,*) ''
155  end if
156 
157  if (present(c)) then
158 
159  argc = command_argument_count()
160 
161  if ((argc .lt. 1) .or. (argc .gt. 1)) then
162  if (pe_rank .eq. 0) write(*,*) 'Usage: ./neko < case file >'
163  stop
164  end if
165 
166  call get_command_argument(1, case_file)
167 
168  call filename_suffix(case_file, suffix)
169 
170  if (trim(suffix) .ne. 'case') then
171  call neko_error('Invalid case file')
172  end if
173 
174  ! Check the device count against the number of MPI ranks
175  if (neko_bcknd_device .eq. 1) then
176  if (device_count() .ne. 1) then
177  call neko_error('Only one device is supported per MPI rank')
178  end if
179  end if
180 
181  !
182  ! Job information
183  !
184  call neko_log%section("Job Information")
185  write(log_buf, '(A,A,A,A,1x,A,1x,A,A,A,A,A)') 'Start time: ',&
186  time(1:2), ':', time(3:4), &
187  '/', date(1:4), '-', date(5:6), '-', date(7:8)
188  call neko_log%message(log_buf, neko_log_quiet)
189  write(log_buf, '(a)') 'Running on: '
190  sw = 10
191  if (pe_size .lt. 1e1) then
192  write(log_buf(13:), '(i1,a)') pe_size, ' MPI '
193  if (pe_size .eq. 1) then
194  write(log_buf(19:), '(a)') 'rank'
195  sw = 9
196  else
197  write(log_buf(19:), '(a)') 'ranks'
198  end if
199  rw = 1
200  else if (pe_size .lt. 1e2) then
201  write(log_buf(13:), '(i2,a)') pe_size, ' MPI ranks'
202  rw = 2
203  else if (pe_size .lt. 1e3) then
204  write(log_buf(13:), '(i3,a)') pe_size, ' MPI ranks'
205  rw = 3
206  else if (pe_size .lt. 1e4) then
207  write(log_buf(13:), '(i4,a)') pe_size, ' MPI ranks'
208  rw = 4
209  else if (pe_size .lt. 1e5) then
210  write(log_buf(13:), '(i5,a)') pe_size, ' MPI ranks'
211  rw = 5
212  else
213  write(log_buf(13:), '(i6,a)') pe_size, ' MPI ranks'
214  rw = 6
215  end if
216 
217  nthrds = 1
218  !$omp parallel
219  !$omp master
220  !$ nthrds = omp_get_num_threads()
221  !$omp end master
222  !$omp end parallel
223 
224  if (nthrds .gt. 1) then
225  if (nthrds .lt. 1e1) then
226  write(log_buf(13 + rw + sw:), '(a,i1,a)') ', using ', &
227  nthrds, ' thrds each'
228  else if (nthrds .lt. 1e2) then
229  write(log_buf(13 + rw + sw:), '(a,i2,a)') ', using ', &
230  nthrds, ' thrds each'
231  else if (nthrds .lt. 1e3) then
232  write(log_buf(13 + rw + sw:), '(a,i3,a)') ', using ', &
233  nthrds, ' thrds each'
234  else if (nthrds .lt. 1e4) then
235  write(log_buf(13 + rw + sw:), '(a,i4,a)') ', using ', &
236  nthrds, ' thrds each'
237  end if
238  end if
239  call neko_log%message(log_buf, neko_log_quiet)
240 
241  write(log_buf, '(a)') 'CPU type : '
242  call system_cpu_name(log_buf(13:))
243  call neko_log%message(log_buf, neko_log_quiet)
244 
245  write(log_buf, '(a)') 'Bcknd type: '
246  if (neko_bcknd_sx .eq. 1) then
247  write(log_buf(13:), '(a)') 'SX-Aurora'
248  else if (neko_bcknd_xsmm .eq. 1) then
249  write(log_buf(13:), '(a)') 'CPU (libxsmm)'
250  else if (neko_bcknd_cuda .eq. 1) then
251  write(log_buf(13:), '(a)') 'Accelerator (CUDA)'
252  else if (neko_bcknd_hip .eq. 1) then
253  write(log_buf(13:), '(a)') 'Accelerator (HIP)'
254  else if (neko_bcknd_opencl .eq. 1) then
255  write(log_buf(13:), '(a)') 'Accelerator (OpenCL)'
256  else
257  write(log_buf(13:), '(a)') 'CPU'
258  end if
259  call neko_log%message(log_buf, neko_log_quiet)
260 
261  if (neko_bcknd_hip .eq. 1 .or. neko_bcknd_cuda .eq. 1 .or. &
262  neko_bcknd_opencl .eq. 1) then
263  write(log_buf, '(a)') 'Dev. name : '
264  call device_name(log_buf(13:))
265  call neko_log%message(log_buf, neko_log_quiet)
266  end if
267 
268  write(log_buf, '(a)') 'Real type : '
269  select case (rp)
270  case (real32)
271  write(log_buf(13:), '(a)') 'single precision'
272  case (real64)
273  write(log_buf(13:), '(a)') 'double precision'
274  case (real128)
275  write(log_buf(13:), '(a)') 'quad precision'
276  end select
277  call neko_log%message(log_buf, neko_log_quiet)
278 
279  call neko_log%end()
280 
281  !
282  ! Create case
283  !
284  call case_init(c, case_file)
285 
286  !
287  ! Create simulation components
288  !
289  call neko_simcomps%init(c)
290 
291  end if
292 
293  end subroutine neko_init
294 
295  subroutine neko_finalize(C)
296  type(case_t), intent(inout), optional :: C
297 
298  if (present(c)) then
299  call case_free(c)
300  end if
301 
302  call neko_field_registry%free()
303  call neko_scratch_registry%free()
304  call device_finalize
306  call comm_free
307  end subroutine neko_finalize
308 
309 end module neko
Retrieves a parameter by name or assigns a provided default value. In the latter case also adds the m...
Definition: json_utils.f90:53
Retrieves a parameter by name or throws an error.
Definition: json_utils.f90:44
Interface to a C function to retrieve the CPU name (type).
Definition: system.f90:44
Defines a Matrix-vector product.
Definition: ax.f90:34
Defines a boundary condition.
Definition: bc.f90:34
Defines a simulation case.
Definition: case.f90:34
subroutine, public case_free(C)
Deallocate a case.
Definition: case.f90:478
Coefficients.
Definition: coef.f90:34
Definition: comm.F90:1
integer pe_rank
MPI rank.
Definition: comm.F90:26
subroutine comm_free
Definition: comm.F90:95
integer pe_size
MPI size of communicator.
Definition: comm.F90:29
subroutine comm_init
Definition: comm.F90:36
Compression.
Definition: cpr.f90:34
subroutine, public cpr_free(cpr)
Deallocate coefficients.
Definition: cpr.f90:109
Implements type data_streamer_t.
subroutine, public device_add2(a_d, b_d, n)
Vector addition .
subroutine, public device_addcol3(a_d, b_d, c_d, n)
Returns .
subroutine, public device_col2(a_d, b_d, n)
Vector multiplication .
subroutine, public device_add2s1(a_d, b_d, c1, n)
subroutine, public device_rzero(a_d, n)
Zero a real vector.
real(kind=rp) function, public device_vlsc3(u_d, v_d, w_d, n)
Compute multiplication sum .
subroutine, public device_rone(a_d, n)
Set all elements to one.
subroutine, public device_add2s2(a_d, b_d, c1, n)
Vector addition with scalar multiplication (multiplication on first argument)
subroutine, public device_invcol1(a_d, n)
Invert a vector .
subroutine, public device_col3(a_d, b_d, c_d, n)
Vector multiplication with 3 vectors .
subroutine, public device_cadd(a_d, c, n)
Add a scalar to vector .
subroutine, public device_vdot3(dot_d, u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, n)
Compute a dot product (3-d version) assuming vector components etc.
subroutine, public device_cmult2(a_d, b_d, c, n)
Multiplication by constant c .
subroutine, public device_cmult(a_d, c, n)
Multiplication by constant c .
subroutine, public device_masked_copy(a_d, b_d, mask_d, n, m)
Copy a masked vector .
subroutine, public device_add2s2_many(y_d, x_d_d, a_d, j, n)
subroutine, public device_cfill_mask(a_d, c, size, mask_d, mask_size)
Fill a constant to a masked vector. .
real(kind=rp) function, public device_glsc2(a_d, b_d, n)
Weighted inner product .
subroutine, public device_sub3(a_d, b_d, c_d, n)
Vector subtraction .
real(kind=rp) function, public device_glsc3(a_d, b_d, c_d, n)
Weighted inner product .
subroutine, public device_add3(a_d, b_d, c_d, n)
Vector addition .
real(kind=rp) function, public device_glsum(a_d, n)
Sum a vector of length n.
subroutine, public device_cadd2(a_d, b_d, c, n)
Add a scalar to vector .
subroutine, public device_copy(a_d, b_d, n)
Copy a vector .
subroutine, public device_add3s2(a_d, b_d, c_d, c1, c2, n)
Returns .
subroutine, public device_subcol3(a_d, b_d, c_d, n)
Returns .
subroutine, public device_glsc3_many(h, w_d, v_d_d, mult_d, j, n)
subroutine, public device_sub2(a_d, b_d, n)
Vector substraction .
subroutine, public device_cfill(a_d, c, n)
Set all elements to a constant c .
subroutine, public device_addcol4(a_d, b_d, c_d, d_d, n)
Returns .
subroutine, public device_invcol2(a_d, b_d, n)
Vector division .
subroutine, public device_addsqr2s2(a_d, b_d, c1, n)
Returns .
Device abstraction, common interface for various accelerators.
Definition: device.F90:34
subroutine, public device_finalize
Definition: device.F90:122
subroutine, public device_name(name)
Definition: device.F90:138
integer function device_count()
Return the number of available devices.
Definition: device.F90:151
subroutine, public device_init
Definition: device.F90:107
Defines a dirichlet boundary condition.
Definition: dirichlet.f90:34
Defines a mapping of the degrees of freedom.
Definition: dofmap.f90:35
subroutine, public drag_torque_zone(dgtq, tstep, zone, center, s11, s22, s33, s12, s13, s23, p, coef, visc)
Some functions to calculate the lift/drag and torque Calculation can be done on a zone,...
Definition: drag_torque.f90:89
subroutine, public drag_torque_facet(dgtq, xm0, ym0, zm0, center, s11, s22, s33, s12, s13, s23, pm1, visc, f, e, coef, Xh)
Calculate drag and torque over a facet.
subroutine, public drag_torque_pt(dgtq, x, y, z, center, s11, s22, s33, s12, s13, s23, p, n1, n2, n3, v)
Calculate drag and torque from one point.
Defines inflow dirichlet conditions.
Defines inflow dirichlet conditions.
Defines a registry for storing solution fields.
type(field_registry_t), target, public neko_field_registry
Global field registry.
Defines a field.
Definition: field.f90:34
Module for file I/O operations.
Definition: file.f90:34
Computes various statistics for the fluid fields. We use the Reynolds decomposition for a field u = ...
Definition: fluid_stats.f90:36
Implements the fluid_user_source_term_t type.
Gather-scatter.
Implements global_interpolation given a dofmap.
Implements a hash table ADT.
Definition: htable.f90:36
Job control.
Definition: jobctrl.f90:34
logical function, public jobctrl_time_limit()
Check if the job's time limit has been reached.
Definition: jobctrl.f90:107
real(kind=rp) function, public jobctrl_jobtime()
Returns a job's time in seconds relative to the first call.
Definition: jobctrl.f90:126
subroutine, public jobctrl_init()
Initialize jobctrl.
Definition: jobctrl.f90:55
Utilities for retrieving parameters from the case files.
Definition: json_utils.f90:34
subroutine, public json_extract_item(core, array, i, item)
Extract ith item from a JSON array as a separate JSON object.
Definition: json_utils.f90:364
Logging routines.
Definition: log.f90:34
integer, parameter, public neko_log_quiet
Always logged.
Definition: log.f90:63
type(log_t), public neko_log
Global log stream.
Definition: log.f90:61
Creates a 1d GLL point map along a specified direction based on the connectivity in the mesh.
Definition: map_1d.f90:3
NEKTON map.
Definition: map.f90:3
Definition: math.f90:60
subroutine, public cmult(a, c, n)
Multiplication by constant c .
Definition: math.f90:277
subroutine, public cmult2(a, b, c, n)
Multiplication by constant c .
Definition: math.f90:661
subroutine, public row_zero(a, m, n, e)
Sets row e to 0 in matrix a.
Definition: math.f90:206
subroutine, public invcol2(a, b, n)
Vector division .
Definition: math.f90:675
real(kind=rp) function, public vlsc2(u, v, n)
Compute multiplication sum .
Definition: math.f90:533
real(kind=rp), parameter, public pi
Definition: math.f90:73
real(kind=rp) function, public glsc3(a, b, c, n)
Weighted inner product .
Definition: math.f90:854
subroutine, public ascol5(a, b, c, d, e, n)
Returns .
Definition: math.f90:790
subroutine, public invers2(a, b, n)
Compute inverted vector .
Definition: math.f90:460
subroutine, public cadd2(a, b, s, n)
Add a scalar to vector .
Definition: math.f90:301
subroutine, public cadd(a, s, n)
Add a scalar to vector .
Definition: math.f90:289
subroutine, public addsqr2s2(a, b, c1, n)
Returns .
Definition: math.f90:647
real(kind=rp) function, public glsc4(a, b, c, d, n)
Definition: math.f90:871
subroutine, public add2s1(a, b, c1, n)
Vector addition with scalar multiplication (multiplication on first argument)
Definition: math.f90:618
real(kind=rp) function, public glsc2(a, b, n)
Weighted inner product .
Definition: math.f90:836
subroutine, public subcol3(a, b, c, n)
Returns .
Definition: math.f90:716
subroutine, public rone(a, n)
Set all elements to one.
Definition: math.f90:217
subroutine, public x_update(a, b, c, c1, c2, n)
Returns .
Definition: math.f90:821
subroutine, public add3(a, b, c, n)
Vector addition .
Definition: math.f90:560
integer function, public glimin(a, n)
Min of an integer vector of length n.
Definition: math.f90:383
real(kind=rp) function, public glsum(a, n)
Sum a vector of length n.
Definition: math.f90:326
subroutine, public sub3(a, b, c, n)
Vector subtraction .
Definition: math.f90:602
subroutine, public addcol4(a, b, c, d, n)
Returns .
Definition: math.f90:775
subroutine, public add2(a, b, n)
Vector addition .
Definition: math.f90:547
subroutine, public cfill(a, c, n)
Set all elements to a constant c .
Definition: math.f90:314
subroutine, public invcol3(a, b, c, n)
Invert a vector .
Definition: math.f90:447
subroutine, public add3s2(a, b, c, c1, c2, n)
Returns .
Definition: math.f90:730
subroutine, public subcol4(a, b, c, d, n)
Returns .
Definition: math.f90:746
subroutine, public addcol3(a, b, c, n)
Returns .
Definition: math.f90:761
subroutine, public invcol1(a, n)
Invert a vector .
Definition: math.f90:435
subroutine, public masked_copy(a, b, mask, n, m)
Copy a masked vector .
Definition: math.f90:247
subroutine, public chsign(a, n)
Change sign of vector .
Definition: math.f90:400
subroutine, public col2(a, b, n)
Vector multiplication .
Definition: math.f90:689
subroutine, public izero(a, n)
Zero an integer vector.
Definition: math.f90:195
real(kind=rp) function, public glmax(a, n)
Max of a vector of length n.
Definition: math.f90:341
subroutine, public copy(a, b, n)
Copy a vector .
Definition: math.f90:228
subroutine, public add4(a, b, c, d, n)
Vector addition .
Definition: math.f90:574
subroutine, public col3(a, b, c, n)
Vector multiplication with 3 vectors .
Definition: math.f90:702
subroutine, public vdot3(dot, u1, u2, u3, v1, v2, v3, n)
Compute a dot product (3-d version) assuming vector components etc.
Definition: math.f90:505
subroutine, public rzero(a, n)
Zero a real vector.
Definition: math.f90:184
subroutine, public vdot2(dot, u1, u2, v1, v2, n)
Compute a dot product (2-d version) assuming vector components etc.
Definition: math.f90:491
real(kind=rp) function, public vlmin(vec, n)
minimun value of a vector of length n
Definition: math.f90:423
real(kind=rp) function, public vlmax(vec, n)
maximum value of a vector of length n
Definition: math.f90:412
integer function, public glimax(a, n)
Max of an integer vector of length n.
Definition: math.f90:355
subroutine, public sub2(a, b, n)
Vector substraction .
Definition: math.f90:589
subroutine, public cfill_mask(a, c, size, mask, mask_size)
Fill a constant to a masked vector. .
Definition: math.f90:263
subroutine, public add2s2(a, b, c1, n)
Vector addition with scalar multiplication (multiplication on second argument)
Definition: math.f90:633
real(kind=rp) function, public glmin(a, n)
Min of a vector of length n.
Definition: math.f90:369
subroutine, public vcross(u1, u2, u3, v1, v2, v3, w1, w2, w3, n)
Compute a cross product assuming vector components etc.
Definition: math.f90:474
real(kind=rp) function, public vlsc3(u, v, w, n)
Compute multiplication sum .
Definition: math.f90:519
subroutine, public p_update(a, b, c, c1, c2, n)
Returns .
Definition: math.f90:806
Collection of vector field operations operating on and . Note that in general the indices and ....
Definition: mathops.f90:65
subroutine, public opcolv(a1, a2, a3, c, gdim, n)
Definition: mathops.f90:97
subroutine, public opadd2col(a1, a2, a3, b1, b2, b3, c, n, gdim)
Definition: mathops.f90:165
subroutine, public opchsign(a1, a2, a3, gdim, n)
for and .
Definition: mathops.f90:76
subroutine, public opadd2cm(a1, a2, a3, b1, b2, b3, c, n, gdim)
Definition: mathops.f90:142
subroutine, public opcolv3c(a1, a2, a3, b1, b2, b3, c, d, n, gdim)
Definition: mathops.f90:119
Defines a matrix.
Definition: matrix.f90:34
Defines a mesh field.
Definition: mesh_field.f90:35
Defines a mesh.
Definition: mesh.f90:34
Wrapper for all matrix-matrix product implementations.
Definition: mxm_wrapper.F90:2
subroutine, public mxm(a, n1, b, n2, c, n3)
Compute matrix-matrix product for contiguously packed matrices A,B, and C.
Definition: mxm_wrapper.F90:29
Build configurations.
Definition: neko_config.f90:34
integer, parameter neko_bcknd_sx
Definition: neko_config.f90:39
integer, parameter neko_bcknd_hip
Definition: neko_config.f90:42
character(len=80), parameter neko_build_info
Definition: neko_config.f90:37
character(len=10), parameter neko_version
Definition: neko_config.f90:36
integer, parameter neko_bcknd_device
Definition: neko_config.f90:44
integer, parameter neko_bcknd_opencl
Definition: neko_config.f90:43
integer, parameter neko_bcknd_cuda
Definition: neko_config.f90:41
integer, parameter neko_bcknd_xsmm
Definition: neko_config.f90:40
MPI derived types.
Definition: mpi_types.f90:34
subroutine, public neko_mpi_types_init
Define all MPI derived types.
Definition: mpi_types.f90:86
subroutine, public neko_mpi_types_free
Deallocate all derived MPI types.
Definition: mpi_types.f90:523
Master module.
Definition: neko.f90:34
subroutine neko_finalize(C)
Definition: neko.f90:296
subroutine neko_init(C)
Definition: neko.f90:127
integer, parameter, public qp
Definition: num_types.f90:10
integer, parameter, public dp
Definition: num_types.f90:9
integer, parameter, public sp
Definition: num_types.f90:8
integer, parameter, public rp
Global precision used in computations.
Definition: num_types.f90:12
Operators.
Definition: operators.f90:34
subroutine, public opgrad(ux, uy, uz, u, coef, es, ee)
Compute the weak gradient of a scalar field, i.e. the gradient multiplied by the mass matrix.
Definition: operators.f90:164
subroutine, public div(res, ux, uy, uz, coef)
Compute the divergence of a vector field.
Definition: operators.f90:96
subroutine, public grad(ux, uy, uz, u, coef)
Compute the gradient of a scalar field.
Definition: operators.f90:139
subroutine, public curl(w1, w2, w3, u1, u2, u3, work1, work2, coef)
Definition: operators.f90:314
subroutine, public strain_rate(s11, s22, s33, s12, s13, s23, u, v, w, coef)
Compute the strain rate tensor, i.e 0.5 * du_i/dx_j + du_j/dx_i.
Definition: operators.f90:382
subroutine, public lambda2op(lambda2, u, v, w, coef)
Compute the Lambda2 field for a given velocity field.
Definition: operators.f90:455
subroutine, public ortho(x, n, glb_n)
Othogonalize with regard to vector (1,1,1,1,1,1...,1)^T.
Definition: operators.f90:201
subroutine, public cdtp(dtx, x, dr, ds, dt, coef, es, ee)
Apply D^T to a scalar field, where D is the derivative matrix.
Definition: operators.f90:223
subroutine, public dudxyz(du, u, dr, ds, dt, coef)
Compute derivative of a scalar field along a single direction.
Definition: operators.f90:71
real(kind=rp) function, public cfl(dt, u, v, w, Xh, coef, nelv, gdim)
Definition: operators.f90:346
subroutine, public conv1(du, u, vx, vy, vz, Xh, coef, es, ee)
Compute the advection term.
Definition: operators.f90:267
Defines an output.
Definition: output.f90:34
Interface to ParMETIS.
Definition: parmetis.F90:34
subroutine, public parmetis_partmeshkway(msh, parts, weights, nprts)
Compute a k-way partitioning of a mesh msh.
Definition: parmetis.F90:111
subroutine, public parmetis_partgeom(msh, parts)
Compute a k-way partitioning of a mesh msh using a coordinated-based space-filing curves method.
Definition: parmetis.F90:182
Routines to interpolate fields on a given element on a point in that element with given r,...
type(point_zone_registry_t), target, public neko_point_zone_registry
Global point_zone registry.
Implements a point.
Definition: point.f90:35
Implements probes.
Definition: probes.F90:37
Project x onto X, the space of old solutions and back again.
Definition: projection.f90:63
Defines a sampler.
Definition: sampler.f90:34
Implements the scalar_user_source_term_t type.
Defines a registry for storing and requesting temporary fields This can be used when you have a funct...
type(scratch_registry_t), target, public neko_scratch_registry
Global scratch registry.
Interface to signal handler.
Definition: signal.f90:34
Contains the simcomp_executor_t type.
type(simcomp_executor_t), target, public neko_simcomps
Global variable for the simulation component driver.
Simulation components are objects that encapsulate functionality that can be fit to a particular comp...
Simulation driver.
Definition: simulation.f90:34
subroutine, public neko_solve(C)
Main driver to solve a case C.
Definition: simulation.f90:57
Defines a function space.
Definition: space.f90:34
integer, parameter, public gll
Definition: space.f90:48
integer, parameter, public gj
Definition: space.f90:48
integer, parameter, public gl
Definition: space.f90:48
LIBRARY ROUTINES FOR SPECTRAL METHODS.
Definition: speclib.f90:148
Implements type spectral_error_indicator_t.
Implements a dynamic stack ADT.
Definition: stack.f90:35
Interface to system information routines.
Definition: system.f90:34
subroutine, public system_cpu_name(name)
Retrieve the system's CPU name (type)
Definition: system.f90:59
Tensor operations.
Definition: tensor.f90:61
Implements type time_interpolator_t.
Implements a n-tuple.
Definition: tuple.f90:34
Interfaces for user interaction with NEKO.
Definition: user_intf.f90:34
Implements an unordered set ADT.
Definition: uset.f90:35
Utilities.
Definition: utils.f90:35
subroutine, public filename_suffix(fname, suffix)
Extract a filename's suffix.
Definition: utils.f90:69
Defines a vector.
Definition: vector.f90:34
Defines wall boundary conditions.
Definition: wall.f90:34
Base type for a matrix-vector product providing .
Definition: ax.f90:43
A box-shaped point zone.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Definition: coef.f90:55
include information needed for compressing fields
Definition: cpr.f90:51
Provides access to data streaming by interfacing with c++ ADIOS2 subroutines.
Generic Dirichlet boundary condition on .
Definition: dirichlet.f90:44
field_ptr_t, To easily obtain a pointer to a field
Definition: field.f90:80
User defined dirichlet condition, for which the user can work with an entire field....
Extension of the user defined dirichlet condition field_dirichlet
field_list_t, To be able to group fields together
Definition: field_list.f90:13
Type that encapsulates a mapping from each gll point in the mesh to its corresponding (global) GLL po...
Definition: map_1d.f90:21
Abstract type defining an output type.
Definition: output.f90:41
A point in with coordinates .
Definition: point.f90:43
Field interpolator to arbitrary points within an element. Tailored for experimentation,...
Base abstract type for point zones.
Definition: point_zone.f90:47
Base abstract class for simulation components.
A helper type that is needed to have an array of polymorphic objects.
The function space for the SEM solution fields.
Definition: space.f90:62
Provides a tool to perform interpolation in time.
No-slip Wall boundary condition.
Definition: wall.f90:43