diff options
Diffstat (limited to 'intern/elbeem/intern/solver_control.cpp')
-rw-r--r-- | intern/elbeem/intern/solver_control.cpp | 152 |
1 files changed, 0 insertions, 152 deletions
diff --git a/intern/elbeem/intern/solver_control.cpp b/intern/elbeem/intern/solver_control.cpp index c3015b82f0a..d7ed1a5a7ef 100644 --- a/intern/elbeem/intern/solver_control.cpp +++ b/intern/elbeem/intern/solver_control.cpp @@ -873,156 +873,4 @@ LbmFsgrSolver::handleCpdata() // warning, may return before } -#if LBM_USE_GUI==1 - -#define USE_GLUTILITIES -#include "../gui/gui_utilities.h" - -void LbmFsgrSolver::cpDebugDisplay(int dispset) -{ - for(int cpssi=0; cpssi<(int)mpControl->mCons.size(); cpssi++) { - ControlParticles *cparts = mpControl->mCons[cpssi]->mCparts; - //ControlParticles *cpmotion = mpControl->mCons[cpssi]->mCpmotion; - // display cp parts - const bool cpCubes = false; - const bool cpDots = true; - const bool cpCpdist = true; - const bool cpHideIna = true; - glShadeModel(GL_FLAT); - glDisable( GL_LIGHTING ); // dont light lines - - // dot influence - if((mpControl->mDebugCpscale>0.) && cpDots) { - glPointSize(mpControl->mDebugCpscale * 8.); - glBegin(GL_POINTS); - for(int i=0; i<cparts->getSize(); i++) { - if((cpHideIna)&&( (cparts->getParticle(i)->influence<=0.) || (cparts->getParticle(i)->size<=0.) )) continue; - ntlVec3Gfx org( vec2G(cparts->getParticle(i)->pos ) ); - //LbmFloat halfsize = 0.5; - LbmFloat scale = cparts->getParticle(i)->densityWeight; - //glColor4f( scale,scale,scale,scale ); - glColor4f( 0.,scale,0.,scale ); - glVertex3f( org[0],org[1],org[2] ); - //errMsg("lbmDebugDisplay","CP "<<i<<" at "<<org); // DEBUG - } - glEnd(); - } - - // cp positions - if((mpControl->mDebugCpscale>0.) && cpDots) { - glPointSize(mpControl->mDebugCpscale * 3.); - glBegin(GL_POINTS); - glColor3f( 0,1,0 ); - } - for(int i=0; i<cparts->getSize(); i++) { - if((cpHideIna)&&( (cparts->getParticle(i)->influence<=0.) || (cparts->getParticle(i)->size<=0.) )) continue; - ntlVec3Gfx org( vec2G(cparts->getParticle(i)->pos ) ); - LbmFloat halfsize = 0.5; - LbmFloat scale = cparts->getRadiusAtt() * cparts->getParticle(i)->densityWeight; - if(cpCubes){ glLineWidth( 1 ); - glColor3f( 1,1,1 ); - ntlVec3Gfx s = org-(halfsize * (scale)); - ntlVec3Gfx e = org+(halfsize * (scale)); - drawCubeWire( s,e ); } - if((mpControl->mDebugCpscale>0.) && cpDots) { - glVertex3f( org[0],org[1],org[2] ); - } - } - if(cpDots) glEnd(); - - if(mpControl->mDebugAvgVelScale>0.) { - const float scale = mpControl->mDebugAvgVelScale; - - glColor3f( 1.0,1.0,1 ); - glBegin(GL_LINES); - for(int i=0; i<cparts->getSize(); i++) { - if((cpHideIna)&&( (cparts->getParticle(i)->influence<=0.) || (cparts->getParticle(i)->size<=0.) )) continue; - ntlVec3Gfx org( vec2G(cparts->getParticle(i)->pos ) ); - - //errMsg("CPAVGVEL","i"<<i<<" pos"<<org<<" av"<<cparts->getParticle(i)->avgVel);// DEBUG - float dx = cparts->getParticle(i)->avgVel[0]; - float dy = cparts->getParticle(i)->avgVel[1]; - float dz = cparts->getParticle(i)->avgVel[2]; - dx *= scale; dy *= scale; dz *= scale; - glVertex3f( org[0],org[1],org[2] ); - glVertex3f( org[0]+dx,org[1]+dy,org[2]+dz ); - } - glEnd(); - } // */ - - if( (LBMDIM==2) && (cpCpdist) ) { - - // debug, for use of e.g. LBMGET_FORCE LbmControlData *mpControl = this; -# define TESTGET_FORCE(lev,i,j,k) mpControl->mCpForces[lev][ ((k*mLevel[lev].lSizey)+j)*mLevel[lev].lSizex+i ] - - glBegin(GL_LINES); - //const int lev=0; - for(int lev=0; lev<=mMaxRefine; lev++) { - FSGR_FORIJK_BOUNDS(lev) { - LbmVec pos = LbmVec( - ((mvGeoEnd[0]-mvGeoStart[0])/(LbmFloat)mLevel[lev].lSizex) * ((LbmFloat)i+0.5) + mvGeoStart[0], - ((mvGeoEnd[1]-mvGeoStart[1])/(LbmFloat)mLevel[lev].lSizey) * ((LbmFloat)j+0.5) + mvGeoStart[1], - ((mvGeoEnd[2]-mvGeoStart[2])/(LbmFloat)mLevel[lev].lSizez) * ((LbmFloat)k+0.5) + mvGeoStart[2] ); - if(LBMDIM==2) pos[2] = ((mvGeoEnd[2]-mvGeoStart[2])*0.5 + mvGeoStart[2]); - - if((mpControl->mDebugMaxdScale>0.) && (TESTGET_FORCE(lev,i,j,k).weightAtt<=0.) ) - if(TESTGET_FORCE(lev,i,j,k).maxDistance>=0.) - if(TESTGET_FORCE(lev,i,j,k).maxDistance<CPF_MAXDINIT ) { - const float scale = mpControl->mDebugMaxdScale*10001.; - float dx = TESTGET_FORCE(lev,i,j,k).forceMaxd[0]; - float dy = TESTGET_FORCE(lev,i,j,k).forceMaxd[1]; - float dz = TESTGET_FORCE(lev,i,j,k).forceMaxd[2]; - dx *= scale; dy *= scale; dz *= scale; - glColor3f( 0,1,0 ); - glVertex3f( pos[0],pos[1],pos[2] ); - glVertex3f( pos[0]+dx,pos[1]+dy,pos[2]+dz ); - } // */ - if((mpControl->mDebugAttScale>0.) && (TESTGET_FORCE(lev,i,j,k).weightAtt>0.)) { - const float scale = mpControl->mDebugAttScale*100011.; - float dx = TESTGET_FORCE(lev,i,j,k).forceAtt[0]; - float dy = TESTGET_FORCE(lev,i,j,k).forceAtt[1]; - float dz = TESTGET_FORCE(lev,i,j,k).forceAtt[2]; - dx *= scale; dy *= scale; dz *= scale; - glColor3f( 1,0,0 ); - glVertex3f( pos[0],pos[1],pos[2] ); - glVertex3f( pos[0]+dx,pos[1]+dy,pos[2]+dz ); - } // */ - // why check maxDistance? - if((mpControl->mDebugVelScale>0.) && (TESTGET_FORCE(lev,i,j,k).maxDistance+TESTGET_FORCE(lev,i,j,k).weightVel>0.)) { - float scale = mpControl->mDebugVelScale*1.; - float wvscale = TESTGET_FORCE(lev,i,j,k).weightVel; - float dx = TESTGET_FORCE(lev,i,j,k).forceVel[0]; - float dy = TESTGET_FORCE(lev,i,j,k).forceVel[1]; - float dz = TESTGET_FORCE(lev,i,j,k).forceVel[2]; - scale *= wvscale; - dx *= scale; dy *= scale; dz *= scale; - glColor3f( 0.2,0.2,1 ); - glVertex3f( pos[0],pos[1],pos[2] ); - glVertex3f( pos[0]+dx,pos[1]+dy,pos[2]+dz ); - } // */ - if((mpControl->mDebugCompavScale>0.) && (TESTGET_FORCE(lev,i,j,k).compAvWeight>0.)) { - const float scale = mpControl->mDebugCompavScale*1.; - float dx = TESTGET_FORCE(lev,i,j,k).compAv[0]; - float dy = TESTGET_FORCE(lev,i,j,k).compAv[1]; - float dz = TESTGET_FORCE(lev,i,j,k).compAv[2]; - dx *= scale; dy *= scale; dz *= scale; - glColor3f( 0.2,0.2,1 ); - glVertex3f( pos[0],pos[1],pos[2] ); - glVertex3f( pos[0]+dx,pos[1]+dy,pos[2]+dz ); - } // */ - } // att,maxd - } - glEnd(); - } - } // cpssi - - //fprintf(stderr,"BLA\n"); - glEnable( GL_LIGHTING ); // dont light lines - glShadeModel(GL_SMOOTH); -} - -#else // LBM_USE_GUI==1 void LbmFsgrSolver::cpDebugDisplay(int dispset) { } -#endif // LBM_USE_GUI==1 - - |