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

patchkernel: fix evaluation of normal for polygonal elements #378

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

marcocisternino
Copy link
Member

The return vector must be normalized to assure to be a versor.

@andrea-iob andrea-iob changed the title Fix element normal evaluation patchkernel: fix evaluation of normal for polygonal elements Mar 20, 2023
@andrea-iob
Copy link
Member

I've added some comments.

@andrea-iob
Copy link
Member

On a second though, the code can be simplified: if the normal is re-normalized, there is no need to divede it by surfaceArea.

@andrea-iob
Copy link
Member

The branch "ai.element.eval.normal" contains a simplified version.

Evaluating the normal of a polygonal element as the weighted average of
the normals of its tiles will not generate a versor (triangular
inequality). After being evaluated, the vector needs to be
explicitly normalized.
@marcocisternino marcocisternino merged commit c6a2073 into master Apr 4, 2023
@marcocisternino marcocisternino deleted the element.eval.normal branch April 4, 2023 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants