-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
Description
For the moment, there are two different functions to compute the barycenter:
- one which compute the barycenter
- one which compute the center of mass
There are are at least four problems:
- The two functions don't give the same results for a same geometry (except for simplicial). I think it is better if we rename the function which compute the center of mass like centerOfMass(). It prevents unexpected results and don't create confusion.
- There is no function to compute the centerOfMass in 1D and in 3D (in 1D, the two definitions are equivalent)
- During a same computation, the two functions are called indifferently. This is not very good, because we loose the consistency of the definition of the barycenter. (To test: add a comment in both barycenter function and run vector_reconstruction test). We have to choose carefully which function have to be used.
- The computation of the barycenter with the function center of mass depends on the numbering of the nodes. The barycenter is different between cartesian mesh using generic_mesh and cartesian_mesh for a same geometry. cartesian_mesh use a strange ordering of the nodes 0-1-3-2 and not 0-1-2-3. Tow possibilities: create a specific function for cartesian_mesh or change the ordering of the nodes.