#include #include #include "PosICNewtonRaphson.h" #include "SingularMatrixError.h" #include "SystemSolver.h" void MbD::PosICNewtonRaphson::run() { while (true) { try { VectorNewtonRaphson::run(); break; } catch (SingularMatrixError ex) { auto redundantEqnNos = ex.getRedundantEqnNos(); system->partsJointsMotionsDo([&](std::shared_ptr item) { item->removeRedundantConstraints(redundantEqnNos); }); system->partsJointsMotionsDo([&](std::shared_ptr item) { item->constraintsReport(); }); system->partsJointsMotionsDo([&](std::shared_ptr item) { item->setqsu(qsuOld); }); } } }