message: Gmsh quadrilateral mapping (thanks
diff: namespace mfem
  {
  +int CartesianToGmshQuad(int idx_in[], int ref)
  +{
  + int i = idx_in[0];
  + int j = idx_in[1];
  + // Do we lie on any of the edges
  + bool ibdr = (i == 0 || i == ref);
  + bool jbdr = (j == 0 || j == ref);
  + if (ibdr && jbdr) // Vertex DOF
  + {
  + return (i ? (j ? 2 : 1) : (j ? 3 : 0));
  + }
  + int offset = 4;
  + if (jbdr) // Edge DOF on j==0 or j==ref
  + {
  + return offset + (j ? 3*ref - 3 - i : i - 1);
  + }
  + else if (ibdr) // Edge DOF on i==0 or i==ref
  + {
  + return offset + (i ? ref - 1 + j - 1 : 4*ref - 4 - j);
  + }
  + else // Recursive numbering for interior
  + {
  + int idx_out[2];
  + idx_out[0] = i-1;
  + idx_out[1] = j-1;
  + offset += 4 * (ref - 1);
  + return offset + CartesianToGmshQuad(idx_out, ref-2);
  + }
  +}
  +
  void GmshHOSegmentMapping(int order, int *map)
  {
  map[0] = 0;
  @@ -42,7 +72,19 @@ void GmshHOTriangleMapping(int order, int *map)
  }
  void GmshHOQuadrilateralMapping(int order, int *map)
  -{}
  +{
  + int b[2];
  + int o = 0;
  + for (b[1]=0; b[1]<=order; b[1]++)
  + {
  + for (b[0]=0; b[0]<=order; b[0]++)
  + {
  + int o_gmsh = CartesianToGmshQuad(b, order);
  + map[o] = o_gmsh;
  + o++;
  + }
  + }
  +}
  void GmshHOTetrahedronMapping(int order, int *map)
  {}
  