<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 11, 2013 at 9:01 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>
<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>
I now able to simulate a two fields non-linear system with fem,
and I get a good speed up with Dirichlet BC. Thanks for your help.<br>
<br>
About Neumann BC, I need to add "-ksp_type fgmres", else the line
search failed (even with -snes_mf). <br>
More over, the Neumann version works only in sequential. Indeed,
in parallel, the boundary conditions are applied inside the
domain. I guess it is because the label are automatically add
after the mesh partitioning. This problem doesn't appear in ex12
because there is a test in the plugin function, but it is not
possible to do the same thing with a complex shape. I don't know
what it must be done.<br></div></div></blockquote><div><br></div><div>I am finally fixing this stuff. First, you can either have the boundary automatically marked in serial, and then distribute. Or</div><div>you can mark the boundary yourself, either in serial or parallel.</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>
In Neumann case, the 1D-integral apears only in the residual part
(ie the right side hand of the system). Is it done in the
FEMIntegrateBdResidualBatch function ?<br></div></div></blockquote><div><br></div><div>I put in all the hooks for this computation, but I think it would only contribute for Robin conditions. Are I wrong here?</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>
Thanks<br>
Olivier B<div><div class="h5"><br>
<br>
<br>
<br>
On 10/10/2013 02:37 AM, Matthew Knepley wrote:<br>
</div></div></div><div><div class="h5">
<blockquote type="cite">
<div dir="ltr">On Thu, Oct 3, 2013 at 4:48 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 for your answer, I'm now able to run the
ex12.c with Neumann BC (options -bc_type neumann
-interpolate 1).<br>
<br>
I have adapted the ex12.c for the 2D-system:<br>
<br>
-\Delta u +u =0<br>
<br>
It consists in adapting the fem->f0Funcs[0]
function and adding the jacobian function
fem->g0Funcs[0].<br>
My implementation works for Dirichlet BC.<br>
With Neumann BC(with options -bc_type neumann
-interpolate 1), the line search failed. I think my
jacobian functions are corrects, because the option
"-snes_mf_operator" leads to the same behavior.<br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Sorry this took me a long time. Do you mean that it
converges with -snes_mf?</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> Do you know what I have missed ?<br>
In Neumann case, Where is added the 1d-integral along
\delta \Omega ?<br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>You are correct that I am not doing the correct
integral for the Jacobian. I will put it in soon. That</div>
<div>is why it should work with the FD approximation since
the residual is correct.</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> Thanks,<br>
Olivier Bonnefon<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
On 09/26/2013 06:54 PM, Matthew Knepley wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">On Thu, Sep 26, 2013 at 6:04 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello,<br>
<br>
I have implemented my own system from ex12.c.
It works with Dirichlet BC, but failed with
Neumann one.<br>
<br>
So, I'm came back to the example
/src/snes/example/tutorial/ex12.c, and I tried
with Neumann BC:<br>
<br>
./ex12 -bc_type NEUMANN<br>
</blockquote>
<div><br>
</div>
<div>Here is the full list of tests I run (just
checked that it passes in 'next'):</div>
<div><br>
</div>
<div> <a href="https://bitbucket.org/petsc/petsc/src/f34a81fe8510aa025c9247a5b14f0fe30e3c0bed/config/builder.py?at=master#cl-175" target="_blank">https://bitbucket.org/petsc/petsc/src/f34a81fe8510aa025c9247a5b14f0fe30e3c0bed/config/builder.py?at=master#cl-175</a></div>
<div><br>
</div>
<div>Make sure you use an interpolated mesh with
Neumann conditions since you need faces.</div>
<div><br>
</div>
<div> Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">This
leads to the following crach:<br>
<br>
[0]PETSC ERROR: --------------------- Error
Message ------------------------------------<br>
[0]PETSC ERROR: No support for this operation
for this object type!<br>
[0]PETSC ERROR: Unsupported number of vertices
0 in cell 8 for element geometry computation!<br>
[0]PETSC ERROR:
------------------------------------------------------------------------<br>
[0]PETSC ERROR: Petsc Release Version 3.4.2,
Jul, 02, 2013<br>
[0]PETSC ERROR: See docs/changes/index.html
for recent updates.<br>
[0]PETSC ERROR: See docs/faq.html for hints
about trouble shooting.<br>
[0]PETSC ERROR: See docs/index.html for manual
pages.<br>
[0]PETSC ERROR:
------------------------------------------------------------------------<br>
[0]PETSC ERROR: ./ex12 on a
arch-linux2-c-debug named pcbiom38 by olivierb
Thu Sep 26 14:53:32 2013<br>
[0]PETSC ERROR: Libraries linked from
/home/olivierb/SOFT/petsc-3.4.2/arch-linux2-c-debug/lib<br>
[0]PETSC ERROR: Configure run at Thu Sep 26
14:44:42 2013<br>
[0]PETSC ERROR: Configure options
--with-debugging=1 --download-fiat
--download-scientificpython
--download-generator --download-triangle
--download-ctetgen --download-chaco
--download-netcdf --download-hdf5<br>
[0]PETSC ERROR:
------------------------------------------------------------------------<br>
[0]PETSC ERROR: DMPlexComputeCellGeometry()
line 732 in
/home/olivierb/SOFT/petsc-3.4.2/src/dm/impls/plex/plexgeometry.c<br>
[0]PETSC ERROR: DMPlexComputeResidualFEM()
line 558 in
/home/olivierb/SOFT/petsc-3.4.2/src/dm/impls/plex/plexfem.c<br>
[0]PETSC ERROR: SNESComputeFunction_DMLocal()
line 75 in
/home/olivierb/SOFT/petsc-3.4.2/src/snes/utils/dmlocalsnes.c<br>
[0]PETSC ERROR: SNESComputeFunction() line
1988 in
/home/olivierb/SOFT/petsc-3.4.2/src/snes/interface/snes.c<br>
[0]PETSC ERROR: SNESSolve_NEWTONLS() line 162
in
/home/olivierb/SOFT/petsc-3.4.2/src/snes/impls/ls/ls.c<br>
[0]PETSC ERROR: SNESSolve() line 3636 in
/home/olivierb/SOFT/petsc-3.4.2/src/snes/interface/snes.c<br>
[0]PETSC ERROR: main() line 582 in
"unknowndirectory/"/home/olivierb/solvers/trunk/SandBox/PETSC/LANDSCAPE/REF/ex12.c<br>
--------------------------------------------------------------------------<br>
MPI_ABORT was invoked on rank 0 in
communicator MPI_COMM_WORLD<br>
with errorcode 56.<br>
<br>
NOTE: invoking MPI_ABORT causes Open MPI to
kill all MPI processes.<br>
You may or may not see output from other
processes, depending on<br>
exactly when Open MPI kills them.<br>
--------------------------------------------------------------------------<br>
<br>
With Gbd, I saw that DMPlexGetConeSize is 0
for the last point.<br>
<br>
Do I have forget a step to use Neumann BC ?<br>
<br>
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><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><font color="#888888"> </font></span></div>
<span><font color="#888888"> </font></span></blockquote>
<span><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>
</blockquote>
<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>
</div></div></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>