Closed jnbrunet closed 3 years ago
I would definitely ping @epernod on this since he recently worked on the mass and their initialization.
What is exactly f_sofa.norm()
? Cause here there is clearly a 2.5 factor acting (typical from mass lumping in tets) ?
I would definitely ping @epernod on this since he recently worked on the mass and their initialization. What is exactly
f_sofa.norm()
? Cause here there is clearly a 2.5 factor acting (typical from mass lumping in tets) ?
It's the force vector:
caribou_mass->addForce(&mechanical_parameters, d_f_caribou, mo->x, mo->v);
sofa_mass->addForce(&mechanical_parameters, d_f_sofa, mo->x, mo->v);
Which should be the integral over the domain of G*density.
@hugtalbot I'm sorry I don't have time to dig this up more but, I'm fairly sure the MeshMatrixMass::addForce
of SOFA isn't giving the same result either your are using a lumped scheme or not, and I'm not talking about a small difference. You can test it against SOFA v20.12, which works correctly.
What a nice surprise to see a review from you @hugtalbot , thanks !!
Btw, I have a suspecious error in Caribou's CI. The following test:
where
f_caribou
is Caribou's mass component, andf_sofa
is asofa::component::mass::MeshMatrixMass
, fails with master, but not with previous verions of SOFA:Caribou vs SOFA v20.06
Caribou vs SOFA v20.12
Caribou vs SOFA master
It looks like the
MeshMatrixMass
isn't producing the same mass matrix as before... Did something change there? Maybe @epernod knows something?