<div style="font-family: Arial, sans-serif; font-size: 14px;"></div><p style="text-decoration:none">Hi,</p><p style="text-decoration:none">I am building a solver and for mesh handling, I use<span> </span><span>DMPlex</span>. In my 3D mesh, I need to color faces. The adjacency information appears correct based on my checks(But I tried setting adjacency and creating new sections too):</p><div style="text-decoration: none; margin-top: 14px; margin-bottom: 14px;"><span style="font-family: Menlo, Consolas, "Courier New", monospace;">for (PetscInt f = fStart; f < fEnd; ++f) {</span><div><span style="font-family: Menlo, Consolas, "Courier New", monospace;"> PetscInt adjSize = PETSC_DETERMINE;</span></div><div><span style="font-family: Menlo, Consolas, "Courier New", monospace;"> PetscInt *adj = NULL;</span></div><div><span style="font-family: Menlo, Consolas, "Courier New", monospace;"> PetscCallVoid(DMPlexGetAdjacency(dm_, f, &adjSize, &adj));</span></div><div><span style="font-family: Menlo, Consolas, "Courier New", monospace;"> PetscCallVoid(PetscPrintf(PETSC_COMM_WORLD, "[%4d]", f));</span></div><div><span style="font-family: Menlo, Consolas, "Courier New", monospace;"> PetscInt count = 0;</span></div><div><span style="font-family: Menlo, Consolas, "Courier New", monospace;"> for (int i = 0; i < adjSize; ++i) {</span></div><div><span style="font-family: Menlo, Consolas, "Courier New", monospace;"> if (adj[i] >= fStart && adj[i] < fEnd) {</span></div><div><span style="font-family: Menlo, Consolas, "Courier New", monospace;"> count++;</span></div><div><span style="font-family: Menlo, Consolas, "Courier New", monospace;"> PetscCallVoid(PetscPrintf(PETSC_COMM_WORLD, " %4d", adj[i]));</span></div><div><span style="font-family: Menlo, Consolas, "Courier New", monospace;"> }</span></div><div><span style="font-family: Menlo, Consolas, "Courier New", monospace;"> }</span></div><div><span style="font-family: Menlo, Consolas, "Courier New", monospace;"> PetscCallVoid(PetscPrintf(PETSC_COMM_WORLD, " | %d\n", count));</span></div><div><span style="font-family: Menlo, Consolas, "Courier New", monospace;"> PetscCallVoid(PetscFree(adj));</span></div><span style="font-family: Menlo, Consolas, "Courier New", monospace;">}</span></div><div style="text-decoration: none; margin-top: 14px; margin-bottom: 14px;"><span style="font-family: Menlo, Consolas, "Courier New", monospace;"><p style="text-decoration:none"><span style="font-family: Arial, sans-serif;">I am testing this on a mesh consisting of quadrilateral elements. This code correctly outputs 7 adjacent faces for interior faces and 4 for boundary faces (including the face itself).</span></p><p style="text-decoration:none"><span style="font-family: Arial, sans-serif;">However, when I call</span><span style="font-family: Arial, sans-serif;"> </span><span style="font-family: Menlo, Consolas, "Courier New", monospace;">DMCreateColoring</span><span style="font-family: Arial, sans-serif;">, I get the following error:</span></p><p style="text-decoration:none"><span style="font-family: Arial, sans-serif;"><span style="font-family: Menlo, Consolas, "Courier New", monospace;">[0]PETSC ERROR: No support for this operation for this object type </span><br><span style="font-family: Menlo, Consolas, "Courier New", monospace;">[0]PETSC ERROR: No method getcoloring for DM of type plex </span></span></p><p style="text-decoration:none"><span style="font-family: Arial, sans-serif;"><span style="font-family: Menlo, Consolas, "Courier New", monospace;"></span></span></p><p style="text-decoration:none"><span style="font-family: Arial, sans-serif;">What is the way to perform face coloring using</span><span style="font-family: Arial, sans-serif;"> </span><span style="font-family: Arial, sans-serif;">DMPlex</span><span style="font-family: Arial, sans-serif;">?</span></p><p style="text-decoration:none"><span style="font-family: Arial, sans-serif;">Thank you!</span></p><p style="text-decoration:none"><span style="font-family: Arial, sans-serif;">Onur</span></p></span><p></p><br></div><div class="protonmail_signature_block" style="font-family: Arial, sans-serif; font-size: 14px;"><div class="protonmail_signature_block-proton">
</div>
</div>