No LocalToGlobalMapping in DMPlex
Hello PETSc Developers, I’d like to get an ISLocalToGlobalMapping from a DMPlex. But, currently, DMGetLocalToGlobalMapping returns an empty ISLocalToGlobalMapping. I can see that ISLocalToGlobalMappings are created in DMPlexDistribute, but they are never assigned to the DM. Is DMGetLocalToGlobalMapping supported with DMPlex or is this a bug? I’ve included a simple example below. ``` #include <petsc.h> int main(int argc, char** argv) { PetscErrorCode ierr; PetscInt size; ISLocalToGlobalMapping l2g; DM dm, dm_dist; PetscInt num_points[2] = {2, 2}; PetscInt cone_size[4] = {1, 1, 0, 0}; PetscInt cones[2] = {2,3}; PetscInt orientations[2] = {0, 0}; PetscInt local_points[2] = {0, 1}; PetscInt global_points[2]; PetscInitialize(&argc, &argv, NULL, NULL); DMPlexCreate(PETSC_COMM_WORLD, &dm); DMPlexCreateFromDAG(dm, 1, num_points, cone_size, cones, orientations, NULL); DMPlexDistribute(dm, 0, NULL, &dm_dist); DMGetLocalToGlobalMapping(dm_dist, &l2g); ISLocalToGlobalMappingApply(l2g, 2, local_points, global_points); PetscFinalize(); } ``` Thank you, Tristan Konolige
participants (1)
-
Tristan Konolige