Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
sponge_source_term.f90
Go to the documentation of this file.
1! Copyright (c) 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!
33!
36 use num_types, only : rp, dp, sp
37 use json_module, only : json_file
38 use registry, only : neko_registry
39 use field, only : field_t
42 use utils, only : neko_error
45 use time_state, only : time_state_t
46 use math, only : sub3, col2, add2s2
49 use source_term, only : source_term_t
50 use case, only : case_t
53 use field_list, only : field_list_t
54 use coefs, only : coef_t
55 use utils, only : neko_fname_len
56 use file, only : file_t
58 use comm, only : pe_rank
62 implicit none
63 private
64
65 type, public, extends(source_term_t) :: sponge_source_term_t
66
68 type(field_t), pointer :: u => null()
69 type(field_t), pointer :: v => null()
70 type(field_t), pointer :: w => null()
72 type(field_t), pointer :: u_bf => null()
73 type(field_t), pointer :: v_bf => null()
74 type(field_t), pointer :: w_bf => null()
76 character(len=1024) :: bf_rgstry_pref
78 logical :: baseflow_set = .false.
81 logical :: baseflow_is_ic = .false.
84 type(field_t), pointer :: fringe => null()
86 real(kind=rp) :: amplitudes(3)
88 character(len=1024) :: fringe_registry_name
90 logical :: dump_fields = .false.
92 character(NEKO_FNAME_LEN) :: dump_fname
94 logical :: check = .true.
95 contains
97 procedure, pass(this) :: init => sponge_init_from_json
99 procedure, pass(this) :: init_constant => &
102 procedure, pass(this) :: init_user => &
105 procedure, pass(this) :: init_field => &
108 procedure, pass(this) :: init_noop => &
111 procedure, pass(this) :: init_common => &
114 procedure, pass(this) :: free => sponge_free
116 procedure, pass(this) :: compute_ => sponge_compute
117 end type sponge_source_term_t
118
119contains
120
122 subroutine sponge_init_from_json(this, json, fields, coef, variable_name)
123 class(sponge_source_term_t), intent(inout) :: this
124 type(json_file), intent(inout) :: json
125 type(field_list_t), intent(in), target :: fields
126 type(coef_t), intent(in), target :: coef
127 character(len=*), intent(in) :: variable_name
128
129 real(kind=rp), allocatable :: amplitudes(:)
130 character(len=:), allocatable :: baseflow_method
131 character(len=:), allocatable :: read_str, fringe_registry_name, &
132 bf_registry_pref, dump_fname
133 character(len=NEKO_FNAME_LEN) :: fname, mesh_fname
134 logical :: interpolate, dump_fields
135 real(kind=rp), allocatable :: constant_value(:)
136 real(kind=rp) :: start_time, end_time, tolerance
137 integer :: nzones
138
139 type(json_file) :: baseflow_subdict
140 integer :: i, izone
141
142 call neko_log%section("Sponge source term", lvl = neko_log_info)
143
144 call json_get_or_default(json, "dump_fields", dump_fields, .false.)
145 call json_get_or_default(json, "dump_file_name", dump_fname, &
146 "spng_fields")
147 call json_get_or_default(json, "fringe_registry_name", &
148 fringe_registry_name, "sponge_fringe")
149
150 call json_get_or_lookup(json, "amplitudes", amplitudes)
151 if (size(amplitudes) .ne. 3) then
152 call neko_error("(SPONGE) Expected 3 elements for 'amplitudes'")
153 end if
154
155 call json_get_or_default(json, "start_time", start_time, 0.0_rp)
156 call json_get_or_default(json, "end_time", end_time, huge(0.0_rp))
157
158
159 call json_get(json, 'baseflow', &
160 baseflow_subdict)
161 call json_get(baseflow_subdict, "method", baseflow_method)
162 call json_get_or_default(json, "baseflow_registry_prefix", &
163 bf_registry_pref, "sponge_bf")
164
165 select case (trim(baseflow_method))
166
167 ! Import the base flow from an fld file. The same parameters as field
168 ! initial condition apply since we use the same subroutine to read and
169 ! potentially interpolate from a field file. It would be nice to have
170 ! some kind of `gfldr` function to make this nicer.
171 case ("field")
172
173 ! The lines below are just copy pasted from set_flow_ic_int, because we
174 ! want to make sure to separate the JSON constructor
175 ! sponge_init_from_json and the constructor from attributes
176 ! sponge_init_field.
177 call json_get(baseflow_subdict, 'file_name', read_str)
178 fname = trim(read_str)
179 call json_get_or_default(baseflow_subdict, 'interpolate', interpolate, &
180 .false.)
181 call json_get_or_default(baseflow_subdict, 'mesh_file_name', read_str, &
182 "none")
183 mesh_fname = trim(read_str)
184
185 block
186 type(json_file) :: interp_subdict
187 call json_get_subdict_or_empty(baseflow_subdict, "interpolation", &
188 interp_subdict)
189
190 call this%init_field(fields, coef, start_time, end_time, amplitudes, &
191 fringe_registry_name, bf_registry_pref, dump_fields, dump_fname, &
192 fname, interpolate, mesh_fname, interp_subdict)
193 end block
194
195 ! Constant base flow
196 case ("constant")
197
198 call json_get_or_lookup(baseflow_subdict, "value", constant_value)
199 if (size(constant_value) .lt. 3) then
200 call neko_error("(SPONGE) Expected 3 elements for 'value'")
201 end if
202
203 call this%init_constant(fields, coef, start_time, end_time, &
204 amplitudes, fringe_registry_name, bf_registry_pref, dump_fields, &
205 dump_fname, constant_value)
206
207 ! Let the user set the base flow.
208 case ("user")
209
210 call this%init_user(fields, coef, start_time, end_time, amplitudes, &
211 fringe_registry_name, bf_registry_pref, dump_fields, dump_fname)
212
213 ! Use an already existing baseflow from another sponge object
214 case ("no-op")
215
216 call this%init_noop(fields, coef, start_time, end_time, &
217 amplitudes, fringe_registry_name, bf_registry_pref, dump_fields, &
218 dump_fname)
219
220 case default
221 call neko_error("(SPONGE) " // trim(baseflow_method) // &
222 " is not a valid method")
223 end select
224
225 call neko_log%end_section(lvl = neko_log_info)
226
227 end subroutine sponge_init_from_json
228
231 subroutine sponge_init_noop(this, fields, coef, start_time, end_time, &
232 amplitudes, fringe_registry_name, bf_registry_pref, dump_fields, &
233 dump_fname)
234 class(sponge_source_term_t), intent(inout) :: this
235 type(field_list_t), intent(in), target :: fields
236 type(coef_t), intent(in), target :: coef
237 real(kind=rp), intent(in) :: start_time, end_time
238 real(kind=rp), intent(in) :: amplitudes(:)
239 character(len=*), intent(in) :: fringe_registry_name, dump_fname, &
240 bf_registry_pref
241 logical, intent(in) :: dump_fields
242 character(len=LOG_SIZE) :: log_buf
243 integer :: i
244
245 !
246 ! Common constructor
247 !
248 call sponge_init_common(this, fields, coef, start_time, end_time, &
249 amplitudes, fringe_registry_name, bf_registry_pref, dump_fields, &
250 dump_fname)
251
252 !
253 ! Reuse existing baseflows
254 !
255 this%u_bf => neko_registry%get_field(trim(bf_registry_pref) // "_u")
256 this%v_bf => neko_registry%get_field(trim(bf_registry_pref) // "_v")
257 this%w_bf => neko_registry%get_field(trim(bf_registry_pref) // "_w")
258
259 call neko_log%message("Baseflow : from existing sponge", lvl = neko_log_info)
260
261 this%baseflow_set = .true.
262
263 end subroutine sponge_init_noop
264
265
267 subroutine sponge_init_constant(this, fields, coef, start_time, end_time, &
268 amplitudes, fringe_registry_name, bf_registry_pref, dump_fields, &
269 dump_fname, constant_values)
270 class(sponge_source_term_t), intent(inout) :: this
271 type(field_list_t), intent(in), target :: fields
272 type(coef_t), intent(in), target :: coef
273 real(kind=rp), intent(in) :: start_time, end_time
274 real(kind=rp), intent(in) :: amplitudes(:)
275 character(len=*), intent(in) :: fringe_registry_name, dump_fname, &
276 bf_registry_pref
277 logical, intent(in) :: dump_fields
278 real(kind=rp), intent(in) :: constant_values(:)
279 character(len=LOG_SIZE) :: log_buf
280 integer :: i
281
282 !
283 ! Common constructor
284 !
285 call sponge_init_common(this, fields, coef, start_time, end_time, &
286 amplitudes, fringe_registry_name, bf_registry_pref, dump_fields, &
287 dump_fname)
288
289 !
290 ! Create the base flow fields in the registry
291 !
292 call neko_registry%add_field(this%u%dof, &
293 trim(bf_registry_pref) // "_u")
294 call neko_registry%add_field(this%v%dof, &
295 trim(bf_registry_pref) // "_v")
296 call neko_registry%add_field(this%w%dof, &
297 trim(bf_registry_pref) // "_w")
298
299 this%u_bf => neko_registry%get_field(trim(bf_registry_pref) // "_u")
300 this%v_bf => neko_registry%get_field(trim(bf_registry_pref) // "_v")
301 this%w_bf => neko_registry%get_field(trim(bf_registry_pref) // "_w")
302
303 !
304 ! Assign constant values
305 !
306 this%u_bf = constant_values(1)
307 this%v_bf = constant_values(2)
308 this%w_bf = constant_values(3)
309
310 call neko_log%message("Baseflow : constant", lvl = neko_log_info)
311 write (log_buf, '(A, 3(ES12.6, A))') "Value : [", &
312 (constant_values(i), ", ", i = 1, 2), constant_values(3), "]"
313 call neko_log%message(log_buf, lvl = neko_log_info)
314
315 this%baseflow_set = .true.
316
317 end subroutine sponge_init_constant
318
320 subroutine sponge_init_field(this, fields, coef, start_time, end_time, &
321 amplitudes, fringe_registry_name, bf_registry_pref, dump_fields, &
322 dump_fname, file_name, interpolate, mesh_file_name, interp_subdict)
323 class(sponge_source_term_t), intent(inout) :: this
324 type(field_list_t), intent(in), target :: fields
325 type(coef_t), intent(in), target :: coef
326 real(kind=rp), intent(in) :: start_time, end_time
327 real(kind=rp), intent(in) :: amplitudes(:)
328 character(len=*), intent(in) :: fringe_registry_name, dump_fname, &
329 bf_registry_pref
330 logical, intent(in) :: dump_fields
331 character(len=*), intent(in) :: file_name
332 logical, intent(in) :: interpolate
333 character(len=*), intent(inout) :: mesh_file_name
334 type(json_file), intent(inout) :: interp_subdict
335
336 type(field_t) :: wk
337 integer :: tmp_index
338
339 !
340 ! Common constructor
341 !
342 call sponge_init_common(this, fields, coef, start_time, end_time, &
343 amplitudes, fringe_registry_name, bf_registry_pref, dump_fields, &
344 dump_fname)
345
346 call neko_log%message("Baseflow : field", lvl = neko_log_info)
347
348 !
349 ! Create the base flow fields in the registry
350 !
351 call neko_registry%add_field(this%u%dof, &
352 trim(bf_registry_pref) // "_u")
353 call neko_registry%add_field(this%v%dof, &
354 trim(bf_registry_pref) // "_v")
355 call neko_registry%add_field(this%w%dof, &
356 trim(bf_registry_pref) // "_w")
357
358 this%u_bf => neko_registry%get_field(trim(bf_registry_pref) // "_u")
359 this%v_bf => neko_registry%get_field(trim(bf_registry_pref) // "_v")
360 this%w_bf => neko_registry%get_field(trim(bf_registry_pref) // "_w")
361
362 !
363 ! Import the u,v,w baseflows from fld
364 !
365 if (trim(mesh_file_name) .eq. 'none') then
366 call import_fields(file_name, interp_subdict, &
367 u = this%u_bf, v = this%v_bf, w = this%w_bf, &
368 interpolate = interpolate)
369 else
370 call import_fields(file_name, interp_subdict, mesh_file_name, &
371 u = this%u_bf, v = this%v_bf, w = this%w_bf, &
372 interpolate = interpolate)
373 end if
374
375 this%baseflow_set = .true.
376
377 end subroutine sponge_init_field
378
380 subroutine sponge_init_user(this, fields, coef, start_time, end_time, &
381 amplitudes, fringe_registry_name, bf_registry_pref, dump_fields, &
382 dump_fname)
383 class(sponge_source_term_t), intent(inout) :: this
384 type(field_list_t), intent(in), target :: fields
385 type(coef_t), intent(in), target :: coef
386 real(kind=rp), intent(in) :: start_time, end_time
387 real(kind=rp), intent(in) :: amplitudes(:)
388 character(len=*), intent(in) :: fringe_registry_name, dump_fname, &
389 bf_registry_pref
390 logical, intent(in) :: dump_fields
391
392 !
393 ! Common constructor
394 !
395 call sponge_init_common(this, fields, coef, start_time, end_time, &
396 amplitudes, fringe_registry_name, bf_registry_pref, dump_fields, &
397 dump_fname)
398
399 call neko_log%message("Baseflow : user", lvl = neko_log_info)
400
401 end subroutine sponge_init_user
402
404 subroutine sponge_init_common(this, fields, coef, start_time, end_time, &
405 amplitudes, fringe_registry_name, bf_registry_pref, dump_fields, &
406 dump_fname)
407 class(sponge_source_term_t), intent(inout) :: this
408 type(field_list_t), intent(in), target :: fields
409 type(coef_t), intent(in), target :: coef
410 real(kind=rp), intent(in) :: start_time, end_time
411 real(kind=rp), intent(in) :: amplitudes(:)
412 character(len=*), intent(in) :: fringe_registry_name, dump_fname, &
413 bf_registry_pref
414 logical, intent(in) :: dump_fields
415
416 character(len=LOG_SIZE) :: log_buf
417
418 integer :: i
419
420 call neko_log%message("Initializing sponge", lvl = neko_log_debug)
421
422 call this%free()
423 call this%init_base(fields, coef, start_time, end_time)
424
425 this%amplitudes(1) = amplitudes(1)
426 this%amplitudes(2) = amplitudes(2)
427 this%amplitudes(3) = amplitudes(3)
428
429 write (log_buf, '(A, 3(ES12.6, A))') "Amplitudes : [", &
430 (amplitudes(i), ", ", i = 1, 2), amplitudes(3), "]"
431 call neko_log%message(log_buf, lvl=neko_log_info)
432
433 this%fringe_registry_name = trim(fringe_registry_name)
434 this%bf_rgstry_pref = trim(bf_registry_pref)
435 this%dump_fields = dump_fields
436 this%dump_fname = trim(dump_fname)
437
438 call neko_log%message("Fringe name : " // trim(fringe_registry_name), &
439 lvl = neko_log_info)
440 call neko_log%message("Baseflow prefix: " // trim(bf_registry_pref), &
441 lvl = neko_log_info)
442
443 write (log_buf, "(A,L1)") "Dump fields : ", this%dump_fields
444 call neko_log%message(log_buf, lvl=neko_log_info)
445
446 this%u => neko_registry%get_field_by_name("u")
447 this%v => neko_registry%get_field_by_name("v")
448 this%w => neko_registry%get_field_by_name("w")
449
450 end subroutine sponge_init_common
451
453 subroutine sponge_free(this)
454 class(sponge_source_term_t), intent(inout) :: this
455
456 call this%free_base()
457
458 nullify(this%u)
459 nullify(this%v)
460 nullify(this%w)
461 nullify(this%u_bf)
462 nullify(this%v_bf)
463 nullify(this%w_bf)
464 nullify(this%fringe)
465
466 this%fringe_registry_name = ""
467 this%bf_rgstry_pref = ""
468 this%baseflow_set = .false.
469
470 end subroutine sponge_free
471
484 subroutine sponge_compute(this, time)
485 class(sponge_source_term_t), intent(inout) :: this
486 type(time_state_t), intent(in) :: time
487
488 integer :: i, nfields
489 type(field_t), pointer :: fu, fv, fw
490
491 type(json_file) :: json_subdict
492 character(len=:), allocatable :: string_val
493
494 character(len=1024) :: u_name, v_name, w_name
495 type(fld_file_output_t) :: fout
496 integer :: tmp_index
497 type(field_t), pointer :: wk
498
499 !
500 ! Do some checks at the first timestep
501 !
502 if (this%check) then
503
504 u_name = trim(this%bf_rgstry_pref) // "_u"
505 v_name = trim(this%bf_rgstry_pref) // "_v"
506 w_name = trim(this%bf_rgstry_pref) // "_w"
507
508 ! Check if all the base flow fields exist in the registry
509 this%baseflow_set = neko_registry%field_exists(trim(u_name)) &
510 .and. neko_registry%field_exists(trim(v_name)) .and. &
511 neko_registry%field_exists(trim(w_name))
512
513 if (.not. this%baseflow_set) then
514 call neko_error("SPONGE: No baseflow set (searching for " // &
515 trim(this%bf_rgstry_pref) // "_u)")
516 end if
517
518 ! Check if the user has added the fringe field in the registry
519 if (.not. neko_registry%field_exists( &
520 trim(this%fringe_registry_name))) then
521 call neko_error("SPONGE: No fringe field set (" // &
522 trim(this%fringe_registry_name) // " not found)")
523 end if
524
525 ! This will throw an error if the user hasn't added 'sponge_fringe'
526 ! to the registry.
527 this%fringe => &
528 neko_registry%get_field(trim(this%fringe_registry_name))
529
530 ! This will throw an error if the user hasn't added the base flow fields
531 ! to the registry.
532 this%u_bf => neko_registry%get_field(trim(u_name))
533 this%v_bf => neko_registry%get_field(trim(v_name))
534 this%w_bf => neko_registry%get_field(trim(w_name))
535
536 ! Reset the flag
537 this%check = .false.
538
539 !
540 ! Dump the fringe and/or baseflow fields for visualization
541 !
542 if (this%dump_fields) then
543 call fout%init(sp, trim(this%dump_fname), 4)
544 call fout%fields%assign_to_ptr(1, this%fringe)
545 call fout%fields%assign_to_field(2, this%u_bf)
546 call fout%fields%assign_to_field(3, this%v_bf)
547 call fout%fields%assign_to_field(4, this%w_bf)
548 call fout%sample(time%t)
549 end if
550
551 end if
552
553 !
554 ! Start computation of source term
555 !
556 if (neko_bcknd_device .eq. 1) then
557 call sponge_source_term_compute_device(this%fields, &
558 this%u, this%v, this%w, this%u_bf, this%v_bf, this%w_bf, &
559 this%fringe, &
560 this%amplitudes(1), this%amplitudes(2), this%amplitudes(3))
561 else
562 call sponge_source_term_compute_cpu(this%fields, &
563 this%u, this%v, this%w, this%u_bf, this%v_bf, this%w_bf, &
564 this%fringe, &
565 this%amplitudes(1), this%amplitudes(2), this%amplitudes(3))
566 end if
567
568 end subroutine sponge_compute
569
570end module sponge_source_term
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.
Defines a simulation case.
Definition case.f90:34
Coefficients.
Definition coef.f90:34
Definition comm.F90:1
integer, public pe_rank
MPI rank.
Definition comm.F90:59
subroutine, public device_sub3(a_d, b_d, c_d, n, strm)
Vector subtraction .
subroutine, public device_add2s2(a_d, b_d, c1, n, strm)
Vector addition with scalar multiplication (multiplication on first argument)
subroutine, public device_col2(a_d, b_d, n, strm)
Vector multiplication .
Device abstraction, common interface for various accelerators.
Definition device.F90:34
integer, parameter, public host_to_device
Definition device.F90:48
Defines a field.
Definition field.f90:34
Module for file I/O operations.
Definition file.f90:34
Implements fld_file_output_t.
Importation of fields from fld files.
Utilities for retrieving parameters from the case files.
subroutine, public json_get_subdict_or_empty(json, key, output)
Extract a sub-object from a json object and returns an empty object if the key is missing.
Logging routines.
Definition log.f90:34
integer, parameter, public neko_log_debug
Debug.
Definition log.f90:56
type(log_t), public neko_log
Global log stream.
Definition log.f90:92
integer, parameter, public log_size
Definition log.f90:46
integer, parameter, public neko_log_info
Default.
Definition log.f90:53
Definition math.f90:60
subroutine, public sub3(a, b, c, n)
Vector subtraction .
Definition math.f90:1002
subroutine, public col2(a, b, n)
Vector multiplication .
Definition math.f90:1085
subroutine, public add2s2(a, b, c1, n)
Vector addition with scalar multiplication (multiplication on second argument)
Definition math.f90:1037
Build configurations.
integer, parameter neko_bcknd_device
integer, parameter, public dp
Definition num_types.f90:10
integer, parameter, public sp
Definition num_types.f90:8
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:14
Defines a registry for storing solution fields.
Definition registry.f90:34
type(registry_t), target, public neko_registry
Global field registry.
Definition registry.f90:158
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.
Contains the simcomp_executor_t type.
type(simcomp_executor_t), target, public neko_simcomps
Global variable for the simulation component driver.
Implements the source_term_t type and a wrapper source_term_wrapper_t.
Implements the cpu kernel for the sponge_source_term_t type.
subroutine, public sponge_source_term_compute_cpu(fields, u, v, w, u_bf, v_bf, w_bf, fringe, a_x, a_y, a_z)
Computes the generic sponge source term on the cpu.
Implements the device kernel for the sponge_source_term_t type.
subroutine, public sponge_source_term_compute_device(fields, u, v, w, u_bf, v_bf, w_bf, fringe, a_x, a_y, a_z)
Computes the sponge source term on the device.
Implements the sponge_t type.
subroutine sponge_init_noop(this, fields, coef, start_time, end_time, amplitudes, fringe_registry_name, bf_registry_pref, dump_fields, dump_fname)
Initialize a sponge that reuses an already existing baseflow in the registry.
subroutine sponge_init_from_json(this, json, fields, coef, variable_name)
Constructor from json.
subroutine sponge_init_user(this, fields, coef, start_time, end_time, amplitudes, fringe_registry_name, bf_registry_pref, dump_fields, dump_fname)
Initialize a sponge with a baseflow set by the user.
subroutine sponge_free(this)
Destructor.
subroutine sponge_compute(this, time)
Compute the sponge field. The sponge is applied according to the following definition: f_x = amp_x * ...
subroutine sponge_init_constant(this, fields, coef, start_time, end_time, amplitudes, fringe_registry_name, bf_registry_pref, dump_fields, dump_fname, constant_values)
Initialize a sponge with a constant baseflow.
subroutine sponge_init_field(this, fields, coef, start_time, end_time, amplitudes, fringe_registry_name, bf_registry_pref, dump_fields, dump_fname, file_name, interpolate, mesh_file_name, interp_subdict)
Initialize a sponge with a baseflow imported from a field file.
subroutine sponge_init_common(this, fields, coef, start_time, end_time, amplitudes, fringe_registry_name, bf_registry_pref, dump_fields, dump_fname)
Common constructor.
Module with things related to the simulation time.
Utilities.
Definition utils.f90:35
integer, parameter, public neko_fname_len
Definition utils.f90:42
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Definition coef.f90:136
field_list_t, To be able to group fields together
A wrapper around a polymorphic generic_file_t that handles its init. This is essentially a factory fo...
Definition file.f90:56
A simple output saving a list of fields to a .fld file.
Base abstract type for source terms.
A struct that contains all info about the time, expand as needed.