lanl / LaGriT

Los Alamos Grid Toolbox (LaGriT) is a library of user callable tools that provide mesh generation, mesh optimization and dynamic mesh maintenance in two and three dimensions.
https://lanl.github.io/LaGriT/
Other
122 stars 49 forks source link

Pylagrit: Error when running example "ideas_mesh" #245

Open Cocytus-kyon opened 2 years ago

Cocytus-kyon commented 2 years ago

Deer all, When I try to execute the example(/Lagrit/PyLaGriT/examples/ideas_mesh) with the following command

python ideas_mesh.py --dem dem0.5m.dat --exo ./

the error message is below:

...
       1828         0   0.3350000E+02  0.5500000E+01  0.0000000E+00             
        975         0   0.7000000E+01  0.3000000E+01  0.0000000E+00             
        122         0   0.6050000E+02  0.0000000E+00  0.0000000E+00             
ERROR: delaunay                                                                 
     > invalid number for element estimate:          0                          
     > exiting with error num:     1                                            

ERROR END: delaunay                                                             

             Warning from: connect                           set info 0 elements

 Dudding      5120 points that have no associated tetrahedra.                   
  0.0000000E+00  0.0000000E+00  0.0000000E+00          1         0              
  0.5000000E+00  0.0000000E+00  0.0000000E+00          2         0 
...
The mesh is complete but could not include all points.                         
 Number of points that could not be connected:       5120                       

LaGriT FINISH: connect                                                          

Traceback (most recent call last):
  File "ideas_mesh.py", line 106, in <module>
    m2.createpts_xyz((nx,ny,1),[xx.min(),yy.min(),0.],[xx.max(),yy.max(),0],rz_switch=[1,1,1])
  File "/usr/local/lib/python3.8/dist-packages/pylagrit-1.0.1-py3.8.egg/pylagrit/pylagrit.py", line 3597, in createpts_xyz
  File "/usr/local/lib/python3.8/dist-packages/pylagrit-1.0.1-py3.8.egg/pylagrit/pylagrit.py", line 3585, in createpts
  File "/usr/local/lib/python3.8/dist-packages/pylagrit-1.0.1-py3.8.egg/pylagrit/pylagrit.py", line 1540, in sendline
  File "/usr/local/lib/python3.8/dist-packages/pylagrit-1.0.1-py3.8.egg/pylagrit/pylagrit.py", line 128, in sendline
Exception: ERROR: delaunay

It seems to be related to problem #75,What should I do with PyLagrit? Could anyone help me to take a look at it? thank you so much

millerta commented 2 years ago

Thank you for reaching out.

Unfortunately our pylagrit developers have all retired or left for other positions.

I am one of the lagrit developers and can help with lagrit issues, but not python errors.

I may need your lagrit.log (restart file) and the data to help you, but here is what I see.

The connect command is failing. Either your point distribution is not Delaunay or something

went wrong earlier in the work flow. You can check lagrit.out for a full screen report.

Note your point distribution must be convex to connect without errors.

A fully unstructured mesh can be built using volume surfaces that represent a geometry. It is necessary that these surfaces are coincident where they share a boundary. There cannot be any gaps or intersections where surfaces cross each other. The interface nodes may need refinement or buffering to ensure elements conform at the boundary.

For modeling applications that require the Delaunay criteria, this can be very difficult. The mesh elements will conform to the geometry, but the mesh quality will likely contain a poor topology and generate negative coupling coefficients. The solutions from simulations may be inaccurate. You can mitigate the impact by adjusting the mesh resolution. Generally high aspect ratio tet elements (long dimension along the external boundary) are more of a problem. This means that mesh refinement that brings the mesh closer to unit aspect ratio will help.

See some general discussion at

https://lanl.github.io/LaGriT/pages/docs/meshing.html

Here are some simple examples regarding non-convex mesh methods.

https://lanl.github.io/LaGriT/pages/docs/demos/main_connect.html https://lanl.github.io/LaGriT/pages/docs/meshing.html


From: Cocytus-kyon @.***> Sent: Tuesday, June 14, 2022 3:24 AM To: lanl/LaGriT Cc: Subscribed Subject: [EXTERNAL] [lanl/LaGriT] Pylagrit: Error when running example "ideas_mesh" (Issue #245)

Deer all, When I try to execute the example(/Lagrit/PyLaGriT/examples/ideas_mesh) with the following command

python ideas_mesh.pyhttps://urldefense.com/v3/__http://ideas_mesh.py__;!!Bt8fGhp8LhKGRg!GmCsbR8oWE_nAK15A57rmTZD_Ng6sqaRbHWTjxqODRV3XhGPUgQIAMwvv45i7ynSGFUwuxjRom5eS0oGFEE48cQ8$ --dem dem0.5m.dat --exo ./

the error message is below:

... 1828 0 0.3350000E+02 0.5500000E+01 0.0000000E+00 975 0 0.7000000E+01 0.3000000E+01 0.0000000E+00 122 0 0.6050000E+02 0.0000000E+00 0.0000000E+00 ERROR: delaunay

invalid number for element estimate: 0 exiting with error num: 1

ERROR END: delaunay

         Warning from: connect                           set info 0 elements

Dudding 5120 points that have no associated tetrahedra. 0.0000000E+00 0.0000000E+00 0.0000000E+00 1 0 0.5000000E+00 0.0000000E+00 0.0000000E+00 2 0 ... The mesh is complete but could not include all points. Number of points that could not be connected: 5120

LaGriT FINISH: connect

Traceback (most recent call last): File "ideas_mesh.pyhttps://urldefense.com/v3/__http://ideas_mesh.py__;!!Bt8fGhp8LhKGRg!GmCsbR8oWE_nAK15A57rmTZD_Ng6sqaRbHWTjxqODRV3XhGPUgQIAMwvv45i7ynSGFUwuxjRom5eS0oGFEE48cQ8$", line 106, in m2.createpts_xyz((nx,ny,1),[xx.min(),yy.min(),0.],[xx.max(),yy.max(),0],rz_switch=[1,1,1]) File "/usr/local/lib/python3.8/dist-packages/pylagrit-1.0.1-py3.8.egg/pylagrit/pylagrit.pyhttps://urldefense.com/v3/__http://pylagrit.py__;!!Bt8fGhp8LhKGRg!GmCsbR8oWE_nAK15A57rmTZD_Ng6sqaRbHWTjxqODRV3XhGPUgQIAMwvv45i7ynSGFUwuxjRom5eS0oGFNLf0CP0$", line 3597, in createpts_xyz File "/usr/local/lib/python3.8/dist-packages/pylagrit-1.0.1-py3.8.egg/pylagrit/pylagrit.pyhttps://urldefense.com/v3/__http://pylagrit.py__;!!Bt8fGhp8LhKGRg!GmCsbR8oWE_nAK15A57rmTZD_Ng6sqaRbHWTjxqODRV3XhGPUgQIAMwvv45i7ynSGFUwuxjRom5eS0oGFNLf0CP0$", line 3585, in createpts File "/usr/local/lib/python3.8/dist-packages/pylagrit-1.0.1-py3.8.egg/pylagrit/pylagrit.pyhttps://urldefense.com/v3/__http://pylagrit.py__;!!Bt8fGhp8LhKGRg!GmCsbR8oWE_nAK15A57rmTZD_Ng6sqaRbHWTjxqODRV3XhGPUgQIAMwvv45i7ynSGFUwuxjRom5eS0oGFNLf0CP0$", line 1540, in sendline File "/usr/local/lib/python3.8/dist-packages/pylagrit-1.0.1-py3.8.egg/pylagrit/pylagrit.pyhttps://urldefense.com/v3/__http://pylagrit.py__;!!Bt8fGhp8LhKGRg!GmCsbR8oWE_nAK15A57rmTZD_Ng6sqaRbHWTjxqODRV3XhGPUgQIAMwvv45i7ynSGFUwuxjRom5eS0oGFNLf0CP0$", line 128, in sendline Exception: ERROR: delaunay

It seems to be related to problem #75https://urldefense.com/v3/__https://github.com/lanl/LaGriT/issues/75__;!!Bt8fGhp8LhKGRg!GmCsbR8oWE_nAK15A57rmTZD_Ng6sqaRbHWTjxqODRV3XhGPUgQIAMwvv45i7ynSGFUwuxjRom5eS0oGFAooNlkR$,What should I do with PyLagrit? Could anyone help me to take a look at it? thank you so much

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/lanl/LaGriT/issues/245__;!!Bt8fGhp8LhKGRg!GmCsbR8oWE_nAK15A57rmTZD_Ng6sqaRbHWTjxqODRV3XhGPUgQIAMwvv45i7ynSGFUwuxjRom5eS0oGFFaxeBe6$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AFAWPSFLPDBYWPHJNYMSW7DVPBFUFANCNFSM5YW7ULMQ__;!!Bt8fGhp8LhKGRg!GmCsbR8oWE_nAK15A57rmTZD_Ng6sqaRbHWTjxqODRV3XhGPUgQIAMwvv45i7ynSGFUwuxjRom5eS0oGFDAwef_v$. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Cocytus-kyon commented 2 years ago

Thank you very much for your reply!

My 'lagrit.log' is empty and I don't know why. Input data is here. I will try to solve the problem according to your comments. If there is any progress, I will reply here.

Thank you again.

millerta commented 2 years ago

the log file might have a different name running under python.

Check files that are written, lagrit.out is the screen capture with errors.

lagrit.log is the command file that can run with lagrit < lagrit.log

It looks like you are getting points but many points are problematic.

You can run the workflow and add a lagrit "finish" command at each step,

just to make sure each of the previous commands are running as expected.

I can not look at this now, but maybe later in the week.

Remind me later if you can not locate the problem.

Good luck,

Terry


From: Cocytus-kyon @.***> Sent: Tuesday, June 14, 2022 8:46:02 AM To: lanl/LaGriT Cc: Miller, Terry Ann; Comment Subject: [EXTERNAL] Re: [lanl/LaGriT] Pylagrit: Error when running example "ideas_mesh" (Issue #245)

Thank you very much for your reply!

My 'lagrit.log' is empty and I don't know why. Input data is herehttps://urldefense.com/v3/__https://github.com/lanl/LaGriT/blob/master/PyLaGriT/examples/ideas_mesh/dem0.5m.dat__;!!Bt8fGhp8LhKGRg!Ggn4W1iYS7156Z6lBLQOtCDH9Lm2Q_Ka4krZmuJ0KRuOCbj20-SLSIS0ZmR9PFwxKzVY2I8B3fuI1iKFqtE9UwWL$. I will try to solve the problem according to your comments. If there is any progress, I will reply here.

Thank you again.

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/lanl/LaGriT/issues/245*issuecomment-1155294303__;Iw!!Bt8fGhp8LhKGRg!Ggn4W1iYS7156Z6lBLQOtCDH9Lm2Q_Ka4krZmuJ0KRuOCbj20-SLSIS0ZmR9PFwxKzVY2I8B3fuI1iKFqsGe3Sir$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AFAWPSDU6CYY4ETMMG6ODGDVPCLKVANCNFSM5YW7ULMQ__;!!Bt8fGhp8LhKGRg!Ggn4W1iYS7156Z6lBLQOtCDH9Lm2Q_Ka4krZmuJ0KRuOCbj20-SLSIS0ZmR9PFwxKzVY2I8B3fuI1iKFqpGqzNeA$. You are receiving this because you commented.Message ID: @.***>