Re: [deal.II] How to set refinement flag on the neighbouring cell when it is owned by another processor?

2023-07-21 Thread Abbas Ballout
I ended up passing the assemble_own_interior_faces_both flag to mesh-worker 
mesh loop. 
I will probably have to use these Consensus algorithms sooner or later 
anyway. 

Thank you. 
Abbas 

On Thursday, July 13, 2023 at 3:17:59 AM UTC+2 Wolfgang Bangerth wrote:

> On 7/11/23 08:23, Abbas Ballout wrote:
> > I don't want to just set a refinement flag for my cell but I also want 
> to set 
> > the refinement
> > flag for the neighbouring cell too and that is what 
> ncellset_refine_flag(); 
> > doesThis doesn't work if the neighbouring cell is owned by another core
>
> Correct. That's because you can't set information on cells you don't own, 
> in 
> particular because it isn't clear what should happen if different 
> non-owning 
> processes (for which this cell is a ghost cell) disagree in their 
> decisions on 
> what they want to set.
>
> If you want to do this kind of thing, you probably want to collect a list 
> of 
> (cell_id, value) that you want to send to each of the neighboring 
> processes, 
> then send it via Utilities::MPI::isend(). Then you'd receive this kind of 
> list 
> on each process via Utilities::MPI::irecv(), unpack it, and then set the 
> value 
> on each of the cells in question.
>
> If you want a higher-level interface, you can use the functions in 
> Utilities::MPI::ConsensusAlgorithms.
>
> Best
> Wolfgang
>
> -- 
> 
> Wolfgang Bangerth email: bang...@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/b7efbdde-5de5-4b93-a4ef-91152ba63a99n%40googlegroups.com.


Re: [deal.II] How to set refinement flag on the neighbouring cell when it is owned by another processor?

2023-07-12 Thread Wolfgang Bangerth

On 7/11/23 08:23, Abbas Ballout wrote:
I don't want to just set a refinement flag for my cell but I also want to set 
the refinement
flag for the neighbouring cell too and that is what ncellset_refine_flag(); 
doesThis doesn't work if the neighbouring cell is owned by another core


Correct. That's because you can't set information on cells you don't own, in 
particular because it isn't clear what should happen if different non-owning 
processes (for which this cell is a ghost cell) disagree in their decisions on 
what they want to set.


If you want to do this kind of thing, you probably want to collect a list of 
(cell_id, value) that you want to send to each of the neighboring processes, 
then send it via Utilities::MPI::isend(). Then you'd receive this kind of list 
on each process via Utilities::MPI::irecv(), unpack it, and then set the value 
on each of the cells in question.


If you want a higher-level interface, you can use the functions in 
Utilities::MPI::ConsensusAlgorithms.


Best
 Wolfgang

--

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/94596774-23d6-cbcf-2516-969f1513bd76%40colostate.edu.