<!-- 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;">
"The cone sizes are used to allocate the array to hold the cones. How would you have an array holding the cone information without knowing the sizes?" You're right, I must first know the sizes (which I determine from the file). It
</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="pfptBanner5hlmbro" 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="pfptBanner5hlmbro" style="all: unset !important; float:left !important; display:block !important; margin: 0px 0px 1px 0px !important; max-width: 600px !important;">
<div id="pfptBanner5hlmbro" 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="pfptBanner5hlmbro" 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 -->
<html>
<head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
#pfptBanner5hlmbro { all: revert !important; display: block !important;
visibility: visible !important; opacity: 1 !important;
background-color: #D0D8DC !important;
max-width: none !important; max-height: none !important }
.pfptPrimaryButton5hlmbro:hover, .pfptPrimaryButton5hlmbro:focus {
background-color: #b4c1c7 !important; }
.pfptPrimaryButton5hlmbro:active {
background-color: #90a4ae !important; }
</style>
<!-- BaNnErBlUrFlE-HeAdEr-end -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: "Times New Roman", Times, serif; font-size: 12pt; color: rgb(0, 0, 0);">
"The cone sizes are used to allocate the array to hold the cones. How would you have an array holding the cone information without knowing the sizes?"</div>
<div class="elementToProof" style="font-family: "Times New Roman", Times, serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Times New Roman", Times, serif; font-size: 12pt; color: rgb(0, 0, 0);">
You're right, I must first know the sizes (which I determine from the file).</div>
<div class="elementToProof" style="font-family: "Times New Roman", Times, serif; font-size: 12pt; color: rgb(0, 0, 0);">
It lists the number of cells and their types by sequential chunks.</div>
<div class="elementToProof" style="font-family: "Times New Roman", Times, serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Times New Roman", Times, serif; font-size: 12pt; color: rgb(0, 0, 0);">
The issue I am trying to describe, is that because I cannot know the number of local vertices a priori, the pipeline DMSetChart()->DMPlexSetConeSize()->DMSetUp() essentially produces a redundant array (because I already have the connectivity that I read
from the file).</div>
<div class="elementToProof" style="font-family: "Times New Roman", Times, serif; font-size: 12pt; color: rgb(0, 0, 0);">
As far as I can tell, in my case, the end result of calling these APIs is already available, hence my wish for a "DMPlexSetCones()".</div>
<div class="elementToProof" style="font-family: "Times New Roman", Times, serif; font-size: 12pt; color: rgb(0, 0, 0);">
If such an API existed, I would then attempt to retroactively set the Chart and the ConeSizes.</div>
<div class="elementToProof" style="font-family: "Times New Roman", Times, serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
Like you hinted in a reply, for this extra array to be worthwhile, I would have to keep it as a global numbering list (which I want to by the way).<br>
I was hoping to at least keep them in the DM's global PetscSection as offsets.</div>
<div class="elementToProof" style="font-family: "Times New Roman", Times, serif; font-size: 12pt; color: rgb(0, 0, 0);">
Unfortunately, PetscSection has a similar workflow to DM: PetscSectionSetChart(), PetscSectionAddDof(), PetscSectionSetUp(), PetscSectionSetOffset().</div>
<div class="elementToProof" style="font-family: "Times New Roman", Times, serif; font-size: 12pt; color: rgb(0, 0, 0);">
</div>
<div id="appendonsend" 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="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 <knepley@gmail.com><br>
<b>Sent:</b> Monday, May 6, 2024 7:52 AM<br>
<b>To:</b> Ferrand, Jesus A. <FERRANJ2@my.erau.edu><br>
<b>Cc:</b> petsc-users@mcs.anl.gov <petsc-users@mcs.anl.gov><br>
<b>Subject:</b> Re: [EXTERNAL] Re: [petsc-users] Is there anything like a "DMPlexSetCones()" ?</span>
<div> </div>
</div>
<div style="direction: ltr;">On Fri, May 3, 2024 at 7:32 PM Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" id="OWA46efca77-f64e-9987-4f21-d6db275954f6" class="OWAAutoLink" data-loopstyle="linkonly">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);">
"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 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);">
True, the connectivity is read in global numbering.</div>
<div style="direction: ltr; font-family: "Times New Roman", Times, serif; font-size: 12pt; color: rgb(0, 0, 0);">
Renumbering is facilitated by the table from PetscHashSetI.<br>
The connectivity list I am able to renumber in place though, I don't see the need to have another interim copy of the numbers.</div>
<div style="direction: ltr; font-family: "Times New Roman", Times, serif; font-size: 12pt; color: rgb(0, 0, 0);">
My concern is that I have two memory chunks that both contain the same information.<br>
The only reason It has to be this way is because I can't manually set the Cones first and the Chart/ConeSizes second.</div>
</blockquote>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">The cone sizes are used to allocate the array to hold the cones. How would you have an array holding the cone information without knowing the sizes?</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="x_m_-6243239857549940670divRplyFwdMsg" 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="OWAfcb40646-e7c7-211f-5b95-b5ce31346626" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>><br>
<b>Sent:</b> Friday, May 3, 2024 6:45 PM<br>
<b>To:</b> Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" id="OWA6215e956-3f24-bd6c-0411-2e9a5091c0e5" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA32468a01-bbe8-8242-e432-c878c4a0f425" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA35fb1623-6430-d3fe-b4d0-427debafab89" class="OWAAutoLink" data-loopstyle="linkonly">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 6:30 PM Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" id="OWA13a9548f-3ec8-f60a-9bc6-48b7e4f4eb8c" class="OWAAutoLink" data-loopstyle="linkonly">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);">
"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>
</blockquote>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">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 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="x_m_-6243239857549940670x_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" id="OWA5bb1b16f-a765-bfa6-809d-d01fcec382c9" class="OWAAutoLink" data-loopstyle="linkonly">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" id="OWA1a1f42b1-720a-3bfb-ac33-0ae2c063e717" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWAa238d504-120c-daeb-17ba-af9cc86b33e1" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA1b3ef072-b37f-77df-a44e-8e12deaeea75" class="OWAAutoLink" data-loopstyle="linkonly">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="OWA7f0a0659-ea5f-972a-b711-0edabf7a106b" class="OWAAutoLink" data-loopstyle="linkonly">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="x_m_-6243239857549940670x_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="OWA37436d7b-7c01-f1c6-0b55-7755bb4b567f" class="OWAAutoLink" data-loopstyle="linkonly">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="OWAd36c8432-2e09-34eb-59c0-10a3557160e9" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWAdbd3ad8d-9241-0b5d-01a5-329c8d94a854" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA88047065-45e2-ded4-f4b4-f3331766095b" class="OWAAutoLink" data-loopstyle="linkonly">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!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-BV3mYuw$" id="OWAf89a9261-21d5-5847-ad89-4743843e070a" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscErrorCode</a> <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/DM/DMSetUp/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-CMnaFo8$" id="OWAfaa16359-1502-4cbf-a1de-1c31450fe22f" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">DMSetUp</a>(<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/DM/DM/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-UUpirwU$" id="OWAf2b1bddd-f9af-9744-acb0-dda7c2170264" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">DM</a> dm)</b>
817: {
818: <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscFunctionBegin/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-YcDnMyU$" id="OWA1f3d815a-0db7-441d-487b-d228a084fe60" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscFunctionBegin</a>;
820: if (dm->setupcalled) <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscFunctionReturn/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-IHg61OE$" id="OWA1e126263-e10e-a418-1aee-372c95f150eb" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscFunctionReturn</a>(<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscErrorCode/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-BV3mYuw$" id="OWA2da831fb-c4f5-499a-ae5a-eb0b9bd08271" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PETSC_SUCCESS</a>);
821: <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscTryTypeMethod/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD--roQk-8$" id="OWAb3892a0a-a003-2429-4209-efb0c9f2a238" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscTryTypeMethod</a>(dm, setup);
822: dm->setupcalled = <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PETSC_TRUE/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-6I9S4aE$" id="OWA5b359f8b-614c-a4ee-08de-891a43ab6743" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PETSC_TRUE</a>;
823: <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscFunctionReturn/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-IHg61OE$" id="OWA3b17032c-1c81-43ed-46e0-3963b026b6ab" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscFunctionReturn</a>(<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscErrorCode/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-BV3mYuw$" id="OWA50468dcc-17d6-dbef-c362-e942e1d64238" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">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="OWA298ba131-3f78-0251-0e41-ed76cd483866" class="OWAAutoLink" data-loopstyle="linkonly">
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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="OWA2e5f0868-e528-264b-f74a-5ea7b97af5b3" class="OWAAutoLink" data-loopstyle="linkonly">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="OWA4ef3ba12-d4f8-deb7-28e0-993243d7df39" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA6a371fb3-1b91-0105-f4de-dfb8ea30b75b" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA15fd51fa-b2b6-02ea-fb0e-7c0e090d6bcc" class="OWAAutoLink" data-loopstyle="linkonly">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="OWAe6cca7b5-84f0-7c58-e4b7-733595590b86" class="OWAAutoLink" data-loopstyle="linkonly">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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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;" data-listchain="__List_Chain_4104" 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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="OWA9ae2ec0c-3c75-f5cb-085f-9d37a0440343" class="OWAAutoLink" style="margin-top: 0px; margin-bottom: 0px;" data-loopstyle="linkonly">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="OWAd794d8cd-d897-9653-04e5-f3bdc4fca3ea" class="OWAAutoLink" style="margin-top: 0px; margin-bottom: 0px;" data-loopstyle="linkonly">
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!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-kBIt_QE$" id="OWAc366cd0d-a14a-056c-287b-423d2fb44847" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a></div>
<div id="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="OWAaf5f69e8-d5e2-b556-aa45-4f13f4764247" class="OWAAutoLink" data-loopstyle="linkonly">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="OWAf69437a0-7d32-c8e6-80c7-1197e68aafd4" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA59042de6-858f-81cc-f1b9-dc51e0f0440a" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA2de5221a-1c69-e383-0c63-3a3b481b4b1a" class="OWAAutoLink" data-loopstyle="linkonly">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="OWA797a611c-0bb1-7d1c-aa05-62804c54cdc8" class="OWAAutoLink" data-loopstyle="linkonly">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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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;" data-listchain="__List_Chain_4105" 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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="OWA4538fb85-421d-f6a7-1ee7-dfe58a1728a4" class="OWAAutoLink" style="margin-top: 0px; margin-bottom: 0px;" data-loopstyle="linkonly">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="OWAcedd2521-ed3a-7863-9346-563b22874e30" class="OWAAutoLink" style="margin-top: 0px; margin-bottom: 0px;" data-loopstyle="linkonly">
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!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-kBIt_QE$" id="OWA5cc5266b-58b4-3d71-1195-da2fe87c5fd7" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">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!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-kBIt_QE$" id="OWA6b1b9e86-4aad-fc7e-0b71-a5c151b5c3fa" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a></div>
<div id="x_m_-6243239857549940670x_m_4321204284333071829appendonsend" 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="x_m_-6243239857549940670x_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" id="OWA367a4169-b6b4-095d-aa85-4e825dc087b0" class="OWAAutoLink" data-loopstyle="linkonly">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" id="OWAbb39d4af-f0ce-b197-46a6-d0f547f4aa18" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA08b955f3-6684-17ab-07ee-572e36df18c7" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWAb48b4a04-b265-d723-3a74-b98b57247a23" class="OWAAutoLink" data-loopstyle="linkonly">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="OWA9b287bb0-1a89-23a2-5e29-9a941864fdb1" class="OWAAutoLink" data-loopstyle="linkonly">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="x_m_-6243239857549940670x_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="OWAce48149a-5115-4305-4664-901351cc76f7" class="OWAAutoLink" data-loopstyle="linkonly">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="OWA58e6bcc4-1adb-a2d7-eaf1-316ea0595207" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA4b2c0a1a-a246-9045-35b7-bb2784a78c47" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA566beea4-279d-e5ec-ceab-af38caa3fbfd" class="OWAAutoLink" data-loopstyle="linkonly">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!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-BV3mYuw$" id="OWA8ae44446-b458-fd4d-92c6-ef52dd2d9ef2" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscErrorCode</a> <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/DM/DMSetUp/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-CMnaFo8$" id="OWA2d7ae949-5600-946a-8627-7eb43c4f5579" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">DMSetUp</a>(<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/DM/DM/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-UUpirwU$" id="OWA6686cec4-7b26-65e4-b719-1da9e1dc4a85" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">DM</a> dm)</b>
817: {
818: <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscFunctionBegin/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-YcDnMyU$" id="OWA1f1b9965-d4d5-50ba-ae0b-3757f4583a83" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscFunctionBegin</a>;
820: if (dm->setupcalled) <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscFunctionReturn/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-IHg61OE$" id="OWA9a342309-f92e-9cef-0c3e-334dbc32a4e2" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscFunctionReturn</a>(<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscErrorCode/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-BV3mYuw$" id="OWAd0a58bf4-c150-67be-7d7b-30e4facd812d" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PETSC_SUCCESS</a>);
821: <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscTryTypeMethod/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD--roQk-8$" id="OWAa9f0829a-3ec3-7490-3aa8-c0171c824fb2" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscTryTypeMethod</a>(dm, setup);
822: dm->setupcalled = <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PETSC_TRUE/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-6I9S4aE$" id="OWA2b6eecb4-eebd-69a0-0d85-336b8306118d" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PETSC_TRUE</a>;
823: <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscFunctionReturn/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-IHg61OE$" id="OWAf3bad018-48c4-309f-f022-5a2ad37651cf" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscFunctionReturn</a>(<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscErrorCode/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-BV3mYuw$" id="OWA5017f57c-cc1b-7833-b4ba-fcc27005c6a9" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">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="OWAa50a314d-18e9-b84d-3097-83b71d449128" class="OWAAutoLink" data-loopstyle="linkonly">
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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="OWA800403dc-3666-2119-9e38-493b8baba987" class="OWAAutoLink" data-loopstyle="linkonly">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="OWA9b0e6d02-adc1-8e2d-e29e-2e460a7e4979" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA66a26bc2-4fc5-b3b1-ebc0-89f64538f210" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWAe93d40a4-2bc1-0833-214b-33816034241f" class="OWAAutoLink" data-loopstyle="linkonly">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="OWA2f1ab1d2-4169-319b-a2a5-ee74693c0115" class="OWAAutoLink" data-loopstyle="linkonly">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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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;" data-listchain="__List_Chain_4106" 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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="OWA64a7a7e4-1f6b-e5a0-caad-b0e8af557d56" class="OWAAutoLink" style="margin-top: 0px; margin-bottom: 0px;" data-loopstyle="linkonly">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="OWA39aaef78-f341-9178-9a21-6e23eefb06c3" class="OWAAutoLink" style="margin-top: 0px; margin-bottom: 0px;" data-loopstyle="linkonly">
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!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-kBIt_QE$" id="OWAf8699093-2ff2-d549-c10e-882eb9f26b62" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a></div>
<div id="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="OWAa7e7407f-6f85-0d38-d1da-0f0a5abdd119" class="OWAAutoLink" data-loopstyle="linkonly">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="OWAfcdd706e-c4c9-8d34-a53d-c592487c133f" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA96f223b4-6696-17f4-dca8-8f42a3019b5a" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA0e397d4e-ad1b-cc4d-6a6c-611dee8a4de9" class="OWAAutoLink" data-loopstyle="linkonly">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="OWA655ed92b-d807-13a1-db71-8da4d5a2d3e1" class="OWAAutoLink" data-loopstyle="linkonly">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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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;" data-listchain="__List_Chain_4107" 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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="OWA47cb3eb0-7a81-e84c-ce8e-f8d5f185a405" class="OWAAutoLink" style="margin-top: 0px; margin-bottom: 0px;" data-loopstyle="linkonly">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="OWA1edf83bc-8cdb-a27a-6c9a-fa6ecb1ef549" class="OWAAutoLink" style="margin-top: 0px; margin-bottom: 0px;" data-loopstyle="linkonly">
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!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-kBIt_QE$" id="OWAb53da87a-9732-067e-d547-f2a82a3180ec" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">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!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-kBIt_QE$" id="OWA85905752-1610-e357-f435-caf9542deeb4" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">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!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-kBIt_QE$" id="OWA9dabf47e-3bc6-007e-fbdd-647372f23ef0" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a></div>
<div id="x_m_-6243239857549940670appendonsend" 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="x_m_-6243239857549940670divRplyFwdMsg" 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="OWA84b7087e-b32b-d63c-d7cc-1d0710c2ada6" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>><br>
<b>Sent:</b> Friday, May 3, 2024 6:45 PM<br>
<b>To:</b> Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" id="OWA4d126069-c78e-63ea-9ca3-148b488fe3ae" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWAd8b7bb76-9785-87d6-4b6c-9fc290dda4d1" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWAf2a55bcf-1b4e-c690-d0d6-332b3c0a2bbe" class="OWAAutoLink" data-loopstyle="linkonly">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 6:30 PM Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" id="OWA11ae3326-0762-224c-0e77-4f8eaf330b6d" class="OWAAutoLink" data-loopstyle="linkonly">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);">
"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>
</blockquote>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">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 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="x_m_-6243239857549940670x_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" id="OWA67d97285-8357-97f3-0bdb-c821db525e0b" class="OWAAutoLink" data-loopstyle="linkonly">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" id="OWA84b271bb-8b34-4314-1b70-6cdc96e689b7" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWAd7db6a88-9462-920d-7ded-84434a9aedba" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWAa5245a9c-7a3f-a0cc-30eb-32efd0187845" class="OWAAutoLink" data-loopstyle="linkonly">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="OWAe7f199ee-c920-06cc-39ec-8e12804ebc82" class="OWAAutoLink" data-loopstyle="linkonly">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="x_m_-6243239857549940670x_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="OWA1d30b282-9695-271c-b20c-012550a4469f" class="OWAAutoLink" data-loopstyle="linkonly">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="OWAb386b9fb-c1e0-3cf3-2732-7a1d48277602" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA0d9025b0-6e51-9d53-15d0-6779138fe7f9" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA030df74f-0e7b-fb62-0832-f4ee436e63db" class="OWAAutoLink" data-loopstyle="linkonly">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!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-BV3mYuw$" id="OWA5b298ba4-9edc-bdea-2373-f604660a4054" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscErrorCode</a> <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/DM/DMSetUp/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-CMnaFo8$" id="OWA9f33612a-be3c-92bb-f031-02a7cf02a73e" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">DMSetUp</a>(<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/DM/DM/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-UUpirwU$" id="OWA585ca34e-3624-2793-5b87-add9ac954ceb" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">DM</a> dm)</b>
817: {
818: <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscFunctionBegin/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-YcDnMyU$" id="OWA06b87e0e-9f9f-d4b4-de4e-2ad6afea5173" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscFunctionBegin</a>;
820: if (dm->setupcalled) <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscFunctionReturn/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-IHg61OE$" id="OWA39e514fd-fdf2-d56c-32cb-8b84e49af0cb" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscFunctionReturn</a>(<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscErrorCode/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-BV3mYuw$" id="OWA1dc21062-949a-c203-9208-1f761fcedf1d" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PETSC_SUCCESS</a>);
821: <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscTryTypeMethod/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD--roQk-8$" id="OWA707b1e55-d7dd-d790-d995-4d9ed823ee33" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscTryTypeMethod</a>(dm, setup);
822: dm->setupcalled = <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PETSC_TRUE/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-6I9S4aE$" id="OWA748df256-d778-6f1f-4778-a2be9fffe6af" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PETSC_TRUE</a>;
823: <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscFunctionReturn/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-IHg61OE$" id="OWAadd69463-d3fb-951a-97ee-73642eeb2024" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscFunctionReturn</a>(<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscErrorCode/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-BV3mYuw$" id="OWAe43f0a54-3bc7-9ca9-9b4c-6225ef2b7e17" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">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="OWA2b7990cf-633a-0362-87f0-6a1f6b8bec21" class="OWAAutoLink" data-loopstyle="linkonly">
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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="OWA4a8949bf-1cfb-2f92-1305-339593b67afc" class="OWAAutoLink" data-loopstyle="linkonly">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="OWAfa3484fa-d230-226e-1f19-3d332ff5cfb9" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA6246a410-95cc-bbd4-1615-7066bb4854ac" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWAb70250f7-98cb-e32d-e2f1-abdbde8753b0" class="OWAAutoLink" data-loopstyle="linkonly">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="OWA64ce3af5-1d67-181d-77bb-b9cadf9e73b5" class="OWAAutoLink" data-loopstyle="linkonly">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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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;" data-listchain="__List_Chain_4108" 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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="OWAa5571376-bc6f-fc81-ca47-a2cf9c0b581b" class="OWAAutoLink" style="margin-top: 0px; margin-bottom: 0px;" data-loopstyle="linkonly">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="OWA41b2b236-0dad-5454-83e0-70c836f4e5ba" class="OWAAutoLink" style="margin-top: 0px; margin-bottom: 0px;" data-loopstyle="linkonly">
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!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-kBIt_QE$" id="OWAe4553f44-d3d4-ab28-4c10-26f8735880c0" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a></div>
<div id="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="OWA782e6fdd-b950-bdcc-6e45-d57453e80e2c" class="OWAAutoLink" data-loopstyle="linkonly">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="OWA1df278e0-6945-c7e8-0269-82a4ed51670c" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA28c9b247-7fbf-88c1-c08b-62a3b3642b94" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWAca8d0719-e195-162c-7797-65ab1aa1f516" class="OWAAutoLink" data-loopstyle="linkonly">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="OWAf72ec8cc-24f0-cc66-e83e-c471ce20f7e1" class="OWAAutoLink" data-loopstyle="linkonly">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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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;" data-listchain="__List_Chain_4109" 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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="OWAdf3590b6-7caf-1aa5-2e19-fd40d234f542" class="OWAAutoLink" style="margin-top: 0px; margin-bottom: 0px;" data-loopstyle="linkonly">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="OWAe5ca1435-da4b-ae4e-53bc-da0e55171884" class="OWAAutoLink" style="margin-top: 0px; margin-bottom: 0px;" data-loopstyle="linkonly">
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!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-kBIt_QE$" id="OWA3712345a-c143-ac58-204a-9aab93a5c2cd" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">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!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-kBIt_QE$" id="OWA276ce67e-c695-cc59-21da-aa6755af83ef" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a></div>
<div id="x_m_-6243239857549940670x_m_4321204284333071829appendonsend" 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="x_m_-6243239857549940670x_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" id="OWA5f792490-a0fb-0617-6320-8ecda3c7cdbf" class="OWAAutoLink" data-loopstyle="linkonly">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" id="OWA6e50cf91-90a2-7137-445c-9ad9af8d2356" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA9109830b-4c04-108e-b43a-26eec7f59aa8" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA4b6535ce-9b15-2fb8-7e25-f37e002d7d97" class="OWAAutoLink" data-loopstyle="linkonly">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="OWA32664f44-9448-e973-bdca-cdfabd505b57" class="OWAAutoLink" data-loopstyle="linkonly">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="x_m_-6243239857549940670x_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="OWA0929fddf-c4a6-a28d-68aa-e7ac3fc9cc65" class="OWAAutoLink" data-loopstyle="linkonly">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="OWA797d2331-caa0-3ff6-5cbe-c0e1fce8c51b" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA3f867afc-f7c4-4922-82f9-0df351fd1c5e" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA177580a1-3274-7c5e-b532-07e2efd122da" class="OWAAutoLink" data-loopstyle="linkonly">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!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-BV3mYuw$" id="OWA9a756a0f-9d38-02a5-47ea-4b95cefb5f0c" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscErrorCode</a> <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/DM/DMSetUp/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-CMnaFo8$" id="OWAd6521901-53ca-ba3e-d3db-cb4d1b8d4a06" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">DMSetUp</a>(<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/DM/DM/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-UUpirwU$" id="OWAeacce05f-23e6-5936-efaf-1d142d8ce5c5" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">DM</a> dm)</b>
817: {
818: <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscFunctionBegin/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-YcDnMyU$" id="OWAbcd04d0d-ed89-8f5b-20f0-faec965c36cd" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscFunctionBegin</a>;
820: if (dm->setupcalled) <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscFunctionReturn/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-IHg61OE$" id="OWAa84d3c6c-f6b2-a54f-aa7e-5335b7b94e4f" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscFunctionReturn</a>(<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscErrorCode/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-BV3mYuw$" id="OWAd84bd4b8-f840-1950-987f-0c871eeda52b" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PETSC_SUCCESS</a>);
821: <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscTryTypeMethod/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD--roQk-8$" id="OWA08d977e0-b173-a7ef-a30c-2e2108c088dd" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscTryTypeMethod</a>(dm, setup);
822: dm->setupcalled = <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PETSC_TRUE/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-6I9S4aE$" id="OWA63ed763d-a569-be2e-aaf6-56f48b7088da" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PETSC_TRUE</a>;
823: <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscFunctionReturn/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-IHg61OE$" id="OWA74429857-31a3-8b78-d961-c0ba60a3abc0" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">PetscFunctionReturn</a>(<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PetscErrorCode/__;!!G_uCfscf7eWS!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-BV3mYuw$" id="OWAbe7bb01a-5c31-de77-bf76-fd5e8140832f" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">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="OWA07a77e47-bb67-dabc-99f6-1384fdc269fa" class="OWAAutoLink" data-loopstyle="linkonly">
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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="OWAd76ba260-c381-abc6-c07e-f3c5e4471a6c" class="OWAAutoLink" data-loopstyle="linkonly">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="OWA94ea8970-717f-62a4-b8ea-744a4ee034c5" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA28752e7a-4a65-e1b2-4994-a7292a01e92d" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA8ca175cf-10c8-6990-c4b0-0eea13109d50" class="OWAAutoLink" data-loopstyle="linkonly">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="OWAde3d0e9d-9caa-41d6-8d21-2f1ce88aaca1" class="OWAAutoLink" data-loopstyle="linkonly">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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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;" data-listchain="__List_Chain_4110" 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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="OWA38c8d73d-7efc-a500-9feb-64428e8112db" class="OWAAutoLink" style="margin-top: 0px; margin-bottom: 0px;" data-loopstyle="linkonly">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="OWA80231345-5f3d-ba70-ed50-96bce8ea1cad" class="OWAAutoLink" style="margin-top: 0px; margin-bottom: 0px;" data-loopstyle="linkonly">
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!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-kBIt_QE$" id="OWA17b9b36d-31a0-485a-529c-7f86bce3bd72" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a></div>
<div id="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="OWA08883ac6-02a4-b401-3d41-54d01cc06e67" class="OWAAutoLink" data-loopstyle="linkonly">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="OWA829471ad-b039-34e6-1e70-c5e42d649baf" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWAfc380464-9b30-37a8-5902-64ea93a2fb5a" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA3090ff6f-97e9-5af6-56e0-9e8945e4883d" class="OWAAutoLink" data-loopstyle="linkonly">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="OWAa1672938-b811-52dc-cc8b-47b0612f889b" class="OWAAutoLink" data-loopstyle="linkonly">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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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;" data-listchain="__List_Chain_4111" 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="x_m_-6243239857549940670x_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="x_m_-6243239857549940670x_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="OWAc0767a4d-4e74-d013-42ea-0f2696275997" class="OWAAutoLink" style="margin-top: 0px; margin-bottom: 0px;" data-loopstyle="linkonly">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="OWAb323d145-f4b4-dee4-0d4c-7db50209c794" class="OWAAutoLink" style="margin-top: 0px; margin-bottom: 0px;" data-loopstyle="linkonly">
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!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-kBIt_QE$" id="OWA4c0841f2-87f9-9fd6-feb3-c027b8d4cb85" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">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!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-kBIt_QE$" id="OWAc619a6d8-295b-bbc8-e8a6-d25124dd47c6" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">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!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-kBIt_QE$" id="OWAb9df2003-33b7-bbc8-bc74-4bba38d4f93d" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">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!YA9N-9_O6-4rSg848GHyIY2nSendFsTvYClTS9F7288syR3Qqj7dAAwx9vwfVzBedRxEAI057ebAdXwzNbD-kBIt_QE$" id="OWA688503b8-b5d1-a063-ae29-b537115a9dfa" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a></div>
</body>
</html>