/// <summary> /// Get the other element of a <see cref="MeshFace"/>, when /// looking from <paramref name="element"/>. /// <para> /// For boundary faces, null is returned. /// </para> /// </summary> public static int OtherElement(this SMeshFace face, int element) { if (face.LeftElement == element) { return(face.RightElement); } if (face.RightElement == element) { return(face.LeftElement); } throw new Exception("element is not part of face"); }
/// <summary> /// Returns true if the face is a boundary face. /// </summary> public static bool IsBoundaryFace(this SMeshFace face) { return(face.RightElement < 0); }