Hi all

On a related matter, can one assume that there is a one-to-one relationship 
between a cell_iterator and a cell that persists even during mesh refinement? 
That is, if I store a std::vector of cell_iterators prior to refinement (say 
containing the cell_iterators of those inactive cells that have all children 
marked for coarsening) will the contents still be valid after refinement?

Many thanks
Andrew




On 07 Aug 2010, at 10:41 PM, Guido Kanschat wrote:

> 
>> 
>> Can one assume that the order that the (active) cells are traversed over in 
>> a loop such as:
>> 
>>    for (Triangulation<deal_II_dimension>::active_cell_iterator cell  = 
>> tri.begin_active() ;
>>    cell != tri.end(); ++cell) 
>> is the always the same if the mesh has not been altered?  I'm guessing not 
>> but hoping so.
> Yes, you can. While you cannot rely on a specific ordering, the order will 
> not change for a particular mesh. This is actually being used inside the 
> library, where data of a mesh cell is stored in different vectors.
> 
> Best,
> Guido

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to