Re: [deal.II] why locally_size() equal to size() for a Trilinos vector

11 views
Skip to first unread message

Wolfgang Bangerth

unread,
Oct 26, 2017, 10:19:31 PM10/26/17
to dea...@googlegroups.com
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: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Reply all
Reply to author
Forward
0 new messages