27 lines
840 B
C++
27 lines
840 B
C++
#include <cstdio>
|
|
#include <initializer_list>
|
|
#define __device__
|
|
#define __forceinline__ inline
|
|
#define WALL_NORMAL_VELOCITY 0.0f
|
|
#include "boundary/planar_velocity.cuh"
|
|
|
|
int main() {
|
|
const int cy[9]={0,0,0,1,-1,1,-1,-1,1};
|
|
const float w[9]={4.f/9,1.f/9,1.f/9,1.f/9,1.f/9,1.f/36,1.f/36,1.f/36,1.f/36};
|
|
for (float rho : {1.f,1.04f}) for (float v : {-.01f,-.001f,0.f,.001f,.01f})
|
|
for (int neq : {0,1}) {
|
|
float f[9];
|
|
printf("%.9g %.9g %d\n",rho,v,neq);
|
|
for (int i=0;i<9;++i) {
|
|
float cu=cy[i]*v;
|
|
f[i]=w[i]*rho*(1+3*cu+4.5f*cu*cu-1.5f*v*v)+neq*.0001f*(i-4);
|
|
if (cy[i]==-1) f[i]=-7.f-i;
|
|
printf("%.9g ",f[i]);
|
|
}
|
|
puts("");
|
|
reconstruct_top_reservoir(f,rho);
|
|
for (float value : f) printf("%.9g ",value);
|
|
puts("");
|
|
}
|
|
}
|