96 const double invariant_point[3],
152 double f = r->
omega * c;
154 vr[0] += (- r->
axis[2]*v[1] + r->
axis[1]*v[2]) * f;
155 vr[1] += (- r->
axis[0]*v[2] + r->
axis[2]*v[0]) * f;
156 vr[2] += (- r->
axis[1]*v[0] + r->
axis[0]*v[1]) * f;
175 double f = r->
omega * c;
177 vr[0] = (- r->
axis[2]*v[1] + r->
axis[1]*v[2]) * f;
178 vr[1] = (- r->
axis[0]*v[2] + r->
axis[2]*v[0]) * f;
179 vr[2] = (- r->
axis[1]*v[0] + r->
axis[0]*v[1]) * f;
198 double f = r->
omega * c;
200 tr[0][1] -= r->
axis[2]*f;
201 tr[0][2] += r->
axis[1]*f;
203 tr[1][0] += r->
axis[2]*f;
204 tr[1][2] -= r->
axis[0]*f;
206 tr[2][0] -= r->
axis[1]*f;
207 tr[2][1] += r->
axis[0]*f;
226 double f = r->
omega * c;
229 tr[0][1] = - r->
axis[2]*f;
230 tr[0][2] = r->
axis[1]*f;
232 tr[1][0] = r->
axis[2]*f;
234 tr[1][2] = - r->
axis[0]*f;
236 tr[2][0] = - r->
axis[1]*f;
237 tr[2][1] = r->
axis[0]*f;
#define CS_F_HOST_DEVICE
Definition: cs_defs.h:555
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:349
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
void cs_rotation_cyl_v(const cs_rotation_t *r, const cs_real_t coords[3], const cs_real_t v[3], cs_real_t vc[3])
Express a vector in the cyclindrical system associated to a rotation.
Definition: cs_rotation.cpp:371
void cs_rotation_matrix(double theta, const double axis[3], const double invariant_point[3], double matrix[3][4])
Compute rotation matrix.
Definition: cs_rotation.cpp:251
cs_rotation_t * cs_glob_rotation
void cs_rotation_define(double omega_x, double omega_y, double omega_z, double invariant_x, double invariant_y, double invariant_z)
Define a global rotation.
Definition: cs_rotation.cpp:214
CS_F_HOST_DEVICE void cs_rotation_velocity(const cs_rotation_t *r, const cs_real_t coords[3], cs_real_t vr[3])
Compute velocity relative to a fixed frame at a given point.
Definition: cs_rotation.h:124
void cs_rotation_coriolis_v(const cs_rotation_t *r, cs_real_t c, const cs_real_t v[3], cs_real_t vr[3])
Compute a vector Coriolis term.
Definition: cs_rotation.h:170
CS_F_HOST_DEVICE void cs_rotation_add_coriolis_t(const cs_rotation_t *r, cs_real_t c, cs_real_t tr[3][3])
Add the dual tensor of a rotation vector to a tensor.
Definition: cs_rotation.h:194
void cs_rotation_to_array(int r_num, cs_real_t fra[8])
Copy rotation structure values to an array.
Definition: cs_rotation.cpp:426
void cs_rotation_update_coords(cs_lnum_t n_coords, double t_rot, cs_real_3_t coords[])
Update coordinates based on a global rotation and time.
Definition: cs_rotation.cpp:341
CS_F_HOST_DEVICE void cs_rotation_coriolis_t(const cs_rotation_t *r, cs_real_t c, cs_real_t tr[3][3])
Compute the dual tensor of a rotation vector.
Definition: cs_rotation.h:222
CS_F_HOST_DEVICE void cs_rotation_add_coriolis_v(const cs_rotation_t *r, cs_real_t c, const cs_real_t v[3], cs_real_t vr[3])
Add a Coriolis term to a vector.
Definition: cs_rotation.h:147
Subdomain rotation description.
Definition: cs_rotation.h:42
double axis[3]
Definition: cs_rotation.h:46
double angle
Definition: cs_rotation.h:45
double invariant[3]
Definition: cs_rotation.h:47
double omega
Definition: cs_rotation.h:44