vertex and dofcells

27 views
Skip to first unread message

Alberto Salvadori

unread,
May 26, 2020, 12:35:40 PM5/26/20
to deal.II User Group
Dear community,

this looks a simple question but I just cannot find a simple answer, I apologize.

The code I aim at writing is similar to:

        unsigned vv = 0 ;

        

        for (unsigned int ii=0; ii<dofs_per_cell; ++ii)

        {

          const unsigned int ii_group = manifold_fe.system_to_base_index(ii).first.first;

          

          if ( ii_group == manifold_dofs.cS_dof )

          {

            Point<dim> this_node = cell->vertex(vv) ;

            

            [ ... omitted code ... ]            


            cell_matrix( ii,ii ) = 1 ;

            cell_rhs( ii ) = some_function_of( this_node );


            ...

            ++vv;

          }

         }

            


In a nutshell, I want to retrieve information that I stored at each node of the cell, while looping on the dofcells. 
I am not sure if the order of the dofs and of the vertex coincide, suspect they do not.
Can you please address me to a function that connects the dofcells to the associated vertex,or suggest a better approach?

Thank you so much

Alberto

Jean-Paul Pelteret

unread,
May 26, 2020, 12:42:37 PM5/26/20
to dea...@googlegroups.com
Dear Alberto,

Quick answer: There’s a entry in the FAQ that may answer your question:

As mentioned at the bottom of that entry, is a small point on how to go from DoFs -> vertices using DoFTools::map_dofs_to_support_points().

Does this help you?
Best,
Jean-Paul

Informativa sulla Privacy: http://www.unibs.it/node/8155

--
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/3a275ee6-9416-4547-8a81-188c29579e2a%40googlegroups.com.

Alberto Salvadori

unread,
May 28, 2020, 9:19:07 AM5/28/20
to dea...@googlegroups.com
Thank you, Jean Paul. Exhaustive, as usual.

Alberto Salvadori
 Dipartimento di Ingegneria Meccanica e Industriale (DIMI)
 Universita` di Brescia, via Branze 43, 25123 Brescia
 Italy
 tel 030 3715426

e-mail:
 alberto....@unibs.it
web-page:
 http://m4lab.unibs.it/faculty.html



Reply all
Reply to author
Forward
0 new messages