Re: [deal.II] Re: Problems in handling the userdata of Distributed Triangulation

2016-11-20 Thread Jack
Hi, I find a better way to realize this by using the MPI distributed vector like the finite element solution vector, where I save the values in each cell dof by dof using cell->set_dof_values() and then read the dof values using cell->get_dof_values(). The latter function can exactly read the d

Re: [deal.II] Re: Problems in handling the userdata of Distributed Triangulation

2016-11-08 Thread Jack
Hi, everyone I’m not familiar to ASPECT, could someone tell me how to get the data of ghost cells? In the ASPECT, I find that it is implemented through the following functions to obtain ghost particles in ~/aspect/source/particle/world.cc template std::map World::get_subdomain_id_to_neighbor

Re: [deal.II] Re: Problems in handling the userdata of Distributed Triangulation

2016-11-03 Thread Jack
> > Dear Prof. Bangerth, > Many thanks for your suggestions and help! > I will try this with your reference of Aspect. I hope I can figure out this > smoothly. > Thanks again! > Regards, > Jack > 在 2016年11月3日星期四 UTC+8下午10:54:44,Wolfgang Bangerth写道: > > On 11/03/2016 03:32 AM, Denis Davydov wrote

Re: [deal.II] Re: Problems in handling the userdata of Distributed Triangulation

2016-11-03 Thread Wolfgang Bangerth
On 11/03/2016 03:32 AM, Denis Davydov wrote: 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

Re: [deal.II] Re: Problems in handling the userdata of Distributed Triangulation

2016-11-03 Thread Jack
Hi Denis, Thanks. Yes, that’s right. For distributed MPI parallel computing, this is a big problem. I have just learned deal.II for less than three months, so I’m still new. And also I’m not working on numerical mathematics, so it is difficult for me to solve such problem but I will try.

Re: [deal.II] Re: Problems in handling the userdata of Distributed Triangulation

2016-11-03 Thread Denis Davydov
Hi Jack, One more approach: you first loop over all locally owned cells and determine the local flag (tru/false). Then you still need to ship this to ghost cells on other MPI processors. On doing that you can do your assembly as usual. Kind regards, Denis > On 3 Nov 2016, at 10:12, Jack wrot

Re: [deal.II] Re: Problems in handling the userdata of Distributed Triangulation

2016-11-03 Thread Denis Davydov
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 do

[deal.II] Re: Problems in handling the userdata of Distributed Triangulation

2016-11-03 Thread Jack
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();

[deal.II] Re: Problems in handling the userdata of Distributed Triangulation

2016-11-03 Thread Denis Davydov
Hi Jack, Could you please elaborate why you need to read the data on ghost cells? The CellDataStorage and TransferableQuadraturePointData classes are designed to do assembly, where we always loop over *locally owned cells* and calculate local matrices to be assembled. If the ownership of cells

[deal.II] Re: Problems in handling the userdata of Distributed Triangulation

2016-11-03 Thread Jack
Dear Jean, Thanks so much for your suggestions. I’m really very happy for such new development. I understand that using the CellDataStorage and TransferableQuadraturePointData classes is better than user_pointer when the mesh requires coarsening and refining. *Yet I do not understan

[deal.II] Re: Problems in handling the userdata of Distributed Triangulation

2016-11-02 Thread Jean-Paul Pelteret
Dear Jack, You'll be happy to know that this functionality has recently been added to the developer version of deal.II via the CellDataStorage and TransferableQuadraturePointData