[Bf-blender-cvs] [302d912] hair_immediate_fixes: Added a comment and use the new CG solver as the "official" version now.
Lukas Tönne
noreply at git.blender.org
Thu Sep 4 10:33:33 CEST 2014
Commit: 302d9127326353fa84928a606d2adf39badf03a7
Author: Lukas Tönne
Date: Thu Sep 4 09:26:40 2014 +0200
Branches: hair_immediate_fixes
https://developer.blender.org/rB302d9127326353fa84928a606d2adf39badf03a7
Added a comment and use the new CG solver as the "official" version now.
===================================================================
M source/blender/blenkernel/intern/implicit.c
===================================================================
diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c
index f77574c..2956a29 100644
--- a/source/blender/blenkernel/intern/implicit.c
+++ b/source/blender/blenkernel/intern/implicit.c
@@ -920,7 +920,7 @@ DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
}
}
-#if 0
+#if 0 /* this version of the CG algorithm does not work very well with partial constraints (where S has non-zero elements) */
static int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatrix3x3 *S)
{
// Solves for unknown X in equation AX=B
@@ -985,7 +985,8 @@ static int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z
return conjgrad_loopcount<conjgrad_looplimit; // true means we reached desired accuracy in given time - ie stable
}
-#else
+#endif
+
static int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatrix3x3 *S)
{
// Solves for unknown X in equation AX=B
@@ -1051,7 +1052,6 @@ static int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z,
return conjgrad_loopcount < conjgrad_looplimit; // true means we reached desired accuracy in given time - ie stable
}
-#endif
// block diagonalizer
DO_INLINE void BuildPPinv(fmatrix3x3 *lA, fmatrix3x3 *P, fmatrix3x3 *Pinv)
More information about the Bf-blender-cvs
mailing list