Re: [deal.II] vertex and dofcells

2020-05-28 Thread Alberto Salvadori
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.salvad...@unibs.it
web-page:
 http://m4lab.unibs.it/faculty.html



On Tue, May 26, 2020 at 6:42 PM Jean-Paul Pelteret 
wrote:

> Dear Alberto,
>
> Quick answer: There’s a entry in the FAQ that may answer your question:
>
> https://github.com/dealii/dealii/wiki/Frequently-Asked-Questions#how-do-i-get-the-degree-of-freedom-indices-at-vertices
>
> 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
>
> On 26 May 2020, at 18:35, Alberto Salvadori 
> wrote:
>
> 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
> {
>
>   *const* *unsigned* *int* ii_group = manifold_fe
> .system_to_base_index(ii).first.first;
>
>
>   *if* ( ii_group == manifold_dofs.cS_dof )
>
>   {
>
> Point 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
>
>
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/3a275ee6-9416-4547-8a81-188c29579e2a%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 dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/F28279CC-8C0A-4CFC-84AC-4D97BE725C2E%40gmail.com
> 
> .
>

-- 


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CABcATpcEuTUVgnhTBo_74HhXNhuqtyOA9sk3aroY1oH0NH1LNA%40mail.gmail.com.


Re: [deal.II] vertex and dofcells

2020-05-26 Thread Jean-Paul Pelteret
Dear Alberto,

Quick answer: There’s a entry in the FAQ that may answer your question:
https://github.com/dealii/dealii/wiki/Frequently-Asked-Questions#how-do-i-get-the-degree-of-freedom-indices-at-vertices
 


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

> On 26 May 2020, at 18:35, Alberto Salvadori  
> wrote:
> 
> 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 
> {
> 
>   const unsigned int ii_group = 
> manifold_fe.system_to_base_index(ii).first.first;
> 
>   
>   if ( ii_group == manifold_dofs.cS_dof )
> 
>   {
> 
> Point 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
> 
> 
> 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+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/dealii/3a275ee6-9416-4547-8a81-188c29579e2a%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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/F28279CC-8C0A-4CFC-84AC-4D97BE725C2E%40gmail.com.


[deal.II] vertex and dofcells

2020-05-26 Thread Alberto Salvadori
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 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

-- 


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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/3a275ee6-9416-4547-8a81-188c29579e2a%40googlegroups.com.