Re: [deal.II] Re: hp convergence for non-linear solver.

2016-11-03 Thread Jaekwang Kim
Thanks for replying me ! 

I moved to squared domain to avoid other possible error when I imply 
boundary condition, but I still have same manufactured solution e^(-x^2-y^2)
I have to say that I have some changed error curve after moving to new mesh 
domain. 
Which is slightly better, but still unsatisfying results. 



To see error per cell, I referred step 27, and make estimated error data 
out. 

I used following code lines



 Vector estimated_error_per_cell (triangulation.n_active_cells());



KellyErrorEstimator::estimate (dof_handler,

QGauss(3),

typename FunctionMap::type(),

solution,

estimated_error_per_cell);


In fact, I don't know how kelly error estimator works...
but just checked that it usually works well with Poisson Equations.



Seeing pictures above,,, when p=2 solution looks seemingly good, but 
estimated error_per_cell should be wrong. 
Since, exact solution the closer points to x=(0,0) (or left down corner in 
pic) has  sharp gradient, thus the larger error is expected. 
Think estimated error case for p=1 is correct. 

Now, I confirmed that the code is not working at higher degree. (p>=2)...
but it is not because of boundary condition...since I have four boundary 
(top,bottom,right,left...) but the points which show highest error is some 
what irrealted to boundary...

Do you have any idea about this? 

Always thank you for your time and advice!

Best regards,
Jaekwang Kim 



2016년 11월 2일 수요일 오후 8시 30분 19초 UTC-5, Wolfgang Bangerth 님의 말:
>
> On 11/02/2016 07:17 PM, Jaekwang Kim wrote: 
> > 
> > I'd like check the visualized error per cell. 
> > Is there any module in deal.ii that enables this...? 
> > 
>
> Yes, you just need to create a vector with as many entries as there are 
> cell 
> (e.g., the output of VectorTools::integrate_difference) and attach that to 
> the 
> DataOut object you have. step-27 shows how to do that, but it in essence 
> works 
> just like for vectors that have as many entries as there are DoFs. 
>
> Best 
>   W. 
>
> -- 
>  
> Wolfgang Bangerth  email: bang...@colostate.edu 
>  
> www: http://www.math.colostate.edu/~bangerth/ 
>
>

-- 
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: hp convergence for non-linear solver.

2016-11-02 Thread Wolfgang Bangerth

On 11/02/2016 07:17 PM, Jaekwang Kim wrote:


I'd like check the visualized error per cell.
Is there any module in deal.ii that enables this...?



Yes, you just need to create a vector with as many entries as there are cell 
(e.g., the output of VectorTools::integrate_difference) and attach that to the 
DataOut object you have. step-27 shows how to do that, but it in essence works 
just like for vectors that have as many entries as there are DoFs.


Best
 W.

--

Wolfgang Bangerth  email: bange...@colostate.edu
   www: http://www.math.colostate.edu/~bangerth/

--
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: hp convergence for non-linear solver.

2016-11-02 Thread Wolfgang Bangerth

On 11/01/2016 11:06 PM, Jaekwang Kim wrote:


do you have any other idea?



Output the errors per cell and visualize. Is there a pattern? Is the error 
localized on the boundary, for example?


Best
 W.

--

Wolfgang Bangerth  email: bange...@colostate.edu
   www: http://www.math.colostate.edu/~bangerth/

--
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.


[deal.II] Re: hp convergence for non-linear solver.

2016-11-01 Thread Jaekwang Kim
Thanks for replying! 

Could you explain more?

I considered mapping degree only when I assemble system... for example. 

template 

void msurface::assemble_system ()

{

  const MappingQ mapping (degree);

  const QGauss  quadrature_formula(degree+2);



  FEValues fe_values (mapping, fe, quadrature_formula,

   update_values|  update_gradients |

   update_quadrature_points  |  update_JxW_values);






but can I also input a non-default Mapping degree when I use 
Vectortools::integrate_difference function?

I tried as ... but it seems that its not a proper way to use this 
function...?

template 

void msurface::evaluate_error()

{

Vector difference_per_cell (triangulation.n_active_cells());



const MappingQ mapping (degree);



VectorTools::integrate_difference (degree, 
dof_handler,solution,Solution(),

   
difference_per_cell,QGauss(degree+2),VectorTools::L2_norm);


How can I use non-default Mapping in here? (I wonder specific lines of 
code...)

Thank for giving me a help!


Regards, 

Jaekwang Kim

2016년 11월 1일 화요일 오후 5시 19분 35초 UTC-5, Daniel Arndt 님의 말:
>
> Jaekwang, 
>
> [...]
>>
>> VectorTools::integrate_difference 
>> (dof_handler,solution,Solution(),
>>
>>difference_per_cell
>> *,QGauss(degree+**2**)*,VectorTools::L2_norm);
>>
> somegthing that immediately comes to mind is that you don't use a 
> non-default Mapping in here although your boundary is curved.
> Make sure that you use an appropriate Mapping everywhere!
>
> Best,
> Daniel
>

-- 
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.


[deal.II] Re: hp convergence for non-linear solver.

2016-11-01 Thread Daniel Arndt
Jaekwang, 

[...]
>
> VectorTools::integrate_difference 
> (dof_handler,solution,Solution(),
>
>difference_per_cell
> *,QGauss(degree+**2**)*,VectorTools::L2_norm);
>
somegthing that immediately comes to mind is that you don't use a 
non-default Mapping in here although your boundary is curved.
Make sure that you use an appropriate Mapping everywhere!

Best,
Daniel

-- 
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.


[deal.II] Re: hp convergence for non-linear solver.

2016-11-01 Thread Bruno Turcksin
Jaekwang,

On Tuesday, November 1, 2016 at 5:43:36 PM UTC-4, Jaekwang Kim wrote:
>
> I think that I didn't make any mistake on my code lines because at least 
> my numerical solution is converging for the case p=1. 
>
> but I couldn't get such convergence for the case p=2, and 3. I have tried 
> to change tolerance number in iterative scheme, but it didn't work. 
>
>
> Are there other things that I failed to consider? 
>
> Or did I make wrong way to test the code? 
>
What you did looks good. You should check that you use the right quadrature 
everywhere. If somewhere in your code you use a low order quadrature, it 
will work for p=1 but you will have a larger error when you increase the 
quadrature. You should also look at the solution for p=2 and p=3. This 
might help you understand what is going on.

Best,

Bruno

-- 
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.


[deal.II] Re: hp convergence for non-linear solver.

2016-11-01 Thread Jaekwang Kim



Thanks for replying! 

Here I attached solution for p=2, and it seems that it has right share. 

When you said 'right quadrature' dose that meanquadrature for 
integration when we assemble system? 

To attach some of my code. 

template 

void msurface::assemble_system ()

{

  const MappingQ mapping (degree);

  const QGauss  quadrature_formula(degree+2);



  FEValues fe_values (mapping, fe, quadrature_formula,

   update_values|  update_gradients |

   update_quadrature_points  |  update_JxW_values);





I am pretty sure that I am using right quadrature here 


but I am not sure whether I am using right quadrature when I compare my 
numerical solution to exact solution.. 


VectorTools::integrate_difference (dof_handler,solution,Solution(),

   difference_per_cell
*,QGauss(degree+**2**)*,VectorTools::L2_norm);



Thanks again for fast reply!! 




2016년 11월 1일 화요일 오후 5시 4분 40초 UTC-5, Bruno Turcksin 님의 말:
>
> Jaekwang,
>
> On Tuesday, November 1, 2016 at 5:43:36 PM UTC-4, Jaekwang Kim wrote:
>>
>> I think that I didn't make any mistake on my code lines because at least 
>> my numerical solution is converging for the case p=1. 
>>
>> but I couldn't get such convergence for the case p=2, and 3. I have tried 
>> to change tolerance number in iterative scheme, but it didn't work. 
>>
>>
>> Are there other things that I failed to consider? 
>>
>> Or did I make wrong way to test the code? 
>>
> What you did looks good. You should check that you use the right 
> quadrature everywhere. If somewhere in your code you use a low order 
> quadrature, it will work for p=1 but you will have a larger error when you 
> increase the quadrature. You should also look at the solution for p=2 and 
> p=3. This might help you understand what is going on.
>
> Best,
>
> Bruno
>

-- 
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.