ASCOT5
Loading...
Searching...
No Matches
wall_2d.h
Go to the documentation of this file.
1
5#ifndef WALL_2D_H
6#define WALL_2D_H
7#include "../ascot5.h"
8#include "../offload.h"
9
15typedef struct {
16 int n;
20
21int wall_2d_init(wall_2d_data* data, int nelements, real* r, real* z);
22void wall_2d_free(wall_2d_data* data);
24GPU_DECLARE_TARGET_SIMD_UNIFORM(w)
26DECLARE_TARGET_END
27GPU_DECLARE_TARGET_SIMD_UNIFORM(w)
28int wall_2d_hit_wall(real r1, real phi1, real z1, real r2, real phi2, real z2,
29 wall_2d_data* w, real* w_coll);
30GPU_DECLARE_TARGET_SIMD_UNIFORM(w)
32 wall_2d_data* w, real* w_coll);
33DECLARE_TARGET_END
34#endif
Main header file for ASCOT5.
double real
Definition ascot5.h:85
2D wall data parameters
Definition wall_2d.h:15
real * wall_z
Definition wall_2d.h:18
real * wall_r
Definition wall_2d.h:17
void wall_2d_offload(wall_2d_data *data)
Offload data to the accelerator.
Definition wall_2d.c:60
int wall_2d_find_intersection(real r1, real z1, real r2, real z2, wall_2d_data *w, real *w_coll)
Find intersection between the wall element and line segment.
Definition wall_2d.c:149
int wall_2d_inside(real r, real z, wall_2d_data *w)
Check if coordinates are within 2D polygon wall.
Definition wall_2d.c:83
DECLARE_TARGET_END int wall_2d_hit_wall(real r1, real phi1, real z1, real r2, real phi2, real z2, wall_2d_data *w, real *w_coll)
Check if trajectory from (r1, phi1, z1) to (r2, phi2, z2) intersects the wall.
Definition wall_2d.c:124
void wall_2d_free(wall_2d_data *data)
Free allocated resources.
Definition wall_2d.c:50
int wall_2d_init(wall_2d_data *data, int nelements, real *r, real *z)
Load 2D wall data and prepare parameters.
Definition wall_2d.c:22