10 use,
intrinsic :: iso_c_binding, only: c_ptr, c_null_ptr
25 type(user_t),
intent(inout) :: usr
32 real(kind=rp),
intent(in) :: t
33 integer,
intent(in) :: tstep
34 real(kind=rp),
intent(inout) :: rho, mu, cp, lambda
35 type(json_file),
intent(inout) :: params
39 call json_get(params,
"case.fluid.Re", re)
40 call json_get(params,
"case.scalar.Pe",
pe)
56 class(scalar_user_source_term_t),
intent(inout) :: rhs
57 real(kind=rp),
intent(in) :: t
58 type(field_t),
pointer :: s
61 class(point_zone_t),
pointer :: cyl, ball
63 real(kind=rp) :: current_temperature
65 cyl => neko_point_zone_registry%get_point_zone(
"cylinder")
66 ball => neko_point_zone_registry%get_point_zone(
"ball")
84 if (neko_bcknd_device .eq. 1)
then
87 host_to_device, .true.)
91 s => neko_field_registry%get_field(
's')
95 if (neko_bcknd_device .eq. 1)
then
96 call device_cfill_mask(s%x_d, current_temperature, rhs%dm%size(), &
98 call device_cfill_mask(s%x_d, current_temperature, rhs%dm%size(), &
99 ball%mask_d, ball%size)
109 call cfill_mask(s%x, current_temperature, rhs%dm%size(), cyl%mask, &
111 call cfill_mask(s%x, current_temperature, rhs%dm%size(), ball%mask, &
subroutine device_sub3_mask(a_d, b_d, c_d, size, mask_d, mask_size)
subroutine sub3_mask(a, b, c, size, mask, mask_size)
Subtract 2 masked vectors. Save the result in a new vector. .
User defined user region.
subroutine heat_source(rhs, t)
Heat source.
real(kind=rp) ramp_time_end
subroutine user_setup(user)
Register user defined functions (see nekos user_intf.f90)
real(kind=rp), dimension(:), allocatable resistance
subroutine set_material_properties(t, tstep, rho, mu, cp, lambda, params)
Read the material properties from the JSON file.
real(kind=rp) target_temperature