- fixed MSVC problem in fluidsim.c

- removed some more debug output in the solver
This commit is contained in:
Nils Thuerey 2006-05-11 13:19:41 +00:00
parent 0497ea57cb
commit 74fc4fa254
3 changed files with 10 additions and 16 deletions

@ -234,8 +234,8 @@ int ntlGeometryObjModel::loadBobjModel(string filename)
vector<ntlSetVec3f> aninorms; vector<ntlSetVec3f> aninorms;
vector<double> anitimes; vector<double> anitimes;
const bool debugPrint=true; const bool debugPrint=false;
const bool debugPrintFull=true; const bool debugPrintFull=false;
gzFile gzf; gzFile gzf;
gzf = gzopen(filename.c_str(), "rb"); gzf = gzopen(filename.c_str(), "rb");
if (!gzf) { if (!gzf) {

@ -900,8 +900,8 @@ LbmFsgrSolver::mainLoop(int lev)
((rl>RWVEL_WINDTHRESH) && (lcsmqo<P_LCSMQO)) )// normal checks ((rl>RWVEL_WINDTHRESH) && (lcsmqo<P_LCSMQO)) )// normal checks
||(k>this->mSizez-SLOWDOWNREGION) ) { ||(k>this->mSizez-SLOWDOWNREGION) ) {
LbmFloat nuz = uz; LbmFloat nuz = uz;
LbmFloat jdf; // = 0.05 * (rand()/(RAND_MAX+1.0)); //? LbmFloat jdf; // = 0.05 * (rand()/(RAND_MAX+1.0));
if(rl>RWVEL_WINDTHRESH) jdf *= (rl-RWVEL_WINDTHRESH); //? if(rl>RWVEL_WINDTHRESH) jdf *= (rl-RWVEL_WINDTHRESH);
if(k>this->mSizez-SLOWDOWNREGION) { if(k>this->mSizez-SLOWDOWNREGION) {
// special case // special case
LbmFloat zfac = (LbmFloat)( k-(this->mSizez-SLOWDOWNREGION) ); LbmFloat zfac = (LbmFloat)( k-(this->mSizez-SLOWDOWNREGION) );
@ -910,11 +910,11 @@ LbmFsgrSolver::mainLoop(int lev)
//errMsg("TOPT"," at "<<PRINT_IJK<<" zfac"<<zfac); //errMsg("TOPT"," at "<<PRINT_IJK<<" zfac"<<zfac);
} else { } else {
// normal probability // normal probability
LbmFloat fac = P_LCSMQO-lcsmqo; //? LbmFloat fac = P_LCSMQO-lcsmqo;
jdf *= fac; //? jdf *= fac;
} }
FORDF1 { FORDF1 {
jdf = 0.05 * (rand()/(RAND_MAX+1.0)); const LbmFloat jdf = 0.05 * (rand()/(RAND_MAX+1.0));
// TODO use wind velocity? // TODO use wind velocity?
if(jdf>0.025) { if(jdf>0.025) {
const LbmFloat add = this->dfLength[l]*(-ux*this->dfDvecX[l]-uy*this->dfDvecY[l]-nuz*this->dfDvecZ[l])*jdf; const LbmFloat add = this->dfLength[l]*(-ux*this->dfDvecX[l]-uy*this->dfDvecY[l]-nuz*this->dfDvecZ[l])*jdf;

@ -71,8 +71,7 @@
#include "BKE_DerivedMesh.h" #include "BKE_DerivedMesh.h"
#include "BKE_ipo.h" #include "BKE_ipo.h"
#include "LBM_fluidsim.h" #include "LBM_fluidsim.h"
// FIXME move? // TODO FIXME double elbeem.h in intern/extern...
// TODO FIXME DOUBLE elbeem.h! in intern/extern...
#include "elbeem.h" #include "elbeem.h"
#include "BLI_editVert.h" #include "BLI_editVert.h"
@ -925,9 +924,7 @@ void fluidsimBake(struct Object *ob)
int *tris=NULL; int *tris=NULL;
int numVerts=0, numTris=0; int numVerts=0, numTris=0;
int o = channelObjCount; int o = channelObjCount;
//Key *shapekey= ob_get_key(obit); int deform = (obit->fluidsimSettings->domainNovecgen);
int deform; // = (shapekey && BLI_countlist(&shapekey->block) >0)||(obit->parent && obit->partype==PARSKEL);
deform = (obit->fluidsimSettings->domainNovecgen);
elbeemMesh fsmesh; elbeemMesh fsmesh;
elbeemResetMesh( &fsmesh ); elbeemResetMesh( &fsmesh );
fsmesh.type = obit->fluidsimSettings->type;; fsmesh.type = obit->fluidsimSettings->type;;
@ -1250,10 +1247,7 @@ void fluidsimBake(struct Object *ob)
(obit->fluidsimSettings->type != OB_FLUIDSIM_DOMAIN) && (obit->fluidsimSettings->type != OB_FLUIDSIM_DOMAIN) &&
(obit->fluidsimSettings->type != OB_FLUIDSIM_PARTICLE) (obit->fluidsimSettings->type != OB_FLUIDSIM_PARTICLE)
) { ) {
//Key *shapekey= ob_get_key(obit); int deform = (obit->fluidsimSettings->domainNovecgen);
// armature check from effect.c
int deform; //= (shapekey && BLI_countlist(&shapekey->block) >0)||(obit->parent && obit->partype==PARSKEL);
deform = (obit->fluidsimSettings->domainNovecgen);
fluidsimGetGeometryObjFilename(obit, fnameObjdat); fluidsimGetGeometryObjFilename(obit, fnameObjdat);
strcpy(targetFile, targetDir); strcpy(targetFile, targetDir);