Re: [deal.II] Transfer of quadrature point history data after mesh refinement.

2016-06-14 Thread Wolfgang Bangerth

On 06/14/2016 10:44 AM, Denis Davydov wrote:

As for the solution transfers, i would speculate that you need two
different ones: one for the main field you solve for and another
for quadrature data.


Correct. You need to define a separate DoFHandler for the DG field to 
which you project your quadrature point data. Then you need a separate 
(second) SolutionTransfer object for the second DoFHandler.


Best
 W.
--

Wolfgang Bangerth   email:bange...@math.tamu.edu
www: http://www.math.tamu.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] Transfer of quadrature point history data after mesh refinement.

2016-06-14 Thread dealii . group

>
>
> Thank you. Is this class available in the release version 8.3.0?
>
I set separate dofhandler (history_dof_handler)  for FE_DGQ. I just 
> confusing because the history_field vector has different size respect to 
> the main solution vector and it also has different DoFHandler. I attached 
> dof_handler defined for the main problem for FE_Q, to the 
> solution_transfer, so I am confusing how we can use this solution_transfer 
> which defined based on the dof_handler to transfer history_field?!
>

On Tuesday, June 14, 2016 at 7:26:06 PM UTC+4:30, Denis Davydov wrote:
>
> Hi
>
> On 14 Jun 2016, at 16:51, dealii...@gmail.com  wrote:
>
> Hi
>
> I am solving a problem using Trilinos and parallel::distributed 
> 
>  triangulation. 
> It works well. I transfer solution data and old solution data during mesh 
> refinement as follow,
>
>
>   std::vector x(2);
>
>   x[0] = _solution;
>
>   x[1] = _old;
>
>
>   parallel::distributed::SolutionTransfer
>
> solution_transfer(dof_handler);
>
>
>   solution_transfer.prepare_for_coarsening_and_refinement(x);
>
>
>   triangulation.execute_coarsening_and_refinement();
>
>   setup_system();
>
>
>   LA::MPI::BlockVector tmp_v(partition);
>
>   LA::MPI::BlockVector tmp_vv(partition);
>
>   std::vector tmp(2);
>
>   tmp[0] = 
>
>   tmp[1] = _2;
>
>
>   solution_transfer.interpolate(tmp);
>
>   solution_old = tmp_2;
>
>
> Now, I also want to transfer quadrature point's data to the new mesh based 
> on the method explained at the end of step-18 in which we can use a 
> discontinuous field that matches the values in the quadrature points. Now 
> using this method, I can prepare a global field (history_field) and I want 
> to transfer the history_field vector as usual using the SolutionTransfer 
> 
>  class.
>
> Can I attach the history_field with relevant_solution and solution_old 
> during solution transfer method? 
>
> yes, you can. You would need to set up a separate DoFHandler and FE_DGQ 
> etc for this.
> Alternatively, you can use this class to achieve the same: 
> https://www.dealii.org/developer/doxygen/deal.II/classparallel_1_1distributed_1_1ContinuousQuadratureDataTransfer.html
>
>
> Or I must use two solution transfers, the first one for relevant_solution 
> and solution using dof_handler and the second one for history_field using 
> history_dof_handler? I can't understand this step and the relation between 
> FE_DGQ for history field and FE_Q for the main problem during refinement.
>
>
> The filed you solve for in FEM and the auxiliary field for transferring 
> are not related.
>
> Regards,
> Denis.
>
>  
>  
>
> On Monday, June 2, 2014 at 3:57:20 AM UTC+4:30, Wolfgang Bangerth wrote:
>>
>> On 05/26/2014 03:43 AM, Ali Karrech wrote: 
>> > Hi Timo, 
>> > Thank you very much. Your comments helped me. I though it's a good idea 
>> to 
>> > share the solution that I adopted with other users. Apart from 
>> > solution_transfer, I used FESystem and FE_DGQ to create a Finite 
>> element field 
>> > which has the same number of degrees as my integration points. I used 
>> this new 
>> > field (which I called history) to store my variable and recuperate them 
>> when I 
>> > need it. It seems to work properly so far. 
>>
>> This is what I would have done as well. There is a function 
>> FETools::compute_projection_from_quadrature_points_matrix that can help 
>> you 
>> with this, in case you haven't already found it. 
>>
>> Best 
>>   W. 
>>
>> -- 
>>  
>> Wolfgang Bangerth   email:bang...@math.tamu.edu 
>>  www: http://www.math.tamu.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 a topic in the 
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/dealii/OSaxZJR19W8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> dealii+un...@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.


Re: [deal.II] Transfer of quadrature point history data after mesh refinement.

2016-06-14 Thread dealii . group


Hi

I am solving a problem using Trilinos and parallel::distributed 

 triangulation. 
It works well. I transfer solution data and old solution data during mesh 
refinement as follow,


  std::vector x(2);

  x[0] = _solution;

  x[1] = _old;


  parallel::distributed::SolutionTransfer

 solution_transfer(dof_handler);


  solution_transfer.prepare_for_coarsening_and_refinement(x);


  triangulation.execute_coarsening_and_refinement();

  setup_system();


  LA::MPI::BlockVector tmp_v(partition);

  LA::MPI::BlockVector tmp_vv(partition);

  std::vector tmp(2);

  tmp[0] = 

  tmp[1] = _2;


  solution_transfer.interpolate(tmp);

  solution_old = tmp_2;


Now, I also want to transfer quadrature point's data to the new mesh based 
on the method explained at the end of step-18 in which we can use a 
discontinuous field that matches the values in the quadrature points. Now 
using this method, I can prepare a global field (history_field) and I want 
to transfer the history_field vector as usual using the SolutionTransfer 
 class.

Can I attach the history_field with relevant_solution and solution_old 
during solution transfer method? Or I must use two solution transfers, the 
first one for relevant_solution and solution using dof_handler and the 
second one for history_field using history_dof_handler? I can't understand 
this step and the relation between FE_DGQ for history field and FE_Q for 
the main problem during refinement.

 

 

On Monday, June 2, 2014 at 3:57:20 AM UTC+4:30, Wolfgang Bangerth wrote:
>
> On 05/26/2014 03:43 AM, Ali Karrech wrote: 
> > Hi Timo, 
> > Thank you very much. Your comments helped me. I though it's a good idea 
> to 
> > share the solution that I adopted with other users. Apart from 
> > solution_transfer, I used FESystem and FE_DGQ to create a Finite element 
> field 
> > which has the same number of degrees as my integration points. I used 
> this new 
> > field (which I called history) to store my variable and recuperate them 
> when I 
> > need it. It seems to work properly so far. 
>
> This is what I would have done as well. There is a function 
> FETools::compute_projection_from_quadrature_points_matrix that can help 
> you 
> with this, in case you haven't already found it. 
>
> Best 
>   W. 
>
> -- 
>  
> Wolfgang Bangerth   email:bang...@math.tamu.edu 
>  
>  www: http://www.math.tamu.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] Transfer of quadrature point history data after mesh refinement.

2016-06-14 Thread Denis Davydov
Hi

> On 14 Jun 2016, at 16:51, dealii.gr...@gmail.com wrote:
> 
> Hi
> 
> I am solving a problem using Trilinos and parallel::distributed 
> 
>  triangulation. It works well. I transfer solution data and old solution data 
> during mesh refinement as follow,
> 
> 
> 
>   std::vector x(2);
> 
>   x[0] = _solution;
> 
>   x[1] = _old;
> 
> 
> 
>   parallel::distributed::SolutionTransfer
> 
> 
> solution_transfer(dof_handler);
> 
> 
> 
>   solution_transfer.prepare_for_coarsening_and_refinement(x);
> 
> 
> 
>   triangulation.execute_coarsening_and_refinement();
> 
>   setup_system();
> 
> 
> 
>   LA::MPI::BlockVector tmp_v(partition);
> 
>   LA::MPI::BlockVector tmp_vv(partition);
> 
>   std::vector tmp(2);
> 
>   tmp[0] = 
> 
>   tmp[1] = _2;
> 
> 
> 
>   solution_transfer.interpolate(tmp);
> 
>   solution_old = tmp_2;
> 
> 
> 
> Now, I also want to transfer quadrature point's data to the new mesh based on 
> the method explained at the end of step-18 in which we can use a 
> discontinuous field that matches the values in the quadrature points. Now 
> using this method, I can prepare a global field (history_field) and I want to 
> transfer the history_field vector as usual using the SolutionTransfer 
>  class.
> 
> Can I attach the history_field with relevant_solution and solution_old during 
> solution transfer method?
> 
yes, you can. You would need to set up a separate DoFHandler and FE_DGQ etc for 
this.
Alternatively, you can use this class to achieve the same: 
https://www.dealii.org/developer/doxygen/deal.II/classparallel_1_1distributed_1_1ContinuousQuadratureDataTransfer.html
 



> Or I must use two solution transfers, the first one for relevant_solution and 
> solution using dof_handler and the second one for history_field using 
> history_dof_handler? I can't understand this step and the relation between 
> FE_DGQ for history field and FE_Q for the main problem during refinement.
> 
> 

The filed you solve for in FEM and the auxiliary field for transferring are not 
related.

Regards,
Denis.

>  
>  
> 
> On Monday, June 2, 2014 at 3:57:20 AM UTC+4:30, Wolfgang Bangerth wrote:
> On 05/26/2014 03:43 AM, Ali Karrech wrote: 
> > Hi Timo, 
> > Thank you very much. Your comments helped me. I though it's a good idea to 
> > share the solution that I adopted with other users. Apart from 
> > solution_transfer, I used FESystem and FE_DGQ to create a Finite element 
> > field 
> > which has the same number of degrees as my integration points. I used this 
> > new 
> > field (which I called history) to store my variable and recuperate them 
> > when I 
> > need it. It seems to work properly so far. 
> 
> This is what I would have done as well. There is a function 
> FETools::compute_projection_from_quadrature_points_matrix that can help you 
> with this, in case you haven't already found it. 
> 
> Best 
>   W. 
> 
> -- 
>  
> Wolfgang Bangerth   email:bang...@ <>math.tamu.edu 
>  
>  www: http://www.math.tamu.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 a topic in the Google 
> Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/dealii/OSaxZJR19W8/unsubscribe 
> .
> To unsubscribe from this group and all its topics, 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.