Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,14 @@ void MORUnilateralInteractionConstraint<DataTypes>::getPositionViolation(lineara
// Sets dfree in global violation vector
if (!c.parameters.hasTangentialComponent()){

for (int k=0;k<reducedContacts.size();k++){
for (size_t k=0;k<reducedContacts.size();k++){
if (contactIndices(c.m2) != -1)
dfreeRed(k) += dfree*lambdaModes(contactIndices(c.m2),reducedContacts[k]);
}
}
else
{
for (int k=0;k<reducedContacts.size()/3;k++){
for (size_t k=0;k<reducedContacts.size()/3;k++){
if (contactIndices(3*c.m2) != -1){
dfreeRed(3*k) += dfree*lambdaModes(contactIndices(3*c.m2),reducedContacts[3*k]);
dfreeRed(3*k+1) += dfree_t*lambdaModes(contactIndices(3*c.m2+1),reducedContacts[3*k]);
Expand All @@ -267,7 +267,7 @@ void MORUnilateralInteractionConstraint<DataTypes>::getPositionViolation(lineara

c.dfree = dfree; // PJ : For isActive() method. Don't know if it's still usefull.
}
for (int k=0;k<reducedContacts.size();k++){
for (size_t k=0;k<reducedContacts.size();k++){
v->set(k, dfreeRed(k));
}

Expand Down
4 changes: 2 additions & 2 deletions src/ModelOrderReduction/component/contact/MORpointModel.inl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void MORPointCollisionModel<DataTypes>::drawCollisionModel(const core::visual::V
double val;
double step = this->getContext()->getTime()/this->getContext()->getDt();
numMode = (int) step - 1;
for (int i = 0; i < size; i++)
for (size_t i = 0; i < size; i++)
{
TPoint<DataTypes> p(this, i);
if (p.isActive())
Expand Down Expand Up @@ -123,7 +123,7 @@ void MORPointCollisionModel<DataTypes>::drawCollisionModel(const core::visual::V
{
std::vector< type::Vec3 > pointsPFree;

for (int i = 0; i < size; i++)
for (size_t i = 0; i < size; i++)
{
TPoint<DataTypes> p(this, i);
if (p.isActive())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void MORContactMapping<TIn, TOut>::applyJT(const core::ConstraintParams * /*cpar
while (colIt != colItEnd)
{
InDeriv data;
for(unsigned int j=0 ; j<m_nbCols ; j++)
for(unsigned int j=0 ; j<(unsigned int)m_nbCols ; j++)
{
typename In::MatrixDeriv::RowIterator o = out.writeLine(j);
data = colIt.val()*m_matrix(contactIndices(rowIt.index()),j);
Expand Down
Loading