message: Generalizing FiniteElementSpace::Construct
diff: @@ -1081,11 +1081,12 @@ void FiniteElementSpace::Construct()
  if (mesh->Dimension() == 3 && mesh->GetNE())
  {
  - // Here we assume that all faces in the mesh have the same base
  - // geometry -- the base geometry of the 0-th face element.
  - // The class Mesh assumes the same inside GetFaceBaseGeometry(...).
  - // Thus we do not need to generate all the faces in the mesh
  - // if we do not need them.
  + Geometry::Type face_geom = mesh->GetFaceBaseGeometry(-1);
  +
  + if ( face_geom != Geometry::MIXED )
  + {
  + // All faces are the same type thus we do not need to generate
  + // all the faces in the mesh since we do not need them.
  int fdof = fec->DofForGeometry(mesh->GetFaceBaseGeometry(0));
  if (fdof > 0)
  {
  @@ -1099,6 +1100,21 @@ void FiniteElementSpace::Construct()
  }
  }
  }
  + else
  + {
  + fdofs = new int[mesh->GetNFaces()+1];
  + fdofs[0] = 0;
  + for (i = 0; i < mesh->GetNFaces(); i++)
  + {
  + nfdofs += fec->DofForGeometry(mesh->GetFaceBaseGeometry(i));
  + fdofs[i+1] = nfdofs;
  + }
  + if ( nfdofs == 0 )
  + {
  + delete [] fdofs; fdofs = NULL;
  + }
  + }
  + }
  bdofs = new int[mesh->GetNE()+1];
  bdofs[0] = 0;
  