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

surfunstructured: use a better estimate of the number of vertices when importing an STL #298

Merged
merged 1 commit into from
May 16, 2022

Conversation

andrea-iob
Copy link
Member

The number of facets and the number of vertices of a triangulation are related by the inequality nFacets <= 2 * nVertices - 4, where the equality holds for a closed triangulation. To limit memory usage in the case the facets are joined, we estimate the number of vertices assuming a closed triangulation (this gives us the minimum number of nodes the triangulation could possibly have).

With this change, there is a 30% reduction in the memory needed for importing a closed triangulation of 500K elements.

@andrea-iob andrea-iob force-pushed the surfunstructured.reduce.memory.usage branch from b6ab2b5 to 6badf57 Compare May 13, 2022 10:38
@andrea-iob andrea-iob merged commit 305090c into master May 16, 2022
@andrea-iob andrea-iob deleted the surfunstructured.reduce.memory.usage branch May 16, 2022 10:10
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

Successfully merging this pull request may close these issues.

2 participants