<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 11/09/2017 07:22 PM, Matthew Knepley
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAMYG4G=f11+QdNAgGQKza5W40cQtbqQEEbArZJBQRLH1QZGs7g@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Thu, Nov 9, 2017 at 1:20 PM, Yann
Jobic <span dir="ltr"><<a
href="mailto:yann.jobic@univ-amu.fr" target="_blank"
moz-do-not-send="true">yann.jobic@univ-amu.fr</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
I'm trying to access to the values of a p4est forest.<br>
I know how to do that by converting my forest to a DMPlex,
and then use DMPlexVecGetClosure over the converted DM.<br>
However, i want to assign a label and access to the values
of the forest directly.<br>
</blockquote>
<div><br>
</div>
<div>What do you mean by "directly". p4est only has
topology. We use a Section to map points to values, just
like Plex.</div>
</div>
</div>
</div>
</blockquote>
I feel stupid, but i don't know how to use a section to map points
to values. In my code i use (from ex11.c and
DMComputeL2GradientDiff_Plex) :<br>
ierr = DMGetDefaultSection(forest, §ion);CHKERRQ(ierr);<br>
ierr =
DMForestGetCellChart(forest,&cStart,&cEnd);CHKERRQ(ierr);<br>
ierr = DMGetLocalVector(forest, &localX);CHKERRQ(ierr);<br>
ierr = DMGlobalToLocalBegin(forest, u, INSERT_VALUES,
localX);CHKERRQ(ierr);<br>
ierr = DMGlobalToLocalEnd (forest, u, INSERT_VALUES,
localX);CHKERRQ(ierr);<br>
<br>
for (c = cStart; c < cEnd; c++) {<br>
<br>
DMPlexVecGetClosure(forest, section, localX, c, NULL, &x);<br>
<br>
[...]<br>
<br>
And i would like to get "x" for a DM forest.<br>
<br>
I looked at dm/impls/forest/p4est/pforest.c, but it looks like quite
difficult to import.<br>
I also search in vec/is/utils/vsectionis.c in order to find the
correct section function, but i didn't catch how to use the right
one.<br>
<br>
It looks so simple to use DMPlexVecGetClosure for DM Plex, getting
into the code of DMPlexVecGetClosure is also kind of difficult, at
my level i mean.<br>
<br>
Where can i find the correct way to do it ? Is there an example for
what i want to do ?<br>
<br>
Thanks,<br>
<br>
Yann<br>
<br>
<blockquote type="cite"
cite="mid:CAMYG4G=f11+QdNAgGQKza5W40cQtbqQEEbArZJBQRLH1QZGs7g@mail.gmail.com">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div><br>
</div>
<div> Thanks,</div>
<div><br>
</div>
<div> Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Is it
possible ?<br>
Thanks,<br>
Yann<br>
<br>
<br>
---<br>
L'absence de virus dans ce courrier électronique a été
vérifiée par le logiciel antivirus Avast.<br>
<a href="https://www.avast.com/antivirus" rel="noreferrer"
target="_blank" moz-do-not-send="true">https://www.avast.com/antiviru<wbr>s</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature" data-smartmail="gmail_signature">
<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.caam.rice.edu/%7Emk51/"
target="_blank" moz-do-not-send="true">https://www.cse.buffalo.edu/~knepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
___________________________
Yann JOBIC
HPC engineer
Polytech Marseille DME
IUSTI-CNRS UMR 6595
Technopôle de Château Gombert
5 rue Enrico Fermi
13453 Marseille cedex 13
Tel : (33) 4 91 10 69 39
ou (33) 4 91 10 69 43
Fax : (33) 4 91 10 69 69
</pre>
</body>
</html>