Neko 1.99.7
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
neko.h
Go to the documentation of this file.
1#ifndef __NEKO_H
2#define __NEKO_H
3
4#include <stdint.h>
5
10typedef double neko_real;
11
16typedef void (*neko_initial_condition_cb)(const char *scheme_name,
17 int scheme_name_len);
18
19/* Pre timestep callback */
20typedef void (*neko_preprocess_cb)(neko_real t, int tstep);
21
22/* End of timestep callback */
23typedef void (*neko_compute_cb)(neko_real t, int tstep);
24
25/* User boundary condition callback */
26typedef void (*neko_dirichlet_condition_cb)(int *msk, int msk_size,
27 neko_real t, int tstep);
28
33typedef void (*neko_material_properties_cb)(const char *scheme_name,
35 neko_real t, int tstep);
36
41typedef void (*neko_source_term_cb)(const char *scheme_name,
43 neko_real t, int tstep);
44
45/* Initialise Neko */
46void neko_init();
47
48/* Finalize Neko */
50
51/* Display job information */
53
54/* Initialise a Neko device layer */
56
57/* Destroy a Neko device layer */
59
60/* Initialise a Neko registry */
62
63/* Destroy a Neko registry */
65
66/* Initialise a Neko scratch registry */
68
69/* Destroy a Neko scratch registry */
71
72/* Allocate memory for a Neko case */
74
75/* Initialise a Neko case */
76void neko_case_init(const char **case_json, int case_len, int **case_iptr);
77
78/* Destroy a Neko case */
80
81/* Retrive the current time of a case */
83
84/* Retrive the end time of a case */
86
87/* Retrive the current time-step of a case */
89
90/* Solve a Neko case */
92
93/* Compute a time-step for a neko case */
94void neko_step(int **case_iptr);
95
96/* Execute a case's output controller */
98
99/* Retrive a pointer to a flow field */
100neko_real *neko_field(char *field_name);
101
102/* Retrive the order of a field */
103int neko_field_order(char *field_name);
104
105/* Retrive the number of elements in a field */
106int neko_field_nelements(char *field_name);
107
108/* Retrive the total number of degrees of freedom of a field */
109int neko_field_size(char *field_name);
110
111/* Retrive the dofmap associated with a field */
112void neko_field_dofmap(char *field_name, int64_t **dof, neko_real **x,
113 neko_real **y, neko_real **z);
114
115/* Retrive the dofmapassociated with a case's fluid solver */
117 neko_real **y, neko_real **z, int *size);
118
119/* Retrive the space associated with a field */
120void neko_field_space(char *field_name, int *lx, neko_real **zg,
122 neko_real **wx, neko_real **wy, neko_real **wz,
124
125/* Retrive the space associated with a field */
126void neko_case_fluid_space(int **case_iptr, int *lx, neko_real **zg,
128 neko_real **wx, neko_real **wy, neko_real **wz,
130
131/* Retrive the coefficient associated with a case's fluid solver */
133 neko_real **G33, neko_real **G12, neko_real **G13,
134 neko_real **G23, neko_real **mult, neko_real **dxdr,
135 neko_real **dydr, neko_real **dzdr, neko_real **dxds,
136 neko_real **dyds, neko_real **dzds, neko_real **dxdt,
137 neko_real **dydt, neko_real **dzdt, neko_real **drdx,
141 neko_real **B, neko_real **area, neko_real **nx,
142 neko_real **ny, neko_real **nz);
143
144/* Setup user-provided callbacks, a null pointer leaves a callback undefined */
152
153/* Retrive a pointer to a field of the currently active callback */
155
156/* Retrive a pointer to a field of the currently active callback */
158
159/* Check if the callback's field at a given index has a given name */
160int neko_cb_field_name_at_index(int *field_idx, char *field_name);
161
162#endif
__global__ void ale_add_kinematics_kernel(const int n, T *__restrict__ wx, T *__restrict__ wy, T *__restrict__ wz, const T *__restrict__ x_ref, const T *__restrict__ y_ref, const T *__restrict__ z_ref, const T *__restrict__ phi, const T *__restrict__ x, const T *__restrict__ y, const T *__restrict__ z, const kinematics_params_t kin_params)
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ drdy
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ drdz
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dsdz
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dsdy
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dtdy
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dx
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ drdx
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dtdz
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dsdx
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dtdx
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dz
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dy
__global__ void const T *__restrict__ const T *__restrict__ dr
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ ds
__global__ void const T *__restrict__ x
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dt
void neko_step(int **case_iptr)
void(* neko_source_term_cb)(const char *scheme_name, int scheme_name_len, neko_real t, int tstep)
Definition neko.h:41
int neko_field_nelements(char *field_name)
int neko_case_tstep(int **case_iptr)
void neko_scratch_registry_init()
void neko_registry_free()
void(* neko_material_properties_cb)(const char *scheme_name, int scheme_name_len, neko_real t, int tstep)
Definition neko.h:33
double neko_real
Definition neko.h:10
void neko_device_finalize()
void neko_finalize()
void neko_case_init(const char **case_json, int case_len, int **case_iptr)
void neko_registry_init()
void neko_case_allocate(int **case_iptr)
void neko_output_ctrl_execute(int **case_iptr, int force_output)
void neko_init()
void neko_case_fluid_coef(int **case_iptr, neko_real **G11, neko_real **G22, neko_real **G33, neko_real **G12, neko_real **G13, neko_real **G23, neko_real **mult, neko_real **dxdr, neko_real **dydr, neko_real **dzdr, neko_real **dxds, neko_real **dyds, neko_real **dzds, neko_real **dxdt, neko_real **dydt, neko_real **dzdt, neko_real **drdx, neko_real **drdy, neko_real **drdz, neko_real **dsdx, neko_real **dsdy, neko_real **dsdz, neko_real **dtdx, neko_real **dtdy, neko_real **dtdz, neko_real **jac, neko_real **B, neko_real **area, neko_real **nx, neko_real **ny, neko_real **nz)
void neko_job_info()
void(* neko_preprocess_cb)(neko_real t, int tstep)
Definition neko.h:20
int neko_field_size(char *field_name)
void neko_case_free(int **case_iptr)
void neko_solve(int **case_iptr)
neko_real * neko_cb_field_by_index(int *field_idx)
void neko_field_space(char *field_name, int *lx, neko_real **zg, neko_real **dr, neko_real **ds, neko_real **dt, neko_real **wx, neko_real **wy, neko_real **wz, neko_real **dx, neko_real **dy, neko_real **dz)
neko_real * neko_field(char *field_name)
double neko_case_end_time(int **case_iptr)
double neko_case_time(int **case_iptr)
neko_real * neko_cb_field_by_name(char *field_name)
int neko_cb_field_name_at_index(int *field_idx, char *field_name)
void neko_user_setup(int **case_iptr, neko_initial_condition_cb initial_cb, neko_preprocess_cb preprocess_cb, neko_compute_cb compute_cb, neko_dirichlet_condition_cb dirichlet_cb, neko_material_properties_cb material_cb, neko_source_term_cb source_cb)
void(* neko_initial_condition_cb)(const char *scheme_name, int scheme_name_len)
Definition neko.h:16
void neko_scratch_registry_free()
void neko_field_dofmap(char *field_name, int64_t **dof, neko_real **x, neko_real **y, neko_real **z)
int neko_field_order(char *field_name)
void neko_case_fluid_space(int **case_iptr, int *lx, neko_real **zg, neko_real **dr, neko_real **ds, neko_real **dt, neko_real **wx, neko_real **wy, neko_real **wz, neko_real **dx, neko_real **dy, neko_real **dz)
void neko_device_init()
void(* neko_dirichlet_condition_cb)(int *msk, int msk_size, neko_real t, int tstep)
Definition neko.h:26
void neko_case_fluid_dofmap(int **case_iptr, int64_t **dof, neko_real **x, neko_real **y, neko_real **z, int *size)
void(* neko_compute_cb)(neko_real t, int tstep)
Definition neko.h:23