56 type(
field_t),
intent(in) :: u, v, w
58 real(kind=
rp),
intent(in) :: omega(3)
59 real(kind=
rp),
intent(in) :: u_geo(3)
61 type(
field_t),
pointer :: fu, fv, fw
62 real(kind=
rp) :: ui, vi, wi
64 n = fields%item_size(1)
66 fu => fields%get_by_index(1)
67 fv => fields%get_by_index(2)
68 fw => fields%get_by_index(3)
70 do concurrent(i = 1:n)
71 ui = u%x(i,1,1,1) - u_geo(1)
72 vi = v%x(i,1,1,1) - u_geo(2)
73 wi = w%x(i,1,1,1) - u_geo(3)
75 fu%x(i,1,1,1) = fu%x(i,1,1,1) - 2.0_rp * (omega(2) * wi - omega(3) * vi)
76 fv%x(i,1,1,1) = fv%x(i,1,1,1) - 2.0_rp * (omega(3) * ui - omega(1) * wi)
77 fw%x(i,1,1,1) = fw%x(i,1,1,1) - 2.0_rp * (omega(1) * vi - omega(2) * ui)
subroutine, public coriolis_source_term_compute_cpu(u, v, w, fields, omega, u_geo)
Computes the generic Coriolis source term on the cpu.
subroutine, public vcross(u1, u2, u3, v1, v2, v3, w1, w2, w3, n)
Compute a cross product assuming vector components etc.