Re: [deal.II] Non smooth solution when the BC coincide with the processors boundaries?

2018-02-16 Thread Giorgos Kourakos
Thank you for you reply,

The issue with the boundaries was indeed solved when I assigned the 
boundary ids on the ghost cells as well.

As for the other problem with the refinement around the processor borders, 
I was using a relatively complex way to move the triangulation vertices 
each iteration using a solution transfer to interpolate the vertices to the 
refined mesh. 

After a lot of digging I found the method 
communicate_locally_moved_vertices with a note that I should convert the 
triangulation back to its original shape, then apply refinement, and then 
move the vertices to the desired position.

This simple trick works great so far. 
Kudos to whoever came up with that !!

Giorgos

On Thursday, February 15, 2018 at 3:54:03 PM UTC-8, Wolfgang Bangerth wrote:
>
> On 02/15/2018 04:48 PM, Giorgos Kourakos wrote: 
> > 
> > I haven't forgotten the ConstraintMatrix::distribute. The code works 
> > with 1 processor 
> > I do set manually boundary ids but I reset them after every refinement. 
> > Isn't this enough to get the correct boundaries? 
> > I haven't cross out the other two cases yet, although it doesnt seem as 
> > an artifact. I would say that it looks like that the one processor 
> > doesnt know that there is a boundary in this ghost cell. 
> > At the moment I set boundary ids only for the locally owned cells. 
>
> Not good enough. Both the IndexSet you pass to ConstrainedMatrix and 
> VectorTools::interpolate_boundary_values() needs to have correct 
> information about ghost cells. So the index set needs to contain all 
> locally relevant DoFs, and you need to set boundary_ids for all ghost 
> cells as well. 
>
>
> > I'd like to know if this is somehow expected when more than one 
> > processor is used. 
>
> No -- the solution you compute needs to be exactly the same (up to 
> round-off and solver tolerance, of course) whether you compute with one 
> or multiple processors. 
>
> Best 
>   W. 
>
> -- 
>  
> 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.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Non smooth solution when the BC coincide with the processors boundaries?

2018-02-15 Thread Wolfgang Bangerth

On 02/15/2018 04:48 PM, Giorgos Kourakos wrote:


I haven't forgotten the ConstraintMatrix::distribute. The code works 
with 1 processor
I do set manually boundary ids but I reset them after every refinement. 
Isn't this enough to get the correct boundaries?
I haven't cross out the other two cases yet, although it doesnt seem as 
an artifact. I would say that it looks like that the one processor 
doesnt know that there is a boundary in this ghost cell.

At the moment I set boundary ids only for the locally owned cells.


Not good enough. Both the IndexSet you pass to ConstrainedMatrix and 
VectorTools::interpolate_boundary_values() needs to have correct 
information about ghost cells. So the index set needs to contain all 
locally relevant DoFs, and you need to set boundary_ids for all ghost 
cells as well.



I'd like to know if this is somehow expected when more than one 
processor is used.


No -- the solution you compute needs to be exactly the same (up to 
round-off and solver tolerance, of course) whether you compute with one 
or multiple processors.


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.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Non smooth solution when the BC coincide with the processors boundaries?

2018-02-15 Thread Timo Heister
Giorgos,

there can be several reasons for this:
1. You forgot a ConstraintMatrix::distribute() call (after solving)
2. Your ConstraintMatrix is inconsistent (for example if you manually set
boundary ids or values in the ConstraintMatrix)
3. If you do some kind of nonlinear iteration, you might not treat
residuals of constrained entries correctly.
4. It might be a visualization artifact (you do not transfer the ghost
values over correctly).

This is an annoying thing to debug. Good luck.


On Thu, Feb 15, 2018 at 5:10 AM, Giorgos Kourakos  wrote:

> Hi deal.ii experts,
>
> I have the following issue and I'd like if you could give me directions
> what to look for.
>
> I'm attaching a figure from two consecutive iterations:
> The black line shows how the triangulation is split to different
> processors.
> The red line indicates a Dirichlet boundary condition that happens to
> start
> exactly at the edge of the cell and spans almost half cell (of the 1st
> iteration).
>
> ITERATION 1
>
>
>   >
>
>
> ITERATION 2
>
>
>   >
>
>
> You can see that there is an artifact in the solution right where the
> border between the processors and the edge of the boundary conditions is.
> If I change slightly the boundary conditions e.g. expand it to the left
> then the solution is getting smooth.
>
> Any advice?
>
> Thank you
>
> Giorgos
>
>
>
> --
> The deal.II project is located at 
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.dealii.org_=DwIBaQ=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw=FXNP1TzxXyujwfeH30hq_c08Gw_Elq8I27NRMvHfhSo=XbXGlLUFFDbIPBMwMupIaGv8DRL-hOQ-hF_Lf6R-dNE=
>  
> For mailing list/forum options, see 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_=DwIBaQ=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw=FXNP1TzxXyujwfeH30hq_c08Gw_Elq8I27NRMvHfhSo=JcywWm3IbaPXDhLbQThfRGdhiH0yy7CL9yt0jiWtsGQ=
>  
> 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.
> For more options, visit 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout=DwIBaQ=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw=FXNP1TzxXyujwfeH30hq_c08Gw_Elq8I27NRMvHfhSo=UC01YylZx5IunNqH7OX7-0a-V1zRp9t1_64E4cNepGw=
>  .
>



-- 
Timo Heister
http://www.math.clemson.edu/~heister/

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[deal.II] Non smooth solution when the BC coincide with the processors boundaries?

2018-02-15 Thread Giorgos Kourakos


Hi deal.ii experts,

I have the following issue and I'd like if you could give me directions 
what to look for.

I'm attaching a figure from two consecutive iterations:
The black line shows how the triangulation is split to different processors.
The red line indicates a Dirichlet boundary condition that happens to start 
exactly at the edge of the cell and spans almost half cell (of the 1st 
iteration).

ITERATION 1




ITERATION 2




You can see that there is an artifact in the solution right where the 
border between the processors and the edge of the boundary conditions is.
If I change slightly the boundary conditions e.g. expand it to the left 
then the solution is getting smooth.

Any advice?

Thank you

Giorgos
  


-- 
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.
For more options, visit https://groups.google.com/d/optout.