GLVis / glvis

Lightweight OpenGL tool for accurate and flexible finite element visualization
http://glvis.org
BSD 3-Clause "New" or "Revised" License
255 stars 53 forks source link

parallel nurbs mesh issue #16

Closed rduvigne closed 7 years ago

rduvigne commented 7 years ago

Hello,

I encountered problems when trying to visualize a grid based on nurbs elements from a set of files. It works well when using a single file, but when using multiple files only the grid contained in the last file is actually visible.

I would like to know if you have an example corresponding to such a case ? If necessary, I can also provide my case to fix the problem.

Thanks a lot. Regis

tzanio commented 7 years ago

Hi Regis,

This should work.

One way to try it is to run MFEM's Example 1p on a NURBS mesh:

mpirun -np 2 ex1p -m ../data/pipe-nurbs.mesh

This produces files mesh.000000, mesh.000001, sol.000000 and sol.000001 (attached), that can then be visualized with

glvis -np 2 -m mesh -g sol

How do you generate your mesh? Can you send us a sample?

Cheers, Tzanio

rduvigne commented 7 years ago

Thanks a lot for this fast reply and confirmation that it should work !

I check the program that writes the partitioned nurbs grid (my own work). I will send you a small example if I do not succeed in fixing the problem.

Regards, Régis

rduvigne commented 7 years ago

Hi,

In fact your example is a little too complex to analyse my error. Could you generate a similar one from the case data/square-disc-nurbs.mesh ? (I have not compiled MFEM in parallel).

Alternatively, I have generated a very simple case (2 elements) that illustrates my problem test_nurbs.zip

The two files corresponding to quad elements works well. But for the two files with nurbs elements (simply linear), only the element contained in the second file is visible. if you visualize the files separately, both case work. The only difference between quad and nurbs is in the definition of edges. Could you explain me what is wrong ?

Thanks in advance, Régis

tzanio commented 7 years ago

Hi Régis,

Is this test case better?

It is just the data/beam-quad-nurbs.mesh split in two: glvis_s01

Tzanio

v-dobrev commented 7 years ago

Hi Régis,

Note that when MFEM writes a parallel NURBS mesh, each processor writes the global patch connectivity as a mesh of quads/hexes; then each processor writes all knot vectors. Then each processor writes its local elements in a section called mesh_elements (which is not used in serial) and finally, its local weights and control point coordinates.

Hope this helps, Veselin

rduvigne commented 7 years ago

Hi, Thank you for your help, my bug is fixed now (I misunderstood the "mesh_elements" section) Here is an example of partitioned nurbs grid to study the flow around an airfoil:

mesh_nurbs_16part

By the way, GLVIS is a perfect tool for visualization in isogeometric analysis ! Thanks again for your help. régis

tzanio commented 7 years ago

Glad you got it working.

Thank you for the good words and please let us know if you have any questions or feature requests in the future.

Tzanio