Remove fuzz and return face id alongside element id (Replace stale #308)#319
Remove fuzz and return face id alongside element id (Replace stale #308)#319Sichao25 wants to merge 5 commits into
Conversation
| * should be updated to properly handle the new result. | ||
| */ | ||
| [[nodiscard]] virtual LO GetOwningElementId(const Result& result) const = 0; | ||
| [[nodiscard]] virtual Kokkos::View<LO*> GetOwningElementIds( |
There was a problem hiding this comment.
Can these GetOwningElementId functions be made into free functions?
There was a problem hiding this comment.
It is possible, but since we need to access some private members, more API changes such as getter functions are required.
There was a problem hiding this comment.
Ok, so I think we should probably have a free function that given mesh, dim, id gives back the owning element. The member function can call this.
The free function version will be useful in a number of other places.
| */ | ||
| template <int N> | ||
| [[nodiscard]] KOKKOS_FUNCTION inline Real | ||
| distance_to_closest_edge_from_barycentric(const Omega_h::Matrix<N, 3>& coords, |
There was a problem hiding this comment.
In the case when a point is on the infinite extension of one of the face's edges, this function will erroneously say the point is 0 units from an edge. Also, this method will not (as the comment states) extend to 3D: barycentric coordinates in 3D are the ratios of volumes of tetrahedra, thus the product of the ith coordinate and the height/altitude of the face is not in the distance of the point to the edge.
Resolved the merge conflict and updated the PR #308 to fit the new field API.