diff options
author | over0219 <over0219@umn.edu> | 2020-07-09 23:33:56 +0300 |
---|---|---|
committer | over0219 <over0219@umn.edu> | 2020-07-09 23:33:56 +0300 |
commit | 4bab6e6d83cd64f2918430b003c96ffae08ecd85 (patch) | |
tree | 52e6267f7274ba3e6dc7403d12e4dac47307f4c5 /extern/softbody/src/admmpd_linsolve.cpp | |
parent | 24947f3a0226615d91ac7c6c88d466e8d6983cf7 (diff) |
better pin scalesoftbody-stable-v2
Diffstat (limited to 'extern/softbody/src/admmpd_linsolve.cpp')
-rw-r--r-- | extern/softbody/src/admmpd_linsolve.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/extern/softbody/src/admmpd_linsolve.cpp b/extern/softbody/src/admmpd_linsolve.cpp index 7d5a29eb964..b91d3041913 100644 --- a/extern/softbody/src/admmpd_linsolve.cpp +++ b/extern/softbody/src/admmpd_linsolve.cpp @@ -77,8 +77,9 @@ void ConjugateGradients::solve( make_n3(data->A, gsdata->A3); } - gsdata->CtC = data->spring_k * data->C.transpose()*data->C; - gsdata->Ctd = data->spring_k * data->C.transpose()*data->d; + double col_k = options->mult_ck * data->A_diag_max; + gsdata->CtC = col_k * data->C.transpose()*data->C; + gsdata->Ctd = col_k * data->C.transpose()*data->d; gsdata->A3_CtC_PtP = gsdata->A3 + gsdata->CtC + data->PtP; VectorXd x3(nx*3); for (int i=0; i<nx; ++i) @@ -319,8 +320,9 @@ void GaussSeidel::init_solve( // Finally, the new global matrix and rhs if (has_constraints) { - data->gsdata.CtC = data->spring_k * data->C.transpose()*data->C; - data->gsdata.Ctd.noalias() = data->spring_k * data->C.transpose()*data->d; + double col_k = options->mult_ck * data->A_diag_max; + data->gsdata.CtC = col_k * data->C.transpose()*data->C; + data->gsdata.Ctd.noalias() = col_k * data->C.transpose()*data->d; data->gsdata.A3_CtC_PtP = data->gsdata.A3 + data->gsdata.CtC; data->gsdata.b3_Ctd_Ptx.resize(nx*3); for (int i=0; i<nx; ++i) |