DMGetCoordinatesLocalizedLocal broken for Q2 and higher non-localized coordinates
@dalcinl @stefanozampini This logic returns true when elements have any coordinate dofs, such as when using Q_2
geometry quads or hexes, and this breaks the viewers and likely other places. These elements are important for us. Can you help fix this or tell me how you'd like it fixed? (I won't relitigate my gripes about localized coordinates here. #566)
ierr = DMGetCoordinateSection(dm, &coordSection);CHKERRQ(ierr);
ierr = DMPlexGetHeightStratum(cdm, 0, &cStart, &cEnd);CHKERRQ(ierr);
ierr = PetscSectionGetChart(coordSection, &sStart, &sEnd);CHKERRQ(ierr);
alreadyLocalized = PETSC_FALSE;
for (c = cStart; c < cEnd; ++c) {
if (c < sStart || c >= sEnd) continue;
ierr = PetscSectionGetDof(coordSection, c, &dof);CHKERRQ(ierr);
if (dof) { alreadyLocalized = PETSC_TRUE; break; }
}
*areLocalized = alreadyLocalized;