Neko 1.99.11
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
fluid_scheme_compressible_ns.f90
Go to the documentation of this file.
1! Copyright (c) 2025-2026, 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 use comm, only : neko_comm
35 use advection, only : advection_t
37 use operators, only : div, rotate_cyc
41 use field, only : field_t
44 use gs_ops, only : gs_op_min, gs_op_max
45 use gather_scatter, only : gs_t
46 use num_types, only : rp
47 use mesh, only : mesh_t
48 use checkpoint, only : chkp_t
49 use json_module, only : json_file, json_core, json_value
52 use user_intf, only : user_t
54 use ax_product, only : ax_t, ax_helm_allocator
55 use coefs, only : coef_t
56 use compressible_residual, only : compressible_rhs_t, compressible_rhs_factory
59 use bc_list, only : bc_list_t
60 use bc, only : bc_t
62 use logger, only : log_size, neko_log
63 use time_state, only : time_state_t
72 use mpi_f08, only : mpi_allreduce, mpi_integer, mpi_max
74 viscous_regularization_factory
77 implicit none
78 private
79
80 type, public, extends(fluid_scheme_compressible_t) &
82 type(field_t) :: rho_res, m_x_res, m_y_res, m_z_res, m_e_res
83 type(field_t) :: drho, dm_x, dm_y, dm_z, de
84 class(advection_t), allocatable :: adv
85 class(ax_t), allocatable :: ax
86 class(ax_t), allocatable :: ax_stress
87 class(compressible_rhs_t), allocatable :: compressible_rhs
88 type(runge_kutta_time_scheme_t) :: rk_scheme
89
91 logical :: if_viscous_regularization
92
93 !> Boundary conditions projector for velocity constraints.
94 type(coupled_vector_bc_projector_t):: bcs_vel_projector
95 !> List of boundary conditions for density.
96 type(bc_list_t) :: bcs_density
97
98 contains
99 procedure, pass(this) :: init => fluid_scheme_compressible_ns_init
100 procedure, pass(this) :: free => fluid_scheme_compressible_ns_free
101 procedure, pass(this) :: step => fluid_scheme_compressible_ns_step
102 procedure, pass(this) :: restart => fluid_scheme_compressible_ns_restart
103 !> Set up boundary conditions.
104 procedure, pass(this) :: setup_bcs &
106 procedure, pass(this), private :: setup_viscous_regularization
108
109 interface
110 !> Boundary condition factory for density.
111 !! @details Will mark a mesh zone for the bc and finalize.
112 !! @param[inout] object The object to be allocated.
113 !! @param[in] scheme The `fluid_scheme_compressible_ns_t` scheme.
114 !! @param[inout] json JSON object for initializing the bc.
115 !! @param[in] coef SEM coefficients.
116 !! @param[in] user The user interface.
117 module subroutine density_bc_factory(object, scheme, json, coef, user)
118 class(bc_t), pointer, intent(inout) :: object
119 type(fluid_scheme_compressible_ns_t), intent(in) :: scheme
120 type(json_file), intent(inout) :: json
121 type(coef_t), intent(in) :: coef
122 type(user_t), intent(in) :: user
123 end subroutine density_bc_factory
124 end interface
125
126 interface
127 !> Boundary condition factory for pressure.
128 !! @details Will mark a mesh zone for the bc and finalize.
129 !! @param[inout] object The object to be allocated.
130 !! @param[in] scheme The `fluid_scheme_compressible_ns_t` scheme.
131 !! @param[inout] json JSON object for initializing the bc.
132 !! @param[in] coef SEM coefficients.
133 !! @param[in] user The user interface.
134 module subroutine pressure_bc_factory(object, scheme, json, coef, user)
135 class(bc_t), pointer, intent(inout) :: object
136 type(fluid_scheme_compressible_ns_t), intent(inout) :: scheme
137 type(json_file), intent(inout) :: json
138 type(coef_t), intent(in) :: coef
139 type(user_t), intent(in) :: user
140 end subroutine pressure_bc_factory
141 end interface
142
143 interface
144 !> Boundary condition factory for velocity
145 !! @details Will mark a mesh zone for the bc and finalize.
146 !! @param[inout] object The object to be allocated.
147 !! @param[in] scheme The `fluid_scheme_compressible_ns_t` scheme.
148 !! @param[inout] json JSON object for initializing the bc.
149 !! @param[in] coef SEM coefficients.
150 !! @param[in] user The user interface.
151 module subroutine velocity_bc_factory(object, scheme, json, coef, user)
152 class(bc_t), pointer, intent(inout) :: object
153 type(fluid_scheme_compressible_ns_t), intent(in) :: scheme
154 type(json_file), intent(inout) :: json
155 type(coef_t), intent(in) :: coef
156 type(user_t), intent(in) :: user
157 end subroutine velocity_bc_factory
158 end interface
159
160contains
161 !> Initialize the compressible Navier-Stokes fluid scheme
162 !! @param this The fluid scheme object
163 !! @param msh Mesh data structure
164 !! @param lx Polynomial order in x-direction
165 !! @param params The fluid parameters, i.e. `case.fluid`
166 !! @param numerics_params The numerical parameters, i.e. `case.numerics`
167 !! @param user User-defined parameters and functions
168 !! @param chkp Checkpoint to write to
169 !! @param output_boundary Not supported by this scheme, ignored
170 subroutine fluid_scheme_compressible_ns_init(this, msh, lx, params, &
171 numerics_params, user, chkp, output_boundary)
172 class(fluid_scheme_compressible_ns_t), target, intent(inout) :: this
173 type(mesh_t), target, intent(inout) :: msh
174 integer, intent(in) :: lx
175 type(json_file), target, intent(inout) :: params
176 type(json_file), target, intent(inout) :: numerics_params
177 type(user_t), target, intent(in) :: user
178 type(chkp_t), target, intent(inout) :: chkp
179 logical, intent(in) :: output_boundary
180 character(len=12), parameter :: scheme = 'compressible'
181 integer :: rk_order
182
183 call this%free()
184
185 ! Initialize base class
186 call this%scheme_init(msh, lx, params, numerics_params, scheme, user)
187
188 call compressible_rhs_factory(this%compressible_rhs, this%gamma)
189
190 associate(xh_lx => this%Xh%lx, xh_ly => this%Xh%ly, xh_lz => this%Xh%lz, &
191 dm_xh => this%dm_Xh, nelv => this%msh%nelv)
192
193 call this%drho%init(dm_xh, 'drho')
194 call this%dm_x%init(dm_xh, 'dm_x')
195 call this%dm_y%init(dm_xh, 'dm_y')
196 call this%dm_z%init(dm_xh, 'dm_z')
197 call this%dE%init(dm_xh, 'dE')
198
199 end associate
200
201 if (neko_bcknd_device .eq. 1) then
202 associate(p => this%p, rho => this%rho, &
203 u => this%u, v => this%v, w => this%w, &
204 m_x => this%m_x, m_y => this%m_y, m_z => this%m_z, &
205 artificial_visc => this%artificial_visc)
206 call device_memcpy(p%x, p%x_d, p%dof%size(), &
207 host_to_device, sync = .false.)
208 call device_memcpy(rho%x, rho%x_d, rho%dof%size(), &
209 host_to_device, sync = .false.)
210 call device_memcpy(u%x, u%x_d, u%dof%size(), &
211 host_to_device, sync = .false.)
212 call device_memcpy(v%x, v%x_d, v%dof%size(), &
213 host_to_device, sync = .false.)
214 call device_memcpy(w%x, w%x_d, w%dof%size(), &
215 host_to_device, sync = .false.)
216 call device_memcpy(m_x%x, m_x%x_d, m_x%dof%size(), &
217 host_to_device, sync = .false.)
218 call device_memcpy(m_y%x, m_y%x_d, m_y%dof%size(), &
219 host_to_device, sync = .false.)
220 call device_memcpy(m_z%x, m_z%x_d, m_z%dof%size(), &
221 host_to_device, sync = .false.)
222 call device_memcpy(artificial_visc%x, artificial_visc%x_d, &
223 artificial_visc%dof%size(), host_to_device, sync = .false.)
224 end associate
225 end if
226
227 ! Initialize the diffusion operators
228 if (this%c_Xh%geo_compression) then
229 call ax_helm_allocator(this%Ax, type_name = "standard_compr")
230 else
231 call ax_helm_allocator(this%Ax, type_name = "standard")
232 end if
233 call ax_helm_allocator(this%Ax_stress, type_name = "full")
234
235 ! Initialize the velocity BC projector. The coupled projector builds the
236 ! local bases required by non-axis aligned mixed velocity conditions.
237 call this%bcs_vel_projector%init(this%c_Xh)
238
239 ! Initialize viscous regularization
240 call this%setup_viscous_regularization(params)
241
242 ! Initialize Runge-Kutta scheme
243 call json_get_or_default(numerics_params, 'time_order', rk_order, 4)
244 call this%rk_scheme%init(rk_order)
245
246 call neko_log%section("Fluid boundary conditions")
247 ! Set up boundary conditions
248 call this%setup_bcs(user, params)
249 call neko_log%end_section()
250
251 end subroutine fluid_scheme_compressible_ns_init
252
253 !> Free allocated memory and cleanup
254 !> @param this The fluid scheme object to destroy
255 subroutine fluid_scheme_compressible_ns_free(this)
256 class(fluid_scheme_compressible_ns_t), intent(inout) :: this
257 class(bc_t), pointer :: bc
258 integer :: i
259
260 if (allocated(this%Ax)) then
261 call this%Ax%free()
262 deallocate(this%Ax)
263 end if
264
265 if (allocated(this%Ax_stress)) then
266 call this%Ax_stress%free()
267 deallocate(this%Ax_stress)
268 end if
269
270 call this%scheme_free()
271
272 if (allocated(this%compressible_rhs)) then
273 deallocate(this%compressible_rhs)
274 end if
275
276 call this%drho%free()
277 call this%dm_x%free()
278 call this%dm_y%free()
279 call this%dm_z%free()
280 call this%dE%free()
281 call this%rk_scheme%free()
282
283 if (allocated(this%viscous_regularization)) then
284 call this%viscous_regularization%free()
285 deallocate(this%viscous_regularization)
286 end if
287
288 do i = 1, this%bcs_density%size()
289 bc => this%bcs_density%get(i)
290 if (associated(bc)) then
291 call bc%free()
292 deallocate(bc)
293 end if
294 end do
295 call this%bcs_density%free()
296 call this%bcs_vel_projector%free()
297
298 end subroutine fluid_scheme_compressible_ns_free
299
300 !> Advance the fluid simulation one timestep
301 !> @param this The fluid scheme object
302 !> @param time Current simulation time state
303 !> @param ext_bdf Time integration controller
304 !> @param dt_controller Timestep size controller
305 subroutine fluid_scheme_compressible_ns_step(this, time, dt_controller)
306 class(fluid_scheme_compressible_ns_t), target, intent(inout) :: this
307 type(time_state_t), intent(in) :: time
308 type(time_step_controller_t), intent(in) :: dt_controller
309 type(field_t), pointer :: temp
310 integer :: temp_indices(1)
311 ! number of degrees of freedom
312 integer :: n
313 integer :: i
314 class(bc_t), pointer :: b
315
316 n = this%dm_Xh%size()
317 call neko_scratch_registry%request_field(temp, temp_indices(1), .false.)
318 b => null()
319
320 call profiler_start_region('Fluid compressible', 1)
321 associate(u => this%u, v => this%v, w => this%w, p => this%p, &
322 m_x=> this%m_x, m_y => this%m_y, m_z => this%m_z, &
323 xh => this%Xh, msh => this%msh, ax => this%Ax, &
324 c_xh => this%c_Xh, dm_xh => this%dm_Xh, gs_xh => this%gs_Xh, &
325 e => this%E, rho => this%rho, &
326 f_x => this%f_x, f_y => this%f_y, f_z => this%f_z, &
327 drho => this%drho, dm_x => this%dm_x, dm_y => this%dm_y, &
328 dm_z => this%dm_z, de => this%dE, &
329 compressible_rhs => this%compressible_rhs, &
330 t => time%t, tstep => time%tstep, dt => time%dt, &
331 rk_scheme => this%rk_scheme)
332
333 !> Update artificial viscosity
334 if (allocated(this%viscous_regularization)) then
335 call this%viscous_regularization%update(this%artificial_visc)
336 end if
337
338 ! Refresh user-specified physical viscosity/conductivity before RHS.
339 call this%update_material_properties(time)
340
341 ! Execute RHS step with artificial viscosity field
342 call compressible_rhs%step(rho, m_x, m_y, m_z, e, &
343 p, u, v, w, this%Ax, &
344 this%Ax_stress, c_xh, gs_xh, this%artificial_visc, this%mu, &
345 this%kappa, this%bcs_vel, time, rk_scheme, real(dt, kind=rp))
346
347 !> Apply density boundary conditions
348 call this%bcs_density%apply(rho, time)
349
350 !> Update variables
351 ! Update u, v, w
352 if (neko_bcknd_device .eq. 1) then
353 call compressible_ops_device_update_uvw(u%x_d, v%x_d, w%x_d, &
354 m_x%x_d, m_y%x_d, m_z%x_d, rho%x_d, n)
355 else
356 call compressible_ops_cpu_update_uvw(u%x, v%x, w%x, &
357 m_x%x, m_y%x, m_z%x, rho%x, n)
358 end if
359
360 !> Apply velocity boundary conditions
361 call this%bcs_vel%apply_vector(u%x, v%x, w%x, &
362 dm_xh%size(), time, strong = .true.)
363
364 !> Update m_x, m_y, m_z, p and temp (ruvw)
365 if (neko_bcknd_device .eq. 1) then
366 call compressible_ops_device_update_mxyz_p_ruvw(m_x%x_d, m_y%x_d, &
367 m_z%x_d, p%x_d, temp%x_d, u%x_d, v%x_d, w%x_d, e%x_d, &
368 rho%x_d, this%gamma, n)
369 else
370 call compressible_ops_cpu_update_mxyz_p_ruvw(m_x%x, m_y%x, m_z%x, &
371 p%x, temp%x, u%x, v%x, w%x, e%x, rho%x, this%gamma, n)
372 end if
373
374 !> Apply pressure boundary conditions
375 call this%bcs_prs%apply(p, time)
376
377
378 !> Update E
379 if (neko_bcknd_device .eq. 1) then
380 call compressible_ops_device_update_e(e%x_d, p%x_d, &
381 temp%x_d, this%gamma, n)
382 else
383 call compressible_ops_cpu_update_e(e%x, p%x, temp%x, this%gamma, n)
384 end if
385
386 !> Update temperature T = p / (rho * (gamma - 1))
387 if (neko_bcknd_device .eq. 1) then
388 call compressible_ops_device_update_temperature( &
389 this%temperature%x_d, p%x_d, rho%x_d, this%gamma, n)
390 else
391 !OCL NORECURRENCE, NOVREC, NOALIAS
392 !DIR$ CONCURRENT
393 !DIR$ IVDEP
394 !GCC$ ivdep
395 !$omp parallel do simd
396 do i = 1, n
397 this%temperature%x(i,1,1,1) = p%x(i,1,1,1) / &
398 (rho%x(i,1,1,1) * (this%gamma - 1.0_rp))
399 end do
400 !$omp end parallel do simd
401 end if
402
403 !> Update maximum wave speed for CFL computation
404 call this%compute_max_wave_speed()
405
406 do i = 1, this%bcs_vel%size()
407 b => this%bcs_vel%get(i)
408 b%updated = .false.
409 end do
410
411 do i = 1, this%bcs_prs%size()
412 b => this%bcs_prs%get(i)
413 b%updated = .false.
414 end do
415
416 do i = 1, this%bcs_density%size()
417 b => this%bcs_density%get(i)
418 b%updated = .false.
419 end do
420 nullify(b)
421
422 end associate
423 call profiler_end_region('Fluid compressible', 1)
424
425 call neko_scratch_registry%relinquish_field(temp_indices)
426
427 end subroutine fluid_scheme_compressible_ns_step
428
429 !> Set up boundary conditions for the fluid scheme
430 !> @param this The fluid scheme object
431 !> @param user User-defined boundary conditions
432 !> @param params Configuration parameters
433 subroutine fluid_scheme_compressible_ns_setup_bcs(this, user, params)
434 class(fluid_scheme_compressible_ns_t), target, intent(inout) :: this
435 type(user_t), target, intent(in) :: user
436 type(json_file), intent(inout) :: params
437 integer :: i, n_bcs, zone_index, j, zone_size, global_zone_size, ierr
438 class(bc_t), pointer :: bc_i
439 type(json_core) :: core
440 type(json_value), pointer :: bc_object
441 type(json_file) :: bc_subdict
442 logical :: found
443 integer, allocatable :: zone_indices(:)
444 character(len=LOG_SIZE) :: log_buf
445
446 ! Process boundary conditions
447 if (params%valid_path('boundary_conditions')) then
448 call params%info('boundary_conditions', n_children = n_bcs)
449 call params%get_core(core)
450 call params%get('boundary_conditions', bc_object, found)
451
452 !
453 ! Velocity bcs
454 !
455 call this%bcs_vel%init(n_bcs)
456
457 do i = 1, n_bcs
458 ! Extract BC configuration
459 call json_extract_item(core, bc_object, i, bc_subdict)
460 call json_get(bc_subdict, "zone_indices", zone_indices)
461
462 ! Validate zones
463 do j = 1, size(zone_indices)
464 zone_size = this%msh%labeled_zones(zone_indices(j))%size
465 call mpi_allreduce(zone_size, global_zone_size, 1, &
466 mpi_integer, mpi_max, neko_comm, ierr)
467
468 if (global_zone_size .eq. 0) then
469 write(log_buf, '(A,I0,A)') "Error: Zone ", zone_indices(j), &
470 " has zero size"
471 call neko_error(log_buf)
472 end if
473 end do
474
475 ! Create BC
476 bc_i => null()
477 call velocity_bc_factory(bc_i, this, bc_subdict, this%c_Xh, user)
478
479 ! Add to appropriate lists
480 if (associated(bc_i)) then
481 call this%bcs_vel_projector%mark(bc_i)
482 call this%bcs_vel%append(bc_i)
483 end if
484 end do
485
486 !
487 ! Pressure bcs
488 !
489 call this%bcs_prs%init(n_bcs)
490
491 do i = 1, n_bcs
492 ! Create a new json containing just the subdict for this bc
493 call json_extract_item(core, bc_object, i, bc_subdict)
494 bc_i => null()
495 call pressure_bc_factory(bc_i, this, bc_subdict, this%c_Xh, user)
496
497 ! Not all bcs require an allocation for pressure in particular,
498 ! so we check.
499 if (associated(bc_i)) then
500 call this%bcs_prs%append(bc_i)
501 end if
502 end do
503
504 !
505 ! Density bcs
506 !
507 call this%bcs_density%init(n_bcs)
508
509 do i = 1, n_bcs
510 ! Create a new json containing just the subdict for this bc
511 call json_extract_item(core, bc_object, i, bc_subdict)
512 bc_i => null()
513 call density_bc_factory(bc_i, this, bc_subdict, this%c_Xh, user)
514
515 ! Not all bcs require an allocation for pressure in particular,
516 ! so we check.
517 if (associated(bc_i)) then
518 call this%bcs_density%append(bc_i)
519 end if
520 end do
521 else
522 ! Check that there are no labeled zones, i.e. all are periodic.
523 do i = 1, size(this%msh%labeled_zones)
524 if (this%msh%labeled_zones(i)%size .gt. 0) then
525 call neko_error("No boundary_conditions entry in the case file!")
526 end if
527 end do
528
529 ! For a pure periodic case, we still need to initilise the bc lists
530 ! to a zero size to avoid issues with apply() in step()
531 call this%bcs_prs%init()
532 call this%bcs_vel%init()
533 call this%bcs_density%init()
534
535 end if
536
537 call this%bcs_vel_projector%finalize(rebuild_mask = .true.)
538 end subroutine fluid_scheme_compressible_ns_setup_bcs
539
540 !> Restart the simulation from saved state
541 !! @param this The fluid scheme object
542 !! @param dtlag Previous timestep sizes
543 !! @param tlag Previous time values
544 subroutine fluid_scheme_compressible_ns_restart(this, chkp)
545 class(fluid_scheme_compressible_ns_t), target, intent(inout) :: this
546 type(chkp_t), intent(inout) :: chkp
547 end subroutine fluid_scheme_compressible_ns_restart
548
549 subroutine setup_viscous_regularization(this, params)
550 class(fluid_scheme_compressible_ns_t), target, intent(inout) :: this
551 type(json_file), intent(inout) :: params
552 type(json_file) :: reg_json
553 logical :: found
554 character(len=:), allocatable :: viscous_regularization_type
555
556 found = .false.
557 if (params%valid_path('viscous_regularization')) then
558 call json_get(params, 'viscous_regularization', &
559 reg_json)
560 found = .true.
561 end if
562
563 if (.not. found) then
564 ! No viscous_regularization specified, so we skip setup
565 this%if_viscous_regularization = .false.
566 return
567 else
568 this%if_viscous_regularization = .true.
569 end if
570
571 call json_get(reg_json, 'type', viscous_regularization_type)
572 call viscous_regularization_factory(this%viscous_regularization, &
573 viscous_regularization_type, &
574 reg_json, this%c_Xh, this%dm_Xh)
575
576 call reg_json%destroy()
577
578 if (allocated(viscous_regularization_type)) &
579 deallocate(viscous_regularization_type)
580
581 end subroutine setup_viscous_regularization
582
double real
Abstract interface to evaluate rhs.
Copy data between host and device (or device and device).
Definition device.F90:72
Retrieves a parameter by name or assigns a provided default value. In the latter case also adds the m...
Retrieves a parameter by name or throws an error.
Compute the divergence of a vector field.
Definition operators.f90:86
Apply cyclic boundary condition to a vector field.
Subroutines to add advection terms to the RHS of a transport equation.
Definition advection.f90:34
Defines a Matrix-vector product.
Definition ax.f90:34
Defines a list of bc_t.
Definition bc_list.f90:34
Defines a boundary condition.
Definition bc.f90:34
Backward-differencing scheme for time integration.
Defines format-independent checkpoint registration and restart state.
Coefficients.
Definition coef.f90:34
Definition comm.F90:1
type(mpi_comm), public neko_comm
MPI communicator.
Definition comm.F90:46
CPU implementation of compressible flow operations.
subroutine, public compressible_ops_cpu_update_uvw(u, v, w, m_x, m_y, m_z, rho, n)
Update u,v,w fields.
subroutine, public compressible_ops_cpu_update_e(e, p, ruvw, gamma, n)
Update E field.
subroutine, public compressible_ops_cpu_update_mxyz_p_ruvw(m_x, m_y, m_z, p, ruvw, u, v, w, e, rho, gamma, n)
Update m_x, m_y, m_z, p, ruvw, fields.
Device implementation of compressible flow operations.
subroutine, public compressible_ops_device_update_uvw(u_d, v_d, w_d, m_x_d, m_y_d, m_z_d, rho_d, n)
Update u,v,w fields.
subroutine, public compressible_ops_device_update_temperature(t_d, p_d, rho_d, gamma, n)
Update temperature field.
subroutine, public compressible_ops_device_update_mxyz_p_ruvw(m_x_d, m_y_d, m_z_d, p_d, ruvw_d, u_d, v_d, w_d, e_d, rho_d, gamma, n)
Update m_x, m_y, m_z, p, ruvw, fields.
subroutine, public compressible_ops_device_update_e(e_d, p_d, ruvw_d, gamma, n)
Update E field.
Device abstraction, common interface for various accelerators.
Definition device.F90:34
integer, parameter, public host_to_device
Definition device.F90:48
Contains the field_serties_t type.
Defines a field.
Definition field.f90:34
subroutine fluid_scheme_compressible_ns_restart(this, chkp)
Restart the simulation from saved state.
subroutine fluid_scheme_compressible_ns_init(this, msh, lx, params, numerics_params, user, chkp, output_boundary)
Boundary condition factory for density.
subroutine setup_viscous_regularization(this, params)
subroutine fluid_scheme_compressible_ns_step(this, time, dt_controller)
Advance the fluid simulation one timestep.
subroutine fluid_scheme_compressible_ns_free(this)
Free allocated memory and cleanup.
subroutine fluid_scheme_compressible_ns_setup_bcs(this, user, params)
Set up boundary conditions for the fluid scheme.
Gather-scatter.
Defines Gather-scatter operations.
Definition gs_ops.f90:34
integer, parameter, public gs_op_max
Definition gs_ops.f90:36
integer, parameter, public gs_op_min
Definition gs_ops.f90:36
Utilities for retrieving parameters from the case files.
Logging routines.
Definition log.f90:34
type(log_t), public neko_log
Global log stream.
Definition log.f90:92
integer, parameter, public log_size
Definition log.f90:46
Defines a mesh.
Definition mesh.f90:34
Build configurations.
integer, parameter neko_bcknd_device
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:14
Operators.
Definition operators.f90:34
Profiling interface.
Definition profiler.F90:34
subroutine, public profiler_start_region(name, region_id)
Started a named (name) profiler region.
Definition profiler.F90:79
subroutine, public profiler_end_region(name, region_id)
End the most recently started profiler region.
Definition profiler.F90:116
Defines a registry for storing and requesting temporary objects This can be used when you have a func...
type(scratch_registry_t), target, public neko_scratch_registry
Global scratch registry.
Compound scheme for the advection and diffusion operators in a transport equation.
Module with things related to the simulation time.
Implements type time_step_controller.
Interfaces for user interaction with NEKO.
Definition user_intf.f90:34
Utilities.
Definition utils.f90:35
subroutine, public neko_type_error(base_type, wrong_type, known_types)
Reports an error allocating a type for a particular base pointer class.
Definition utils.f90:415
Implements boundary condition projectors for vector fields. Two types concrete types are provided: se...
Defines the base interface for viscous regularization methods.
Base abstract type for computing the advection operator.
Definition advection.f90:46
Base type for a matrix-vector product providing .
Definition ax.f90:44
Base type for a boundary condition.
Definition bc.f90:73
A list of allocatable `bc_t`. Follows the standard interface of lists.
Definition bc_list.f90:49
Implicit backward-differencing scheme for time integration.
Collection of live simulation data registered for checkpointing.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Definition coef.f90:136
Stores a series (sequence) of fields, logically connected to a base field, and arranged according to ...
Gather-scatter kernel.
Implements the logic to compute the time coefficients for the advection and diffusion operators in a ...
A struct that contains all info about the time, expand as needed.
A type collecting all the overridable user routines and flag to suppress type injection from custom m...
A coupled projector for vector fields, suitable for mixed boundary conditions.
Abstract type for resolving vector boundary conditions.
Base abstract type for viscous regularization methods.