I see. In serial mode all is doable because u can go from current cell to 
neighbors to quadrature data and do whatever.

For the case of MPI you would still need to somehow ship the data to ghost 
cells. Because at some point neighbors of locally owned cells will be ghost 
cells.

I think it is doable by looking closer at p::d::Tria. Essentially you need a 
function which takes parallel triangulation, QPData including ghost cells and 
does synchronization of data at ghost cells within the MPI communicator by 
getting it from processors that own those cells and thereby the data. Do you 
want to give it a try and create a work-in-progress Pull-request on GitHub? One 
can start with a simple unit test of 4 cells in 2D and 2 MPI cores.

Ps. Essentially, i would say it all has to do with the fact that your problem 
is non-local.

Cheers,
Denis

> 03 нояб. 2016 г., в 10:12, Jack <ychenj...@gmail.com> написал(а):
> 
> Dear Denis,
> 
>  
> 
> Thanks for your replies.
> 
>  
> 
> I do not have some data attached to ghost cells. But I have a variable that 
> changes with time and its change depends on the data of neighbor cells.
> 
> For example,
> 
> const double value1 = 1, value2 =-1;
> 
> for (cell = tr.begin_active(); cell != tr.end(); ++cell)
> 
> if (cell -> is_locally_owned()){
> 
> bool flag = false;
> 
> std::vector<std::shared_ptr<MyData> > qpd = data_storage.template 
> get_data<MyData>(cell);
> 
> for (unsigned int q = 0; q < n_q_points; ++q)
> 
> if(qpd->value[q]> 0) {flag = true; break;}
> 
>  
> 
> if(!flag)
> 
> // finding the qpd values of neighbor cells and check all the values
> 
> //if one of them is positive, then flag = true;
> 
>  
> 
> //Setting the gpd values of present cell.
> 
> for (unsigned int q = 0; q < n_q_points; ++q)
> 
> {
> 
> if(flag) qpd->value[q] = value1;
> 
> else qpd->value[q] = value2;
> 
> }
> 
> ….
> 
> }
> 
> 
> 
> Thanks!
> 
> -- 
> 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/Rqg7gwmS0Rg/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.

Reply via email to