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.
> On 24 Jan 2020, at 8:39, Nicola Giuliani <[email protected]> wrote:
>
> 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
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/8f2dca8c-b6e3-4a33-b203-cea32e5fb8a4%40googlegroups.com.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/54C88AA4-EAB0-43CC-BF32-6C47AEA38489%40gmail.com.