<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Menlo;
        panose-1:2 11 6 9 3 8 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:12.0pt;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:12.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=EN-CA link="#0563C1" vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt'>Dear PETSc-Users,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>Is there any changes in ISLocalToGlobalMappingGetIndices function after PETSc 3.17? <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>In the previous PETSc version (<= 3.17), the function ‘ISLocalToGlobalMappingGetIndices(ltogm,ltog,idltog,ierr)’ works fine, even though the value of idltog looks out of bound (-11472655627481), <a href="https://www.mcs.anl.gov/petsc/petsc-3.14/src/ksp/ksp/tutorials/ex14f.F90.html">https://www.mcs.anl.gov/petsc/petsc-3.14/src/ksp/ksp/tutorials/ex14f.F90.html</a>. The value of idltog is not clear.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>In the latest PETSc version,  this function can be called, but due to the extreme value of idltog, the code fails. I also tried to use ‘ISLocalToGlobalMappingGetIndicesF90(ltogm,ltog,ierr)’ () but no success. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#569CD6;mso-ligatures:none'>#if (PETSC_VERSION_MAJOR == 3 && PETSC_VERSION_MINOR <= 4)</span><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'><o:p></o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'>        </span><span style='font-size:10.5pt;font-family:Menlo;color:#569CD6;mso-ligatures:none'>call</span><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'> DMDAGetGlobalIndicesF90(dmda_flow%da,PETSC_NULL_INTEGER,  &<o:p></o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'>                                     idx,ierr)<o:p></o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'>        CHKERRQ(ierr)<o:p></o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#569CD6;mso-ligatures:none'>#else</span><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'><o:p></o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'>        </span><span style='font-size:10.5pt;font-family:Menlo;color:#569CD6;mso-ligatures:none'>call</span><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'> DMGetLocalToGlobalMapping(dmda_flow%da,ltogm,ierr)<o:p></o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'>        CHKERRQ(ierr)<o:p></o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'>        </span><span style='font-size:10.5pt;font-family:Menlo;color:#569CD6;mso-ligatures:none'>call</span><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'> ISLocalToGlobalMappingGetIndices(ltogm,ltog,idltog,ierr)<o:p></o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'>        CHKERRQ(ierr)<o:p></o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#569CD6;mso-ligatures:none'>#endif</span><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'><o:p></o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'>        <o:p></o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'>        dof = dmda_flow%dof<o:p></o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'>      <o:p></o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'>        </span><span style='font-size:10.5pt;font-family:Menlo;color:#569CD6;mso-ligatures:none'>do</span><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'> ivol = </span><span style='font-size:10.5pt;font-family:Menlo;color:#B5CEA8;mso-ligatures:none'>1</span><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'>, nngl<o:p></o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'><o:p> </o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#569CD6;mso-ligatures:none'>#if (PETSC_VERSION_MAJOR == 3 && PETSC_VERSION_MINOR <= 4)</span><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'><o:p></o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'>            node_idx_lg2pg(ivol) = (idx(ivol*dof)+</span><span style='font-size:10.5pt;font-family:Menlo;color:#B5CEA8;mso-ligatures:none'>1</span><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'>)/dof<o:p></o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#569CD6;mso-ligatures:none'>#else</span><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'><o:p></o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'>            node_idx_lg2pg(ivol) = (ltog(ivol*dof + idltog)+</span><span style='font-size:10.5pt;font-family:Menlo;color:#B5CEA8;mso-ligatures:none'>1</span><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'>)/dof<o:p></o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#569CD6;mso-ligatures:none'>#endif</span><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'><o:p></o:p></span></p><p class=MsoNormal style='line-height:15.75pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'>        </span><span style='font-size:10.5pt;font-family:Menlo;color:#569CD6;mso-ligatures:none'>end do</span><span style='font-size:10.5pt;font-family:Menlo;color:#D4D4D4;mso-ligatures:none'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>Any suggestions on that. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>Thanks,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>Danyang<o:p></o:p></span></p></div></body></html>