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
116 stars 48 forks source link

recon2d errors for 0 elements #228

Closed millerta closed 2 years ago

millerta commented 2 years ago

recon2d does not exit gracefully for 0 elements and creates strange epsilon values

 33         epsilon REAL     scalar          scalar const perma   l  1.000E-15
 34        epsilonl REAL     scalar          scalar const perma   l  7.692+137
 35        epsilona REAL     scalar          scalar const perma   l  2.665+288
 36        epsilonv REAL     scalar          scalar const perma   l   Infinity
millerta commented 2 years ago

Added check and early exit for 0 elements, epsilon values are still being set to bad values. Need to figure out where that is happening and fix it.

millerta commented 2 years ago

recon is used to call the recon2d and other routines. It also uses setsize to assign epsilon values. For a 0 element mesh the eps values are junk. Added check for 0 elements and exit. This avoids bad values assigned to the epsilons. Note there will be a general error msg from control_command_lg due to ierror = -1 Now the output for 0 elements will look like:

recon/0

WARNING Recon Early Exit: 0 elements

RECON: done.
error in command : recon/0