54 real(kind=
rp),
intent(in) :: omega(3)
55 real(kind=
rp),
intent(in) :: u_geo(3)
57 type(
field_t),
pointer :: u, v, w
58 real(kind=
rp) :: ui, vi, wi
61 n = fields%item_size(1)
63 u => fields%get_by_index(1)
64 v => fields%get_by_index(2)
65 w => fields%get_by_index(3)
67 do concurrent(i = 1:n)
68 ui = u%x(i,1,1,1) - u_geo(1)
69 vi = v%x(i,1,1,1) - u_geo(2)
70 wi = w%x(i,1,1,1) - u_geo(3)
72 u%x(i,1,1,1) = u%x(i,1,1,1) - 2.0_rp * (omega(2) * wi - omega(3) * vi)
73 v%x(i,1,1,1) = v%x(i,1,1,1) - 2.0_rp * (omega(3) * ui - omega(1) * wi)
74 w%x(i,1,1,1) = w%x(i,1,1,1) - 2.0_rp * (omega(1) * vi - omega(2) * ui)
Implements the cpu kernel for the coriolis_source_term_t type. Maintainer: Timofey Mukha.
subroutine, public coriolis_source_term_compute_cpu(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.
integer, parameter, public rp
Global precision used in computations.
field_list_t, To be able to group fields together