Header file for wall.c.
More...
#include "ascot5.h"
#include "offload.h"
#include "wall/wall_2d.h"
#include "wall/wall_3d.h"
Go to the source code of this file.
|
typedef enum wall_type | wall_type |
| Wall model types.
|
|
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.
◆ wall_type
Wall model types.
Enumerator |
---|
wall_type_2D | Axisymmetric wall model consisting of single contour
|
wall_type_3D | 3D wall model consisting of triangles
|
Definition at line 20 of file wall.h.
◆ wall_free()
Free allocated resources.
- Parameters
-
data | pointer to the data struct |
Definition at line 29 of file wall.c.
◆ wall_offload()
Offload data to the accelerator.
- Parameters
-
data | pointer to the data struct |
Definition at line 46 of file wall.c.
◆ wall_hit_wall()
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.
- Parameters
-
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. |
- Returns
- wall element id if hit, zero otherwise
Definition at line 80 of file wall.c.
◆ wall_get_n_elements()
DECLARE_TARGET_END int wall_get_n_elements |
( |
wall_data * | w | ) |
|
Return the number of wall elements.
- Parameters
-
w | pointer to wall data struct on target |
- Returns
- Number of wall elements or zero on failure.
Definition at line 104 of file wall.c.