[petsc-users] DMPlex Transitive closure

Nicholas Arnold-Medabalimi narnoldm at umich.edu
Wed Aug 17 10:30:30 CDT 2022


Good Morning

I have been working with the transitive closure to check to see if a node
point has a cell that is rooted on a process. However, I think I am having
a more fundamental issue. Even just calling the RestoreTransitiveClosure
immediately after getting it is throwing a PetscError.(that is removing all
the calls between the two closure functions. I'm not exactly sure what is
causing the issue. I have used this method previously, except on cell
points to get the constituent vertex points. Is there some nuance to using
the supports instead of the cones?



DMPlexGetDepthStratum(dm, 0, &pStart, &pEnd);
PetscPrintf(PETSC_COMM_WORLD, "Pstart: %d, Pend: %d\n", pStart, pEnd);
for (int p = pStart; p < pEnd; p++)
    {

        PetscInt closureSize;
        PetscInt *closure;

        ierr = DMPlexGetTransitiveClosure(dm, p, PETSC_FALSE, &closureSize,
&closure);
        CHKERRQ(ierr);
        PetscSynchronizedPrintf(PETSC_COMM_WORLD, "rank:%d\n", rank);
        for (int i = 0; i < (2 * closureSize); i = i + 2)
        {
            PetscSynchronizedPrintf(PETSC_COMM_WORLD, "%d\n", closure[i]);
        }
        PetscSynchronizedFlush(PETSC_COMM_WORLD, NULL);
        ierr = DMPlexRestoreTransitiveClosure(dm, p, PETSC_FALSE, &
closureSize, &closure);
        CHKERRQ(ierr);
    }

Results in an error when the RestoreTransitiveClosure is called. I have
checked and the resulting output for the closures are correct.

Pstart: 510, Pend: 1532
rank:0
510
1534
1535
0
rank:1
492
1478
1479
0
[1]PETSC ERROR: 2953
--------------------- Error Message
--------------------------------------------------------------
[1]PETSC ERROR: 491
Object is in wrong state
[1]PETSC ERROR: Array was not checked out
[1]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.
[1]PETSC ERROR: Petsc Release Version 3.17.4, Aug 01, 2022
[1]PETSC ERROR: /home/narnoldm/code/solver-playground/build/bin/pgrid_c on
a  by narnoldm Wed Aug 17 11:18:20 2022
[0]PETSC ERROR: [1]PETSC ERROR: Configure options
--prefix=/home/narnoldm/code/solver-playground/build/external/PETSc
--with-hdf5-dir=/home/narnoldm/code/solver-playground/build/external/HDF5
--with-cgns-dir=/home/narnoldm/code/solver-playground/build/external/CGNS
--download-triangle --download-parmetis --download-metis --with-debugging=1

Any assistance is greatly appreciated.

Sincerely
Nicholas

-- 
Nicholas Arnold-Medabalimi

Ph.D. Candidate
Computational Aeroscience Lab
University of Michigan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220817/bd4902fb/attachment.html>


More information about the petsc-users mailing list