42 class(fluid_user_source_term_t),
intent(inout) :: f
43 real(kind=rp),
intent(in) :: t
44 type(field_t),
pointer :: u, v, w
48 type(field_t),
pointer :: wo1, wo2, wo3, wo4, wo5, wo6
49 type(field_t),
pointer :: t1 , t2
50 integer :: temp_indices(8)
52 print *,
"called forcing"
60 u => neko_field_registry%get_field(
'u')
61 v => neko_field_registry%get_field(
'v')
62 w => neko_field_registry%get_field(
'w')
63 call neko_scratch_registry%request_field(wo1, temp_indices(1))
64 call neko_scratch_registry%request_field(wo2, temp_indices(2))
65 call neko_scratch_registry%request_field(wo3, temp_indices(3))
66 call neko_scratch_registry%request_field(wo4, temp_indices(4))
67 call neko_scratch_registry%request_field(wo5, temp_indices(5))
68 call neko_scratch_registry%request_field(wo6, temp_indices(6))
69 call neko_scratch_registry%request_field(t1 , temp_indices(7))
70 call neko_scratch_registry%request_field(t2 , temp_indices(8))
88 call curl(wo1, wo2, wo3, u, v, w, t1, t2, f%coef)
89 call curl(wo4, wo5, wo6, wo1, wo2, wo3, t1, t2, f%coef)
91 if (neko_bcknd_device .eq. 1)
then
92 call device_copy(f%u_d, wo4%x_d, n)
93 call device_copy(f%v_d, wo5%x_d, n)
94 call device_copy(f%w_d, wo6%x_d, n)
95 call device_cmult(f%u_d, -1.0_rp, n)
96 call device_cmult(f%v_d, -1.0_rp, n)
97 call device_cmult(f%w_d, -1.0_rp, n)
99 call copy(f%u, wo4%x, n)
100 call copy(f%v, wo5%x, n)
101 call copy(f%w, wo6%x, n)
108 call neko_scratch_registry%relinquish_field(temp_indices)