Dear Prof.Arndt,

Thank you very much! I understand what you say. It helps me a lot!

Best,
Chucui

在 2019年2月21日星期四 UTC+8下午7:31:20,Daniel Arndt写道:
>
> Chucui,
>
>
> For Question 1, I write a code to compute the L2 norm of (solution_1 - 
>> solution_2):
>> [...]
>>
>> Is that right?
>>
> You can just take the difference of the two variables and use 
> VectorTools::integrate_difference with a Functions::ZeroFunction as "exact 
> solution".
>  
>  
>
>>
>> For question 2, as the 2 solution vectors have different sizes, we don't 
>> have the same cells, so the cell loop cannot compute altogether:
>> typename DoFHandler<dim>::active_cell_iterator
>>     cell_1 = dof_handler_1.begin_active(),
>>     endc_1 = dof_handler_1.end(); 
>> typename DoFHandler<dim>::active_cell_iterator
>>     cell_2 = dof_handler_2.begin_active();  
>>     for (; cell_1!=endc_2; ++cell_1, ++cell_2)    
>>       {....}
>>
>> I wander how to solve this problem?
>>
> You need to interpolate the solution computed on the coarser mesh to the 
> finer mesh using SolutionTransfer(
> https://www.dealii.org/current/doxygen/deal.II/classSolutionTransfer.html, 
> explained e.g. in 
> https://www.dealii.org/current/doxygen/deal.II/step_26.html). Then, you 
> can take the difference just as in your first question.
>
> 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.

Reply via email to