<!-- 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;">
"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. " True,
</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="pfptBanner6bilt54" 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="pfptBanner6bilt54" style="all: unset !important; float:left !important; display:block !important; margin: 0px 0px 1px 0px !important; max-width: 600px !important;">
<div id="pfptBanner6bilt54" 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="pfptBanner6bilt54" 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>
#pfptBanner6bilt54 { all: revert !important; display: block !important;
visibility: visible !important; opacity: 1 !important;
background-color: #D0D8DC !important;
max-width: none !important; max-height: none !important }
.pfptPrimaryButton6bilt54:hover, .pfptPrimaryButton6bilt54:focus {
background-color: #b4c1c7 !important; }
.pfptPrimaryButton6bilt54: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);">
"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 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);">
True, the connectivity is read in global numbering.</div>
<div class="elementToProof" style="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 class="elementToProof" style="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>
<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> Friday, May 3, 2024 6:45 PM<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 Wed, May 1, 2024 at 6:30 PM Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" id="OWA39f2175c-b654-c0f9-0f73-d7ccd4ad8375" 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_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="OWA1c7394a6-0fd1-9f02-7c1d-5370e9004492" 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="OWA5972c9c9-a802-5d2c-3ebf-2af330c23fb4" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWAea2ea5d0-f69d-fd8b-3c76-fcdef7fb4b46" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA49bd1797-2915-727f-f5b7-69e15a55bf10" 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="OWAbf3d8a8f-09b0-1cad-d9b2-64e4f342c7f3" 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_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="OWA38dc0345-1cc0-d7c5-9020-84c3659c7aff" 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="OWA464dc3c5-4330-8db9-e39b-113ce859d32c" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWAb6734769-a543-be20-55ff-c029884fc0a6" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWAd1f48921-c4f3-fdf4-2666-92fa2d57625d" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FPofG4yo$" id="OWAb7631bef-b514-64d8-4acc-bd6ae4d0f58d" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FyFaICEE$" id="OWAd7259945-a64f-2415-4abd-1b130a028fd7" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FQYYUzqg$" id="OWAdba836f8-d3ef-3494-338d-1d32f61c39d3" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_Fj5e8nKA$" id="OWA142416ae-0ba6-c1c9-ba7d-27c7ab0e999a" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_F3nt7akM$" id="OWAc89d33bf-5fb7-d807-7d1a-c5e7beeae975" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FPofG4yo$" id="OWA8f3eb7a1-f3e4-fc79-6775-cd0767f46aab" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_F0IpLYJM$" id="OWA7c611450-6338-0656-a59d-5b94ea884748" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FQlTgBws$" id="OWA38d1fbc5-90e6-ddb5-2ac2-9a1e42c1f4cf" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_F3nt7akM$" id="OWA117d7eec-be72-8bd9-d186-eaf3642c5792" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FPofG4yo$" id="OWAe1e20636-374d-e896-32aa-50409473b86b" 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="OWA32859796-4699-f5cf-0c64-cc77ba8dac5e" 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_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_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="OWA3e29d908-f513-f50c-99cf-2b302cf3d5e0" 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="OWAc445dd7f-982f-9252-9210-611d46d04ea7" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA27dd1d99-ca1c-c6dd-7c56-04764b2dedcd" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWAae1a72a4-c921-8039-1f3b-ec60a8f5ebb8" 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="OWAea84045c-d6ce-8907-8459-81042457cc94" 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_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_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_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_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_2136" 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_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_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="OWA06ed6fba-38b7-bf79-b280-9900ababe07c" 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="OWA95d78704-a1ce-a562-23e8-6a4651c38845" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FptlwNDw$" id="OWA8e94ffec-7ce7-8057-a3bc-d98c9978fae2" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a></div>
<div id="x_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_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="OWAeea8eefe-3d59-94ea-3d66-56fc12b9b566" 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="OWA31b77585-14ba-5053-3c54-00f5c39df5d1" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA22bdf186-4740-30f4-3b6a-ff16d6940847" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA38910b40-e6e7-e4e8-92df-a36b011311c9" 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="OWA0edaf692-da64-73b6-85cb-0457ec922b0f" 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_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_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_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_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_2137" 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_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_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="OWAc55c8c31-72cb-750f-7810-01c08315a78b" 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="OWAd445bdf0-7023-6b1e-1ad4-0bb25f082c1e" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FptlwNDw$" id="OWAc4851e5d-f20c-7007-d231-f3667062f409" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FptlwNDw$" id="OWA0c9d5ba8-b589-a8e7-fa47-0cff07ae8e00" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a></div>
<div id="x_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_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="OWA89c67b18-f2ae-311c-1b83-09aff73e7f2f" 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="OWAfb5f9767-fb10-3345-a29d-121610827fb1" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWAdca6ae4e-428f-d202-a97b-d3efc06d29c8" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWAebfbb951-1cea-ba2d-cce8-9476c8ae5e37" 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="OWAde76f4b1-a6c1-5eaa-047e-7b436a971c46" 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_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="OWA2529225d-2d42-97c9-42fb-d333b60ddd24" 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="OWA9334fdf2-ec0b-c7fe-f918-e7f398906a7a" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA5f71a1b0-0e2f-b735-d8bb-877db4175d58" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA4863c258-a71e-6a44-122b-4e60723a06f8" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FPofG4yo$" id="OWAb121f511-1dc0-9aa0-a4b8-6f06204b349a" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FyFaICEE$" id="OWA8db17daa-053f-c382-cf7e-7b835db32bb5" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FQYYUzqg$" id="OWAfbaba607-fed6-11d8-639c-74c6304b5dec" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_Fj5e8nKA$" id="OWA46b082f3-52f9-0c00-d457-f028dcb12168" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_F3nt7akM$" id="OWAd5afd419-cbc2-6807-95b7-53f1e503e09a" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FPofG4yo$" id="OWAd83ea2ff-6280-2151-546b-342716eefe67" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_F0IpLYJM$" id="OWA6d580997-3261-13ee-5ed8-d5e3a6cd1a60" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FQlTgBws$" id="OWA0e6e5476-7693-6af1-9222-8eea4c3747b0" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_F3nt7akM$" id="OWAdda2d77f-45af-6145-b3eb-118cec9df4c6" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FPofG4yo$" id="OWAbed910bf-6c82-4f6e-bf26-e3a49193adc2" 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="OWAadaea136-31c5-4bcc-b339-103798adc429" 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_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_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="OWA1f5d323d-3526-92c5-5837-5770158e4bed" 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="OWAf9b80b3d-cbbe-a612-d67f-c6aa8a21d39f" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWAbdc8d47c-906c-b805-2329-7beb3d6f3c0b" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA611c4338-cc43-64dc-ee2d-0cde64a9bcc6" 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="OWAd71e5e3b-364a-3d82-f113-34b8953f01c9" 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_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_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_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_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_2138" 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_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_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="OWAfbe01f13-f3ca-7ade-0fbb-0c75501fa14b" 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="OWAad130163-260f-cb22-b5ba-c858548830cc" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FptlwNDw$" id="OWA1217926a-f4c3-4594-435f-0fd88f945917" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a></div>
<div id="x_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_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="OWA9dfd0ad2-7784-932c-fef0-054bccb67e36" 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="OWA17d45459-eb1a-feca-4c2f-137278535c1c" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA8fdd9e4c-e3cc-193c-f2a6-96154dde7443" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWAe7c2cb39-e4ac-c29d-6dd8-81c0dea30aaa" 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="OWAbd36e517-cdcf-f7bd-ce73-6112dd22fced" 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_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_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_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_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_2139" 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_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_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="OWAc088d035-b096-6b0b-e691-f2e9d97477af" 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="OWA781220f3-8597-7c3f-569b-627ad4629c1a" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FptlwNDw$" id="OWA2d30cd75-a303-ca73-c3d0-d92cfc99a962" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FptlwNDw$" id="OWAb79de2ee-e293-b536-56ff-5f93a8606099" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FptlwNDw$" id="OWAd103e71b-e7c7-8165-0624-acb0bb5e2290" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a></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> Friday, May 3, 2024 6:45 PM<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 Wed, May 1, 2024 at 6:30 PM Ferrand, Jesus A. <<a href="mailto:FERRANJ2@my.erau.edu" id="OWA4ebd0e96-c97b-44e6-7c95-5856aa72f863" 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_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="OWA12ca5156-7329-da8f-46bd-278775f2ffd0" 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="OWAcc57e000-d254-658a-a197-969077cd6704" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA2c2d055c-ea28-ce53-1c5b-a42ce5cc6c4e" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA66125c0e-b6ad-e36a-a1ae-60cdaa1f5a7e" 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="OWA1cae4136-60b9-2c84-56f9-a513b98de369" 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_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="OWA3c5347d1-d945-2d4d-a8c4-30e15c223a22" 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="OWA7653781a-1b20-9780-2f47-fc57ccab7495" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA71391eeb-ff2b-a05a-8670-5517ed5e4895" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA13aad4bb-2ad5-ad9c-c976-191cd1e181de" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FPofG4yo$" id="OWA4e4de6aa-247c-b2d1-09a2-9be059282ae2" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FyFaICEE$" id="OWA28c6b2b2-8edc-6d60-eb2f-0e0ba4e035d8" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FQYYUzqg$" id="OWAa2377994-6efa-c891-b875-d4a1adb4cff3" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_Fj5e8nKA$" id="OWA6bcc08b6-7503-97b6-dc25-0ce76e9fa710" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_F3nt7akM$" id="OWAb9e8acc4-175a-160c-657a-cbe6ff44da8b" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FPofG4yo$" id="OWA6a7ff252-9db6-159d-e2db-e63b0db546e9" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_F0IpLYJM$" id="OWA03b94f42-d930-3bcd-36f8-586961aea5c2" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FQlTgBws$" id="OWA9cecdf5a-a385-57ac-983c-3a43643678e3" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_F3nt7akM$" id="OWA3cff8cf2-3d14-fe66-d315-8a99bb7b93b4" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FPofG4yo$" id="OWA828abb6e-b15d-2e39-4acc-989f47b20774" 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="OWAf5c51907-717f-8ea0-84dc-99e2433241c2" 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_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_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="OWA65802120-37ff-8b0d-3ab2-d77e3a133c85" 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="OWA755329c1-19cc-dcbd-17e3-88e9958eeafc" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWAbacdbb15-9be6-eb44-0358-43231dda7917" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA3961cc66-548e-ccf1-c8f6-212358cc1dbf" 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="OWAd799e226-a62b-61d4-71f9-97ed03178949" 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_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_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_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_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_2140" 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_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_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="OWAe2aad49c-2c06-8e15-ee5e-48c1a8ccb124" 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="OWA66c03634-d47d-fce0-f7d2-95ecfdd324e0" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FptlwNDw$" id="OWA7cfbaccb-3034-4dea-9bf6-0c8952f83e52" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a></div>
<div id="x_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_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="OWA20c7aefd-52cf-e576-164e-2b4864144b6f" 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="OWAf1a67cda-b6f8-89fa-ea1d-9a95315e3e0f" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA6e5ec2a2-d24a-5dc0-1b47-9de440a74860" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWAc6587968-6215-ccf2-d7a1-963f4d359fc8" 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="OWA1279642e-1b91-81d4-bc87-5e335af28deb" 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_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_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_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_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_2141" 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_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_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="OWAa139be0e-3f9a-a62e-16c2-6e253d13049f" 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="OWA4176311a-7b66-826e-8d35-5001b3c577b4" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FptlwNDw$" id="OWAe5e2496b-f8b0-82d1-1076-760082cd90ef" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FptlwNDw$" id="OWAb606ce95-a48d-7c20-c90f-8c9c55cc8fb9" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a></div>
<div id="x_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_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="OWA4a66b97f-4fa8-7543-f2e9-40e78759db27" 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="OWAec357818-771a-d17e-ff31-3fc977d97158" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWA45051bf8-2bbb-5386-faa6-b3e1fe6a7f47" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWAd4354330-9816-4007-b1f6-ff66ea871e05" 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="OWA384a2fea-2a65-bb32-7263-f232c27f7f4d" 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_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="OWAd8fd8e52-fafb-101a-b783-98cd658c6342" 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="OWA2ee520e6-2d3f-c888-423e-fd6c21360b5c" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWAaa67c1b8-bcf4-de65-7dd2-fc2ce48ce3f9" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWAcc6e0cdc-e278-64ed-1415-5102da38b338" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FPofG4yo$" id="OWA0429bf7b-0711-d342-06aa-7a072e99fda1" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FyFaICEE$" id="OWAc8ba6ae0-459b-4667-6ded-176159cb71cf" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FQYYUzqg$" id="OWA834ce93f-b7f9-4b6c-5dbb-a9273bea5b50" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_Fj5e8nKA$" id="OWA56207c85-9fa7-7f4b-38a1-13daebd1ecc3" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_F3nt7akM$" id="OWA30c7d76d-e84a-1040-0dfd-57c778b7dd37" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FPofG4yo$" id="OWA8cd209b6-0532-2813-22b1-df8d01df9d7d" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_F0IpLYJM$" id="OWAdeb51998-4778-339c-c536-c533a44b0302" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FQlTgBws$" id="OWA7d8ea091-e924-5da8-a217-a8f855eeae58" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_F3nt7akM$" id="OWA92d66b5c-f027-f442-14ae-4ef8bf1d0dce" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FPofG4yo$" id="OWAa27dbd35-b626-901a-6360-e9e8481d4eca" 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="OWA87530982-96d4-5e09-04e3-f00081b3537c" 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_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_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="OWAa8b4196c-36f3-ceb7-b437-46d137f378d1" 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="OWA2bed46d0-694f-7048-c645-2477b194969f" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWAb11d735b-2c94-bea3-0911-e8fe97d2b0a2" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA4e3d80da-138b-a8bc-fca3-fe9e3881887f" 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="OWAeb0e2a0e-d5ce-0552-b73d-201242dbb761" 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_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_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_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_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_2142" 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_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_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="OWA8498bf27-0099-7b4f-6b1a-65f19db11975" 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="OWA296f5503-d4a6-b199-4f7d-913fa3a003f8" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FptlwNDw$" id="OWA24ce8fe6-d2f7-c1c7-8d44-5295e99a621b" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a></div>
<div id="x_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_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="OWA6987e1a5-a547-bb8e-9885-d8c65afedb37" 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="OWA923bd5dc-fefd-e1a5-8c7d-23addb069268" class="OWAAutoLink" data-loopstyle="linkonly">FERRANJ2@my.erau.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" id="OWAfeef8ffe-c318-6705-d065-00074386250c" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA2c7e46fc-a26a-a641-8819-816d5e0f4f7c" 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="OWAd53284f4-0967-7689-a90a-e9191636fa50" 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_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_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_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_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_2143" 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_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_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="OWA0cad8c97-978b-4408-1203-7da9eb7cdab6" 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="OWA1bac706b-1a1b-1fac-14b3-95d26b2a593c" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FptlwNDw$" id="OWAf4578131-2be6-b0cc-9c4e-81c6f575afdb" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FptlwNDw$" id="OWA494418f5-7456-6138-3742-1feff581f44d" 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!c7KVr76YJDliUdUPWmCJIBMhcOTynQ-nax52ZuOkqzWsuI1Lfvv-6S8PGQIjKS_Fru4T84MO2sYpAORILP_FptlwNDw$" id="OWA20c4ae50-b4cf-280e-bbd7-75fc6c3e3954" class="OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a></div>
</body>
</html>