ASCOT5
Toggle main menu visibility
Loading...
Searching...
No Matches
simulate
mccc
mccc_wiener.h
Go to the documentation of this file.
1
5
#ifndef MCCC_WIENER_H
6
#define MCCC_WIENER_H
7
8
#include "
../../ascot5.h
"
9
#include "
../../error.h
"
10
15
#define MCCC_NDIM 5
16
21
#define MCCC_NSLOTS WIENERSLOTS
22
28
typedef
struct
{
29
int
nextslot
[
MCCC_NSLOTS
];
33
real
time
[
MCCC_NSLOTS
];
35
real
wiener
[
MCCC_NDIM
*
MCCC_NSLOTS
];
37
}
mccc_wienarr
;
38
39
DECLARE_TARGET_SIMD
40
void
mccc_wiener_initialize
(
mccc_wienarr
* w,
real
initime);
41
DECLARE_TARGET_SIMD
42
GPU_DECLARE_TARGET_SIMD
43
a5err
mccc_wiener_generate
(
mccc_wienarr
* w,
real
t,
int
* windex,
real
* rand5);
44
GPU_DECLARE_TARGET_SIMD
45
a5err
mccc_wiener_clean
(
mccc_wienarr
* w,
real
t);
46
void
mccc_wiener_offload
(
mccc_wienarr
* w,
int
mrk_array_size);
47
void
mccc_wiener_onload
(
mccc_wienarr
* w,
int
mrk_array_size);
48
#endif
ascot5.h
Main header file for ASCOT5.
real
double real
Definition
ascot5.h:85
error.h
Error module for ASCOT5.
a5err
unsigned long int a5err
Simulation error flag.
Definition
error.h:17
mccc_wiener_generate
a5err mccc_wiener_generate(mccc_wienarr *w, real t, int *windex, real *rand5)
Generates a new Wiener process at a given time instant.
Definition
mccc_wiener.c:96
mccc_wiener_onload
void mccc_wiener_onload(mccc_wienarr *w, int mrk_array_size)
Onload data from the GPU.
Definition
mccc_wiener.c:73
mccc_wiener_clean
a5err mccc_wiener_clean(mccc_wienarr *w, real t)
Removes Wiener processes from the array that are no longer required.
Definition
mccc_wiener.c:203
mccc_wiener_offload
void mccc_wiener_offload(mccc_wienarr *w, int mrk_array_size)
Offload data to the accelerator.
Definition
mccc_wiener.c:57
mccc_wiener_initialize
void mccc_wiener_initialize(mccc_wienarr *w, real initime)
Initializes a struct that stores generated Wiener processes.
Definition
mccc_wiener.c:36
MCCC_NSLOTS
#define MCCC_NSLOTS
Definition
mccc_wiener.h:21
MCCC_NDIM
#define MCCC_NDIM
Definition
mccc_wiener.h:15
mccc_wienarr
Struct for storing Wiener processes.
Definition
mccc_wiener.h:28
mccc_wienarr::time
real time[MCCC_NSLOTS]
Definition
mccc_wiener.h:33
mccc_wienarr::nextslot
int nextslot[MCCC_NSLOTS]
Definition
mccc_wiener.h:29
mccc_wienarr::wiener
real wiener[MCCC_NDIM *MCCC_NSLOTS]
Definition
mccc_wiener.h:35
Generated on
for ASCOT5 by
1.18.0