From 5d0a207ecb843c4c73be897cfccbf3a0d2db574b Mon Sep 17 00:00:00 2001 From: Chris Want Date: Wed, 16 Apr 2008 22:40:48 +0000 Subject: Patch from GSR that a) fixes a whole bunch of GPL/BL license blocks that were previously missed; and b) greatly increase my ohloh stats! --- intern/elbeem/CMakeLists.txt | 9 +++------ intern/elbeem/Makefile | 9 +++------ intern/elbeem/extern/LBM_fluidsim.h | 9 +++------ intern/elbeem/intern/Makefile | 9 +++------ 4 files changed, 12 insertions(+), 24 deletions(-) (limited to 'intern/elbeem') diff --git a/intern/elbeem/CMakeLists.txt b/intern/elbeem/CMakeLists.txt index 48d25901499..bd88bc0c5f7 100644 --- a/intern/elbeem/CMakeLists.txt +++ b/intern/elbeem/CMakeLists.txt @@ -1,13 +1,10 @@ # $Id$ -# ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +# ***** BEGIN GPL LICENSE BLOCK ***** # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. The Blender -# Foundation also sells licenses for use in proprietary software under -# the Blender License. See http://www.blender.org/BL/ for information -# about this. +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -25,7 +22,7 @@ # # Contributor(s): Jacques Beaurain. # -# ***** END GPL/BL DUAL LICENSE BLOCK ***** +# ***** END GPL LICENSE BLOCK ***** SET(INC ${PNG_INC} ${ZLIB_INC} ${SDL_INC}) diff --git a/intern/elbeem/Makefile b/intern/elbeem/Makefile index 3e0333fb3cd..9ea08d63374 100644 --- a/intern/elbeem/Makefile +++ b/intern/elbeem/Makefile @@ -1,15 +1,12 @@ # # $Id$ # -# ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +# ***** BEGIN GPL LICENSE BLOCK ***** # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. The Blender -# Foundation also sells licenses for use in proprietary software under -# the Blender License. See http://www.blender.org/BL/ for information -# about this. +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -27,7 +24,7 @@ # # Contributor(s): Hans Lambermont # -# ***** END GPL/BL DUAL LICENSE BLOCK ***** +# ***** END GPL LICENSE BLOCK ***** # elbeem main makefile. # diff --git a/intern/elbeem/extern/LBM_fluidsim.h b/intern/elbeem/extern/LBM_fluidsim.h index 0f7e0e1ef5d..6e7fc86213c 100644 --- a/intern/elbeem/extern/LBM_fluidsim.h +++ b/intern/elbeem/extern/LBM_fluidsim.h @@ -3,15 +3,12 @@ * * $Id$ * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** + * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -29,7 +26,7 @@ * * Contributor(s): none yet. * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** + * ***** END GPL LICENSE BLOCK ***** */ #ifndef LBM_FLUIDSIM_H #define LBM_FLUIDSIM_H diff --git a/intern/elbeem/intern/Makefile b/intern/elbeem/intern/Makefile index 49f0b936e6b..c03b8678186 100644 --- a/intern/elbeem/intern/Makefile +++ b/intern/elbeem/intern/Makefile @@ -1,15 +1,12 @@ # # $Id$ # -# ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +# ***** BEGIN GPL LICENSE BLOCK ***** # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. The Blender -# Foundation also sells licenses for use in proprietary software under -# the Blender License. See http://www.blender.org/BL/ for information -# about this. +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -27,7 +24,7 @@ # # Contributor(s): none yet. # -# ***** END GPL/BL DUAL LICENSE BLOCK ***** +# ***** END GPL LICENSE BLOCK ***** # elbeem intern Makefile # -- cgit v1.2.3 From 2318e47ae90558e5929db9bf1166f358e67c5c69 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Fri, 18 Apr 2008 14:12:42 +0000 Subject: Fluid bugfix [#8395] [#6200]: this should solve the popping/inconsistency/flickering issue with fluids, please give feedback :) --- intern/elbeem/intern/solver_util.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'intern/elbeem') diff --git a/intern/elbeem/intern/solver_util.cpp b/intern/elbeem/intern/solver_util.cpp index a6685babe68..ef98b7f21d0 100644 --- a/intern/elbeem/intern/solver_util.cpp +++ b/intern/elbeem/intern/solver_util.cpp @@ -112,7 +112,8 @@ void LbmFsgrSolver::prepareVisualization( void ) { const CellFlagType nbflag = RFLAG_NB(lev, i,j,k, workSet,l); if(nbflag&CFInter){ intercnt++; } - if(l!=mainGravDir) continue; // only check bnd along main grav. dir + // check all directions otherwise we get bugs with splashes on obstacles + // if(l!=mainGravDir) continue; // only check bnd along main grav. dir //if((nbflag&CFBnd)&&(nbflag&CFBndNoslip)){ noslipbnd=1; } if((nbflag&CFBnd)){ noslipbnd=1; } } @@ -140,11 +141,10 @@ void LbmFsgrSolver::prepareVisualization( void ) { if(vallbmGetData(i,j,ZKOFF) += minval-( val * mIsoWeight[13] ); } -#endif // SURFACE_ENH>0 - } else { // all others, unused? continue; } +#endif // SURFACE_ENH>0 *mpIso->lbmGetData( i-1 , j-1 ,ZKOFF-ZKD1) += ( val * mIsoWeight[0] ); *mpIso->lbmGetData( i , j-1 ,ZKOFF-ZKD1) += ( val * mIsoWeight[1] ); -- cgit v1.2.3 From 4147a5a33d57178914227a45ddd1afb1746cdc49 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Fri, 18 Apr 2008 18:25:11 +0000 Subject: Fluid: got to the real problem of the issue --> wrong float epsilon resulted in normalizing a vector to fail, reverted other change from today --- intern/elbeem/intern/ntl_vector3dim.h | 6 +++--- intern/elbeem/intern/solver_util.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'intern/elbeem') diff --git a/intern/elbeem/intern/ntl_vector3dim.h b/intern/elbeem/intern/ntl_vector3dim.h index 27c3be0d71f..35a3ad59ec9 100644 --- a/intern/elbeem/intern/ntl_vector3dim.h +++ b/intern/elbeem/intern/ntl_vector3dim.h @@ -825,7 +825,7 @@ template inline ntlColor vec2Col(T v) { return ntlColor(v[0],v[1],v[2]) #endif #endif #endif - + #if GFX_PRECISION==1 typedef float gfxReal; #define GFX_REAL_MAX __FLT_MAX__ @@ -833,7 +833,7 @@ typedef float gfxReal; //#define vecGfx2F(x) (x) //#define vecD2Gfx(x) vecD2F(x) //#define vecGfx2D(x) vecF2D(x) -#define VECTOR_EPSILON (1e-5f) +#define VECTOR_EPSILON (1.192092896e-07F) #else typedef double gfxReal; #define GFX_REAL_MAX __DBL_MAX__ @@ -841,7 +841,7 @@ typedef double gfxReal; //#define vecGfx2F(x) vecF2D(x) //#define vecD2Gfx(x) (x) //#define vecGfx2D(x) (x) -#define VECTOR_EPSILON (1e-10) +#define VECTOR_EPSILON (2.2204460492503131e-016) #endif /* fixed double prec. type, for epxlicitly double values */ diff --git a/intern/elbeem/intern/solver_util.cpp b/intern/elbeem/intern/solver_util.cpp index ef98b7f21d0..e74875a0dbf 100644 --- a/intern/elbeem/intern/solver_util.cpp +++ b/intern/elbeem/intern/solver_util.cpp @@ -37,10 +37,10 @@ void LbmFsgrSolver::prepareVisualization( void ) { int lev = mMaxRefine; int workSet = mLevel[lev].setCurr; - int mainGravDir=0; + int mainGravDir=6; // if normalizing fails, we asume z-direction gravity LbmFloat mainGravLen = 0.; FORDF1{ - LbmFloat thisGravLen = dot(LbmVec(dfVecX[l],dfVecY[l],dfVecZ[l]), getNormalized(mLevel[mMaxRefine].gravity) ); + LbmFloat thisGravLen = dot(LbmVec(dfVecX[l],dfVecY[l],dfVecZ[l]), getNormalized(mLevel[mMaxRefine].gravity) ); if(thisGravLen>mainGravLen) { mainGravLen = thisGravLen; mainGravDir = l; @@ -113,7 +113,7 @@ void LbmFsgrSolver::prepareVisualization( void ) { if(nbflag&CFInter){ intercnt++; } // check all directions otherwise we get bugs with splashes on obstacles - // if(l!=mainGravDir) continue; // only check bnd along main grav. dir + if(l!=mainGravDir) continue; // only check bnd along main grav. dir //if((nbflag&CFBnd)&&(nbflag&CFBndNoslip)){ noslipbnd=1; } if((nbflag&CFBnd)){ noslipbnd=1; } } -- cgit v1.2.3 From b43f24a9445faa5775057dab441877fc4627dfde Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 20 Apr 2008 09:57:28 +0000 Subject: Reverting new epsilons since they had bad global impact - instead just remove the problematic normalize() call --- intern/elbeem/intern/ntl_vector3dim.h | 4 ++-- intern/elbeem/intern/solver_util.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'intern/elbeem') diff --git a/intern/elbeem/intern/ntl_vector3dim.h b/intern/elbeem/intern/ntl_vector3dim.h index 35a3ad59ec9..6f17f9f5e7b 100644 --- a/intern/elbeem/intern/ntl_vector3dim.h +++ b/intern/elbeem/intern/ntl_vector3dim.h @@ -833,7 +833,7 @@ typedef float gfxReal; //#define vecGfx2F(x) (x) //#define vecD2Gfx(x) vecD2F(x) //#define vecGfx2D(x) vecF2D(x) -#define VECTOR_EPSILON (1.192092896e-07F) +#define VECTOR_EPSILON (1e-5f) #else typedef double gfxReal; #define GFX_REAL_MAX __DBL_MAX__ @@ -841,7 +841,7 @@ typedef double gfxReal; //#define vecGfx2F(x) vecF2D(x) //#define vecD2Gfx(x) (x) //#define vecGfx2D(x) (x) -#define VECTOR_EPSILON (2.2204460492503131e-016) +#define VECTOR_EPSILON (1e-10) #endif /* fixed double prec. type, for epxlicitly double values */ diff --git a/intern/elbeem/intern/solver_util.cpp b/intern/elbeem/intern/solver_util.cpp index e74875a0dbf..25b8b98b3c6 100644 --- a/intern/elbeem/intern/solver_util.cpp +++ b/intern/elbeem/intern/solver_util.cpp @@ -40,7 +40,7 @@ void LbmFsgrSolver::prepareVisualization( void ) { int mainGravDir=6; // if normalizing fails, we asume z-direction gravity LbmFloat mainGravLen = 0.; FORDF1{ - LbmFloat thisGravLen = dot(LbmVec(dfVecX[l],dfVecY[l],dfVecZ[l]), getNormalized(mLevel[mMaxRefine].gravity) ); + LbmFloat thisGravLen = dot(LbmVec(dfVecX[l],dfVecY[l],dfVecZ[l]), mLevel[mMaxRefine].gravity ); if(thisGravLen>mainGravLen) { mainGravLen = thisGravLen; mainGravDir = l; -- cgit v1.2.3