work on pressure respecting bounds
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
c48467b333
commit
f248d68a5b
@ -153,12 +153,24 @@ LIBRARY_API void pressurecell_approximate_pressure(Environment * environment, Ch
|
||||
// pressureTemp[IX(x,DIM-1,y)] = 0;
|
||||
// pressureTemp[IX(x,y,0)] = 0;
|
||||
// pressureTemp[IX(x,y,DIM-1)] = 0;
|
||||
if(border[IX(0,x,y)] > 0){
|
||||
pressureTemp[IX(0,x,y)] = pressureTemp[IX(1,x,y)];
|
||||
}
|
||||
if(border[IX(DIM-1,x,y)] > 0){
|
||||
pressureTemp[IX(DIM-1,x,y)] = pressureTemp[IX(DIM-2,x,y)];
|
||||
}
|
||||
if(border[IX(x,0,y)] > 0){
|
||||
pressureTemp[IX(x,0,y)] = pressureTemp[IX(x,1,y)];
|
||||
}
|
||||
if(border[IX(x,DIM-1,y)] > 0){
|
||||
pressureTemp[IX(x,DIM-1,y)] = pressureTemp[IX(x,DIM-2,y)];
|
||||
}
|
||||
if(border[IX(x,y,0)] > 0){
|
||||
pressureTemp[IX(x,y,0)] = pressureTemp[IX(x,y,1)];
|
||||
}
|
||||
if(border[IX(x,y,DIM-1)] > 0){
|
||||
pressureTemp[IX(x,y,DIM-1)] = pressureTemp[IX(x,y,DIM-2)];
|
||||
}
|
||||
// pressureTemp[IX(0,x,y)] = border[IX(0,x,y)] * FLUID_PRESSURECELL_BOUND_PRESSURE;
|
||||
// pressureTemp[IX(DIM-1,x,y)] = border[IX(DIM-1,x,y)] * FLUID_PRESSURECELL_BOUND_PRESSURE;
|
||||
// pressureTemp[IX(x,0,y)] = border[IX(x,0,y)] * FLUID_PRESSURECELL_BOUND_PRESSURE;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user