Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
coef.c File Reference
#include <CL/cl.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <device/device_config.h>
#include <device/opencl/jit.h>
#include <device/opencl/prgm_lib.h>
#include <device/opencl/check.h>
#include "coef_kernel.cl.h"
Include dependency graph for coef.c:

Go to the source code of this file.

Macros

#define STR(X)   #X
 
#define GEO_CASE(LX)
 
#define STR(X)   #X
 
#define DXYZDRST_CASE(LX)
 
#define STR(X)   #X
 
#define AREA_CASE(LX)
 

Functions

void opencl_coef_generate_geo (void *G11, void *G12, void *G13, void *G22, void *G23, void *G33, void *drdx, void *drdy, void *drdz, void *dsdx, void *dsdy, void *dsdz, void *dtdx, void *dtdy, void *dtdz, void *jacinv, void *w3, int *nel, int *lx, int *gdim)
 
void opencl_coef_generate_dxyzdrst (void *drdx, void *drdy, void *drdz, void *dsdx, void *dsdy, void *dsdz, void *dtdx, void *dtdy, void *dtdz, void *dxdr, void *dydr, void *dzdr, void *dxds, void *dyds, void *dzds, void *dxdt, void *dydt, void *dzdt, void *dx, void *dy, void *dz, void *x, void *y, void *z, void *jacinv, void *jac, int *lx, int *nel)
 
void opencl_coef_generate_mass (void *B, void *Binv, void *jac, void *w3, int *lxyz, int *nel)
 
void opencl_coef_generate_area_and_normal (void *area, void *nx, void *ny, void *nz, void *dxdr, void *dydr, void *dzdr, void *dxds, void *dyds, void *dzds, void *dxdt, void *dydt, void *dzdt, void *wx, void *wy, void *wz, int *lx, int *nel, real eps)
 
void opencl_coef_get_normal (void *normal_x, void *normal_y, void *normal_z, void *nx, void *ny, void *nz, void *i_idx, void *j_idx, void *k_idx, void *e_idx, void *facet, int *lx, int *n)
 

Macro Definition Documentation

◆ AREA_CASE

#define AREA_CASE (   LX)

◆ DXYZDRST_CASE

#define DXYZDRST_CASE (   LX)
Value:
case LX: \
{ \
CL_CHECK(clSetKernelArg(kernel, 0, sizeof(cl_mem), (void *) &dxdr)); \
CL_CHECK(clSetKernelArg(kernel, 1, sizeof(cl_mem), (void *) &dydr)); \
CL_CHECK(clSetKernelArg(kernel, 2, sizeof(cl_mem), (void *) &dzdr)); \
CL_CHECK(clSetKernelArg(kernel, 3, sizeof(cl_mem), (void *) &dxds)); \
CL_CHECK(clSetKernelArg(kernel, 4, sizeof(cl_mem), (void *) &dyds)); \
CL_CHECK(clSetKernelArg(kernel, 5, sizeof(cl_mem), (void *) &dzds)); \
CL_CHECK(clSetKernelArg(kernel, 6, sizeof(cl_mem), (void *) &dxdt)); \
CL_CHECK(clSetKernelArg(kernel, 7, sizeof(cl_mem), (void *) &dydt)); \
CL_CHECK(clSetKernelArg(kernel, 8, sizeof(cl_mem), (void *) &dzdt)); \
CL_CHECK(clSetKernelArg(kernel, 9, sizeof(cl_mem), (void *) &dx)); \
CL_CHECK(clSetKernelArg(kernel, 10, sizeof(cl_mem), (void *) &dy)); \
CL_CHECK(clSetKernelArg(kernel, 11, sizeof(cl_mem), (void *) &dz)); \
CL_CHECK(clSetKernelArg(kernel, 12, sizeof(cl_mem), (void *) &x)); \
CL_CHECK(clSetKernelArg(kernel, 13, sizeof(cl_mem), (void *) &y)); \
CL_CHECK(clSetKernelArg(kernel, 14, sizeof(cl_mem), (void *) &z)); \
} \
break
#define STR(X)
__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__ dz
__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__ dy
__global__ void const T *__restrict__ x
void * coef_program

◆ GEO_CASE

#define GEO_CASE (   LX)

◆ STR [1/3]

#define STR (   X)    #X

◆ STR [2/3]

#define STR (   X)    #X

◆ STR [3/3]

#define STR (   X)    #X

Function Documentation

◆ opencl_coef_generate_area_and_normal()

void opencl_coef_generate_area_and_normal ( void *  area,
void *  nx,
void *  ny,
void *  nz,
void *  dxdr,
void *  dydr,
void *  dzdr,
void *  dxds,
void *  dyds,
void *  dzds,
void *  dxdt,
void *  dydt,
void *  dzdt,
void *  wx,
void *  wy,
void *  wz,
int *  lx,
int *  nel,
real  eps 
)

Fortran wrapper for generating facet area and surface normals

Definition at line 272 of file coef.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ opencl_coef_generate_dxyzdrst()

void opencl_coef_generate_dxyzdrst ( void *  drdx,
void *  drdy,
void *  drdz,
void *  dsdx,
void *  dsdy,
void *  dsdz,
void *  dtdx,
void *  dtdy,
void *  dtdz,
void *  dxdr,
void *  dydr,
void *  dzdr,
void *  dxds,
void *  dyds,
void *  dzds,
void *  dxdt,
void *  dydt,
void *  dzdt,
void *  dx,
void *  dy,
void *  dz,
void *  x,
void *  y,
void *  z,
void *  jacinv,
void *  jac,
int *  lx,
int *  nel 
)

Fortran wrapper for generating geometric factors

Definition at line 132 of file coef.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ opencl_coef_generate_geo()

void opencl_coef_generate_geo ( void *  G11,
void *  G12,
void *  G13,
void *  G22,
void *  G23,
void *  G33,
void *  drdx,
void *  drdy,
void *  drdz,
void *  dsdx,
void *  dsdy,
void *  dsdz,
void *  dtdx,
void *  dtdy,
void *  dtdz,
void *  jacinv,
void *  w3,
int *  nel,
int *  lx,
int *  gdim 
)

Fortran wrapper for generating geometric factors

Definition at line 55 of file coef.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ opencl_coef_generate_mass()

void opencl_coef_generate_mass ( void *  B,
void *  Binv,
void *  jac,
void *  w3,
int *  lxyz,
int *  nel 
)

Fortran wrapper for generating mass matrix

Definition at line 242 of file coef.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ opencl_coef_get_normal()

void opencl_coef_get_normal ( void *  normal_x,
void *  normal_y,
void *  normal_z,
void *  nx,
void *  ny,
void *  nz,
void *  i_idx,
void *  j_idx,
void *  k_idx,
void *  e_idx,
void *  facet,
int *  lx,
int *  n 
)

Fortran wrapper for retrieving facet normals.

Definition at line 348 of file coef.c.

Here is the call graph for this function:
Here is the caller graph for this function: