librelist archives

« back to archive

Global quadrant number

Global quadrant number

From:
Ethan Hereth
Date:
2015-08-24 @ 01:17
Gentlemen,

I'm trying to validate some research code I have that uses p4est.
Specifically I am trying to validate the compressed row storage and linear
system solver I have implemented for my implicit scheme. I'm having some
trouble getting my parallel implicit code to work so I want to try to see
if I can get the same answer to a global system in serial and in parallel.
Is there a way to get a 'global' quadrant number in parallel? I.e., can I
back out the index a quadrant would have gotten if the parallel p4est had
been created in serial? I dug around in the headers some but I couldn't
quickly find anything that looked useful. Forgive me if I'm overlooking
something obvious.

Thank you for your help and, once again, thanks for the great software.

Ethan Alan

Re: [p4est] Global quadrant number

From:
Michael Lahnert
Date:
2015-08-24 @ 07:01
Hi Ethan,

On Sun, 2015-08-23 at 21:17 -0400, Ethan Hereth wrote:
> Is there a way to get a
> 'global' quadrant number in parallel? I.e., can I back out the index a
> quadrant would have gotten if the parallel p4est had been created in serial? I
> dug around in the headers some but I couldn't quickly find anything that
> looked useful. Forgive me if I'm overlooking something obvious.

if you are just interested in verifying you have the right cells in your scheme
you might look into x, y, and z (if 3D or P4_TO_P8) of p4(8)est_quadrant_t. 

If you want to recover a cell's index, I think you can make use of the space
-filling curve, i.e. something like add number of quadrants of all processors
with lesser rank + local tree offset + local index (see figure 2.1 of [1]). Note
however, that I did not try this in an actual code-snippet.

Best regards
Michael

[1] p4est: Scalable Algorithms For Parallel Adaptive Mesh Refinement on Forests
of Octrees by Carsten Burstedde, Lucas Wilcox, and Omar Ghattas;
http://p4est.github.io/papers/BursteddeWilcoxGhattas11.pdf

-- 
Dipl.-Inf. Michael Lahnert
Simulation großer Systeme
Institut für Parallele und Verteilte Systeme, Universität Stuttgart
Universitätsstraße 38
70569 Stuttgart | Germany

Tel: +49 (0)711 685 88560

Re: [p4est] Global quadrant number

From:
Ethan Hereth
Date:
2015-09-17 @ 18:03
I'm sorry to just now respond. I appreciate your answer. After having sent
the email it occurred to me that I could probably do something like you
suggested to figure this out. I've been swamped haven't had the chance to
try it out yet, and now I'm not sure I'll need to anymore.

Thanks for your time though.

Ethan Alan

Ethan Alan

On Mon, Aug 24, 2015 at 3:01 AM, Michael Lahnert <
michael.lahnert@ipvs.uni-stuttgart.de> wrote:

> Hi Ethan,
>
> On Sun, 2015-08-23 at 21:17 -0400, Ethan Hereth wrote:
> > Is there a way to get a
> > 'global' quadrant number in parallel? I.e., can I back out the index a
> > quadrant would have gotten if the parallel p4est had been created in
> serial? I
> > dug around in the headers some but I couldn't quickly find anything that
> > looked useful. Forgive me if I'm overlooking something obvious.
>
> if you are just interested in verifying you have the right cells in your
> scheme
> you might look into x, y, and z (if 3D or P4_TO_P8) of p4(8)est_quadrant_t.
>
> If you want to recover a cell's index, I think you can make use of the
> space
> -filling curve, i.e. something like add number of quadrants of all
> processors
> with lesser rank + local tree offset + local index (see figure 2.1 of
> [1]). Note
> however, that I did not try this in an actual code-snippet.
>
> Best regards
> Michael
>
> [1] p4est: Scalable Algorithms For Parallel Adaptive Mesh Refinement on
> Forests
> of Octrees by Carsten Burstedde, Lucas Wilcox, and Omar Ghattas;
> http://p4est.github.io/papers/BursteddeWilcoxGhattas11.pdf
>
> --
> Dipl.-Inf. Michael Lahnert
> Simulation großer Systeme
> Institut für Parallele und Verteilte Systeme, Universität Stuttgart
> Universitätsstraße 38
> 70569 Stuttgart | Germany
>
> Tel: +49 (0)711 685 88560
>
>