Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
bc.f90
Go to the documentation of this file.
1! Copyright (c) 2020-2025, 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!
34module bc
36 use num_types, only : rp
37 use device, only : host_to_device, device_memcpy, &
39 use iso_c_binding, only : c_associated
40 use dofmap, only : dofmap_t
41 use coefs, only : coef_t
42 use space, only : space_t
44 use facet_zone, only : facet_zone_t
45 use mask, only : mask_t
46 use stack, only : stack_i4t2_t
47 use tuple, only : tuple_i4_t
48 use field, only : field_t
49 use gs_ops, only : gs_op_add
50 use math, only : relcmp, rzero
51 use device_math, only : device_cfill
53 use logger, only : neko_log, log_size
54 use, intrinsic :: iso_c_binding, only : c_ptr, c_null_ptr
55 use json_module, only : json_file
56 use time_state, only : time_state_t
57 use field, only : field_t
58 use file, only : file_t
59
60 implicit none
61 private
62
66 integer, parameter, public :: bc_dirichlet = 0
67 integer, parameter, public :: bc_mixed_constrains_normal = 2
68 integer, parameter, public :: bc_mixed_constrains_tangent = 3
69 integer, parameter, public :: bc_neumann = 5
70
72 type, public, abstract :: bc_t
74 integer, allocatable :: msk(:)
76 integer, allocatable :: facet_node_msk(:)
78 integer, allocatable :: facet(:)
80 type(dofmap_t), pointer :: dof => null()
82 type(coef_t), pointer :: coef => null()
84 type(mesh_t), pointer :: msh => null()
86 type(space_t), pointer :: xh => null()
88 type(stack_i4t2_t) :: marked_facet
90 type(c_ptr) :: msk_d = c_null_ptr
92 type(c_ptr) :: facet_node_msk_d = c_null_ptr
94 type(c_ptr) :: facet_d = c_null_ptr
96 integer :: bc_type = -1
99 logical :: updated = .false.
100 !!> Name of the bc
101 character(len=:), allocatable :: name
102 !!> Zone indices where the bc is applied
103 integer, allocatable :: zone_indices(:)
104 contains
106 procedure, pass(this) :: init_base => bc_init_base
108 procedure, pass(this) :: free_base => bc_free_base
110 procedure, pass(this) :: mark_facet => bc_mark_facet
112 procedure, pass(this) :: mark_facets => bc_mark_facets
114 procedure, pass(this) :: mark_zone => bc_mark_zone
116 procedure, pass(this) :: mark_labeled_zone => bc_mark_labeled_zone
118 procedure, pass(this) :: mark_labeled_zones => bc_mark_labeled_zones
121 procedure, pass(this) :: finalize_base => bc_finalize_base
122
125 procedure, pass(this) :: apply_scalar_generic => bc_apply_scalar_generic
128 procedure, pass(this) :: apply_vector_generic => bc_apply_vector_generic
130 procedure, pass(this) :: debug_mask_ => bc_debug_mask
132 procedure(bc_apply_scalar), pass(this), deferred :: apply_scalar
134 procedure(bc_apply_vector), pass(this), deferred :: apply_vector
136 procedure(bc_apply_scalar_dev), pass(this), deferred :: apply_scalar_dev
138 procedure(bc_apply_vector_dev), pass(this), deferred :: apply_vector_dev
140 procedure(bc_destructor), pass(this), deferred :: free
142 procedure(bc_constructor), pass(this), deferred :: init
144 procedure(bc_finalize), pass(this), deferred :: finalize
145 end type bc_t
146
148 type, public :: bc_ptr_t
149 class(bc_t), pointer :: ptr => null()
150 end type bc_ptr_t
151
152 ! Helper type to have an array of polymorphic bc_t objects.
153 type, public :: bc_alloc_t
154 class(bc_t), allocatable :: obj
155 end type bc_alloc_t
156
157
158 abstract interface
159
160 subroutine bc_constructor(this, coef, json)
161 import :: bc_t, coef_t, json_file
162 class(bc_t), intent(inout), target :: this
163 type(coef_t), target, intent(in) :: coef
164 type(json_file), intent(inout) :: json
165 end subroutine bc_constructor
166 end interface
167
168 abstract interface
169
170 subroutine bc_destructor(this)
171 import :: bc_t
172 class(bc_t), intent(inout), target :: this
173 end subroutine bc_destructor
174 end interface
175
176 abstract interface
177
178 subroutine bc_finalize(this)
179 import :: bc_t
180 class(bc_t), intent(inout), target :: this
181 end subroutine bc_finalize
182 end interface
183
184 abstract interface
185
190 subroutine bc_apply_scalar(this, x, n, time, strong)
191 import :: bc_t, time_state_t
192 import :: rp
193 class(bc_t), intent(inout) :: this
194 integer, intent(in) :: n
195 real(kind=rp), intent(inout), dimension(n) :: x
196 type(time_state_t), intent(in), optional :: time
197 logical, intent(in), optional :: strong
198 end subroutine bc_apply_scalar
199 end interface
200
201 abstract interface
202
210 subroutine bc_apply_vector(this, x, y, z, n, time, strong)
211 import :: bc_t, time_state_t
212 import :: rp
213 class(bc_t), intent(inout) :: this
214 integer, intent(in) :: n
215 real(kind=rp), intent(inout), dimension(n) :: x
216 real(kind=rp), intent(inout), dimension(n) :: y
217 real(kind=rp), intent(inout), dimension(n) :: z
218 type(time_state_t), intent(in), optional :: time
219 logical, intent(in), optional :: strong
220 end subroutine bc_apply_vector
221 end interface
222
223 abstract interface
224
229 subroutine bc_apply_scalar_dev(this, x_d, time, strong, strm)
230 import :: c_ptr
231 import :: bc_t, time_state_t
232 import :: rp
233 class(bc_t), intent(inout), target :: this
234 type(c_ptr), intent(inout) :: x_d
235 type(time_state_t), intent(in), optional :: time
236 logical, intent(in), optional :: strong
237 type(c_ptr), intent(inout) :: strm
238 end subroutine bc_apply_scalar_dev
239 end interface
240
241 abstract interface
242
249 subroutine bc_apply_vector_dev(this, x_d, y_d, z_d, time, strong, strm)
250 import :: c_ptr, bc_t, time_state_t
251 import :: rp
252 class(bc_t), intent(inout), target :: this
253 type(c_ptr), intent(inout) :: x_d
254 type(c_ptr), intent(inout) :: y_d
255 type(c_ptr), intent(inout) :: z_d
256 type(time_state_t), intent(in), optional :: time
257 logical, intent(in), optional :: strong
258 type(c_ptr), intent(inout) :: strm
259 end subroutine bc_apply_vector_dev
260 end interface
261
262contains
263
266 subroutine bc_init_base(this, coef)
267 class(bc_t), intent(inout) :: this
268 type(coef_t), target, intent(in) :: coef
269
270 call this%free_base
271
272 this%dof => coef%dof
273 this%coef => coef
274 this%Xh => this%dof%Xh
275 this%msh => this%dof%msh
276
277 call this%marked_facet%init()
278
279 end subroutine bc_init_base
280
282 subroutine bc_free_base(this)
283 class(bc_t), intent(inout) :: this
284
285 call this%marked_facet%free()
286
287 nullify(this%Xh)
288 nullify(this%msh)
289 nullify(this%dof)
290 nullify(this%coef)
291
292 if (allocated(this%msk)) then
293 if (neko_bcknd_device .eq. 1) then
294 call device_unmap(this%msk, this%msk_d)
295 end if
296 deallocate(this%msk)
297 end if
298
299 if (allocated(this%facet_node_msk)) then
300 if (neko_bcknd_device .eq. 1) then
301 call device_unmap(this%facet_node_msk, this%facet_node_msk_d)
302 end if
303 deallocate(this%facet_node_msk)
304 end if
305
306 if (allocated(this%facet)) then
307 if (neko_bcknd_device .eq. 1) then
308 call device_unmap(this%facet, this%facet_d)
309 end if
310 deallocate(this%facet)
311 end if
312
313 if (allocated(this%name)) then
314 deallocate(this%name)
315 end if
316
317 if (allocated(this%zone_indices)) then
318 deallocate(this%zone_indices)
319 end if
320
321 ! Back to the state of a freshly declared bc, so that a condition which is
322 ! reinitialised does not inherit an `updated` from its previous life and
323 ! skip its first update.
324 this%updated = .false.
325
326 end subroutine bc_free_base
327
336 subroutine bc_apply_vector_generic(this, x, y, z, time, strong, strm)
337 class(bc_t), intent(inout) :: this
338 type(field_t), intent(inout) :: x
339 type(field_t), intent(inout) :: y
340 type(field_t), intent(inout) :: z
341 type(time_state_t), intent(in), optional :: time
342 logical, intent(in), optional :: strong
343 type(c_ptr), intent(inout), optional :: strm
344 type(c_ptr) :: strm_
345 integer :: n
346 character(len=256) :: msg
347
348 ! Get the size of the fields
349 n = x%size()
350
351 ! Ensure all fields are the same size
352 if (y%size() .ne. n .or. z%size() .ne. n) then
353 msg = "Fields x, y, z must have the same size in " // &
354 "bc_list_apply_vector_field"
355 call neko_error(trim(msg))
356 end if
357
358 if (neko_bcknd_device .eq. 1) then
359
360 if (present(strm)) then
361 strm_ = strm
362 else
363 strm_ = glb_cmd_queue
364 end if
365
366 call this%apply_vector_dev(x%x_d, y%x_d, z%x_d, time = time, &
367 strong = strong, strm = strm_)
368 else
369 call this%apply_vector(x%x, y%x, z%x, n, time = time, strong = strong)
370 end if
371
372 end subroutine bc_apply_vector_generic
373
380 subroutine bc_apply_scalar_generic(this, x, time, strong, strm)
381 class(bc_t), intent(inout) :: this
382 type(field_t), intent(inout) :: x
383 type(time_state_t), intent(in), optional :: time
384 logical, intent(in), optional :: strong
385 type(c_ptr), intent(inout), optional :: strm
386 type(c_ptr) :: strm_
387 integer :: n
388
389 ! Get the size of the field
390 n = x%size()
391
392 if (neko_bcknd_device .eq. 1) then
393
394 if (present(strm)) then
395 strm_ = strm
396 else
397 strm_ = glb_cmd_queue
398 end if
399
400 call this%apply_scalar_dev(x%x_d, time = time, strong = strong, &
401 strm = strm_)
402 else
403 call this%apply_scalar(x%x, n, time = time)
404 end if
405
406 end subroutine bc_apply_scalar_generic
407
411 subroutine bc_mark_facet(this, facet, el)
412 class(bc_t), intent(inout) :: this
413 integer, intent(in) :: facet
414 integer, intent(in) :: el
415 type(tuple_i4_t) :: t
416
417 t%x = [facet, el]
418 call this%marked_facet%push(t)
419
420 end subroutine bc_mark_facet
421
424 subroutine bc_mark_facets(this, facet_list)
425 class(bc_t), intent(inout) :: this
426 type(stack_i4t2_t), intent(inout) :: facet_list
427 type(tuple_i4_t), pointer :: fp(:)
428 integer :: i
429
430 fp => facet_list%array()
431 do i = 1, facet_list%size()
432 call this%marked_facet%push(fp(i))
433 end do
434
435 end subroutine bc_mark_facets
436
439 subroutine bc_mark_zone(this, bc_zone)
440 class(bc_t), intent(inout) :: this
441 class(facet_zone_t), intent(in) :: bc_zone
442 integer :: i
443 do i = 1, bc_zone%size
444 call this%marked_facet%push(bc_zone%facet_el(i))
445 end do
446 end subroutine bc_mark_zone
447
450 subroutine bc_mark_labeled_zone(this, zone_index)
451 class(bc_t), intent(inout) :: this
452 integer, intent(in) :: zone_index
453 integer, allocatable :: tmp(:)
454 integer :: i
455 character(len=LOG_SIZE) :: log_buf
456
457 if (allocated(this%zone_indices)) then
458 do i = 1, size(this%zone_indices)
459 if (this%zone_indices(i) .eq. zone_index) then
460 write(log_buf, '(A,I0,A)') 'Zone index ', zone_index, &
461 ' already marked for this boundary condition'
462 call neko_warning(log_buf)
463 return
464 end if
465 end do
466
467 allocate(tmp(size(this%zone_indices) + 1))
468 tmp(1:size(this%zone_indices)) = this%zone_indices
469 tmp(size(tmp)) = zone_index
470 call move_alloc(tmp, this%zone_indices)
471 else
472 allocate(this%zone_indices(1))
473 this%zone_indices(1) = zone_index
474 end if
475
476 call this%mark_zone(this%msh%labeled_zones(zone_index))
477 end subroutine bc_mark_labeled_zone
478
481 subroutine bc_mark_labeled_zones(this, zone_indices)
482 class(bc_t), intent(inout) :: this
483 integer, intent(in) :: zone_indices(:)
484 integer :: i
485
486 do i = 1, size(zone_indices)
487 call this%mark_labeled_zone(zone_indices(i))
488 end do
489 end subroutine bc_mark_labeled_zones
490
495 subroutine bc_finalize_base(this)
496 class(bc_t), target, intent(inout) :: this
497 type(tuple_i4_t), pointer :: bfp(:)
498 type(tuple_i4_t) :: bc_facet
499 type(field_t) :: test_field
500 integer :: facet_size, facet, el
501 integer :: i, j, k, l, msk_c
502 integer :: lx, ly, lz, n
503 character(len=LOG_SIZE) :: log_buf
504 lx = this%Xh%lx
505 ly = this%Xh%ly
506 lz = this%Xh%lz
508
509 ! Note we assume that lx = ly = lz
510 facet_size = lx**2
511 n = facet_size * this%marked_facet%size()
512 allocate(this%facet_node_msk(0:n))
513 allocate(this%facet(0:n))
514
515 if (neko_bcknd_device .eq. 1) then
516 call device_map(this%facet_node_msk, this%facet_node_msk_d, n + 1)
517 call device_map(this%facet, this%facet_d, n + 1)
518 end if
519
520 msk_c = 0
521 bfp => this%marked_facet%array()
522
523 ! Loop through each (facet, element) id tuple
524 ! Then loop over all the nodes of the face and compute their linear index
525 ! This index goes into this%facet_node_msk, whereas the corresponding face
526 ! id goes into this%facet
527 do i = 1, this%marked_facet%size()
528 bc_facet = bfp(i)
529 facet = bc_facet%x(1)
530 el = bc_facet%x(2)
531 select case (facet)
532 case (1)
533 do l = 1, lz
534 do k = 1, ly
535 msk_c = msk_c + 1
536 this%facet_node_msk(msk_c) = &
537 linear_index(1, k, l, el, lx, ly, lz)
538 this%facet(msk_c) = 1
539 end do
540 end do
541 case (2)
542 do l = 1, lz
543 do k = 1, ly
544 msk_c = msk_c + 1
545 this%facet_node_msk(msk_c) = &
546 linear_index(lx, k, l, el, lx, ly, lz)
547 this%facet(msk_c) = 2
548 end do
549 end do
550 case (3)
551 do l = 1, lz
552 do j = 1, lx
553 msk_c = msk_c + 1
554 this%facet_node_msk(msk_c) = &
555 linear_index(j, 1, l, el, lx, ly, lz)
556 this%facet(msk_c) = 3
557 end do
558 end do
559 case (4)
560 do l = 1, lz
561 do j = 1, lx
562 msk_c = msk_c + 1
563 this%facet_node_msk(msk_c) = &
564 linear_index(j, ly, l, el, lx, ly, lz)
565 this%facet(msk_c) = 4
566 end do
567 end do
568 case (5)
569 do k = 1, ly
570 do j = 1, lx
571 msk_c = msk_c + 1
572 this%facet_node_msk(msk_c) = &
573 linear_index(j, k, 1, el, lx, ly, lz)
574 this%facet(msk_c) = 5
575 end do
576 end do
577 case (6)
578 do k = 1, ly
579 do j = 1, lx
580 msk_c = msk_c + 1
581 this%facet_node_msk(msk_c) = &
582 linear_index(j, k, lz, el, lx, ly, lz)
583 this%facet(msk_c) = 6
584 end do
585 end do
586 end select
587 end do
588 this%facet_node_msk(0) = msk_c
589 this%facet(0) = msk_c
590
591 if (neko_bcknd_device .eq. 1) then
592 n = msk_c + 1
593 call device_memcpy(this%facet_node_msk, this%facet_node_msk_d, n, &
594 host_to_device, sync = .true.)
595 call device_memcpy(this%facet, this%facet_d, n, &
596 host_to_device, sync = .true.)
597 end if
598
599 !Makes check for points not on facet that should have bc applied
600 call test_field%init(this%dof)
601
602 n = test_field%size()
603 test_field%x = 0.0_rp
604 !Apply this bc once
605 do i = 1, this%facet_node_msk(0)
606 test_field%x(this%facet_node_msk(i),1,1,1) = 1.0
607 end do
608 if (neko_bcknd_device .eq. 1) then
609 call device_memcpy(test_field%x, test_field%x_d, n, &
610 host_to_device, sync = .true.)
611 end if
612 !Check if some point that was not zeroed was zeroed on another element
613 call this%coef%gs_h%op(test_field, gs_op_add)
614 if (neko_bcknd_device .eq. 1) then
615 call device_memcpy(test_field%x, test_field%x_d, n, &
616 device_to_host, sync = .true.)
617 end if
618 msk_c = 0
619 do i = 1, this%dof%size()
620 if (test_field%x(i,1,1,1) .gt. 0.5) then
621 msk_c = msk_c + 1
622 end if
623 end do
624 !Allocate new mask
625 allocate(this%msk(0:msk_c))
626 j = 1
627 do i = 1, this%dof%size()
628 if (test_field%x(i,1,1,1) .gt. 0.5) then
629 this%msk(j) = i
630 j = j + 1
631 end if
632 end do
633
634 call test_field%free()
635
636 this%msk(0) = msk_c
637
638 if (neko_bcknd_device .eq. 1) then
639 n = msk_c + 1
640 call device_map(this%msk, this%msk_d, n)
641 call device_memcpy(this%msk, this%msk_d, n, &
642 host_to_device, sync = .true.)
643 end if
644
645 if (.not. allocated(this%name)) then
646! gives plenty of empty info lines during AMR restart
647! this%name = ""
648 else
649 write(log_buf, '(A,A)') 'BC assigned name : ', trim(this%name)
650 call neko_log%message(log_buf)
651 end if
652
653! causes trouble for AMR restart
654! if (.not. allocated(this%zone_indices)) then
655! allocate(this%zone_indices(1))
656! this%zone_indices(1) = -1
657! end if
658
659 end subroutine bc_finalize_base
660
664 subroutine bc_debug_mask(this, file_name)
665 class(bc_t), intent(inout) :: this
666 character(len=*), intent(in) :: file_name
667 type(field_t) :: bdry_field
668 integer:: i, m, k
669 type(file_t) :: dump_file
670
671 call bdry_field%init(this%coef%dof, 'bdry')
672 m = this%msk(0)
673 do i = 1, m
674 k = this%msk(i)
675 bdry_field%x(k,1,1,1) = 1.0_rp
676 end do
677 call dump_file%init(file_name)
678 call dump_file%write(bdry_field)
679
680 end subroutine bc_debug_mask
681
682end module bc
Apply the boundary condition to a scalar field on the device.
Definition bc.f90:229
Apply the boundary condition to a scalar field.
Definition bc.f90:190
Apply the boundary condition to a vector field on the device.
Definition bc.f90:249
Apply the boundary condition to a vector field.
Definition bc.f90:210
Constructor.
Definition bc.f90:160
Destructor.
Definition bc.f90:170
Finalize by building the mask and facet arrays.
Definition bc.f90:178
Map a Fortran array to a device (allocate and associate)
Definition device.F90:83
Copy data between host and device (or device and device)
Definition device.F90:72
Unmap a Fortran array from a device (deassociate and free)
Definition device.F90:89
Defines a boundary condition.
Definition bc.f90:34
subroutine bc_mark_zone(this, bc_zone)
Mark all facets from a zone.
Definition bc.f90:440
subroutine bc_finalize_base(this)
Finalize the construction of the bc by populting the msk and facet arrays.
Definition bc.f90:496
integer, parameter, public bc_mixed_constrains_tangent
Definition bc.f90:68
subroutine bc_free_base(this)
Destructor for the base type, bc_t.
Definition bc.f90:283
subroutine bc_mark_labeled_zones(this, zone_indices)
Mark all facets from labeled zones.
Definition bc.f90:482
integer, parameter, public bc_mixed_constrains_normal
Definition bc.f90:67
subroutine bc_mark_labeled_zone(this, zone_index)
Mark all facets from a labeled zone.
Definition bc.f90:451
subroutine bc_init_base(this, coef)
Constructor.
Definition bc.f90:267
subroutine bc_apply_scalar_generic(this, x, time, strong, strm)
Apply the boundary condition to a scalar field. Dispatches to the CPU or the device version.
Definition bc.f90:381
integer, parameter, public bc_dirichlet
Supported boundary condition types. The values are set in order of precedence for global resolution....
Definition bc.f90:66
subroutine bc_apply_vector_generic(this, x, y, z, time, strong, strm)
Apply the boundary condition to a vector field. Dispatches to the CPU or the device version.
Definition bc.f90:337
subroutine bc_debug_mask(this, file_name)
Write a field showing the mask of the bc.
Definition bc.f90:665
subroutine bc_mark_facet(this, facet, el)
Mark facet on element el as part of the boundary condition.
Definition bc.f90:412
subroutine bc_mark_facets(this, facet_list)
Mark all facets from a (facet, el) tuple list.
Definition bc.f90:425
integer, parameter, public bc_neumann
Definition bc.f90:69
Coefficients.
Definition coef.f90:34
subroutine, public device_cfill(a_d, c, n, strm)
Set all elements to a constant c .
Device abstraction, common interface for various accelerators.
Definition device.F90:34
integer, parameter, public host_to_device
Definition device.F90:48
integer, parameter, public device_to_host
Definition device.F90:48
type(c_ptr), bind(C), public glb_cmd_queue
Global command queue.
Definition device.F90:52
Defines a mapping of the degrees of freedom.
Definition dofmap.f90:35
Defines a zone as a subset of facets in a mesh.
Defines a field.
Definition field.f90:34
Module for file I/O operations.
Definition file.f90:34
Defines Gather-scatter operations.
Definition gs_ops.f90:34
integer, parameter, public gs_op_add
Definition gs_ops.f90:36
Logging routines.
Definition log.f90:34
type(log_t), public neko_log
Global log stream.
Definition log.f90:80
integer, parameter, public log_size
Definition log.f90:46
Object for handling masks in Neko.
Definition mask.f90:34
Definition math.f90:60
subroutine, public rzero(a, n)
Zero a real vector.
Definition math.f90:238
Defines a mesh.
Definition mesh.f90:34
integer, parameter, public neko_msh_max_zlbls
Max num. zone labels.
Definition mesh.f90:65
integer, parameter, public neko_msh_max_zlbl_len
Max length of a zone label.
Definition mesh.f90:67
Build configurations.
integer, parameter neko_bcknd_device
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:14
Defines a function space.
Definition space.f90:34
Implements a dynamic stack ADT.
Definition stack.f90:49
Module with things related to the simulation time.
Implements a n-tuple.
Definition tuple.f90:41
Utilities.
Definition utils.f90:35
character(len=100) function, dimension(:), allocatable, public split_string(string, delimiter)
Split a string based on delimiter (tokenizer) OBS: very hacky, this should really be improved,...
Definition utils.f90:251
pure integer function, public linear_index(i, j, k, l, lx, ly, lz)
Compute the address of a (i,j,k,l) array with sizes (1:lx, 1:ly, 1:lz, :)
Definition utils.f90:289
subroutine, public neko_warning(warning_msg)
Reports a warning to standard output.
Definition utils.f90:398
Pointer to a `bc_t`.
Definition bc.f90:148
Base type for a boundary condition.
Definition bc.f90:72
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Definition coef.f90:93
A wrapper around a polymorphic generic_file_t that handles its init. This is essentially a factory fo...
Definition file.f90:56
Type for consistently handling masks in Neko. This type encapsulates the mask array and its associate...
Definition mask.f90:51
The function space for the SEM solution fields.
Definition space.f90:64
Integer 2-tuple based stack.
Definition stack.f90:98
A struct that contains all info about the time, expand as needed.
Integer based 2-tuple.
Definition tuple.f90:58