|
ASCOT5
|
Header file for wall.c. More...
Go to the source code of this file.
Data Structures | |
| struct | wall_data |
| Wall model simulation data. More... | |
Typedefs | |
| typedef enum wall_type | wall_type |
| Wall model types. | |
Enumerations | |
| enum | wall_type { wall_type_2D , wall_type_3D } |
| Wall model types. More... | |
Functions | |
| void | wall_free (wall_data *data) |
| Free allocated resources. | |
| void | wall_offload (wall_data *data) |
| Offload data to the accelerator. | |
| int | wall_hit_wall (real r1, real phi1, real z1, real r2, real phi2, real z2, wall_data *w, real *w_coll) |
| Check if a given directed line segment intersects the wall. | |
| DECLARE_TARGET_END int | wall_get_n_elements (wall_data *w) |
| Return the number of wall elements. | |
| DECLARE_TARGET_END int | wall_get_flag (wall_data *w, int idx) |
| Return the flag of a wall element. | |
Header file for wall.c.
Contains a list declaring all wall_types, and declaration of wall_offload_data and wall_data structs.
Definition in file wall.h.
| enum wall_type |
| void wall_free | ( | wall_data * | data | ) |
| void wall_offload | ( | wall_data * | data | ) |
| int wall_hit_wall | ( | real | r1, |
| real | phi1, | ||
| real | z1, | ||
| real | r2, | ||
| real | phi2, | ||
| real | z2, | ||
| wall_data * | w, | ||
| real * | w_coll ) |
Check if a given directed line segment intersects the wall.
This function is intended to be used to check whether a marker collides with the wall. If there is a collision, this function returns an identification number specific to that wall tile. If the marker hits multiple wall elements, only the first one is returned.
This is a SIMD function.
| r1 | start point R coordinate [m] |
| phi1 | start point phi coordinate [rad] |
| z1 | start point z coordinate [rad] |
| r2 | end point R coordinate [m] |
| phi2 | end point phi coordinate [rad] |
| z2 | end point z coordinate [rad] |
| w | pointer to data struct on target |
| w_coll | pointer for storing the parameter in P = P1 + w_coll * (P2-P1), where P is the point where the collision occurred. |
| DECLARE_TARGET_END int wall_get_n_elements | ( | wall_data * | w | ) |