An instance represents a triangular face in a domain.
Field: grid_index::integer = 0In many cases faces will form part of a grid, and all the faces in the grid will be numbered from 0 to n-1 for some n. The index number will be stored in this field.
Field: corner::tableThis is a table with indices 0, 1 and 2; the entries are instances of an appropriate subclass of domain_point, representing the three corners of the face.
Field: side::tableThis is a table with indices 0, 1 and 2; the entries are instances of an appropriate subclass of domain_edge, representing the three sides of the face. side[0] should join corner[0] to corner[1], and side[1] should join corner[0] to corner[2], and side[2] should join corner[1] to corner[2]. In more detail, end[0] of side[0] should be the same Maple object as corner[0], so that changing the fields of end[0] of side[0] automatically changes the fields of corner[0], and similarly in the other cases; it is not enough for end[0] of side[0] to be a different object with the same coordinates.
Field: orientation::integer = 1This should be +1 if circuit corner[0] -> corner[1] -> corner[2] -> corner[0] runs anticlockwise (with respect to the given orientation of the domain), and -1 otherwise.
Field: flat_area::scalar = 0This is the area of the affine triangle with the same vertices as this face.
Constructor: `new/domain_face`(S0::domain_edge,S1::domain_edge,S2::domain_edge,)Construct a new face with sides S0, S1 and S2. It is assumed that the endpoints of these sides match up correctly.
Method: set(S0::domain_edge,S1::domain_edge,S2::domain_edge,s_)::voidSet the sides of this face to be S0, S1 and S2, and set the corners and other auxiliary quantities accordingly. If the argument s_ is supplied, then it will be used as the orientation; otherwise the orientation will be calculated by a method that is valid provided that the face is not too strongly curved. It is assumed that the endpoints of S0, S1 and S2 match up correctly; this can be checked by the check_matching method if necessary.
Set the orientation, by a method that is valid provided that the face is not too strongly curved.
Calculate various auxiliary quantities such as the flat_area field. Subclasses may override this method to perform more interesting work.
For an face in a grid, return the indices of the three corners.
For an face in a grid, return the indices of the three sidess.
Check whether the endpoints of the sides are the same as the corresponding corners. They should be the same Maple objects, which can be tested by the built in equality operator. However, one can also pass an equality checking procedure as a second argument to this method.