On 10/26/2017 05:53 PM, Yiyang Zhang wrote:
|
IndexSetglobal_active_cells(this->tria.n_active_cells());
global_active_cells.add_range(0,this->tria.n_active_cells());
IndexSetlocal_active_cells(this->tria.n_active_cells());
local_active_cells.clear();
intcount =0;
for(autocell =this->tria.begin_active();cell !=this->tria.end();++cell){
if(cell->is_locally_owned()){
local_active_cells.add_index(cell->active_cell_index());
|
This will not yield anything interesting. First, not all active cells on all
processors are "interesting" (some active cells will be ghost or artificial
cells). Second, tria.n_active_cells() only returns the number of active cells
on each processor, not the number of *globally* active cells -- for which
there is a different function, however. Finally, the 'active_cell_index' of
each cell is a property of each processor and they are not globally unique --
so they have no relation with the *global* number of active cells mentioned above.
You'll have to think of a different way of doing whatever it is you're trying
to do here :-)
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.