1module user_initial_conditions
2 use field,
only: field_t
3 use json_file_module,
only: json_file
4 use json_utils,
only: json_get_or_default
5 use device,
only: host_to_device
6 use num_types,
only: rp
20 subroutine scalar_z_split_ic(s, split_value, value_below, value_above)
21 type(field_t),
intent(inout) :: s
22 real(kind=rp),
intent(in) :: split_value
23 real(kind=rp),
intent(in) :: value_below, value_above
25 real(kind=rp) :: z_value
28 do i = 1, s%dof%size()
29 z_value = s%dof%z(i, 1, 1, 1)
31 if (z_value .gt. split_value)
then
32 s%x(i, 1, 1, 1) = value_above
34 s%x(i, 1, 1, 1) = value_below
39 call s%copy_from(host_to_device, .true.)
41 end subroutine scalar_z_split_ic
43end module user_initial_conditions