Thanks John, 

So if we don't need to worry about the index there. May be it is a good idea to get ride of the index in the comments. Since c++ will automatically number them. 

I just found there are several virtual functions in the Elem class mainly focus on 2nd order element. Why those appear in a general element class? What should we return for a higher order element? The linear element just return 0. I'm confused by this design.

virtual unsigned int n_second_order_adjacent_vertices (const unsigned int) const
virtual unsigned short int second_order_adjacent_vertex (const unsigned int n, const unsigned int v) const
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex (const unsigned int n) const

Sincerely Yours,

Lei Shi

On Mon, Aug 27, 2012 at 1:44 AM, John Peterson <> wrote:

On Mon, Aug 27, 2012 at 12:39 AM, Lei Shi <> wrote:
Dear All

I want to add some new element to support high order element like what gmsh provided. So I want to add a new entry to the enum of ElemType. However, I found after each line of elemtype, there is a index. Is that ok to insert a new enum entry to indicate a new element? Like 

TRI3,  //3
TRI6,  //4
TRI10,  //new p3 triangle
TRI15, // new p4 triangle

QUAD4, //5

Yes... the comments there could be updated to reflect the new implied numbering.