45 use json_module,
only : json_file
70 type(
field_t),
intent(inout) :: s
71 type(
coef_t),
intent(in) :: coef
72 type(
gs_t),
intent(inout) :: gs
73 character(len=*) :: type
74 type(json_file),
intent(inout) :: params
77 real(kind=
rp) :: ic_value
78 character(len=:),
allocatable :: zone_name
79 real(kind=
rp) :: zone_value
81 if (trim(type) .eq.
'uniform')
then
82 call json_get(params,
'case.scalar.initial_condition.value', ic_value)
84 else if (trim(type) .eq.
'point_zone')
then
85 call json_get(params,
'case.scalar.initial_condition.base_value', &
87 call json_get(params,
'case.scalar.initial_condition.zone_name', &
89 call json_get(params,
'case.scalar.initial_condition.zone_value', &
108 type(
field_t),
intent(inout) :: s
109 type(
coef_t),
intent(in) :: coef
110 type(
gs_t),
intent(inout) :: gs
112 type(json_file),
intent(inout) :: params
114 call usr_ic(s, params)
127 type(
field_t),
intent(inout) :: s
128 type(
coef_t),
intent(in) :: coef
129 type(
gs_t),
intent(inout) :: gs
139 call gs%op(s%x, n, gs_op_add)
144 call col2(s%x, coef%mult, n)
154 type(
field_t),
intent(inout) :: s
155 real(kind=
rp),
intent(in) :: ic_value
160 call cfill(s%x, ic_value, n)
173 type(
field_t),
intent(inout) :: s
174 real(kind=
rp),
intent(in):: base_value
175 character(len=*),
intent(in) :: zone_name
176 real(kind=
rp),
intent(in) :: zone_value
186 call cfill_mask(s%x, zone_value,
size, zone%mask, zone%size)
Copy data between host and device (or device and device)
Retrieves a parameter by name or throws an error.
Abstract interface for user defined scalar initial conditions.
subroutine, public device_col2(a_d, b_d, n)
Vector multiplication .
Device abstraction, common interface for various accelerators.
integer, parameter, public host_to_device
Utilities for retrieving parameters from the case files.
subroutine, public cfill(a, c, n)
Set all elements to a constant c .
subroutine, public col2(a, b, n)
Vector multiplication .
subroutine, public cfill_mask(a, c, size, mask, mask_size)
Fill a constant to a masked vector. .
integer, parameter neko_bcknd_device
integer, parameter, public rp
Global precision used in computations.
type(point_zone_registry_t), target, public neko_point_zone_registry
Global point_zone registry.
Scalar initial condition.
subroutine set_scalar_ic_uniform(s, ic_value)
Uniform initial condition.
subroutine set_scalar_ic_point_zone(s, base_value, zone_name, zone_value)
Point zone initial condition.
subroutine set_scalar_ic_common(s, coef, gs)
Set scalar initial condition (common)
subroutine set_scalar_ic_usr(s, coef, gs, usr_ic, params)
Set scalar intial condition (user defined)
subroutine set_scalar_ic_int(s, coef, gs, type, params)
Set scalar initial condition (builtin)
Interfaces for user interaction with NEKO.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Base abstract type for point zones.