thanks Wolfgang, please see my comments below

> 
>> Is there a way (albeit complex) to determine the parent of child cell? It's
>> easy to get the child of a parent but visa-versa seems less
>> straightforward.
> 
> I think this is something we should eventually implement as it is one of the 
> most often requested features. Maybe this could be achieved during the code 
> jam at the deal.II workshop...

sounds like a good idea.

> 
> As for the general approach: can you modify your algorithm so that instead of 
> having a loop over all active cells and seeking their parents, you loop over 
> *all* cells (active or not) and if a given cell has children then do whatever 
> needs to be done on the the current cell (i.e. the parent of the child you 
> have just discovered)? You'd do the same work as in what you wanted to do, 
> just the order of active cells is different.

my only concern with this approach is what occurs if children have children? 
Because a cell has children need not mean it has been refined during this 
refinement step (I think). I guess the criteria would be that the children are 
active (ie no children)?
 
If you coarsen a mesh does the coarsened cell still have children?

instead what I have done is after preparing the mesh for coarsening and 
refinement I loop over all the cells.
I record the cells to be coarsened, refined and those that remain based on the 
cell refine_flag. 
I then execute the refinement and coarsening.
Then I loop over the vectors of cells to be refined and project the data to the 
children

the coarsening part is less obvious to me.
 i have the cells to be coarsened in a vector, the objective is now to find 
their parents. I can loop over all cells and check to see if their children are 
in the cells to be coarsened. Of coarse this only makes sense if a coarsened 
cell has children after refinement. If not then I would need to loop over the 
triangulation prior to executing the refinement.


Regards
Andrew

> 
> Best
> W.
> 
> -------------------------------------------------------------------------
> Wolfgang Bangerth                email:            [email protected]
>                                 www: http://www.math.tamu.edu/~bangerth/
> 

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

Reply via email to