<div dir="ltr"><div dir="ltr">On Fri, Jan 13, 2023 at 5:58 AM Eric Chamberland <<a href="mailto:Eric.Chamberland@giref.ulaval.ca">Eric.Chamberland@giref.ulaval.ca</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>ok, here is what I want to do:</p>
<p>I am writing a brand new PC which needs some other PETSc objects
like a Vec (for unit partition).</p>
<p>We have a text based user file format in which the user can
create arbitrary Petsc's Vec or Mat.</p>
<p>Then, I would like the user to give the prefix of these Vec or
Mat as a parameter for the new PC that we would like to configure
completely via the "petsc options database".</p>
<p>So in our PCApply_XXX we would like to retrieve some specific
options which will simply give the Vec prefix to retreive.</p>
<p></p></div></blockquote><div>Okay, so a named vector is created when options are processed, and you want to use that vector by name inside your new PC.</div><div><br></div><div>1. You could add that vector to a list you manage at creation time. This means that you are in charge of that list.</div><div><br></div><div>2. DM has named vectors (<a href="https://petsc.org/release/docs/manualpages/DM/DMGetNamedGlobalVector/">https://petsc.org/release/docs/manualpages/DM/DMGetNamedGlobalVector/</a>) but not matrices</div><div><br></div><div>You could probably just extract the DM code to manage your objects.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><p>Thanks,</p>
<p>Eric</p>
<p><br>
</p>
<div>On 2023-01-13 15:39, Matthew Knepley
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">On Fri, Jan 13, 2023 at 4:24 AM Eric Chamberland
<<a href="mailto:Eric.Chamberland@giref.ulaval.ca" target="_blank">Eric.Chamberland@giref.ulaval.ca</a>>
wrote:<br>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Is it possible with PETSc's API to query an objet by it's
name?<br>
<br>
Is there a "global" database with all PETScObject created?<br>
</blockquote>
<div><br>
</div>
<div>No, we do not store that information. What would the use
case be? Maybe there is another way to do it.</div>
<div><br>
</div>
<div> Thanks,</div>
<div><br>
</div>
<div> Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thanks,<br>
<br>
Eric<br>
<br>
-- <br>
Eric Chamberland, ing., M. Ing<br>
Professionnel de recherche<br>
GIREF/Université Laval<br>
(418) 656-2131 poste 41 22 42<br>
<br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>What most experimenters take for granted before
they begin their experiments is infinitely more
interesting than any results to which their
experiments lead.<br>
-- Norbert Wiener</div>
<div><br>
</div>
<div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<pre cols="72">--
Eric Chamberland, ing., M. Ing
Professionnel de recherche
GIREF/Université Laval
(418) 656-2131 poste 41 22 42</pre>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>