Re: [deal.II] Re: Why does the L2-norm increase when the number of nodes becomes too large?

2017-12-21 Thread 'Uwe Köcher' via deal . II User Group
Dear Luca (and Jie)

due to your comment

On Wednesday, 20 December 2017 17:20:43 UTC+1, Luca Heltai wrote:
>
> M… 
>
> I’m actually not sure it’s a bug… The point where the error starts growing 
> is at 10e-12. This is basically machine precision, considering the fact 
> that you are computing the L2 error. 
>
> After you have reached machine precision, any addition you make to that, 
> is just roundoff error adding up. This may or may not be a problem, 
> according to what finite elements you use, but I’m not surprised that 
> increasing the number of dofs, you get higher error. 
>
 
I've analysed the initial test problem with a 1d poisson solver of my suite 
with SIPG/NIPG. For the usual polynomial analytic test problems this solver 
is tested to converge as espected. Even for non-homogeneous Dirichlet 
boundaries.

When I insert the described test problem with the exponential character, 
then I get exactly the same behavior of norm blow up at the described 
point. The linear solver is UMFPACK.

Looks like that your thought was correct. It is also possible that the 
linear solver has significant problems with the higher condition numbers. 
(the Gaußian elimination is known to be numerical instable for such cases).

I did not check other linear solvers (no time for that - sorry).

@Jie: your last results look good 

Kind regards
  Uwe

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Re: Why does the L2-norm increase when the number of nodes becomes too large?

2017-12-21 Thread jie liu
Sorry, the coordinate of x axis is the number of nodes, and the coordinate 
of y axis is L2 error of the variable.

Jie

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Re: Why does the L2-norm increase when the number of nodes becomes too large?

2017-12-21 Thread jie liu
Hi Praveen,

On Thursday, December 21, 2017 at 3:38:21 AM UTC+1, Praveen C wrote:

> step-7 uses QGauss(3) to compute error norm. Have you tried increased 
> number of quadrature points ?
>
>
> Also, what is the quadrature rule you use for assembling?
>
 
Yes, I increased the number of quadrature points both in the 
assemble_system and integrate_difference. That does not show obvious 
difference, see the figure below.
I used QGauss and Qweddle quadrature rules in them.


In the figure above, I tested another 1D Poisson equation, where the 
solution u = x^3 + 1. The definition domain is still (0, 1).
I used P3 elements for the problem. The L2 error of u is showed.

The error is very small from the beginning, then it increases afterwards. I 
think this is some kind of roundoff error, just like Luca said.

Kind regards,
Jie

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Re: Why does the L2-norm increase when the number of nodes becomes too large?

2017-12-20 Thread Praveen C


> On 21-Dec-2017, at 8:04 AM, Praveen C  wrote:
> 
> 
> 
>> On 20-Dec-2017, at 11:52 PM, jie liu > > wrote:
>> 
>> Hi Luca,
>> 
>> On Wednesday, December 20, 2017 at 5:20:43 PM UTC+1, Luca Heltai wrote:
>> 
>> What’s the tolerance of your solver? Is it a direct or an iterative solver? 
>> If it is an iterative solver, is the tolerance right around 1e-12? 
>> 
>> Thank you for your reply. I adopted both iterative and direct solvers.
>> For iterative solvers, e.g., the CG algorithm, the tolerance is set to be 
>> 1e-12 or even smaller. Actually, this does not affect the accuracy too much 
>> when it is small enough.
>> For direct solvers, I adopted the UMFPACK algorithm.
>> The results of the two types of algorithms do not differentiate too much, 
>> see the figure in my first post.
>> 
> 
> step-7 uses QGauss(3) to compute error norm. Have you tried increased 
> number of quadrature points ?

Also, what is the quadrature rule you use for assembling ?

Best
praveen

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Re: Why does the L2-norm increase when the number of nodes becomes too large?

2017-12-20 Thread Praveen C


> On 20-Dec-2017, at 11:52 PM, jie liu  wrote:
> 
> Hi Luca,
> 
> On Wednesday, December 20, 2017 at 5:20:43 PM UTC+1, Luca Heltai wrote:
> 
> What’s the tolerance of your solver? Is it a direct or an iterative solver? 
> If it is an iterative solver, is the tolerance right around 1e-12? 
> 
> Thank you for your reply. I adopted both iterative and direct solvers.
> For iterative solvers, e.g., the CG algorithm, the tolerance is set to be 
> 1e-12 or even smaller. Actually, this does not affect the accuracy too much 
> when it is small enough.
> For direct solvers, I adopted the UMFPACK algorithm.
> The results of the two types of algorithms do not differentiate too much, see 
> the figure in my first post.
> 

step-7 uses QGauss(3) to compute error norm. Have you tried increased 
number of quadrature points ?

Best
praveen

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Re: Why does the L2-norm increase when the number of nodes becomes too large?

2017-12-20 Thread jie liu
Hi Luca,

On Wednesday, December 20, 2017 at 5:20:43 PM UTC+1, Luca Heltai wrote:

>
> What’s the tolerance of your solver? Is it a direct or an iterative 
> solver? If it is an iterative solver, is the tolerance right around 1e-12? 
>
> Thank you for your reply. I adopted both iterative and direct solvers.
For iterative solvers, e.g., the CG algorithm, the tolerance is set to be 
1e-12 or even smaller. Actually, this does not affect the accuracy too much 
when it is small enough.
For direct solvers, I adopted the UMFPACK algorithm.
The results of the two types of algorithms do not differentiate too much, 
see the figure in my first post.

Kind regards,
Jie

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Re: Why does the L2-norm increase when the number of nodes becomes too large?

2017-12-20 Thread luca.heltai
M… 

I’m actually not sure it’s a bug… The point where the error starts growing is 
at 10e-12. This is basically machine precision, considering the fact that you 
are computing the L2 error. 

After you have reached machine precision, any addition you make to that, is 
just roundoff error adding up. This may or may not be a problem, according to 
what finite elements you use, but I’m not surprised that increasing the number 
of dofs, you get higher error.

What’s the tolerance of your solver? Is it a direct or an iterative solver? If 
it is an iterative solver, is the tolerance right around 1e-12?

L.

> On 20 Dec 2017, at 9:47, 'Uwe Köcher' via deal.II User Group 
>  wrote:
> 
> Dear Jie,
> 
> I'm with Bruno, you definately have a bug in your code.
> 
> Maybe the application of the Dirichlet boundary is incorrect. When you use 
> the 1d grid generation
> the left and right boundary nodes are coloured by different numbers. This is 
> a different behaviour
> compared to 2d or 3d grid generation.
> 
> https://www.dealii.org/8.5.0/doxygen/deal.II/namespaceGridGenerator.html#acea0cbcd68e52ce8113d1134b87de403
> 
> Some time ago I had a similar issue (incorrect Dirichlet application). Maybe 
> you should check that
> firstly.
> 
> Kind regards
>   Uwe
> 
> 
> -- 
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see 
> https://groups.google.com/d/forum/dealii?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to dealii+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.