llnl / llnl/conduit

do we need a more robust centroid algo?

Open
#955 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
248
Forks
72
Avg merge
1d 16h
Merged PRs (30d)
15

Description

for many polygon cases -- we may need a more robust centroid algo, such as:

https://en.wikipedia.org/wiki/Centroid#Of_a_polygon

I think we are using simple weighting:

https://github.com/LLNL/conduit/blob/742a29989b40ca50c70e9327a5887345e425786b/src/libs/blueprint/conduit_blueprint_mesh.cpp#L1292

We can also simplify the existing code using the new element lambdas and value accessors.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/libs/blueprint/conduit_blueprint_mesh.cpp around line 1292 and compare the current centroid calculation with the polygon method in the linked Wikipedia article. Review the existing element lambdas and value accessors mentioned in the issue. The scope and validation criteria still need agreement for the relevant polygon cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.