diff --git a/src/chrono/physics/ChAssembly.cpp b/src/chrono/physics/ChAssembly.cpp index cc3f6d56e0..f2f05ab24c 100644 --- a/src/chrono/physics/ChAssembly.cpp +++ b/src/chrono/physics/ChAssembly.cpp @@ -691,8 +691,8 @@ void ChAssembly::IntStateGather(const unsigned int off_x, const unsigned int off_v, ChStateDelta& v, double& T) { - unsigned int displ_x = off_x - this->offset_x; - unsigned int displ_v = off_v - this->offset_w; + int displ_x = off_x - this->offset_x; + int displ_v = off_v - this->offset_w; for (auto& body : bodylist) { if (body->IsActive()) @@ -730,8 +730,8 @@ void ChAssembly::IntStateScatter(const unsigned int off_x, // - in particular, bodies and meshes must be processed *before* links, so that links can use // up-to-date body and node information - unsigned int displ_x = off_x - this->offset_x; - unsigned int displ_v = off_v - this->offset_w; + int displ_x = off_x - this->offset_x; + int displ_v = off_v - this->offset_w; for (auto& body : bodylist) { if (body->IsActive()) @@ -770,7 +770,7 @@ void ChAssembly::IntStateScatter(const unsigned int off_x, } void ChAssembly::IntStateGatherAcceleration(const unsigned int off_a, ChStateDelta& a) { - unsigned int displ_a = off_a - this->offset_w; + int displ_a = off_a - this->offset_w; for (auto& body : bodylist) { if (body->IsActive()) @@ -795,7 +795,7 @@ void ChAssembly::IntStateGatherAcceleration(const unsigned int off_a, ChStateDel // From state derivative (acceleration) to system, sometimes might be needed void ChAssembly::IntStateScatterAcceleration(const unsigned int off_a, const ChStateDelta& a) { - unsigned int displ_a = off_a - this->offset_w; + int displ_a = off_a - this->offset_w; for (auto& body : bodylist) { if (body->IsActive()) @@ -820,7 +820,7 @@ void ChAssembly::IntStateScatterAcceleration(const unsigned int off_a, const ChS // From system to reaction forces (last computed) - some timestepper might need this void ChAssembly::IntStateGatherReactions(const unsigned int off_L, ChVectorDynamic<>& L) { - unsigned int displ_L = off_L - this->offset_L; + int displ_L = off_L - this->offset_L; for (auto& body : bodylist) { if (body->IsActive()) @@ -845,7 +845,7 @@ void ChAssembly::IntStateGatherReactions(const unsigned int off_L, ChVectorDynam // From reaction forces to system, ex. store last computed reactions in ChLinkBase objects for plotting etc. void ChAssembly::IntStateScatterReactions(const unsigned int off_L, const ChVectorDynamic<>& L) { - unsigned int displ_L = off_L - this->offset_L; + int displ_L = off_L - this->offset_L; for (auto& body : bodylist) { if (body->IsActive()) @@ -874,8 +874,8 @@ void ChAssembly::IntStateIncrement(const unsigned int off_x, const ChState& x, const unsigned int off_v, const ChStateDelta& Dv) { - unsigned int displ_x = off_x - this->offset_x; - unsigned int displ_v = off_v - this->offset_w; + int displ_x = off_x - this->offset_x; + int displ_v = off_v - this->offset_w; for (auto& body : bodylist) { if (body->IsActive()) @@ -907,8 +907,8 @@ void ChAssembly::IntStateGetIncrement(const unsigned int off_x, const ChState& x, const unsigned int off_v, ChStateDelta& Dv) { - unsigned int displ_x = off_x - this->offset_x; - unsigned int displ_v = off_v - this->offset_w; + int displ_x = off_x - this->offset_x; + int displ_v = off_v - this->offset_w; for (auto& body : bodylist) { if (body->IsActive()) @@ -939,7 +939,7 @@ void ChAssembly::IntLoadResidual_F(const unsigned int off, ///< offset in R res ChVectorDynamic<>& R, ///< result: the R residual, R += c*F const double c) ///< a scaling factor { - unsigned int displ_v = off - this->offset_w; + int displ_v = off - this->offset_w; for (auto& body : bodylist) { if (body->IsActive()) @@ -967,7 +967,7 @@ void ChAssembly::IntLoadResidual_Mv(const unsigned int off, ///< offset in const ChVectorDynamic<>& w, ///< the w vector const double c ///< a scaling factor ) { - unsigned int displ_v = off - this->offset_w; + int displ_v = off - this->offset_w; for (auto& body : bodylist) { if (body->IsActive()) @@ -991,7 +991,7 @@ void ChAssembly::IntLoadResidual_Mv(const unsigned int off, ///< offset in } void ChAssembly::IntLoadLumpedMass_Md(const unsigned int off, ChVectorDynamic<>& Md, double& err, const double c) { - unsigned int displ_v = off - this->offset_w; + int displ_v = off - this->offset_w; for (auto& body : bodylist) { if (body->IsActive()) @@ -1019,7 +1019,7 @@ void ChAssembly::IntLoadResidual_CqL(const unsigned int off_L, ///< offset in const ChVectorDynamic<>& L, ///< the L vector const double c ///< a scaling factor ) { - unsigned int displ_L = off_L - this->offset_L; + int displ_L = off_L - this->offset_L; for (auto& body : bodylist) { if (body->IsActive()) @@ -1048,7 +1048,7 @@ void ChAssembly::IntLoadConstraint_C(const unsigned int off_L, ///< offset in Q bool do_clamp, ///< apply clamping to c*C? double recovery_clamp ///< value for min/max clamping of c*C ) { - unsigned int displ_L = off_L - this->offset_L; + int displ_L = off_L - this->offset_L; for (auto& body : bodylist) { if (body->IsActive()) @@ -1075,7 +1075,7 @@ void ChAssembly::IntLoadConstraint_Ct(const unsigned int off_L, ///< offset in ChVectorDynamic<>& Qc, ///< result: the Qc residual, Qc += c*Ct const double c ///< a scaling factor ) { - unsigned int displ_L = off_L - this->offset_L; + int displ_L = off_L - this->offset_L; for (auto& body : bodylist) { if (body->IsActive()) @@ -1104,8 +1104,8 @@ void ChAssembly::IntToDescriptor(const unsigned int off_v, const unsigned int off_L, const ChVectorDynamic<>& L, const ChVectorDynamic<>& Qc) { - unsigned int displ_L = off_L - this->offset_L; - unsigned int displ_v = off_v - this->offset_w; + int displ_L = off_L - this->offset_L; + int displ_v = off_v - this->offset_w; for (auto& body : bodylist) { if (body->IsActive()) @@ -1136,8 +1136,8 @@ void ChAssembly::IntFromDescriptor(const unsigned int off_v, ChStateDelta& v, const unsigned int off_L, ChVectorDynamic<>& L) { - unsigned int displ_L = off_L - this->offset_L; - unsigned int displ_v = off_v - this->offset_w; + int displ_L = off_L - this->offset_L; + int displ_v = off_v - this->offset_w; for (auto& body : bodylist) { if (body->IsActive()) diff --git a/src/chrono/physics/ChSystem.cpp b/src/chrono/physics/ChSystem.cpp index 89f548413f..ffac5efca8 100644 --- a/src/chrono/physics/ChSystem.cpp +++ b/src/chrono/physics/ChSystem.cpp @@ -731,8 +731,8 @@ void ChSystem::IntToDescriptor(const unsigned int off_v, assembly.IntToDescriptor(off_v, v, R, off_L, L, Qc); // Use also on contact container: - unsigned int displ_L = off_L - assembly.offset_L; - unsigned int displ_v = off_v - assembly.offset_w; + int displ_L = off_L - assembly.offset_L; + int displ_v = off_v - assembly.offset_w; contact_container->IntToDescriptor(displ_v + contact_container->GetOffset_w(), v, R, displ_L + contact_container->GetOffset_L(), L, Qc); } @@ -745,8 +745,8 @@ void ChSystem::IntFromDescriptor(const unsigned int off_v, assembly.IntFromDescriptor(off_v, v, off_L, L); // Use also on contact container: - unsigned int displ_L = off_L - assembly.offset_L; - unsigned int displ_v = off_v - assembly.offset_w; + int displ_L = off_L - assembly.offset_L; + int displ_v = off_v - assembly.offset_w; contact_container->IntFromDescriptor(displ_v + contact_container->GetOffset_w(), v, displ_L + contact_container->GetOffset_L(), L); }