<head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
  #pfptBanner6p0wt2b { all: revert !important; display: block !important; 
    visibility: visible !important; opacity: 1 !important; 
    background-color: #D0D8DC !important; 
    max-width: none !important; max-height: none !important }
  .pfptPrimaryButton6p0wt2b:hover, .pfptPrimaryButton6p0wt2b:focus {
    background-color: #b4c1c7 !important; }
  .pfptPrimaryButton6p0wt2b:active {
    background-color: #90a4ae !important; }
</style>

<!-- BaNnErBlUrFlE-HeAdEr-end -->
</head><!-- BaNnErBlUrFlE-BoDy-start -->
<!-- Preheader Text : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">
 On Wed, May 1, 2024 at 6: 30 PM Ferrand, Jesus A. <FERRANJ2@ my. erau. edu> wrote: "You know the number of cells if you can read connectivity. Do you mean that the format does not tell you the number of vertices?" Sort of. . . So,
</div>
<!-- Preheader Text : END -->

<!-- Email Banner : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerStart</div>

<!--[if ((ie)|(mso))]>
  <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding: 16px 0px 16px 0px; direction: ltr" ><tr><td>
    <table border="0" cellspacing="0" cellpadding="0" style="padding: 0px 10px 5px 6px; width: 100%; border-radius:4px; border-top:4px solid #90a4ae;background-color:#D0D8DC;"><tr><td valign="top">
      <table align="left" border="0" cellspacing="0" cellpadding="0" style="padding: 4px 8px 4px 8px">
        <tr><td style="color:#000000; font-family: 'Arial', sans-serif; font-weight:bold; font-size:14px; direction: ltr">
          This Message Is From an External Sender
        </td></tr>
        <tr><td style="color:#000000; font-weight:normal; font-family: 'Arial', sans-serif; font-size:12px; direction: ltr">
          This message came from outside your organization.
        </td></tr>

      </table>

    </td></tr></table>
  </td></tr></table>
<![endif]-->

<![if !((ie)|(mso))]>
  <div dir="ltr"  id="pfptBanner6p0wt2b" style="all: revert !important; display:block !important; text-align: left !important; margin:16px 0px 16px 0px !important; padding:8px 16px 8px 16px !important; border-radius: 4px !important; min-width: 200px !important; background-color: #D0D8DC !important; background-color: #D0D8DC; border-top: 4px solid #90a4ae !important; border-top: 4px solid #90a4ae;">
    <div id="pfptBanner6p0wt2b" style="all: unset !important; float:left !important; display:block !important; margin: 0px 0px 1px 0px !important; max-width: 600px !important;">
      <div id="pfptBanner6p0wt2b" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-weight:bold !important; font-weight:bold; font-size:14px !important; line-height:18px !important; line-height:18px">
        This Message Is From an External Sender
      </div>
      <div id="pfptBanner6p0wt2b" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-weight:normal; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-size:12px !important; line-height:18px !important; line-height:18px; margin-top:2px !important;">
This message came from outside your organization.
      </div>

    </div>

    <div style="clear: both !important; display: block !important; visibility: hidden !important; line-height: 0 !important; font-size: 0.01px !important; height: 0px"> </div>
  </div>
<![endif]>

<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerEnd</div>
<!-- Email Banner : END -->

<!-- BaNnErBlUrFlE-BoDy-end -->
<div dir="ltr"><div dir="ltr">On Wed, May 1, 2024 at 6:30 PM Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu">FERRANJ2@my.erau.edu</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg4321204284333071829">




<div dir="ltr">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
"You know the number of cells if you can read connectivity. Do you mean that the format does not tell you</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
the number of vertices?"</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr;margin:0px 40px;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
Sort of...</div>
<div style="direction:ltr;margin:0px 40px;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
So, the format does provide the number of vertices, however, due to the way I read the data in parallel I don't know immediately how many local vertices there will be.</div>
<div style="direction:ltr;margin:0px 40px;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
Which prevents me from knowing the chart a priori.<br>
I figured out the number of vertices using PetscHashSetI to determine the number of unique entries in the connectivity list.</div></div></div></blockquote><div><br></div><div>Right, but that means that the connectivity you read in is not in local numbering. You will have to renumber it, so making a copy is probably necessary anyway. This is the same sort of processing I do for the parallel read.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg4321204284333071829"><div dir="ltr">
<hr style="display:inline-block;width:98%">
<div id="m_4321204284333071829divRplyFwdMsg" dir="ltr" style="color:inherit;background-color:inherit">
<span style="font-family:Calibri,sans-serif;font-size:11pt;color:rgb(0,0,0)"><b>From:</b> Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>><br>
<b>Sent:</b> Wednesday, May 1, 2024 8:52 PM<br>
<b>To:</b> Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" target="_blank">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>><br>
<b>Subject:</b> Re: [EXTERNAL] Re: [petsc-users] Is there anything like a "DMPlexSetCones()" ?</span>
<div> </div>
</div>
<div style="direction:ltr">On Wed, May 1, 2024 at 4:23 PM Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" id="m_4321204284333071829OWAa34ad222-41ef-8ebb-d63e-45b26a990ee9" target="_blank">FERRANJ2@my.erau.edu</a>> wrote:</div>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
Matt:<br>
<br>
My bad again, I need to clarify something that I just realized doesn't make sense.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
I said: "The nature of the I/O makes it so that I need to read the connectivity before I get a semblance of buffer sizes."</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
Scratch that, obviously, if I can read the connectivity, I know the buffer sizes.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
What I should have said is that I cannot know the "chart" that one sets in DMPlexSetChart() a priori like in most cases.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
I need to determine the chart from the connectivity lists.</div>
</blockquote>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">You know the number of cells if you can read connectivity. Do you mean that the format does not tell you</div>
<div style="direction:ltr">the number of vertices?</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">  Thanks,</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">    Matt</div>
<div style="direction:ltr"> </div>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)">
<hr style="direction:ltr;display:inline-block;width:98%">
<div id="m_4321204284333071829x_m_478286811837034506divRplyFwdMsg" dir="ltr" style="color:inherit;background-color:inherit">
<span style="font-family:Calibri,sans-serif;font-size:11pt;color:rgb(0,0,0)"><b>From:</b> Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" id="m_4321204284333071829OWA5b453a06-77d5-ad4d-a4fe-540a37763109" target="_blank">FERRANJ2@my.erau.edu</a>><br>
<b>Sent:</b> Wednesday, May 1, 2024 8:17 PM<br>
<b>To:</b> Matthew Knepley <<a href="mailto:knepley@gmail.com" id="m_4321204284333071829OWA8451e849-2418-9b01-f21a-f872b4eda520" target="_blank">knepley@gmail.com</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="m_4321204284333071829OWAd08a3383-dd03-26aa-feed-526798c12261" target="_blank">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="m_4321204284333071829OWAde234459-3bc4-3862-f03e-69e083396cb2" target="_blank">petsc-users@mcs.anl.gov</a>><br>
<b>Subject:</b> Re: [EXTERNAL] Re: [petsc-users] Is there anything like a "DMPlexSetCones()" ?</span>
<div> </div>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
Matt:</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
"I do not understand the "flag check". What is that?"</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
      My bad, I should have referred to the "dm->setupcalled".<br>
      I believe this PetscBool is checked by the other DM (not just DMPlex) APIs.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
      The subsequent checks for dm->setupcalled == PETSC_TRUE is what I meant to say.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
      Here's a copy of DMSetUp().</div>
<pre style="width:80px"><div style="direction:ltr;margin-right:80px;margin-left:80px;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)"><b><a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscErrorCode/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowpJ3s88P$" id="m_4321204284333071829OWAdcdf9a24-6408-217f-ed17-fbc1d98cd596" target="_blank">PetscErrorCode</a> <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/DM/DMSetUp/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowpy3zGSd$" id="m_4321204284333071829OWA3a92438a-c0d1-5cab-91bd-2c778db594c1" target="_blank">DMSetUp</a>(<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/DM/DM/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowt_sd2eh$" id="m_4321204284333071829OWA9f596d1a-5c0d-4e06-2336-dc4379ff7c9d" target="_blank">DM</a> dm)</b>
817: {
818:   <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscFunctionBegin/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowuMbcxmD$" id="m_4321204284333071829OWAe5ac62da-4614-0e2e-eef8-b47c8a183a25" target="_blank">PetscFunctionBegin</a>;
820:   if (dm->setupcalled) <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscFunctionReturn/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowhC986W-$" id="m_4321204284333071829OWA7f17161a-ebbc-6b13-0e44-7e5530888927" target="_blank">PetscFunctionReturn</a>(<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscErrorCode/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowpJ3s88P$" id="m_4321204284333071829OWA089d7ae3-758b-5511-6b90-23ba25ec69b2" target="_blank">PETSC_SUCCESS</a>);
821:   <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscTryTypeMethod/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowrbaxERF$" id="m_4321204284333071829OWA50871ab1-54bc-5b4e-7cfa-a56b53acbbb9" target="_blank">PetscTryTypeMethod</a>(dm, setup);
822:   dm->setupcalled = <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PETSC_TRUE/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowoILDY_P$" id="m_4321204284333071829OWA8e67be08-f22d-0744-00b1-2cfd27dd72cb" target="_blank">PETSC_TRUE</a>;
823:   <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscFunctionReturn/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowhC986W-$" id="m_4321204284333071829OWA36ec5552-682d-ba97-5459-c0c5c6a17360" target="_blank">PetscFunctionReturn</a>(<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscErrorCode/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowpJ3s88P$" id="m_4321204284333071829OWA548bba14-0528-33cb-edb8-cf0bf2d0e111" target="_blank">PETSC_SUCCESS</a>);
824: }</div></pre>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
"We could make a DMPlexSetCones(), but as you point out, the workflow for DMSetUp() would have to change. Where does the memory come from for your connectivity?"</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
      It's a memory that I myself allocate based on a file's contents.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
      The nature of the I/O makes it so that I need to read the connectivity before I get a semblance of buffer sizes.<br>
      Otherwise, I would stick to the tried and tested way.<br>
<br>
Also, when replying to the PETSc developers, users must reply to <a href="mailto:petsc-users@mcs.anl.gov" id="m_4321204284333071829OWA987e206d-175d-4151-552b-c47b499aaa51" target="_blank">
petsc-users@mcs.anl.gov</a> and not just to the individual email accounts of the developers, right?</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div id="m_4321204284333071829x_m_478286811837034506x_appendonsend" style="color:inherit;background-color:inherit">
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="direction:ltr;display:inline-block;width:98%">
<div id="m_4321204284333071829x_m_478286811837034506x_divRplyFwdMsg" dir="ltr" style="color:inherit;background-color:inherit">
<span style="font-family:Calibri,sans-serif;font-size:11pt;color:rgb(0,0,0)"><b>From:</b> Matthew Knepley <<a href="mailto:knepley@gmail.com" id="m_4321204284333071829OWA7ff217b3-e4cb-c19c-db5f-fb49846fd868" target="_blank">knepley@gmail.com</a>><br>
<b>Sent:</b> Wednesday, May 1, 2024 8:07 PM<br>
<b>To:</b> Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" id="m_4321204284333071829OWA6fa0d1ff-8ca4-9ca2-ec11-d7fd566a31ca" target="_blank">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="m_4321204284333071829OWA819daf86-0770-0632-e70c-21b121e8ec28" target="_blank">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="m_4321204284333071829OWA5bffea7c-f3eb-e407-ab96-b6695aa564db" target="_blank">petsc-users@mcs.anl.gov</a>><br>
<b>Subject:</b> [EXTERNAL] Re: [petsc-users] Is there anything like a "DMPlexSetCones()" ?</span>
<div> </div>
</div>
<table style="direction:ltr;text-align:left;line-height:1.5;border-color:rgb(136,136,136);border-style:solid;border-width:1px;background-color:rgb(255,235,156);width:100%;min-width:100%;color:black;box-sizing:border-box;border-collapse:collapse;border-spacing:0px">
<tbody>
<tr>
<td style="direction:ltr;text-align:left;line-height:1.5;padding:5px 10px">
<div style="direction:ltr;text-align:left;line-height:1.5;font-family:Arial,sans-serif;font-size:14px">
<span style="color:rgb(214,0,0)"><b>CAUTION:</b></span><span style="color:black"> This email originated outside of Embry-Riddle Aeronautical University. Do not click links or open attachments unless you recognize the sender and know the content is safe.</span></div>
</td>
</tr>
</tbody>
</table>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">On Wed, May 1, 2024 at 3:34 PM Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" id="m_4321204284333071829OWA686272c1-974c-79a2-5a7d-093821d8f29b" target="_blank">FERRANJ2@my.erau.edu</a>> wrote:</div>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)">
<div dir="ltr" id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345pfptBanner5674lmf" style="display:block;text-align:left;margin:16px 0px;padding:8px 16px;border-radius:4px;min-width:200px;background-color:rgb(208,216,220);border-top:4px solid rgb(144,164,174);color:inherit">
<div id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345pfptBanner5674lmf" style="float:left;display:block;margin:0px 0px 1px;max-width:600px;color:inherit;background-color:inherit">
<div id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345pfptBanner5674lmf" style="display:block;background-color:rgb(208,216,220);color:rgb(0,0,0);font-family:Arial,sans-serif;font-weight:bold;font-size:14px;line-height:18px">
This Message Is From an External Sender</div>
<div id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345pfptBanner5674lmf" style="font-weight:normal;display:block;background-color:rgb(208,216,220);color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:12px;line-height:18px;margin-top:2px">
This message came from outside your organization.</div>
</div>
<div style="line-height:0;display:block;font-size:0.01px"> </div>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
Dear PETSc team:<br>
<br>
For a project that I'm working on, I need to manually build a DMPlex.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
>From studying the source code of the various APIs in which the plex is built from some supported file format, I get that the workflow is this:</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<ol style="direction:ltr;margin-top:0px;margin-bottom:0px" start="1">
<li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"1) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMPlexSetChart() <-- Input nCells + nVerts</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"2) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMPlexSetConeSize() <-- Input ConeSize for each point in [0,nCells)</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"3) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMSetUp() – Allocates memory internally.</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"4) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMPlexGetCones() --> Gives you the memory onto which to write the cell connectivity.</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"5) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
*Write connectivity*</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"6) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMPlexReorderCell() <-- For each point in [0,nCells)</div>
</li></ol>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
I'm in a situation where the memory given by step (4) is available a-priori.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
I was hoping to skip steps 2, 3 , and 4 with something like a "DMPlexSetCones()", but such an API does not exist.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
My current workaround is to implement steps 2 through 4 as always and have double the memory allocated in the interim (my instance + DM's internal instance).</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
I was thinking of looking for the name of the struct member and = it to my memory, but I can't overcome the flag check in DMSetUp() during later calls to DMPlexGetCones() or DMPlexGetTransitiveClosure().</div>
</blockquote>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">I do not understand the "flag check". What is that?</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">We could make a DMPlexSetCones(), but as you point out, the workflow for DMSetUp() would have to change. Where does the memory come from for your connectivity?</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">  Thanks,</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">    Matt</div>
<div style="direction:ltr"> </div>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)">
<div id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345Signature" style="color:inherit;background-color:inherit">
<div style="background-color:rgb(255,255,255);font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div dir="ltr" id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;background-color:inherit">
<p style="line-height:normal;background-color:white;margin:0px 0px 11px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">Sincerely:</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Courier New",monospace;font-size:14pt;color:red"><b><u>J.A. Ferrand</u></b></span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">Embry-Riddle Aeronautical University - Daytona Beach - FL<br>
Ph.D. Candidate, Aerospace Engineering</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">M.Sc. Aerospace Engineering</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">B.Sc. Aerospace Engineering</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">B.Sc. Computational Mathematics</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)"><br>
</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black"><u>Phone:</u> (386)-843-1829</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black"><u>Email(s):</u> <a href="mailto:ferranj2@my.erau.edu" id="m_4321204284333071829OWA8faa330b-6e0f-2880-3fd8-efb5ff4edcef" style="margin-top:0px;margin-bottom:0px" target="_blank">ferranj2@my.erau.edu</a></span></p>
<p style="text-indent:0.5in;line-height:normal;background-color:white;margin:0px">
<span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">   
<a href="mailto:jesus.ferrand@gmail.com" id="m_4321204284333071829OWAf553f1ad-bd14-ca87-84a0-5920067e7250" style="margin-top:0px;margin-bottom:0px" target="_blank">
jesus.ferrand@gmail.com</a></span></p>
</div>
</div>
</blockquote>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">--</div>
<div style="direction:ltr">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr"><a href="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowmj1eqYm$" id="m_4321204284333071829OWA14d2e185-712c-935d-4b10-76850ee49d7a" target="_blank">https://www.cse.buffalo.edu/~knepley/</a></div>
<div id="m_4321204284333071829x_m_478286811837034506x_appendonsend" style="color:inherit;background-color:inherit">
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="direction:ltr;display:inline-block;width:98%">
<div id="m_4321204284333071829x_m_478286811837034506x_divRplyFwdMsg" dir="ltr" style="color:inherit;background-color:inherit">
<span style="font-family:Calibri,sans-serif;font-size:11pt;color:rgb(0,0,0)"><b>From:</b> Matthew Knepley <<a href="mailto:knepley@gmail.com" id="m_4321204284333071829OWA513c6de5-fdbd-f146-b489-2733230de447" target="_blank">knepley@gmail.com</a>><br>
<b>Sent:</b> Wednesday, May 1, 2024 8:07 PM<br>
<b>To:</b> Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" id="m_4321204284333071829OWAbf5867b0-c3f6-ce5b-7c3a-98f66b7405dd" target="_blank">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="m_4321204284333071829OWAf92d5b1c-7a59-da27-6007-9d9754649686" target="_blank">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="m_4321204284333071829OWA310f90a4-b30c-0354-8970-3b6dfce56477" target="_blank">petsc-users@mcs.anl.gov</a>><br>
<b>Subject:</b> [EXTERNAL] Re: [petsc-users] Is there anything like a "DMPlexSetCones()" ?</span>
<div> </div>
</div>
<table style="direction:ltr;text-align:left;line-height:1.5;border-color:rgb(136,136,136);border-style:solid;border-width:1px;background-color:rgb(255,235,156);width:100%;min-width:100%;color:black;box-sizing:border-box;border-collapse:collapse;border-spacing:0px">
<tbody>
<tr>
<td style="direction:ltr;text-align:left;line-height:1.5;padding:5px 10px">
<div style="direction:ltr;text-align:left;line-height:1.5;font-family:Arial,sans-serif;font-size:14px">
<span style="color:rgb(214,0,0)"><b>CAUTION:</b></span><span style="color:black"> This email originated outside of Embry-Riddle Aeronautical University. Do not click links or open attachments unless you recognize the sender and know the content is safe.</span></div>
</td>
</tr>
</tbody>
</table>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">On Wed, May 1, 2024 at 3:34 PM Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" id="m_4321204284333071829OWA8198e914-06a6-d8be-c49a-ca762d8d8685" target="_blank">FERRANJ2@my.erau.edu</a>> wrote:</div>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)">
<div dir="ltr" id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345pfptBanner5674lmf" style="display:block;text-align:left;margin:16px 0px;padding:8px 16px;border-radius:4px;min-width:200px;background-color:rgb(208,216,220);border-top:4px solid rgb(144,164,174);color:inherit">
<div id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345pfptBanner5674lmf" style="float:left;display:block;margin:0px 0px 1px;max-width:600px;color:inherit;background-color:inherit">
<div id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345pfptBanner5674lmf" style="display:block;background-color:rgb(208,216,220);color:rgb(0,0,0);font-family:Arial,sans-serif;font-weight:bold;font-size:14px;line-height:18px">
This Message Is From an External Sender</div>
<div id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345pfptBanner5674lmf" style="font-weight:normal;display:block;background-color:rgb(208,216,220);color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:12px;line-height:18px;margin-top:2px">
This message came from outside your organization.</div>
</div>
<div style="line-height:0;display:block;font-size:0.01px"> </div>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
Dear PETSc team:<br>
<br>
For a project that I'm working on, I need to manually build a DMPlex.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
>From studying the source code of the various APIs in which the plex is built from some supported file format, I get that the workflow is this:</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<ol style="direction:ltr;margin-top:0px;margin-bottom:0px" start="1">
<li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"1) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMPlexSetChart() <-- Input nCells + nVerts</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"2) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMPlexSetConeSize() <-- Input ConeSize for each point in [0,nCells)</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"3) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMSetUp() – Allocates memory internally.</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"4) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMPlexGetCones() --> Gives you the memory onto which to write the cell connectivity.</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"5) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
*Write connectivity*</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"6) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMPlexReorderCell() <-- For each point in [0,nCells)</div>
</li></ol>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
I'm in a situation where the memory given by step (4) is available a-priori.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
I was hoping to skip steps 2, 3 , and 4 with something like a "DMPlexSetCones()", but such an API does not exist.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
My current workaround is to implement steps 2 through 4 as always and have double the memory allocated in the interim (my instance + DM's internal instance).</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
I was thinking of looking for the name of the struct member and = it to my memory, but I can't overcome the flag check in DMSetUp() during later calls to DMPlexGetCones() or DMPlexGetTransitiveClosure().</div>
</blockquote>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">I do not understand the "flag check". What is that?</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">We could make a DMPlexSetCones(), but as you point out, the workflow for DMSetUp() would have to change. Where does the memory come from for your connectivity?</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">  Thanks,</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">    Matt</div>
<div style="direction:ltr"> </div>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)">
<div id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345Signature" style="color:inherit;background-color:inherit">
<div style="background-color:rgb(255,255,255);font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div dir="ltr" id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;background-color:inherit">
<p style="line-height:normal;background-color:white;margin:0px 0px 11px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">Sincerely:</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Courier New",monospace;font-size:14pt;color:red"><b><u>J.A. Ferrand</u></b></span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">Embry-Riddle Aeronautical University - Daytona Beach - FL<br>
Ph.D. Candidate, Aerospace Engineering</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">M.Sc. Aerospace Engineering</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">B.Sc. Aerospace Engineering</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">B.Sc. Computational Mathematics</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)"><br>
</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black"><u>Phone:</u> (386)-843-1829</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black"><u>Email(s):</u> <a href="mailto:ferranj2@my.erau.edu" id="m_4321204284333071829OWA3a2eab63-ee7c-8153-259b-19dff0dcff01" style="margin-top:0px;margin-bottom:0px" target="_blank">ferranj2@my.erau.edu</a></span></p>
<p style="text-indent:0.5in;line-height:normal;background-color:white;margin:0px">
<span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">   
<a href="mailto:jesus.ferrand@gmail.com" id="m_4321204284333071829OWAb39c1933-7cee-b9f0-a733-73213238632a" style="margin-top:0px;margin-bottom:0px" target="_blank">
jesus.ferrand@gmail.com</a></span></p>
</div>
</div>
</blockquote>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">--</div>
<div style="direction:ltr">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr"><a href="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowmj1eqYm$" id="m_4321204284333071829OWA37e9868e-7d5d-1428-c057-fd60e407105a" target="_blank">https://www.cse.buffalo.edu/~knepley/</a></div>
</blockquote>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">--</div>
<div style="direction:ltr">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr"><a href="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowmj1eqYm$" id="m_4321204284333071829OWA2545c66d-816d-63b9-757f-3be2337e9222" target="_blank">https://www.cse.buffalo.edu/~knepley/</a></div>
<div id="m_4321204284333071829appendonsend" style="color:inherit;background-color:inherit"></div>
<div style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_4321204284333071829divRplyFwdMsg" dir="ltr" style="color:inherit;background-color:inherit">
<span style="font-family:Calibri,sans-serif;font-size:11pt;color:rgb(0,0,0)"><b>From:</b> Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>><br>
<b>Sent:</b> Wednesday, May 1, 2024 8:52 PM<br>
<b>To:</b> Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" target="_blank">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>><br>
<b>Subject:</b> Re: [EXTERNAL] Re: [petsc-users] Is there anything like a "DMPlexSetCones()" ?</span>
<div> </div>
</div>
<div style="direction:ltr">On Wed, May 1, 2024 at 4:23 PM Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" id="m_4321204284333071829OWAbae7a098-4c6f-5008-bfb9-7a173cda274f" target="_blank">FERRANJ2@my.erau.edu</a>> wrote:</div>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
Matt:<br>
<br>
My bad again, I need to clarify something that I just realized doesn't make sense.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
I said: "The nature of the I/O makes it so that I need to read the connectivity before I get a semblance of buffer sizes."</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
Scratch that, obviously, if I can read the connectivity, I know the buffer sizes.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
What I should have said is that I cannot know the "chart" that one sets in DMPlexSetChart() a priori like in most cases.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
I need to determine the chart from the connectivity lists.</div>
</blockquote>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">You know the number of cells if you can read connectivity. Do you mean that the format does not tell you</div>
<div style="direction:ltr">the number of vertices?</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">  Thanks,</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">    Matt</div>
<div style="direction:ltr"> </div>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)">
<hr style="direction:ltr;display:inline-block;width:98%">
<div id="m_4321204284333071829x_m_478286811837034506divRplyFwdMsg" dir="ltr" style="color:inherit;background-color:inherit">
<span style="font-family:Calibri,sans-serif;font-size:11pt;color:rgb(0,0,0)"><b>From:</b> Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" id="m_4321204284333071829OWA9aadafab-c6e2-466e-ceda-0c9b25b999a7" target="_blank">FERRANJ2@my.erau.edu</a>><br>
<b>Sent:</b> Wednesday, May 1, 2024 8:17 PM<br>
<b>To:</b> Matthew Knepley <<a href="mailto:knepley@gmail.com" id="m_4321204284333071829OWAd2a1129e-c76a-5f33-b7ae-e9f0147540c2" target="_blank">knepley@gmail.com</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="m_4321204284333071829OWA5b70e2ff-3a09-145d-0953-77d59d5a65be" target="_blank">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="m_4321204284333071829OWA1701cb67-d7c5-5514-ae4c-5de8f6cd1dd8" target="_blank">petsc-users@mcs.anl.gov</a>><br>
<b>Subject:</b> Re: [EXTERNAL] Re: [petsc-users] Is there anything like a "DMPlexSetCones()" ?</span>
<div> </div>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
Matt:</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
"I do not understand the "flag check". What is that?"</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
      My bad, I should have referred to the "dm->setupcalled".<br>
      I believe this PetscBool is checked by the other DM (not just DMPlex) APIs.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
      The subsequent checks for dm->setupcalled == PETSC_TRUE is what I meant to say.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
      Here's a copy of DMSetUp().</div>
<pre style="width:80px"><div style="direction:ltr;margin-right:80px;margin-left:80px;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)"><b><a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscErrorCode/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowpJ3s88P$" id="m_4321204284333071829OWAb91cbd99-2679-bc8b-0953-84120ba52a95" target="_blank">PetscErrorCode</a> <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/DM/DMSetUp/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowpy3zGSd$" id="m_4321204284333071829OWA9ca16e63-d615-cd91-58a0-0cabfab7706d" target="_blank">DMSetUp</a>(<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/DM/DM/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowt_sd2eh$" id="m_4321204284333071829OWA27e17768-5be6-6fb4-70b0-764b9b1ad8af" target="_blank">DM</a> dm)</b>
817: {
818:   <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscFunctionBegin/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowuMbcxmD$" id="m_4321204284333071829OWA27dcabe7-e220-5818-6476-b5c03828fdcc" target="_blank">PetscFunctionBegin</a>;
820:   if (dm->setupcalled) <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscFunctionReturn/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowhC986W-$" id="m_4321204284333071829OWA77b93fee-6e88-c5d8-a844-775fb2aaa1e3" target="_blank">PetscFunctionReturn</a>(<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscErrorCode/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowpJ3s88P$" id="m_4321204284333071829OWAbc8923dd-b93c-7c79-ccf8-34dff27ae997" target="_blank">PETSC_SUCCESS</a>);
821:   <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscTryTypeMethod/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowrbaxERF$" id="m_4321204284333071829OWA4fbdab8a-44a4-237e-d2a6-2478d092526f" target="_blank">PetscTryTypeMethod</a>(dm, setup);
822:   dm->setupcalled = <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PETSC_TRUE/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowoILDY_P$" id="m_4321204284333071829OWA084e0dcf-c5be-ed8a-f9b3-726561cb4a43" target="_blank">PETSC_TRUE</a>;
823:   <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscFunctionReturn/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowhC986W-$" id="m_4321204284333071829OWA6e8093f0-c27d-a394-5936-a0fdde5e9c56" target="_blank">PetscFunctionReturn</a>(<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscErrorCode/__;!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowpJ3s88P$" id="m_4321204284333071829OWA7d46889a-8b6d-4b10-0953-c3f76f69f4c0" target="_blank">PETSC_SUCCESS</a>);
824: }</div></pre>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
"We could make a DMPlexSetCones(), but as you point out, the workflow for DMSetUp() would have to change. Where does the memory come from for your connectivity?"</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
      It's a memory that I myself allocate based on a file's contents.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
      The nature of the I/O makes it so that I need to read the connectivity before I get a semblance of buffer sizes.<br>
      Otherwise, I would stick to the tried and tested way.<br>
<br>
Also, when replying to the PETSc developers, users must reply to <a href="mailto:petsc-users@mcs.anl.gov" id="m_4321204284333071829OWA339594d1-e339-8a55-9ebb-5cd0bae29f05" target="_blank">
petsc-users@mcs.anl.gov</a> and not just to the individual email accounts of the developers, right?</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div id="m_4321204284333071829x_m_478286811837034506x_appendonsend" style="color:inherit;background-color:inherit">
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="direction:ltr;display:inline-block;width:98%">
<div id="m_4321204284333071829x_m_478286811837034506x_divRplyFwdMsg" dir="ltr" style="color:inherit;background-color:inherit">
<span style="font-family:Calibri,sans-serif;font-size:11pt;color:rgb(0,0,0)"><b>From:</b> Matthew Knepley <<a href="mailto:knepley@gmail.com" id="m_4321204284333071829OWAe968c95f-4a27-8020-c5ff-982cf264c054" target="_blank">knepley@gmail.com</a>><br>
<b>Sent:</b> Wednesday, May 1, 2024 8:07 PM<br>
<b>To:</b> Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" id="m_4321204284333071829OWAce540ff9-0219-c249-4bfb-159aa501b174" target="_blank">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="m_4321204284333071829OWA1cb5fa76-732c-2da4-6a2c-9351519482f3" target="_blank">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="m_4321204284333071829OWA75d90c20-73e5-652b-bf68-067304c00584" target="_blank">petsc-users@mcs.anl.gov</a>><br>
<b>Subject:</b> [EXTERNAL] Re: [petsc-users] Is there anything like a "DMPlexSetCones()" ?</span>
<div> </div>
</div>
<table style="direction:ltr;text-align:left;line-height:1.5;border-color:rgb(136,136,136);border-style:solid;border-width:1px;background-color:rgb(255,235,156);width:100%;min-width:100%;color:black;box-sizing:border-box;border-collapse:collapse;border-spacing:0px">
<tbody>
<tr>
<td style="direction:ltr;text-align:left;line-height:1.5;padding:5px 10px">
<div style="direction:ltr;text-align:left;line-height:1.5;font-family:Arial,sans-serif;font-size:14px">
<span style="color:rgb(214,0,0)"><b>CAUTION:</b></span><span style="color:black"> This email originated outside of Embry-Riddle Aeronautical University. Do not click links or open attachments unless you recognize the sender and know the content is safe.</span></div>
</td>
</tr>
</tbody>
</table>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">On Wed, May 1, 2024 at 3:34 PM Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" id="m_4321204284333071829OWAe7f4bcdd-5a0f-f2da-0675-f70677ee9c1e" target="_blank">FERRANJ2@my.erau.edu</a>> wrote:</div>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)">
<div dir="ltr" id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345pfptBanner5674lmf" style="display:block;text-align:left;margin:16px 0px;padding:8px 16px;border-radius:4px;min-width:200px;background-color:rgb(208,216,220);border-top:4px solid rgb(144,164,174);color:inherit">
<div id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345pfptBanner5674lmf" style="float:left;display:block;margin:0px 0px 1px;max-width:600px;color:inherit;background-color:inherit">
<div id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345pfptBanner5674lmf" style="display:block;background-color:rgb(208,216,220);color:rgb(0,0,0);font-family:Arial,sans-serif;font-weight:bold;font-size:14px;line-height:18px">
This Message Is From an External Sender</div>
<div id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345pfptBanner5674lmf" style="font-weight:normal;display:block;background-color:rgb(208,216,220);color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:12px;line-height:18px;margin-top:2px">
This message came from outside your organization.</div>
</div>
<div style="line-height:0;display:block;font-size:0.01px"> </div>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
Dear PETSc team:<br>
<br>
For a project that I'm working on, I need to manually build a DMPlex.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
>From studying the source code of the various APIs in which the plex is built from some supported file format, I get that the workflow is this:</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<ol style="direction:ltr;margin-top:0px;margin-bottom:0px" start="1">
<li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"1) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMPlexSetChart() <-- Input nCells + nVerts</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"2) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMPlexSetConeSize() <-- Input ConeSize for each point in [0,nCells)</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"3) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMSetUp() – Allocates memory internally.</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"4) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMPlexGetCones() --> Gives you the memory onto which to write the cell connectivity.</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"5) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
*Write connectivity*</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"6) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMPlexReorderCell() <-- For each point in [0,nCells)</div>
</li></ol>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
I'm in a situation where the memory given by step (4) is available a-priori.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
I was hoping to skip steps 2, 3 , and 4 with something like a "DMPlexSetCones()", but such an API does not exist.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
My current workaround is to implement steps 2 through 4 as always and have double the memory allocated in the interim (my instance + DM's internal instance).</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
I was thinking of looking for the name of the struct member and = it to my memory, but I can't overcome the flag check in DMSetUp() during later calls to DMPlexGetCones() or DMPlexGetTransitiveClosure().</div>
</blockquote>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">I do not understand the "flag check". What is that?</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">We could make a DMPlexSetCones(), but as you point out, the workflow for DMSetUp() would have to change. Where does the memory come from for your connectivity?</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">  Thanks,</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">    Matt</div>
<div style="direction:ltr"> </div>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)">
<div id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345Signature" style="color:inherit;background-color:inherit">
<div style="background-color:rgb(255,255,255);font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div dir="ltr" id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;background-color:inherit">
<p style="line-height:normal;background-color:white;margin:0px 0px 11px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">Sincerely:</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Courier New",monospace;font-size:14pt;color:red"><b><u>J.A. Ferrand</u></b></span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">Embry-Riddle Aeronautical University - Daytona Beach - FL<br>
Ph.D. Candidate, Aerospace Engineering</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">M.Sc. Aerospace Engineering</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">B.Sc. Aerospace Engineering</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">B.Sc. Computational Mathematics</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)"><br>
</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black"><u>Phone:</u> (386)-843-1829</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black"><u>Email(s):</u> <a href="mailto:ferranj2@my.erau.edu" id="m_4321204284333071829OWA10dfda44-db14-5791-4b4c-f66aa929406b" style="margin-top:0px;margin-bottom:0px" target="_blank">ferranj2@my.erau.edu</a></span></p>
<p style="text-indent:0.5in;line-height:normal;background-color:white;margin:0px">
<span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">   
<a href="mailto:jesus.ferrand@gmail.com" id="m_4321204284333071829OWA7a99b8ad-8961-852f-8abe-e15037c374e1" style="margin-top:0px;margin-bottom:0px" target="_blank">
jesus.ferrand@gmail.com</a></span></p>
</div>
</div>
</blockquote>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">--</div>
<div style="direction:ltr">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr"><a href="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowmj1eqYm$" id="m_4321204284333071829OWA0b68485c-55d2-b655-4d60-a4421f432788" target="_blank">https://www.cse.buffalo.edu/~knepley/</a></div>
<div id="m_4321204284333071829x_m_478286811837034506x_appendonsend" style="color:inherit;background-color:inherit">
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="direction:ltr;display:inline-block;width:98%">
<div id="m_4321204284333071829x_m_478286811837034506x_divRplyFwdMsg" dir="ltr" style="color:inherit;background-color:inherit">
<span style="font-family:Calibri,sans-serif;font-size:11pt;color:rgb(0,0,0)"><b>From:</b> Matthew Knepley <<a href="mailto:knepley@gmail.com" id="m_4321204284333071829OWAc6404b52-5c53-a92a-0546-de24f2e4c799" target="_blank">knepley@gmail.com</a>><br>
<b>Sent:</b> Wednesday, May 1, 2024 8:07 PM<br>
<b>To:</b> Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" id="m_4321204284333071829OWAb310d2eb-d412-07b6-98c1-c85ed99c74f8" target="_blank">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="m_4321204284333071829OWA60dcfb09-a0d6-4c39-eaa3-2675ae5d7f2d" target="_blank">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="m_4321204284333071829OWA36724de3-66bf-71c9-7d73-e9eba39860b0" target="_blank">petsc-users@mcs.anl.gov</a>><br>
<b>Subject:</b> [EXTERNAL] Re: [petsc-users] Is there anything like a "DMPlexSetCones()" ?</span>
<div> </div>
</div>
<table style="direction:ltr;text-align:left;line-height:1.5;border-color:rgb(136,136,136);border-style:solid;border-width:1px;background-color:rgb(255,235,156);width:100%;min-width:100%;color:black;box-sizing:border-box;border-collapse:collapse;border-spacing:0px">
<tbody>
<tr>
<td style="direction:ltr;text-align:left;line-height:1.5;padding:5px 10px">
<div style="direction:ltr;text-align:left;line-height:1.5;font-family:Arial,sans-serif;font-size:14px">
<span style="color:rgb(214,0,0)"><b>CAUTION:</b></span><span style="color:black"> This email originated outside of Embry-Riddle Aeronautical University. Do not click links or open attachments unless you recognize the sender and know the content is safe.</span></div>
</td>
</tr>
</tbody>
</table>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">On Wed, May 1, 2024 at 3:34 PM Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" id="m_4321204284333071829OWA6eda1f9c-1443-7e09-0b6e-ec89ba398926" target="_blank">FERRANJ2@my.erau.edu</a>> wrote:</div>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)">
<div dir="ltr" id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345pfptBanner5674lmf" style="display:block;text-align:left;margin:16px 0px;padding:8px 16px;border-radius:4px;min-width:200px;background-color:rgb(208,216,220);border-top:4px solid rgb(144,164,174);color:inherit">
<div id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345pfptBanner5674lmf" style="float:left;display:block;margin:0px 0px 1px;max-width:600px;color:inherit;background-color:inherit">
<div id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345pfptBanner5674lmf" style="display:block;background-color:rgb(208,216,220);color:rgb(0,0,0);font-family:Arial,sans-serif;font-weight:bold;font-size:14px;line-height:18px">
This Message Is From an External Sender</div>
<div id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345pfptBanner5674lmf" style="font-weight:normal;display:block;background-color:rgb(208,216,220);color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:12px;line-height:18px;margin-top:2px">
This message came from outside your organization.</div>
</div>
<div style="line-height:0;display:block;font-size:0.01px"> </div>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
Dear PETSc team:<br>
<br>
For a project that I'm working on, I need to manually build a DMPlex.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
>From studying the source code of the various APIs in which the plex is built from some supported file format, I get that the workflow is this:</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<ol style="direction:ltr;margin-top:0px;margin-bottom:0px" start="1">
<li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"1) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMPlexSetChart() <-- Input nCells + nVerts</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"2) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMPlexSetConeSize() <-- Input ConeSize for each point in [0,nCells)</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"3) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMSetUp() – Allocates memory internally.</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"4) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMPlexGetCones() --> Gives you the memory onto which to write the cell connectivity.</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"5) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
*Write connectivity*</div>
</li><li style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"6) "">
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
DMPlexReorderCell() <-- For each point in [0,nCells)</div>
</li></ol>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
I'm in a situation where the memory given by step (4) is available a-priori.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
I was hoping to skip steps 2, 3 , and 4 with something like a "DMPlexSetCones()", but such an API does not exist.</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
My current workaround is to implement steps 2 through 4 as always and have double the memory allocated in the interim (my instance + DM's internal instance).</div>
<div style="direction:ltr;font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
I was thinking of looking for the name of the struct member and = it to my memory, but I can't overcome the flag check in DMSetUp() during later calls to DMPlexGetCones() or DMPlexGetTransitiveClosure().</div>
</blockquote>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">I do not understand the "flag check". What is that?</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">We could make a DMPlexSetCones(), but as you point out, the workflow for DMSetUp() would have to change. Where does the memory come from for your connectivity?</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">  Thanks,</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">    Matt</div>
<div style="direction:ltr"> </div>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)">
<div id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345Signature" style="color:inherit;background-color:inherit">
<div style="background-color:rgb(255,255,255);font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div dir="ltr" id="m_4321204284333071829x_m_478286811837034506x_x_m_-2907562466910451345divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;background-color:inherit">
<p style="line-height:normal;background-color:white;margin:0px 0px 11px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">Sincerely:</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Courier New",monospace;font-size:14pt;color:red"><b><u>J.A. Ferrand</u></b></span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">Embry-Riddle Aeronautical University - Daytona Beach - FL<br>
Ph.D. Candidate, Aerospace Engineering</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">M.Sc. Aerospace Engineering</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">B.Sc. Aerospace Engineering</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">B.Sc. Computational Mathematics</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:rgb(0,0,0)"><br>
</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black"><u>Phone:</u> (386)-843-1829</span></p>
<p style="line-height:normal;background-color:white;margin:0px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black"><u>Email(s):</u> <a href="mailto:ferranj2@my.erau.edu" id="m_4321204284333071829OWAb86e728d-82be-033e-4ea4-dac95127fb6b" style="margin-top:0px;margin-bottom:0px" target="_blank">ferranj2@my.erau.edu</a></span></p>
<p style="text-indent:0.5in;line-height:normal;background-color:white;margin:0px">
<span style="font-family:"Times New Roman",Times,serif;font-size:12pt;color:black">   
<a href="mailto:jesus.ferrand@gmail.com" id="m_4321204284333071829OWA63525edd-c72b-477c-c7d9-396e9a635e10" style="margin-top:0px;margin-bottom:0px" target="_blank">
jesus.ferrand@gmail.com</a></span></p>
</div>
</div>
</blockquote>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">--</div>
<div style="direction:ltr">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr"><a href="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowmj1eqYm$" id="m_4321204284333071829OWAc24de83e-e209-7bfe-d9ee-2c577fc6b094" target="_blank">https://www.cse.buffalo.edu/~knepley/</a></div>
</blockquote>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">--</div>
<div style="direction:ltr">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr"><a href="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowmj1eqYm$" id="m_4321204284333071829OWA93d565d6-f122-78a2-d9aa-9caadaa89d3b" target="_blank">https://www.cse.buffalo.edu/~knepley/</a></div>
</div>

</div></blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!e603Zn0jXSCVvzNnzzRiius-0-C5jw6GGzCOFJ7EW5nKTGdX8aI6qchOlBW23rM9TlwMTiidfBsowmj1eqYm$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>