Use direct momentum in opt-in shifted blocked equilibrium
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
#define WALL_SLOT_WIDTH 0
|
||||
#define NX 16
|
||||
#include "core/descriptors.cuh"
|
||||
// Host round-to-nearest shim; CUDA intrinsic behavior is tested on-device.
|
||||
inline float __fdiv_rn(float a, float b) { return a / b; }
|
||||
#include "operators/macro.cuh"
|
||||
#include "operators/collision_srt.cuh"
|
||||
#include "boundary/planar_velocity.cuh"
|
||||
@@ -23,6 +25,13 @@ int main() {
|
||||
float eq[9]; compute_feq(1.f+delta,u,-.2f*u,eq,delta);
|
||||
printf("E %.9g %.9g %.9g\n",delta,u,-.2f*u);emit(eq);
|
||||
}
|
||||
for(float delta : {0.f, 0x1p-30f, -0x1p-30f, .04f, -.01f})
|
||||
for(float jx : {0.f,.005f,-.02f}) {
|
||||
const float jy = -.2f*jx, rho = 1.f+delta;
|
||||
const float ux = jx/rho, uy = jy/rho;
|
||||
float eq[9];compute_feq_from_momentum(delta,jx,jy,ux,uy,eq);
|
||||
printf("J %.9g %.9g %.9g %.9g %.9g\n",delta,jx,jy,ux,uy);emit(eq);
|
||||
}
|
||||
for(int mode : {0,1,2}) for(float rho : {1.f,1.04f}) {
|
||||
float f[9];const float u=.007f,v=.003f;
|
||||
compute_feq(rho,u,v,f,rho-1.f);
|
||||
|
||||
Reference in New Issue
Block a user