Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

barycenter computation #46

Open
npaster opened this issue Jan 28, 2019 · 0 comments
Open

barycenter computation #46

npaster opened this issue Jan 28, 2019 · 0 comments
Assignees

Comments

@npaster
Copy link
Member

npaster commented Jan 28, 2019

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:

  1. 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.
  2. There is no function to compute the centerOfMass in 1D and in 3D (in 1D, the two definitions are equivalent)
  3. 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.
  4. 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants