45 lines
840 B
C
45 lines
840 B
C
#include <jni.h>
|
|
#include <stdint.h>
|
|
#include "includes/utilities.h"
|
|
#include "includes/chunkmask.h"
|
|
#include "includes/electrosphere_FluidSim.h"
|
|
|
|
#define DIM 18
|
|
#define LINEARSOLVERTIMES 20
|
|
|
|
typedef struct {
|
|
float * d;
|
|
float * u;
|
|
float * v;
|
|
float * w;
|
|
float * d0;
|
|
float * u0;
|
|
float * v0;
|
|
float * w0;
|
|
} Chunk;
|
|
|
|
|
|
JNIEXPORT void JNICALL Java_electrosphere_FluidSim_simulate(
|
|
JNIEnv * env,
|
|
jclass class,
|
|
jfloat timestep
|
|
){
|
|
}
|
|
|
|
JNIEXPORT void JNICALL Java_electrosphere_FluidSim_queueChunk(
|
|
JNIEnv * env,
|
|
jclass class,
|
|
jint oldDim,
|
|
jint chunkmask,
|
|
jobjectArray dr,
|
|
jobjectArray ur,
|
|
jobjectArray vr,
|
|
jobjectArray wr,
|
|
jobjectArray d0r,
|
|
jobjectArray u0r,
|
|
jobjectArray v0r,
|
|
jobjectArray w0r,
|
|
jfloat DIFFUSION_CONSTANT,
|
|
jfloat VISCOSITY_CONSTANT
|
|
){
|
|
} |