Skip to content

Negative volume of triangle in udim 2 #63

Description

@bboeyken

When computing the volume of a 2D simplex (with udim=2) using a BEAST assembly method, the resulting value is often negative. This volume is subsequently used to calculate the Jacobian, which leads to a negative assembled matrix.
The relevant function is available at:

function _normals(tangents::SVector{2,SVector{2,T}}, ::Type{Val{0}}) where {T}
t = tangents[1]
s = tangents[2]
v = (t[1]*s[2] - t[2]*s[1])/2
# n[3] = tangents[1] × tangents[2]
# l = norm(n)
P = SVector{2,T}
SVector{0,P}(), v
end

Shouldn’t there be an absolute value applied to the volume calculation at line 220?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions