Re: [deal.II] faces barycenter

2020-12-20 Thread Alberto Salvadori
You are right, of course, Wolfgang.
I should offer to contribute in the development of this method. I will.
Thank you
Alberto


*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 Mon, Dec 21, 2020 at 4:11 AM Wolfgang Bangerth 
wrote:

> On 12/20/20 2:58 AM, Alberto Salvadori wrote:
> >
> > Point centroid = cell->face(face_number)->barycenter() ;
> >
> > provides always centroid = {0,0,0}, whereas the following
> >
> > Point centroid = cell->face(face_number)->center() ;
> >
> > returns the correct amount.
> >
> > Am I misunderstanding something or may it be a bug?
>
> I suspect that you forgot to try running your code in debug mode :-) In
> debug
> mode, I'm pretty sure you would run into this assertion:
>
>template 
>Point
>barycenter(const TriaAccessor &)
>{
>  // this function catches all the cases not
>  // explicitly handled above
>  Assert(false, ExcNotImplemented());
>  return Point();
>}
>
> In other words, the function is simply not implemented -- though I suspect
> that it would not be very difficult to do so.
>
> Best
>   W.
>
>
> --
> 
> Wolfgang Bangerth  email: bange...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>
> --
> 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/c6c8111e-a53a-da7a-4b5e-40b870546283%40colostate.edu
> .
>

-- 


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/CABcATpfQhoj40UDEfu5wVVAa2%3DrBxf2byZKdtUBHF37QKLMnHA%40mail.gmail.com.


[deal.II] faces barycenter

2020-12-20 Thread Alberto Salvadori
Dear community

I observed that this instruction:

Point centroid = cell->face(face_number)->barycenter() ;

provides always centroid = {0,0,0}, whereas the following

Point centroid = cell->face(face_number)->center() ;

returns the correct amount.

Am I misunderstanding something or may it be a bug?

Thanks,

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/2554f429-14fd-49ae-9ca9-943db692f4f2n%40googlegroups.com.