Blender V2.61 - r43446
Defines | Functions | Variables

solver_init.cpp File Reference

#include "solver_class.h"
#include "solver_relax.h"
#include "elbeem.h"

Go to the source code of this file.

Defines

#define SWAPYZ(vec)
#define POS2GRID_CHECK(vec, n)
#define OBJVEL_CALC
#define TTT
#define GETPOS(i, j, k)
#define STANDFLAGCHECK(iindex)
#define PRINTGDIRS
#define GRAVLOOP

Functions

LbmSolverInterfacecreateSolver ()
 lbm factory functions

Variables

bool glob_mpactive
int glob_mpnum
int glob_mpindex
int globGeoInitDebug

Detailed Description

Definition in file solver_init.cpp.


Define Documentation

#define GETPOS (   i,
  j,
 
)
Value:
ntlVec3Gfx ggpos = \
        ntlVec3Gfx( iniPos[0]+ dvec[0]*(gfxReal)(i), \
                      iniPos[1]+ dvec[1]*(gfxReal)(j), \
                      iniPos[2]+ dvec[2]*(gfxReal)(k) ); \
  if((LBMDIM==2)&&(mInit2dYZ)) { SWAPYZ(ggpos); }

Definition at line 1763 of file solver_init.cpp.

Referenced by LbmFsgrSolver::initGeometryFlags().

#define GRAVLOOP
Value:
gravAbort=false; \
    for(gravIndex[2]= gravIMin[2];     (gravIndex[2]!=gravIMax[2])&&(!gravAbort);  gravIndex[2] += gravDir[2]) \
        for(gravIndex[1]= gravIMin[1];   (gravIndex[1]!=gravIMax[1])&&(!gravAbort);  gravIndex[1] += gravDir[1]) \
            for(gravIndex[0]= gravIMin[0]; (gravIndex[0]!=gravIMax[0])&&(!gravAbort);  gravIndex[0] += gravDir[0])

Referenced by LbmFsgrSolver::initStandingFluidGradient().

#define OBJVEL_CALC
Value:
LbmVec objvel = vec2L((mMOIVertices[n]-mMOIVerticesOld[n]) /dvec); { \
                const LbmFloat usqr = (objvel[0]*objvel[0]+objvel[1]*objvel[1]+objvel[2]*objvel[2])*1.5; \
                USQRMAXCHECK(usqr, objvel[0],objvel[1],objvel[2], mMaxVlen, mMxvx,mMxvy,mMxvz); \
                if(usqr>maxusqr) { \
                    /* cutoff at maxVelVal */ \
                    for(int jj=0; jj<3; jj++) { \
                        if(objvel[jj]>0.) objvel[jj] =  maxVelVal;  \
                        if(objvel[jj]<0.) objvel[jj] = -maxVelVal; \
                    } \
                } } \
                if(ntype&(CFBndFreeslip)) { \
                    const LbmFloat dp=dot(objvel, vec2L((*pNormals)[n]) ); \
                    const LbmVec oldov=objvel; /*DEBUG*/ \
                    objvel = vec2L((*pNormals)[n]) *dp; \
                    /* if((j==24)&&(n%5==2)) errMsg("FSBT","n"<<n<<" v"<<objvel<<" nn"<<(*pNormals)[n]<<" dp"<<dp<<" oldov"<<oldov ); */ \
                } \
                else if(ntype&(CFBndPartslip)) { \
                    const LbmFloat dp=dot(objvel, vec2L((*pNormals)[n]) ); \
                    const LbmVec oldov=objvel; /*DEBUG*/ \
                    /* if((j==24)&&(n%5==2)) errMsg("FSBT","n"<<n<<" v"<<objvel<<" nn"<<(*pNormals)[n]<<" dp"<<dp<<" oldov"<<oldov ); */ \
                    const LbmFloat partv = mObjectPartslips[OId]; \
                    /*errMsg("PARTSLIP_DEBUG","l="<<l<<" ccel="<<RAC(ccel, dfInv[l] )<<" partv="<<partv<<",id="<<(int)(mnbf>>24)<<" newval="<<newval ); / part slip debug */ \
                    /* m[l] = (RAC(ccel, dfInv[l] ) ) * partv + newval * (1.-partv); part slip */ \
                    objvel = objvel*partv + vec2L((*pNormals)[n]) *dp*(1.-partv); \
                }

Definition at line 1329 of file solver_init.cpp.

Referenced by LbmFsgrSolver::initMovingObstacles().

#define POS2GRID_CHECK (   vec,
 
)
Value:
monTotal++;\
                const int i=(int)( ((vec)[n][0]-iniPos[0])/dvec[0] +0.0); \
                if(i<=0) continue; \
                if(i>=mLevel[level].lSizex-1) continue; \
                const int j=(int)( ((vec)[n][1]-iniPos[1])/dvec[1] +0.0); \
                if(j<=0) continue; \
                if(j>=mLevel[level].lSizey-1) continue; \
                const int k=(int)( ((vec)[n][2]-iniPos[2])/dvec[2] +0.0); \
                if(k<=0) continue; \
                if(k>=mLevel[level].lSizez-1) continue; \

Definition at line 1314 of file solver_init.cpp.

Referenced by LbmFsgrSolver::initMovingObstacles().

#define PRINTGDIRS
Value:
errMsg("Standing fp","X start="<<gravIMin[0]<<" end="<<gravIMax[0]<<" dir="<<gravDir[0] ); \
    errMsg("Standing fp","Y start="<<gravIMin[1]<<" end="<<gravIMax[1]<<" dir="<<gravDir[1] ); \
    errMsg("Standing fp","Z start="<<gravIMin[2]<<" end="<<gravIMax[2]<<" dir="<<gravDir[2] );
#define STANDFLAGCHECK (   iindex)
Value:
if( ( (RFLAG(mMaxRefine,i,j,k,mLevel[mMaxRefine].setCurr) & (CFInter)) ) || \
                        ( (RFLAG(mMaxRefine,i,j,k,mLevel[mMaxRefine].setCurr) & (CFEmpty)) ) ){  \
                    if((iindex)>1) { haveStandingFluid=(iindex); } \
                    j = mLevel[mMaxRefine].lSizey; i=mLevel[mMaxRefine].lSizex; k=getForZMaxBnd(); \
                    continue; \
                }
#define SWAPYZ (   vec)
Value:
{ \
        const LbmFloat tmp = (vec)[2]; \
        (vec)[2] = (vec)[1]; (vec)[1] = tmp; }

Definition at line 20 of file solver_init.cpp.

Referenced by LbmFsgrSolver::initLevelOmegas().

#define TTT

Definition at line 1356 of file solver_init.cpp.


Function Documentation

LbmSolverInterface* createSolver ( )

lbm factory functions

Definition at line 2380 of file solver_init.cpp.

References LbmFsgrSolver::LbmFsgrSolver().

Referenced by SimulationObject::initializeLbmSimulation().


Variable Documentation

Definition at line 86 of file utilities.cpp.

Definition at line 89 of file utilities.cpp.

Definition at line 88 of file utilities.cpp.

perform geometry init (if switched on)

Definition at line 344 of file solver_interface.cpp.

Referenced by ControlParticles::checkPointInside(), and LbmSolverInterface::geoInitCheckPointInside().