www.pudn.com > DemoFluid2D.zip > smVBound2D.psh


!!FP1.0 
#TEX0--- OldVelocity 
#TEX1--- RealOffset 
#TEX2--- VelocityFactor 
#TEX3--- InFlowData 
 
#find the effected node to the current node 
TEX R0, f[WPOS], TEX1, RECT; 
ADD R0, f[WPOS].xyxy, R0; 
 
#COMPUTE the velocity ACCORDING TO the boundary conditions 
TEX R0, R0.xyxx, TEX0, RECT;  
TEX R1, f[WPOS], TEX2, RECT;  
MUL R0, R0, R1; 
 
#if the inflowdata is NOT zero, then set it to inflowdata 
TEX R1, f[WPOS], TEX3, RECT; 
SNE H0, R1, {0,0,0,0}; 
LRP o[COLR], H0, R1, R0; 
 
END 
# 17 instructions, 2 R-regs, 1 H-regs. 
# End of program