-
Notifications
You must be signed in to change notification settings - Fork 2
Introduce orientation (replacing tangent) #12
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
base: main
Are you sure you want to change the base?
Conversation
6d46d98 to
c789ab2
Compare
|
@schnellerhase The tangent has to be oriented in the same way as the "orientation of the network". (i.e. what is an in-edge or out edge). |
|
Im not sure what you are trying to do here is the correct approach. The key is that if we look at an edge of the graph, the orientation is decided by wether a node considers is as an in-edge or out edge. Your orientation parameter seems to only look at the number of the original nodes of the graph edge (or am I mistaken)? I also don’t get the reason for storing orientation rather than the normal. |
The orientation variable
The check for |
The orientation is not geometry dependant. If we transform the mesh the orientation will still carry the correct information as it is independent of the geometric information, while the tangent vector would no longer be correct. |
2597654 to
d8a8488
Compare
| t = J[:, 0] | ||
| t /= ufl.sqrt(ufl.inner(t, t)) | ||
|
|
||
| tangent = self._network_mesh.orientation * t |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess as we are in 1D, we don't really worry about if UFL over-estimates quadrature for this.
And in the case of "curved" meshes, we could actually gain accuracy by this approach rather than encoding the tangent.
Co-authored-by: Jørgen Schartum Dokken <dokken92@gmail.com>
jorgensd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor (but important) things.


Introduces the orientation function$o \in DG(\Omega)_0$ which encodes the orientation of the edge relative to the local storage order.
A unit tangent oriented in the direction of the directed graph is given by
where
the Jacobian, i.e.
ufl.Jacobian(mesh).In general for a deformed configuration$x + u(x)$ , a tangent would still be given by $\xi$ with the altered Jacobian of the configuration
Implementation wise this has the benefit of fitting into the abstraction of
dolfinx.io.distribute_entity_data, which extends to parallel input.