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

TriangleMesher: cell size to area conversion #35

Closed
Huite opened this issue Aug 29, 2024 · 0 comments
Closed

TriangleMesher: cell size to area conversion #35

Huite opened this issue Aug 29, 2024 · 0 comments

Comments

@Huite
Copy link
Contributor

Huite commented Aug 29, 2024

Triangle requires an area for triangles, rather than a specified cell size. Gmsh uses a cell size.

To make things consistent across, I compute an area based on the cell size:

0.5 * cellsize * cellsize

I.e. $A = \frac{1}{2} b h$

This is assuming a right-angled triangled where base and height are equal. Of course, this means that the hypothenuse is longer than the specified cell size.

The ideal triangle is probably equilateral, in which case $A = \frac{\sqrt{3}}{4} s^2$.

This results in slightly smaller triangles.

@Huite Huite closed this as completed in fc5ce83 Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant