ASCOT5
Toggle main menu visibility
Loading...
Searching...
No Matches
wall
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
15
typedef
struct
{
16
int
n
;
17
real
*
wall_r
;
18
real
*
wall_z
;
19
int
*
flag
;
20
}
wall_2d_data
;
21
22
int
wall_2d_init
(
wall_2d_data
* data,
int
nelements,
real
* r,
real
* z,
23
int
* flag);
24
void
wall_2d_free
(
wall_2d_data
* data);
25
void
wall_2d_offload
(
wall_2d_data
* data);
26
GPU_DECLARE_TARGET_SIMD_UNIFORM(w)
27
int
wall_2d_inside
(
real
r,
real
z,
wall_2d_data
* w);
28
DECLARE_TARGET_END
29
GPU_DECLARE_TARGET_SIMD_UNIFORM(w)
30
int
wall_2d_hit_wall
(
real
r1,
real
phi1,
real
z1,
real
r2,
real
phi2,
real
z2,
31
wall_2d_data
* w,
real
* w_coll);
32
DECLARE_TARGET_END
33
GPU_DECLARE_TARGET_SIMD_UNIFORM(w)
34
int
wall_2d_find_intersection
(
real
r1,
real
z1,
real
r2,
real
z2,
35
wall_2d_data
* w,
real
* w_coll);
36
DECLARE_TARGET_END
37
#endif
ascot5.h
Main header file for ASCOT5.
real
double real
Definition
ascot5.h:85
wall_2d_data
2D wall data parameters
Definition
wall_2d.h:15
wall_2d_data::n
int n
Definition
wall_2d.h:16
wall_2d_data::wall_z
real * wall_z
Definition
wall_2d.h:18
wall_2d_data::flag
int * flag
Definition
wall_2d.h:19
wall_2d_data::wall_r
real * wall_r
Definition
wall_2d.h:17
wall_2d_offload
void wall_2d_offload(wall_2d_data *data)
Offload data to the accelerator.
Definition
wall_2d.c:63
wall_2d_find_intersection
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
wall_2d_inside
int wall_2d_inside(real r, real z, wall_2d_data *w)
Check if coordinates are within 2D polygon wall.
Definition
wall_2d.c:87
wall_2d_init
int wall_2d_init(wall_2d_data *data, int nelements, real *r, real *z, int *flag)
Load 2D wall data and prepare parameters.
Definition
wall_2d.c:22
wall_2d_free
void wall_2d_free(wall_2d_data *data)
Free allocated resources.
Definition
wall_2d.c:53
wall_2d_hit_wall
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:128
Generated on
for ASCOT5 by
1.18.0