1#ifndef __CS_ROTATION_H__
2#define __CS_ROTATION_H__
100 const double invariant_point[3],
101 double matrix[3][4]);
155 double f = r->
omega * c;
157 vr[0] += (- r->
axis[2]*
v[1] + r->
axis[1]*
v[2]) * f;
158 vr[1] += (- r->
axis[0]*
v[2] + r->
axis[2]*
v[0]) * f;
159 vr[2] += (- r->
axis[1]*
v[0] + r->
axis[0]*
v[1]) * f;
178 double f = r->
omega * c;
180 vr[0] = (- r->
axis[2]*
v[1] + r->
axis[1]*
v[2]) * f;
181 vr[1] = (- r->
axis[0]*
v[2] + r->
axis[2]*
v[0]) * f;
182 vr[2] = (- r->
axis[1]*
v[0] + r->
axis[0]*
v[1]) * f;
201 double f = r->
omega * c;
203 tr[0][1] -= r->
axis[2]*f;
204 tr[0][2] += r->
axis[1]*f;
206 tr[1][0] += r->
axis[2]*f;
207 tr[1][2] -= r->
axis[0]*f;
209 tr[2][0] -= r->
axis[1]*f;
210 tr[2][1] += r->
axis[0]*f;
229 double f = r->
omega * c;
232 tr[0][1] = - r->
axis[2]*f;
233 tr[0][2] = r->
axis[1]*f;
235 tr[1][0] = r->
axis[2]*f;
237 tr[1][2] = - r->
axis[0]*f;
239 tr[2][0] = - r->
axis[1]*f;
240 tr[2][1] = r->
axis[0]*f;
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
#define CS_F_HOST_DEVICE
Definition: cs_defs.h:561
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:359
#define END_C_DECLS
Definition: cs_defs.h:543
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:335
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:376
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:256
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:219
static 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:127
static 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:173
static 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:197
void cs_rotation_to_array(int r_num, cs_real_t fra[8])
Copy rotation structure values to an array.
Definition: cs_rotation.cpp:431
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:346
static 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:225
static 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:150
double precision, dimension(:,:,:), allocatable theta
Definition: atimbr.f90:122
double precision, dimension(:,:,:), allocatable v
Definition: atimbr.f90:113
Subdomain rotation description.
Definition: cs_rotation.h:46
double axis[3]
Definition: cs_rotation.h:50
double angle
Definition: cs_rotation.h:49
double invariant[3]
Definition: cs_rotation.h:51
double omega
Definition: cs_rotation.h:48