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_acc_omp.h"
9
13typedef struct {
14 int n;
17
23typedef struct {
24 int n;
28
30 real** offload_array);
32 real** offload_array);
33
35 real* offload_array);
36GPU_DECLARE_TARGET_SIMD_UNIFORM(w)
38DECLARE_TARGET_END
39GPU_DECLARE_TARGET_SIMD_UNIFORM(w)
40int wall_2d_hit_wall(real r1, real phi1, real z1, real r2, real phi2, real z2,
41 wall_2d_data* w, real* w_coll);
42GPU_DECLARE_TARGET_SIMD_UNIFORM(w)
44 wall_2d_data* w, real* w_coll);
45DECLARE_TARGET_END
46#endif
Main header file for ASCOT5.
double real
Definition ascot5.h:85
2D wall data parameters
Definition wall_2d.h:23
real * wall_z
Definition wall_2d.h:26
real * wall_r
Definition wall_2d.h:25
2D wall offload data
Definition wall_2d.h:13
void wall_2d_free_offload(wall_2d_offload_data *offload_data, real **offload_array)
Free offload array and reset parameters.
Definition wall_2d.c:62
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:167
void wall_2d_init(wall_2d_data *w, wall_2d_offload_data *offload_data, real *offload_array)
Initialize 2D wall data struct on target.
Definition wall_2d.c:78
int wall_2d_inside(real r, real z, wall_2d_data *w)
Check if coordinates are within 2D polygon wall.
Definition wall_2d.c:101
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:142
int wall_2d_init_offload(wall_2d_offload_data *offload_data, real **offload_array)
Load 2D wall data and prepare parameters.
Definition wall_2d.c:29