Introduce orientation (replacing tangent)#12
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.
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.
Minor (but important) things.
Co-authored-by: Jørgen Schartum Dokken <dokken92@gmail.com>


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.