Behrooz,

Can you elaborate some more on what you are trying to achieve?
The (pseudo-)code you posted looks OK apart from vertices being declared in
the innermost loop.
You probably want it to be outside the loop over the vertices of a face.

The API for Point can be found at
https://www.dealii.org/current/doxygen/deal.II/classPoint.html. In
particular, it is derived from Tensor.

In the end, it should not be a problem to create a std::vector of storage
type Point (if you are interested in the position of vertices)
or unsigned int (if you are interested in the index of the vertices) and
push_back into it.

Best,
Daniel


Am Do., 8. Okt. 2020 um 04:48 Uhr schrieb Behrooz Karami <
be.kar...@gmail.com>:

> Hi everyone,
>
> I am trying to cast extracted vertex_indices into a set (or vector).
> Before that it is needed to make a pair of those indices (just doubling)
> and to cast the pairs into a set  for further manipulations.
>
> I get the vertex information mainly through following lines of code:
>
> for (auto cell : triangulation.active_cell_iterators())
>           for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell;
> ++f)
>                     if (...)
>                     for (unsigned int v=0; v <
> GeometryInfo<dim>::vertices_per_face; ++v)
>                             {
>                                 if (...)
>                                         {
>                                              Point<dim>
> vertices[GeometryInfo<dim>::vertices_per_face];
>
>                                             //vertices[v] =
> cell->face(f)->vertex(v);
>                                             std::cout<<"  vertex_id:
> "<<cell->face(f)->vertex_index(v)<<std::endl;
>                                             //std::cout<<"  coords: "<<
> cell->face(f)->vertex(v)<<std::endl;
>                                         }
>                                }
>
> However I have not yet been able to construct the required data structure
> to get that.
> Specially the nature of Point<dim> is not yet clear to me. It looks to
> have some similarities with vectors.
>
> Though std::cout yields vertex IDs, I am not sure how to store them (as
> well as vertex coords., face IDs, etc) into a set or vector.
> Having a look on GeometryInfo<dim>, my new guess is that I probably need
> to loop over vertex_indices(), i.e.
> vertices[GeometryInfo<dim>::vertex_indices()].
>
> By the way could anyone kindly enlighten me about the Point<dim> and
> required steps to make a pair of and cast intended data into a set?
> Specially why Point<dim, double> is a preferred type (in the case of
> vertices) to other data types?
>
> Thanks very much,
> Behrooz
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/b192e1e9-4905-4e40-9e32-17d8a4a3ee62n%40googlegroups.com
> <https://groups.google.com/d/msgid/dealii/b192e1e9-4905-4e40-9e32-17d8a4a3ee62n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAOYDWb%2B%2BmCustRajVHPe79-k4_XohBLKxAsgaAp%3DsNw915a5iA%40mail.gmail.com.

Reply via email to