Skip to content

Commit

Permalink
PR: sofa-framework#288 change constraint->f_indices to constraint->d_…
Browse files Browse the repository at this point in the history
…indices in FEMGridBehaviorModel.inl
  • Loading branch information
Younesssss committed Aug 31, 2017
1 parent 30d0bf9 commit a96b58d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,18 @@ void FEMGridBehaviorModel<DataTypes>::init()
m_internalNode->setGravity(this->getContext()->getGravity());
m_internalNode->setDt(this->getContext()->getDt());

constraint->f_indices.beginEdit()->clear();
constraint->d_indices.beginEdit()->clear();

for( unsigned x=0 ; x<2 ; ++x )
for( unsigned y=0 ; y<2 ; ++y )
for( unsigned z=0 ; z<2 ; ++z )
{
mapExposedInternalIndices[x+y*2+z*4] = x*(_subdivisions.getValue())+y*_subdivisions.getValue()*(_subdivisions.getValue()+1)+z*_subdivisions.getValue()*(_subdivisions.getValue()+1)*(_subdivisions.getValue()+1);
// std::cerr<<x+y*2+z*4<<" "<<mapExposedInternalIndices[x+y*2+z*4]<<std::endl;
constraint->f_indices.beginEdit()->push_back(mapExposedInternalIndices[x+y*2+z*4]);
constraint->d_indices.beginEdit()->push_back(mapExposedInternalIndices[x+y*2+z*4]);
}

constraint->f_indices.endEdit();
constraint->d_indices.endEdit();


/////////////////////////////
Expand Down

0 comments on commit a96b58d

Please sign in to comment.