Disordered mesh elements after several refinmnets

24 views
Skip to first unread message

ofcra...@gmail.com

unread,
Apr 26, 2019, 10:35:40 PM4/26/19
to deal.II User Group
Dear All,

I am solving Laplace equation near end of line where field is changing like sqrt(r), thats why I dense mesh size near tip, and also use adaptive mesh refinement to make it dense even more. 

But resulted mesh is very disordered(even simulation still works). 
I can't understand where is the problem: in Paraview, in mesh generator(Triangle+Tethex) or in Deal.ii? And what are others limitation of mesh size, cos I need those to be very small near tip.

ps: my code is very similar to step-6.

With regards,
Oleg Kmechak

4.png


3.png2.png1.png

refinment_test_0.vtk
refinment_test_3.vtk
refinment_test_5.vtk
refinment_test_7.vtk

Wolfgang Bangerth

unread,
Apr 26, 2019, 11:27:08 PM4/26/19
to dea...@googlegroups.com
On 4/26/19 8:35 PM, ofcra...@gmail.com wrote:
>
> I am solving Laplace equation near end of line where field is changing like
> sqrt(r), thats why I dense mesh size near tip, and also use adaptive mesh
> refinement to make it dense even more.
>
> But resulted mesh is very disordered(even simulation still works).
> I can't understand where is the problem: in Paraview, in mesh
> generator(Triangle+Tethex) or in Deal.ii? And what are others limitation of
> mesh size, cos I need those to be very small near tip.

What do the pictures you attached show? It looks like some of the cells are
triangles, not quadrilaterals. Is this a 3d mesh? A 2d mesh?

Best
W.


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

ofcra...@gmail.com

unread,
Apr 30, 2019, 11:06:06 AM4/30/19
to deal.II User Group
Sorry, if my question(and english language) is not clear enough.
Yes those "triangles" mesh are what I call "disordered mesh". By design, my mesh generator produces only quadrangular elements(with area nearly 1e-10), but after few refinments in deal.ii paraview shows those pictures: one refinment, two. three times and one with bigger view on mesh)

Best,
Oleg

Wolfgang Bangerth

unread,
Apr 30, 2019, 11:14:07 AM4/30/19
to dea...@googlegroups.com
On 4/30/19 9:06 AM, ofcra...@gmail.com wrote:
> Yes those "triangles" mesh are what I call "disordered mesh". By design,
> my mesh generator produces only quadrangular elements(with area nearly
> 1e-10), but after few refinments in deal.ii paraview shows those
> pictures: one refinment, two. three times and one with bigger view on mesh)

Oh, I wonder whether that's because you output the locations of vertices
only to a certain number of digits. Can you set the precision of the
stream you output the file to to a larger number of digits?

What output format do you use?

Oleg Kmechak

unread,
Apr 30, 2019, 11:24:31 AM4/30/19
to dea...@googlegroups.com
Yes, it looked like not enough precision of numbers and thats why it quantisizing mesh to grid. 
I am using VTK and standard workflow from step-6:      

DataOut<dim> data_out; 
data_out.attach_dof_handler(dof_handler); 
data_out.add_data_vector(solution, "solution"); 
data_out.build_patches(); 
std::ofstream output(file_name + ".vtk"); 
data_out.write_vtk(output); 

Best, 
Oleg



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

Oleg Kmechak

unread,
Apr 30, 2019, 11:30:30 AM4/30/19
to dea...@googlegroups.com
PS: In a moment I checked documentation for write_vtk. And there is suggestion to use VTU, so I will try to check also this case.
Regards,
Oleg

On Tue, 30 Apr 2019 at 17:14, Wolfgang Bangerth <bang...@colostate.edu> wrote:

Wolfgang Bangerth

unread,
Apr 30, 2019, 11:38:49 AM4/30/19
to dea...@googlegroups.com
On 4/30/19 7:29 AM, Oleg Kmechak wrote:
> PS: In a moment I checked documentation for write_vtk. And there is
> suggestion to use VTU, so I will try to check also this case.

I looked up the VTU format when I wrote the original answer, and it
turns out that we only use 32-bit floating point numbers in VTU. So
you'll probably need to stick with VTK format and use something like
output.precision(16);
to output the data with more digits.

ofcra...@gmail.com

unread,
May 6, 2019, 10:28:00 AM5/6/19
to deal.II User Group
Thanks, it helped me. Very small mesh elements are still disordered but oweral solution looks better.

Regards, 
Oleg Kmechak
Reply all
Reply to author
Forward
0 new messages