Commit: 3de0037ab12f742493571bcfc1cf4a60644694ad
Author: mattoverby
Date:   Wed Aug 19 09:55:06 2020 -0500
Branches: soc-2020-soft-body
https://developer.blender.org/rB3de0037ab12f742493571bcfc1cf4a60644694ad

fixed err in debug mode

===================================================================

M       extern/softbody/src/admmpd_linsolve.cpp
M       source/tools

===================================================================

diff --git a/extern/softbody/src/admmpd_linsolve.cpp 
b/extern/softbody/src/admmpd_linsolve.cpp
index bd06f5910a7..21cf5cdc02d 100644
--- a/extern/softbody/src/admmpd_linsolve.cpp
+++ b/extern/softbody/src/admmpd_linsolve.cpp
@@ -74,14 +74,17 @@ void LDLT::init_solve(
                data->ls.Ptq = options->pk * P.transpose() * q;
        }
 
-       if (!data->ls.ldlt_A_PtP)
+       bool new_ptr = false;
+       if (!data->ls.ldlt_A_PtP) {
                data->ls.ldlt_A_PtP = std::make_unique<Cholesky>();
+               new_ptr = true;
+       }
 
        // Compute A + P'P and factorize:
        // 1) A not computed
        // 2) P has changed
        // 3) factorization not set
-       if ( data->ls.ldlt_A_PtP->info() != Eigen::Success ||
+       if ( new_ptr ||
                data->ls.A_PtP.nonZeros()==0 ||
                new_P)
        {
@@ -105,7 +108,7 @@ void LDLT::solve(
        if (nx==0)
                throw_err("solve","no vertices");
 
-       if (!data->ls.ldlt_A_PtP)
+       if (!data->ls.ldlt_A_PtP || 
!data->ls.ldlt_A_PtP->info()==Eigen::Success)
                init_solve(mesh,options,collision,data);
 
        // Linearize collision constraints
diff --git a/source/tools b/source/tools
index 44ae9d181c7..ea2a2fa54ec 160000
--- a/source/tools
+++ b/source/tools
@@ -1 +1 @@
-Subproject commit 44ae9d181c734c14ae22feb0d33ad39a626f8ce7
+Subproject commit ea2a2fa54ecde677aaf4babf54ef4811adc82ccf

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to