diff --git a/src/Mod/Assembly/App/opendcm/core/imp/kernel_imp.hpp b/src/Mod/Assembly/App/opendcm/core/imp/kernel_imp.hpp index 8a7c1fe6b..1bddcede1 100644 --- a/src/Mod/Assembly/App/opendcm/core/imp/kernel_imp.hpp +++ b/src/Mod/Assembly/App/opendcm/core/imp/kernel_imp.hpp @@ -160,9 +160,7 @@ int Dogleg::solve(typename Kernel::MappedEquationSystem& sys, Functor& r #ifdef USE_LOGGING BOOST_LOG(log)<< "initial jacobi: "<() - << std::endl<<"Real Jacobi: "<(); #endif sys.removeLocalGradientZeros(); @@ -219,14 +217,12 @@ int Dogleg::solve(typename Kernel::MappedEquationSystem& sys, Functor& r number_type rho; //get the update step - calculateStep(g, sys.Jacobi, sys.Residual, h_dl, delta); + calculateStep(g, sys.Jacobi, sys.Residual, h_dl, delta); #ifdef USE_LOGGING - BOOST_LOG(log)<<"Step in iter "< +#include + #ifdef DCM_EXTERNAL_CORE #include "opendcm/core/imp/kernel_imp.hpp" #include "opendcm/core/imp/clustergraph_imp.hpp" @@ -359,9 +361,13 @@ void SystemSolver::solveCluster(boost::shared_ptr cluster, Sys& sy #endif //cool, lets do uncylic. first all rotational constraints with rotational parameters mes.setAccess(rotation); - //solve can be done without catching exceptions, because this only fails if the system in - //unsolvable - DummyScaler re; + + //solve can be done without catching exceptions, because this only fails if the system is + //unsolvable. We need the rescaler here two as unscaled rotations may be unprecise if the + //parts are big (as ne the normals are always 1) and then distances may not be possible + //to solve correctly with only translations + Rescaler re(cluster, mes); + re(); sys.kernel().solve(mes, re); //now let's see if we have to go on with the translations