[petsc-users] petsc-3.5.2: ex12 with Neumann BC

Olivier Bonnefon olivier.bonnefon at avignon.inra.fr
Mon Nov 3 03:46:21 CST 2014


Hello,

Thank for your answer, I'll explain my trouble:

My problem is that the BC Neumann leads to wrong result.

With Dirichlet BC, I get:
-------------------------------

 > ./ex12 -run_type full -refinement_limit 0.0    -bc_type dirichlet 
-interpolate 0 -petscspace_order 1 -show_initial -show_solution 
-dm_plex_print_fem 1
...
...
Solution
Vec Object:potential 1 MPI processes
   type: seq
0.5

This result is correct.

With Neuman BC, I get:
--------------------------------

 > ./ex12 -run_type full -refinement_limit 0.0    -bc_type neumann 
-interpolate 1 -petscspace_order 1 -show_initial -dm_plex_print_fem 1 
-show_solution -bd_petscspace_order 1 -snes_linesearch_monitor   
-snes_monitor -ksp_monitor_true_residual -snes_converged_reason 
-ksp_converged_reason
....
....


Solution
Vec Object:potential 1 MPI processes
   type: seq
-0.75
-0.583333
0.0833333
-0.583333
-0.333333
0.416667
0.0833333
0.416667
1.25


That is not the values of the solution x*x+y*y.


I tried many ksp options.
Moreover, the neumann BC with "-run_type full" is not cover in the list 
https://bitbucket.org/petsc/petsc/src/fced3c3f9e703542693913793d15321603e40fe6/config/builder.py?at=master#cl-257

Do you know what is wrong ?

Thanks,

Olivier Bonnefon

On 10/31/2014 06:50 PM, Matthew Knepley wrote:
> On Fri, Oct 31, 2014 at 10:43 AM, Olivier Bonnefon 
> <olivier.bonnefon at avignon.inra.fr 
> <mailto:olivier.bonnefon at avignon.inra.fr>> wrote:
>
>     Hello,
>
>     I'm working on the snes/examples/tutorial/ex12 version 3.5.2.
>
>     I didn't succed to run the simplest case with Neumann BC:
>
>     ./ex12 -run_type full -refinement_limit 0.0    -bc_type neumann
>     -interpolate 1 -petscspace_order 1 -show_initial
>     -dm_plex_print_fem 1 -show_solution -bd_petscspace_order 1
>     -snes_linesearch_monitor -snes_monitor -ksp_monitor_true_residual
>     -snes_converged_reason -ksp_converged_reason
>
>     This leads to dofs negatives values.
>
>
> I do not understand what you mean. Please always mail the full error 
> message.
>
>     Do you know the options to get a correct result with Neumann BC ?
>
>
> There are some tests here:
>
> https://bitbucket.org/petsc/petsc/src/fced3c3f9e703542693913793d15321603e40fe6/config/builder.py?at=master#cl-257
>
>    Matt
>
>     Regards,
>     Olivier Bonnefon
>
>
>
>
> -- 
> What most experimenters take for granted before they begin their 
> experiments is infinitely more interesting than any results to which 
> their experiments lead.
> -- Norbert Wiener


-- 
Olivier Bonnefon
INRA PACA-Avignon, Unité BioSP
Tel: +33 (0)4 32 72 21 58

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141103/1228f9a9/attachment-0001.html>


More information about the petsc-users mailing list