Check normal consistency.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(in) | :: | self | Facet. |
Consistency check result.
elemental function check_normal(self) result(is_consistent)
!< Check normal consistency.
class(facet_object), intent(in) :: self !< Facet.
logical :: is_consistent !< Consistency check result.
type(vector_R8P) :: normal !< Normal computed by means of vertices data.
normal = face_normal3_R8P(pt1=self%vertex_1, pt2=self%vertex_2, pt3=self%vertex_3, norm='y')
is_consistent = ((abs(normal%x - self%normal%x)<=2*ZeroR8P).and.&
(abs(normal%y - self%normal%y)<=2*ZeroR8P).and.&
(abs(normal%z - self%normal%z)<=2*ZeroR8P))
endfunction check_normal