An instance of this class represents an edge in a domain.
Field: grid_index::integer = 0In many cases edges will form part of a grid, and all the edges in the grid will be numbered from 0 to n-1 for some n. The index number will be stored in this field.
Field: constraint::integer = 0The constraint field contains an integer encoding information about whether this edge (ignoring endpoints) is in the interior of the domain, or whether it lies along one of the sides. We always refer to specific values by symbolic names such as CONSTRAINT_FREE or CONSTRAINT_C3 rather than bare integers. For more details of the encoding, see the file domain.mpl. Grids should be set up so that no edge has endpoints on two different sides of the domain.
Field: curve_index = NULLThis field contains the same information as the constraint field, but encoded differently. It takes the value 0, 1, 3 or 5 if the edge lies along C[0], C[1], C[3] or C[5], and it is NULL if the edge does not lie along any of these boundary curves.
Field: end::tableThis is a table with indices 0 and 1; the entries are instances of an appropriate subclass of domain_point, representing the two endpoints of the edge. We do not store any information about the precise path taken between the endpoints. The domain may have methods that encode a canonical choice of path.
Field: vector::list(scalar)This is the vector from end[0] to end[1]
Field: straight_length::scalarThis is the straight line distance from end[0] to end[1]
Field: weighting::scalar = 0This field is used when calculating the Dirichlet energy of a map between two domains. Details will be explained elsewhere.
Constructor: `new/domain_edge`(P0::domain_point,P1::domain_point,)Construct a new edge with endpoints P0 and P1.
Method: set(P0::domain_point,P1::domain_point)::voidSet the endpoints to P0 and P1
Calculate various auxiliary quantities such as the vector and straight_length fields. Subclasses may override this method to perform more interesting work.
For an edge in a grid, return the indices of the two endpoints.