Neko  0.9.99
A portable framework for high-order spectral element flow simulations
filters.cu File Reference
#include "filter_kernels.h"
#include <device/device_config.h>
#include <device/cuda/check.h>
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for filters.cu:

Go to the source code of this file.

Functions

void cuda_smooth_step (void *x, real *edge0, real *edge1, int *n)
 
void cuda_step_function (void *x, real *edge, real *left, real *right, int *n)
 
void cuda_permeability (void *x, real *k_0, real *k_1, real *q, int *n)
 

Function Documentation

◆ cuda_permeability()

void cuda_permeability ( void *  x,
real k_0,
real k_1,
real q,
int *  n 
)

Fortran wrapper for the permeability filter

Parameters
xarray to apply the permeability filter on
k_0lower bound of the permeability
k_1upper bound of the permeability
qparameter
nsize of the array

Definition at line 90 of file filters.cu.

◆ cuda_smooth_step()

void cuda_smooth_step ( void *  x,
real edge0,
real edge1,
int *  n 
)

Fortran wrapper for 2nd order smooth_step

Compute the smooth step function for a given array. t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0); return t^3 * (t * (6.0 * t - 15.0) + 10.0);

Definition at line 49 of file filters.cu.

◆ cuda_step_function()

void cuda_step_function ( void *  x,
real edge,
real left,
real right,
int *  n 
)

Fortran wrapper for step function

Compute the step function for a given array. if (x < edge) return left; else return right;

Parameters
xarray to apply the step function
edgethreshold value
leftvalue to return if x < edge
rightvalue to return if x >= edge
nsize of the array

Definition at line 72 of file filters.cu.