Nicola,
what would you think of a function in GridTools like
GridTools::propagate_internal_manifold_ids(tria, disambiguation_function)
that would loop over all cells, loop over all faces, check if the neighbor
manifold id is the same of this cell, and
i) the two ids are the same: assign the same id to the face (calling
cell->face(f)->set_all_manifold_ids())
ii) the two ids are different: set the id of the face to the return value of
the disambiguation_function(id1, id2)
disambiguation_function could be of type
std::function<types::manifold_id(const manifold_id &id1, const manifold_id
&id2)>
and its default implementation could be
std::function<types::manifold_id(const manifold_id &id1, const manifold_id
&id2)> = [](const manifold_id &id1, const manifold_id &id2){return
std::min(id1, id2);}
Would this address your needs?
L.
> On 15 Mar 2019, at 15:16, Nicola Giuliani <[email protected]> wrote:
>
> I agree that the choice is ambiguous on the faces.
>
> However a practical problem remains, let's assume that a user wants to import
> a very big geometry with a lot of internal faces. Right now he would need to
> specify all the possible faces in the input file (with an increasing
> possibility of confusing the manifold ids).
> I agree he should (otherwise is a criminal) specify what happens when two
> different manifolds meet but if we have a face neighbouring two cells with
> the same manifold_id couldn't (or shouldn't) we assume the manifold of the
> face to be the same?
> Alternatively we could write a utility to transfer the manifold information
> to the faces, it should be "morally" the same of calling set_all_manifold_ids.
--
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].
For more options, visit https://groups.google.com/d/optout.