#include #include #include #include #include #include #include void debugDM(DM dm, int rank){ // get local coordinates Vec coordinates; DMGetCoordinatesLocal(dm, &coordinates); PetscScalar *coords; PetscInt coordSize; VecGetSize(coordinates, &coordSize); int start, m; VecGetArray(coordinates, &coords); PetscSection cs; DMGetCoordinateSection(dm, &cs); // iterate points std::vector res; PetscInt from,to,dof,off; DMPlexGetHeightStratum(dm, 0,&from, &to); for (int cellIndex=from;cellIndex "+std::to_string(edgeIndex)); const PetscInt *vertices; PetscInt numVertices; DMPlexGetConeSize(dm, edgeIndex, &numVertices); DMPlexGetCone(dm, edgeIndex, &vertices); for (int v = 0;v "+std::to_string(vertexIndex)+ coordinatesStr) ; } } } VecRestoreArray(coordinates, &coords); // sort and print std::sort(res.begin(),res.end()); std::stringstream ss; for (auto s : res){ ss <