message: Fixed Mesh::UniformRefinement for an all-tet mesh and the 1D case.
diff: @@ -7277,35 +7277,35 @@ void Mesh::GetElementData(const Array<Element*> &elem_array, int geom,
  }
  }
  +static Array<int>& AllElements(Array<int> &list, int nelem)
  +{
  + list.SetSize(nelem);
  + for (int i = 0; i < nelem; i++) { list[i] = i; }
  + return list;
  +}
  +
  void Mesh::UniformRefinement(int ref_algo)
  {
  + Array<int> list;
  +
  if (NURBSext)
  {
  NURBSUniformRefinement();
  }
  else if (ncmesh)
  {
  - Array<int> elem_to_refine(GetNE());
  - for (int i = 0; i < elem_to_refine.Size(); i++)
  - {
  - elem_to_refine[i] = i;
  - }
  - GeneralRefinement(elem_to_refine, 1);
  + GeneralRefinement(AllElements(list, GetNE()));
  }
  - else if (ref_algo == 1 && meshgen == 1)
  + else if (ref_algo == 1 && meshgen == 1 && Dim == 3)
  {
  // algorithm "B" for an all-tet mesh
  - Array<int> elem_to_refine(GetNE());
  - for (int i = 0; i < elem_to_refine.Size(); i++)
  - {
  - elem_to_refine[i] = i;
  - }
  - LocalRefinement(elem_to_refine);
  + LocalRefinement(AllElements(list, GetNE()));
  }
  else
  {
  switch (Dim)
  {
  + case 1: LocalRefinement(AllElements(list, GetNE())); break;
  case 2: UniformRefinement2D(); break;
  case 3: UniformRefinement3D(); break;
  default: MFEM_ABORT("internal error");
  