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

quality report bug #164

Closed millerta closed 5 years ago

millerta commented 5 years ago

quality is not always reporting attribute values correctly. For instance in this example elements in material 1 and 2 have volume 1, not zero. The summary is correct, but not the reports by material value.

quality/volume/itetclr                                                          

QUALITY TOTALS for          3 MATERIALS:                                                        
 epsilonvol:   3.4390268E-12                                                     
---------------------------------------                                         
 VOLUMES for ELEMENT COLOR          1                                          
...........................                                                     
All elements have volume  0.0000000E+00                                         
---------------------------------------                                         

VOLUMES for ELEMENT COLOR          2                                          
...........................                                                     
All elements have volume  0.0000000E+00                                         
---------------------------------------                                         

VOLUMES for ELEMENT COLOR          3                                          
...........................                                                     
element volumes b/w  0.1000E+00 and  0.1477E+00:        20                      
element volumes b/w  0.1477E+00 and  0.2183E+00:         0                      
element volumes b/w  0.2183E+00 and  0.3225E+00:        16                      
element volumes b/w  0.3225E+00 and  0.4765E+00:         0                      
element volumes b/w  0.4765E+00 and  0.7040E+00:        12                      
min volume =   1.0000000E-01  max volume =   7.0400000E-01                      
---------------------------------------                                         

  SUMMARY VOLUME/AREA of ELEMENT COLORS for cmotet         1           3        
...........................................................                     
Color      Num. Elements   Volume          Fractional Volume                    
    1           6          0.1000000E+01     0.064566116                        
    2           6          0.1000000E+01     0.064566116                        
    3          48          0.1348800E+02     0.870867769                        
 Total elements:           60          Total Volume:  0.1548800E+02             
-----------------------------------------------------------             

Another example of incorrect quality report, the computed numbers are correct, but the values given for each of the bins do not reflect the min max values.

quality/edge_max/y                                                              
cmo/addatt//edgemax/VDOUBLE/scalar/nelements                                    
finish                                                                          

epsilonl, epsilonaspect:   3.5613878E-11  4.5170802E-32                         
--------------------------------------------                                    
element norm max edge length < .01:                    0                        
element norm edge length b/w .01 and .02:          0                            
element norm edge length b/w .02 and .05:          0                            
element norm edge length b/w .05 and .1 :          6                            
element norm edge length b/w .1  and .2 :         38                            
element norm edge length b/w .2  and .5 :          9                            
element norm edge length b/w .5  and 1. :        107                            
min max edge length =  0.2175E+01  max max edge length =  0.2500E+02            
-----------------------------------------------------------                     
       160 total elements evaluated.                          
millerta commented 5 years ago

Test directories with quality have correct results, will have to find example where quality is not working.

test/level01/refine_recon_quality calls quality/volume/material with correct results.

millerta commented 5 years ago

The bug causing quality volume to report wrong non zero volumes is in quality.f The index into the volume array vol() was using index 1 instead of mpary(1) vol(1) 0.0000000000000000
vol(2) 0.0000000000000000
vol(3) 0.16666666666666666
mpary(1) = 3 vol(3) = 0.16666666666666666
mpary(2) = 7 vol(7) = 0.16666666666666666
mpary(3) = 9 vol(9) = 0.16666666666666666

millerta commented 5 years ago

bug fixed for quality/volume/itetclr Each material (itetclr) is now reporting the correct volume. See test/level01/quality for examples. I am moving the other quality bug into a separate issue since it is not related to this.