On 04/26/2018 03:04 PM, Pratik wrote:

In this function, there are two for loops (line 64 to 74 and line 84 to 97). First loop returns the ghost cell and gets the subdomain_id of that cell into the sc_array subids and the second loop adds this subdomain_id information to the vertices_with_ghost_neighbors.

I was wondering if it possible to also do something like this in the first loop as well:

|
for(j =0;j <nsubs;j++)
{
(*vertices_with_ghost_neighbors)[cell->vertex_index(sides[i].corner)]
.insert (subdomain_ids[j]);
}
|


so that even the ghost cells to the first layer of ghost cells are added to the vertices_with_ghost_neighbors. Would this work ? Is there a better way ?

I have to admit that I don't know what the function does, exactly, and that it's a bit hard to read -- we definitely had a different programming style at the time :-(

What happens if you try this? The way to test these sorts of things is to come up with a simple case for which you can draw little pictures -- say, you start with a unit square and then refine it 2 or 3 times. Run things with two processors and print a lot of debug output (or run things in a debugger) -- you can follow each step this way, and with a piece of paper and a pencil, you can draw little pictures that help you understand what is supposed to happen and what actually happens.


I apologize for not being of more help. The code was written some ten years ago by Timo Heister when he was visiting my lab. I have no recollection of how this code works, and would have to spend significant time to read through it to be better able to help -- time I unfortunately don't have. Timo might remember more, but he's got other things going on in his life right now as well.

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.

Reply via email to