Skip to content

Commit

Permalink
[MeshMatrixMass] Fix init from density
Browse files Browse the repository at this point in the history
  • Loading branch information
epernod committed Jun 18, 2021
1 parent ce505bf commit ea36995
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1749,6 +1749,14 @@ void MeshMatrixMass<DataTypes, MassType>::initFromMassDensity()
{
sumMass += vertexMassInfo[i]*m_massLumpingCoeff;
}

// Same for edgeMass
helper::WriteAccessor<Data<MassVector> > edgeMass = d_edgeMass;
for (size_t i = 0; i < edgeMass.size(); i++)
{
sumMass += edgeMass[i] * 2;
}

d_totalMass.setValue(sumMass);
}

Expand Down

0 comments on commit ea36995

Please sign in to comment.