#include "cs_defs.h"#include <assert.h>#include <math.h>#include <string.h>#include "bft_mem.h"#include "cs_base.h"#include "cs_math.h"#include "cs_time_step.h"#include "cs_timer.h"#include "cs_rotation.h"Functions | |
| 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. | |
| void | cs_rotation_matrix (double theta, const double axis[3], const double invariant_point[3], double matrix[3][4]) |
| Compute rotation matrix. | |
| 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. | |
| 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. | |
| void | cs_rotation_to_array (int r_num, cs_real_t fra[8]) |
| Copy rotation structure values to an array. | |
| 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.
| [in] | r | pointer to rotation structure |
| [in] | coords | cartesian coordinates of the location point |
| [in] | v | vector components in cartesian coordinates system |
| [out] | vc | vector components in cylindrical coordinates system |
| 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.
The rotation vector's length determines the angular velocity (in rad/s).
| [in] | omega_x | rotation vector x component |
| [in] | omega_y | rotation vector y component |
| [in] | omega_z | rotation vector z component |
| [in] | invariant_x | invariant point x component |
| [in] | invariant_y | invariant point y component |
| [in] | invariant_z | invariant point z component |
| void cs_rotation_matrix | ( | double | theta, |
| const double | axis[3], | ||
| const double | invariant_point[3], | ||
| double | matrix[3][4] ) |
Compute rotation matrix.
| [in] | theta | rotation angle, in radians |
| [in] | axis | rotation axis direction vector |
| [in] | invariant_point | invariant point coordinates |
| [out] | matrix | resulting rotation matrix |
| void cs_rotation_to_array | ( | int | r_num, |
| cs_real_t | fra[8] ) |
Copy rotation structure values to an array.
This may be useful to avoid requiring specific type mappings for MPI or other programming languages.
| [in] | r_num | rotation number (1 to n numbering, 0 for none) |
| [in] | fra | flat rotation array: axis (0-2), invariant(3-5), omega (6), angle(7) |
| 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.
| [in] | n_coords | number of coordinates |
| [in] | t_rot | time since rotation start |
| [in,out] | coords | coordinates array |