<div dir="ltr">On Tue, Aug 20, 2013 at 10:16 AM, Olivier Bonnefon <span dir="ltr"><<a href="mailto:olivier.bonnefon@avignon.inra.fr" target="_blank">olivier.bonnefon@avignon.inra.fr</a>></span> wrote:<br><div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hello,<br>
<br>
Thank-you, I'm using DMPlexCreateFromCellList(), and it works
except for the boundary conditions. <br>
I'm using Dirichlet boundary conditions, and the corresponding
degree of freedom are not substituted (like when I use
DMPlexCreateBoxMesh). <br>
So, I do have missing a step to define the boundary ?<br></div></div></blockquote><div><br></div><div>Yes. For the other formats, it translates boundary markers to DMLabels. With the CellList you will have to label your boundary.</div>
<div>If you want it to work exactly as in the example, for every point p on your boundary,</div><div><br></div><div> DMPlexSetLabelValue(dm, "marker", p, 1);</div><div><br></div><div>You can avoid the string lookup by using</div>
<div><br></div><div> DMPlexCreateLabel(dm, "marker");</div><div> DMPlexGetLabel(dm, "marker", &label);</div><div> DMLabelSetValue(label, p, 1);</div><div><br></div><div>Obviously, if you have multiple BC, you can use a label for each condition.</div>
<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"><div bgcolor="#FFFFFF" text="#000000">
<div>
Olivier B<br>
<br>
<br>
On 08/20/2013 03:08 PM, Matthew Knepley wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">On Tue, Aug 20, 2013 at 7:50 AM, Olivier Bonnefon <span dir="ltr"><<a href="mailto:olivier.bonnefon@avignon.inra.fr" target="_blank">olivier.bonnefon@avignon.inra.fr</a>></span>
wrote:<br>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I have modify the ex12.c example for a like diffusive
problem (FEM+unstructured mesh+SNES).<br>
The next step, is to replace the square mesh by my own
mesh.<br>
I want import my mesh from a simple file, and after
distributed it with DMPlexDistribute.<br>
Is it the good way ?<br>
Is it possible to import a mesh in petsc ? I didn't find
the answer in the documentation. Is there an example ?<br>
</blockquote>
<div><br>
</div>
<div>There are a few formats supported:</div>
<div><br>
</div>
<div> 1) Cell-vertex: DMPlexCreateFromCellList()</div>
<div><br>
</div>
<div> 2) Exodus: DMPlexCreateExodus()</div>
<div><br>
</div>
<div> 3) CGNS: DMPlexCreateCGNS()</div>
<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">
Thanks<span><font color="#888888"><br>
Olivier Bonnefon<br>
<br>
-- <br>
Olivier Bonnefon<br>
INRA PACA-Avignon, Unité BioSP<br>
Tel: <a href="tel:%2B33%20%280%294%2032%2072%2021%2058" value="+33432722158" target="_blank">+33 (0)4 32 72
21 58</a><br>
<br>
</font></span></blockquote>
</div>
<br>
<br clear="all"><span class="HOEnZb"><font color="#888888">
<div><br>
</div>
-- <br>
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
</font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<br>
<pre cols="72">--
Olivier Bonnefon
INRA PACA-Avignon, Unité BioSP
Tel: <a href="tel:%2B33%20%280%294%2032%2072%2021%2058" value="+33432722158" target="_blank">+33 (0)4 32 72 21 58</a></pre>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>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>