48 use json_module,
only : json_file
61 type(json_file),
intent(inout) :: params
67 subroutine useric(u, v, w, p, params)
70 type(
field_t),
intent(inout) :: u
71 type(
field_t),
intent(inout) :: v
72 type(
field_t),
intent(inout) :: w
73 type(
field_t),
intent(inout) :: p
74 type(json_file),
intent(inout) :: params
83 type(
field_t),
intent(inout) :: rho
84 type(
field_t),
intent(inout) :: u
85 type(
field_t),
intent(inout) :: v
86 type(
field_t),
intent(inout) :: w
87 type(
field_t),
intent(inout) :: p
88 type(json_file),
intent(inout) :: params
97 type(
field_t),
intent(inout) :: s
98 type(json_file),
intent(inout) :: params
110 type(
field_t),
intent(inout) :: u
111 type(
field_t),
intent(inout) :: v
112 type(
field_t),
intent(inout) :: w
113 type(
field_t),
intent(inout) :: p
114 type(
coef_t),
intent(inout) :: coef
115 type(json_file),
intent(inout) :: params
123 type(json_file),
intent(inout) :: params
131 type(
mesh_t),
intent(inout) :: msh
142 real(kind=
rp),
intent(in) :: t
143 integer,
intent(in) :: tstep
144 type(
field_t),
intent(inout) :: u
145 type(
field_t),
intent(inout) :: v
146 type(
field_t),
intent(inout) :: w
147 type(
field_t),
intent(inout) :: p
148 type(
coef_t),
intent(inout) :: coef
149 type(json_file),
intent(inout) :: param
159 type(json_file),
intent(inout) :: param
174 real(kind=
rp),
intent(in) :: t
175 integer,
intent(in) :: tstep
176 real(kind=
rp),
intent(inout) :: rho, mu, cp, lambda
177 type(json_file),
intent(inout) :: params
186 user_startup => null()
190 user_init_modules => null()
192 procedure(
useric),
nopass,
pointer :: fluid_user_ic => null()
195 fluid_compressible_user_ic => null()
201 init_user_simcomp => null()
203 procedure(
usermsh),
nopass,
pointer :: user_mesh_setup => null()
206 procedure(
usercheck),
nopass,
pointer :: user_check => null()
210 user_finalize_modules => null()
213 fluid_user_f => null()
216 fluid_user_f_vector => null()
219 scalar_user_f => null()
222 scalar_user_f_vector => null()
230 user_dirichlet_update => null()
233 material_properties => null()
253 class(
user_t),
intent(inout) :: this
254 logical :: user_extended = .false.
255 character(len=256),
dimension(14) :: extensions
259 if (.not.
associated(this%user_startup))
then
262 user_extended = .true.
264 write(extensions(n),
'(A)')
'- Startup'
267 if (.not.
associated(this%fluid_user_ic))
then
270 user_extended = .true.
272 write(extensions(n),
'(A)')
'- Fluid initial condition'
275 if (.not.
associated(this%scalar_user_ic))
then
278 user_extended = .true.
280 write(extensions(n),
'(A)')
'- Scalar initial condition'
283 if (.not.
associated(this%fluid_compressible_user_ic))
then
286 user_extended = .true.
288 write(extensions(n),
'(A)')
'- Compressible fluid initial condition'
291 if (.not.
associated(this%fluid_user_f))
then
294 user_extended = .true.
296 write(extensions(n),
'(A)')
'- Fluid source term'
299 if (.not.
associated(this%fluid_user_f_vector))
then
302 user_extended = .true.
304 write(extensions(n),
'(A)')
'- Fluid source term vector'
307 if (.not.
associated(this%scalar_user_f))
then
310 user_extended = .true.
312 write(extensions(n),
'(A)')
'- Scalar source term'
315 if (.not.
associated(this%scalar_user_f_vector))
then
318 user_extended = .true.
320 write(extensions(n),
'(A)')
'- Scalar source term vector'
323 if (.not.
associated(this%scalar_user_bc))
then
326 user_extended = .true.
328 write(extensions(n),
'(A)')
'- Scalar boundary condition'
331 if (.not.
associated(this%user_dirichlet_update))
then
334 user_extended = .true.
336 write(extensions(n),
'(A)')
'- Dirichlet boundary condition'
339 if (.not.
associated(this%user_mesh_setup))
then
342 user_extended = .true.
344 write(extensions(n),
'(A)')
'- Mesh setup'
347 if (.not.
associated(this%user_check))
then
350 user_extended = .true.
352 write(extensions(n),
'(A)')
'- User check'
355 if (.not.
associated(this%user_init_modules))
then
358 user_extended = .true.
360 write(extensions(n),
'(A)')
'- Initialize modules'
363 if (.not.
associated(this%init_user_simcomp))
then
367 if (.not.
associated(this%user_finalize_modules))
then
370 user_extended = .true.
372 write(extensions(n),
'(A)')
'- Finalize modules'
375 if (.not.
associated(this%material_properties))
then
378 user_extended = .true.
380 write(extensions(n),
'(A)')
'- Material properties'
383 if (user_extended)
then
384 call neko_log%section(
'User defined extensions')
387 call neko_log%message(extensions(i))
403 type(json_file),
intent(inout) :: params
408 type(
field_t),
intent(inout) :: u
409 type(
field_t),
intent(inout) :: v
410 type(
field_t),
intent(inout) :: w
411 type(
field_t),
intent(inout) :: p
412 type(json_file),
intent(inout) :: params
413 call neko_error(
'Dummy user defined initial condition set')
418 type(
field_t),
intent(inout) :: rho
419 type(
field_t),
intent(inout) :: u
420 type(
field_t),
intent(inout) :: v
421 type(
field_t),
intent(inout) :: w
422 type(
field_t),
intent(inout) :: p
423 type(json_file),
intent(inout) :: params
424 call neko_error(
'Dummy user defined initial condition set')
431 type(
field_t),
intent(inout) :: s
432 type(json_file),
intent(inout) :: params
433 call neko_error(
'Dummy user defined scalar initial condition set')
439 real(kind=
rp),
intent(in) :: t
440 call neko_error(
'Dummy user defined vector valued forcing set')
445 real(kind=
rp),
intent(inout) :: u
446 real(kind=
rp),
intent(inout) :: v
447 real(kind=
rp),
intent(inout) :: w
448 integer,
intent(in) :: j
449 integer,
intent(in) :: k
450 integer,
intent(in) :: l
451 integer,
intent(in) :: e
452 real(kind=
rp),
intent(in) :: t
453 call neko_error(
'Dummy user defined forcing set')
459 real(kind=
rp),
intent(in) :: t
460 call neko_error(
'Dummy user defined vector valued forcing set')
465 real(kind=
rp),
intent(inout) :: s
466 integer,
intent(in) :: j
467 integer,
intent(in) :: k
468 integer,
intent(in) :: l
469 integer,
intent(in) :: e
470 real(kind=
rp),
intent(in) :: t
471 call neko_error(
'Dummy user defined forcing set')
475 subroutine dummy_scalar_user_bc(s, x, y, z, nx, ny, nz, ix, iy, iz, ie, t, &
477 real(kind=
rp),
intent(inout) :: s
478 real(kind=
rp),
intent(in) :: x
479 real(kind=
rp),
intent(in) :: y
480 real(kind=
rp),
intent(in) :: z
481 real(kind=
rp),
intent(in) :: nx
482 real(kind=
rp),
intent(in) :: ny
483 real(kind=
rp),
intent(in) :: nz
484 integer,
intent(in) :: ix
485 integer,
intent(in) :: iy
486 integer,
intent(in) :: iz
487 integer,
intent(in) :: ie
488 real(kind=
rp),
intent(in) :: t
489 integer,
intent(in) :: tstep
490 call neko_warning(
'Dummy scalar user bc set, applied on all' // &
491 ' non-labeled zones')
475 subroutine dummy_scalar_user_bc(s, x, y, z, nx, ny, nz, ix, iy, iz, ie, t, &
…
496 type(
mesh_t),
intent(inout) :: msh
501 real(kind=
rp),
intent(in) :: t
502 integer,
intent(in) :: tstep
503 type(
field_t),
intent(inout) :: u
504 type(
field_t),
intent(inout) :: v
505 type(
field_t),
intent(inout) :: w
506 type(
field_t),
intent(inout) :: p
507 type(
coef_t),
intent(inout) :: coef
508 type(json_file),
intent(inout) :: params
513 type(
field_t),
intent(inout) :: u
514 type(
field_t),
intent(inout) :: v
515 type(
field_t),
intent(inout) :: w
516 type(
field_t),
intent(inout) :: p
517 type(
coef_t),
intent(inout) :: coef
518 type(json_file),
intent(inout) :: params
522 type(json_file),
intent(inout) :: params
527 type(json_file),
intent(inout) :: params
532 type(
field_list_t),
intent(inout) :: dirichlet_field_list
534 type(
coef_t),
intent(inout) :: coef
535 real(kind=
rp),
intent(in) :: t
536 integer,
intent(in) :: tstep
541 real(kind=
rp),
intent(in) :: t
542 integer,
intent(in) :: tstep
543 real(kind=
rp),
intent(inout) :: rho, mu, cp, lambda
544 type(json_file),
intent(inout) :: params
555 character(len=*),
intent(in) :: name
556 type(json_file),
intent(inout) :: params
557 type(json_file) :: comp_subdict
559 character(len=:),
allocatable :: current_type
560 integer :: n_simcomps
562 logical :: found, is_user
564 call params%info(
'', n_children = n_simcomps)
570 if (.not. is_user) cycle
572 call json_get(comp_subdict,
"type", current_type)
573 if (trim(current_type) .eq. trim(name))
then
579 if (.not. found)
then
580 call neko_error(
"User-defined simulation component " &
581 // trim(name) //
" not found in case file.")
Abstract interface defining a dirichlet condition on a list of fields.
Computes the source term at a single point.
Computes the source term and adds the result to fields.
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.
Computes the source term at a single point.
Computes the source term and adds the result to fields.
Abstract interface for finalizating user variables.
Abstract interface for initilialization of modules.
Abstract interface for setting material properties.
Abstract interface for adding user defined simulation components.
Abstract interface for a user start-up routine.
Abstract interface for user defined check functions.
Abstract interface for user defined initial conditions.
Abstract interface for user defined scalar initial conditions.
Abstract interface for user defined initial conditions.
Abstract interface for user defined mesh deformation functions.
Abstract interface defining a user defined inflow condition (pointwise)
Abstract interface defining a user defined scalar boundary condition (pointwise) Just imitating inflo...
Defines a boundary condition.
Defines user dirichlet condition for a scalar field.
Implements the fluid_user_source_term_t type.
Utilities for retrieving parameters from the case files.
type(log_t), public neko_log
Global log stream.
integer, parameter, public rp
Global precision used in computations.
Implements the scalar_user_source_term_t type.
Interfaces for user interaction with NEKO.
subroutine dummy_user_f_vector(f, t)
Dummy user (fluid) forcing.
subroutine dummy_user_ic_scalar(s, params)
Dummy user initial condition for scalar field.
type(json_file) function, public simulation_component_user_settings(name, params)
JSON extraction helper function for simulation components.
subroutine dummy_user_final_no_modules(t, params)
subroutine dummy_user_init_no_simcomp(params)
subroutine dummy_scalar_user_f(s, j, k, l, e, t)
Dummy user (scalar) forcing.
subroutine user_intf_init(this)
Constructor.
subroutine dummy_user_f(u, v, w, j, k, l, e, t)
Dummy user (fluid) forcing.
subroutine dummy_user_mesh_setup(msh)
Dummy user mesh apply.
subroutine dummy_user_startup(params)
Dummy user startup.
subroutine dummy_user_ic(u, v, w, p, params)
Dummy user initial condition.
subroutine, public dummy_user_material_properties(t, tstep, rho, mu, cp, lambda, params)
subroutine dummy_user_ic_compressible(rho, u, v, w, p, params)
Dummy user initial condition.
subroutine dirichlet_do_nothing(dirichlet_field_list, dirichlet_bc, coef, t, tstep)
subroutine dummy_user_check(t, tstep, u, v, w, p, coef, params)
Dummy user check.
subroutine dummy_user_scalar_f_vector(f, t)
Dummy user (scalar) forcing.
subroutine dummy_scalar_user_bc(s, x, y, z, nx, ny, nz, ix, iy, iz, ie, t, tstep)
Dummy user boundary condition for scalar.
subroutine dummy_user_init_no_modules(t, u, v, w, p, coef, params)
Defines inflow dirichlet conditions.
Defines dirichlet conditions for scalars.
subroutine, public neko_warning(warning_msg)
Reports a warning to standard output.
Base type for a boundary condition.
A list of allocatable `bc_t`. Follows the standard interface of lists.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
User defined dirichlet condition, for which the user can work with an entire field....
field_list_t, To be able to group fields together
A source-term for the fluid, with procedure pointers pointing to the actual implementation in the use...
A source-term for the scalar, with procedure pointers pointing to the actual implementation in the us...
A type collecting all the overridable user routines.
User defined dirichlet condition for velocity.
User defined dirichlet condition for scalars.