p4est balance_mesh

12 views
Skip to first unread message

Gabriel Peters

unread,
Jun 4, 2019, 8:41:38 AM6/4/19
to deal.II User Group
Hey everyone,

I am wondering, whether there is a deal.ii function, which balances a parallel::distributed::triangulation neighbouring elements by 2:1,
like the p8est_balance_ext function

Such a function might be useful after calling triagulation.execute_refinement_and_coarsening();




I think it mgiht be possible to proceed as in the p4est test programs and called
             p4est_balance (triangulation, P4EST_CONNECT_FULL, NULL);

but I got the error message
cannot convert ‘dealii::parallel::distributed::Triangulation<3, 3>’ to ‘p4est_t* {aka p4est*}’ for argument ‘1’ to ‘void p4est_balance(p4est_t*, p4est_connect_type_t, p4est_init_t)’
   p4est_balance (triangulation, P4EST_CONNECT_FULL, NULL);

which is obvious because the p::d::triangulation is not a p4est*



Does someone have an idea how to fix this or how to balance the triangulation?

Best regards

Gabriel
























Wolfgang Bangerth

unread,
Jun 4, 2019, 11:52:50 AM6/4/19
to dea...@googlegroups.com
On 6/4/19 6:41 AM, Gabriel Peters wrote:
>
> I am wondering, whether there is a deal.ii function, which balances a
> parallel::distributed::triangulation neighbouring elements by 2:1,
> like the p8est_balance_ext function
> (see
> http://p4est.github.io/api/p8est__extended_8h.html#ad3a61dc2b4b5cc69b03c995f188bfd8d
> )
>
> Such a function might be useful after calling
> triagulation.execute_refinement_and_coarsening();
>
>
>
>
> I think it mgiht be possible to proceed as in the p4est test programs and called
> /p4est_balance//(triangulation, P4EST_CONNECT_FULL, NULL);/
> /
> /
> but I got the error message
> cannot convert ‘dealii::parallel::distributed::Triangulation<3, 3>’ to
> ‘p4est_t* {aka p4est*}’ for argument ‘1’ to ‘void p4est_balance(p4est_t*,
> p4est_connect_type_t, p4est_init_t)’
>    p4est_balance (triangulation, P4EST_CONNECT_FULL, NULL);
>
> which is obvious because the p::d::triangulation is not a p4est*
>
>
>
> Does someone have an idea how to fix this or how to balance the triangulation?

What are you trying to achieve? The p::d::Triangulation class calls that
function internally anyway to ensure the 2:1 balance. There is nothing you
need to do yourself.

Best
W.


--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Gabriel Peters

unread,
Jun 5, 2019, 5:36:42 AM6/5/19
to dea...@googlegroups.com
Hi
I am setting refinement_flags on cells, based on the geometry I use, and I want to ensure, that the mesh is still balanced. But if p4est does this automatically when I call execute_refine...()  it might be enough.
Best
 
Gabriel
 
Gesendet: Dienstag, 04. Juni 2019 um 17:52 Uhr
Von: "Wolfgang Bangerth" <bang...@colostate.edu>
An: "dea...@googlegroups.com" <dea...@googlegroups.com>
Betreff: Re: [deal.II] p4est balance_mesh
--
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/4595f80e-7d83-72d6-71e2-6c1fffe5bb32%40colostate.edu.
For more options, visit https://groups.google.com/d/optout.

Wolfgang Bangerth

unread,
Jun 5, 2019, 8:55:41 AM6/5/19
to dea...@googlegroups.com
On 6/5/19 3:36 AM, Gabriel Peters wrote:
> I am setting refinement_flags on cells, based on the geometry I use, and I
> want to ensure, that the mesh is still balanced. But if p4est does this
> automatically when I call execute_refine...()  it might be enough.

p4est doesn't, but deal.II does when it refines the mesh. It automatically
calls p4est_balance after p4est_refine.

Gabriel Peters

unread,
Jun 5, 2019, 9:03:30 AM6/5/19
to dea...@googlegroups.com
Ok thanks a lot.

Best
Gabriel




Gabriel Peters
Endenicher Str. 310
53121 Bonn
00491525/5478185
Gabriel...@koeln.de

Am 05.06.19 um 14:55 schrieb Wolfgang 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+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/13f21b39-b827-79a6-cbfc-882d21acba07%40colostate.edu.
Reply all
Reply to author
Forward
0 new messages