Hi Jonathan, there is a unique way to identify cells, even in parallel::distributed::Triangulation objects! For this, have a look at the CellId <https://www.dealii.org/current/doxygen/deal.II/classCellId.html> class.
You can create an object of this class from a cell accessor using this member function <https://www.dealii.org/current/doxygen/deal.II/classCellAccessor.html#aee7d5ec9cac8af95a136554501ea4f0a> . Hope this helps, Marc On Thursday, November 11, 2021 at 6:30:30 AM UTC-7 Jonathan Russ wrote: > Hello - > > I really would like to have a unique ID for each coarse cell regardless of > the number of MPI processes. I have a distributed (not fullydistributed) > triangulation. Testing the coarse_cell->index > <https://www.dealii.org/current/doxygen/deal.II/classTriaAccessorBase.html#a6bebfc1e42324fbf595487e1bf668a22>() > > method for a simple problem appears to provide exactly what I need but the > documentation > > <https://www.dealii.org/current/doxygen/deal.II/DEALGlossary.html#GlossCoarseCellId>seems > > to suggest that this isn't necessarily true. > > The function "coarse_cell_id_to_coarse_cell_index > <https://www.dealii.org/current/doxygen/deal.II/classparallel_1_1distributed_1_1Triangulation.html#a2b3e5307d74d2747acf0846eda3e8984>" > > is private for the distributed triangulation but even if it were public I > don't think it is what I want, since I am after unique cell identifiers > when running the code with a different number of MPI ranks. In other words, > I want cell 27 to remain cell 27 whether I run on 1 MPI rank or 10 MPI > ranks. > > Is this possible to do in deal.II? The only thing I know would work would > be to use a unique material_id for each coarse cell in the domain but then > I would no longer have the material_id functionality as originally intended. > > Thanks in advance for your help, > Jonathan > -- 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/a331acaa-a7c0-4a3a-b782-26eb43dc3805n%40googlegroups.com.
