Groups
Groups
Sign in
Groups
Groups
deal.II User Group
Conversations
Labels
About
Send feedback
Help
number of cells sharing a line
14 views
Skip to first unread message
Nicola Giuliani
unread,
Jan 24, 2020, 2:39:30 AM
1/24/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to deal.II User Group
Dear all,
In my code I need to reconstruct the number of cells sharing an edge.
Is there a way to reconstruct this number locally? In principle I would need something like to cell->line(1)->n_sharing_cells()?
Bests,
Nicola
luca.heltai
unread,
Jan 24, 2020, 5:03:55 AM
1/24/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Deal.II Users
Nicola,
I would simply do this by
std::map<decltype(tria.begin_active()->line(0)), unsigned int> line_count;
for(const auto &cell: tria.active_cell_iterators()) {
for(unsigned int i=0; i< GeometryInfo<dim>::lines_per_cell; ++i) {
const it = line_count.find(cell->line(i));
if(it != line_count.end())
*it.second++;
else
line_count[cell->line(i)] = 1;
}
We don’t have access to that information within the iterator.
L.
> --
> 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+un...@googlegroups.com
.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/8f2dca8c-b6e3-4a33-b203-cea32e5fb8a4%40googlegroups.com
.
Reply all
Reply to author
Forward
0 new messages