MOAB: Mesh Oriented datABase  (version 5.2.1)
verdict.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Module:    $RCSfile: verdict.h,v $
00004 
00005   Copyright (c) 2006 Sandia Corporation.
00006   All rights reserved.
00007   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE.  See the above copyright notice for more information.
00012 
00013 =========================================================================*/
00014 
00015 
00016 /*! \file verdict.h
00017   \brief Header file for verdict library that calculates metrics for finite elements.
00018     Also see: \ref index "Main Page" 
00019  *
00020  * verdict.h is the header file for applications/libraries to include
00021  *           to compute quality metrics.
00022  *
00023  * This file is part of VERDICT
00024  *
00025 */
00026 
00027 /* note: changes to this file must be propagated to verdict.h.in so that 
00028    Verdict can be compiled using CMake and autoconf. */
00029 
00030 #ifndef VERDICT_INC_LIB
00031 #define VERDICT_INC_LIB
00032 
00033 #ifndef VERDICT_VERSION
00034 # define VERDICT_VERSION 120
00035 #endif
00036 
00037 #define VERDICT_DBL_MIN 1.0E-30
00038 #define VERDICT_DBL_MAX 1.0E+30
00039 #define VERDICT_PI 3.1415926535897932384626
00040 
00041 #ifdef __cplusplus
00042 # if defined(WIN32) && defined(VERDICT_SHARED_LIB)
00043 #  ifdef verdict_EXPORTS
00044 #   define C_FUNC_DEF extern "C" __declspec(dllexport)
00045 #  else
00046 #   define C_FUNC_DEF extern "C" __declspec(dllimport)
00047 #  endif
00048 # else
00049 #  define C_FUNC_DEF extern "C"
00050 # endif
00051 #else
00052 # if defined(WIN32) && defined(VERDICT_SHARED_LIB)
00053 #  ifdef verdict_EXPORTS
00054 #   define C_FUNC_DEF __declspec(dllexport)
00055 #  else
00056 #   define C_FUNC_DEF __declspec(dllimport)
00057 #  endif
00058 # else
00059 #  define C_FUNC_DEF
00060 # endif
00061 #endif
00062 
00063 
00064 /* typedef for the user if they want to use
00065  *    function pointers */
00066 #ifdef __cplusplus
00067 extern "C" {
00068 #endif
00069   typedef double(*VerdictFunction)(int, double[][3]);
00070   typedef int(*ComputeNormal)(double point[3], double normal[3]); 
00071 #ifdef __cplusplus
00072 }
00073 #endif
00074 
00075 
00076 /** HexMetricVals is a <em>struct</em> used to return calculated metrics  
00077     when calling the function <em>v_hex_quality(...)</em> 
00078 
00079     HexMetricVals is used just as QuadMetricVals.
00080     For an example, see Detailed Description in QuadMetricVals  
00081 */
00082 struct HexMetricVals
00083 {
00084   /** \sa v_hex_edge_ratio */
00085   double edge_ratio ;  
00086   /** \sa v_hex_max_edge_ratio */
00087   double max_edge_ratio ;  
00088   /** \sa v_hex_skew */
00089   double skew ;
00090   /** \sa v_hex_taper */
00091   double taper ;
00092   /** \sa v_hex_volume */
00093   double volume ;
00094   /** \sa v_hex_stretch */
00095   double stretch ;
00096   /** \sa v_hex_diagonal */
00097   double diagonal ;
00098   /** \sa v_hex_dimension */
00099   double dimension ;
00100   /** \sa v_hex_oddy */
00101   double oddy ;
00102   /** \sa v_hex_med_aspect_frobenius */
00103   double med_aspect_frobenius ;
00104   /** \sa v_hex_condition */
00105   double condition ;
00106   /** \sa v_hex_jacobian */
00107   double jacobian ;
00108   /** \sa v_hex_scaled_jacobian */
00109   double scaled_jacobian ;
00110   /** \sa v_hex_shear */
00111   double shear ;
00112   /** \sa v_hex_shape */
00113   double shape ;
00114   /** \sa v_hex_relative_size */
00115   double relative_size_squared;
00116   /** \sa v_hex_shape_and_size */
00117   double shape_and_size ; 
00118   /** \sa v_hex_shear_and_size */
00119   double shear_and_size ; 
00120   /** \sa v_hex_distortion */
00121   double distortion; 
00122 };
00123 
00124 /** EdgeMetricVals is a <em>struct</em> used to return calculated metrics  
00125     when calling the function <em>v_edge_quality(...)</em> 
00126 
00127     EdgeMetricVals is used just as QuadMetricVals.
00128     For an example, see Detailed Description in QuadMetricVals  
00129 */
00130 struct EdgeMetricVals
00131 {
00132   double length ; 
00133 };
00134 
00135 
00136 /** KnifeMetricVals is a <em>struct</em> used to return calculated metrics  
00137     when calling the function <em>v_knife_quality(...)</em> 
00138 
00139     KnifeMetricVals is used just as QuadMetricVals.
00140     For an example, see Detailed Description in QuadMetricVals  
00141 */
00142 struct KnifeMetricVals
00143 {
00144   double volume ; 
00145 };
00146 
00147 
00148 /** QuadMetricVals is a <em>struct</em> used to return calculated metrics  
00149     when calling the function <em>v_quad_quality(...)</em> 
00150  
00151     The following is an example of how this struct is used with Verdict.
00152 
00153     Example: \code
00154     QuadMetricVals quad_metrics = {0};
00155     unsigned long metrics_flag = 0;
00156     metrics_flag += V_QUAD_SHAPE;
00157     metrics_flag += V_QUAD_DISTORTION;
00158     metrics_flag += V_QUAD_AREA;   
00159     double quad_nodes[4][3];
00160     get_quad_nodes( quad_nodes );  //some user-defined function to load 
00161                                    //xyz coordinate info. into array  
00162     v_quad_quality( 4, quad_nodes, metrics_flag, quad_metrics );
00163     double my_shape      = quad_metrics.shape; 
00164     double my_distortion = quad_metrics.distortion; 
00165     double my_area       = quad_metrics.area;  \endcode
00166      
00167  */
00168 
00169 struct QuadMetricVals
00170 {
00171   /** \sa v_quad_edge_ratio function */
00172   double edge_ratio ;
00173   /** \sa v_quad_max_edge_ratio function */
00174   double max_edge_ratio ;
00175   /** \sa v_quad_aspect_ratio function */
00176   double aspect_ratio ;
00177   /** \sa v_quad_radius_ratio function */
00178   double radius_ratio ;
00179   /** \sa v_quad_med_aspect_frobenius function */
00180   double med_aspect_frobenius ;
00181   /** \sa v_quad_max_aspect_frobenius function */
00182   double max_aspect_frobenius ;
00183   /** \sa v_quad_skew function */
00184   double skew ;
00185   /** \sa v_quad_taper function */
00186   double taper ;
00187   /** \sa v_quad_warpage function */
00188   double warpage ;
00189   /** \sa v_quad_area function */
00190   double area ;
00191   /** \sa v_quad_stretch function */
00192   double stretch ;
00193   /** \sa v_quad_smallest_angle function */
00194   double minimum_angle ;
00195   /** \sa v_quad_largest_angle function */
00196   double maximum_angle ;
00197   /** \sa v_quad_oddy function */
00198   double oddy ;
00199   /** \sa v_quad_condition function */
00200   double condition ;
00201   /** \sa v_quad_jacobian function */
00202   double jacobian ;
00203   /** \sa v_quad_scaled_jacobian function */
00204   double scaled_jacobian ;
00205   /** \sa v_quad_shear function */
00206   double shear ;
00207   /** \sa v_quad_shape function */
00208   double shape ;
00209   /** \sa v_quad_relative_size_squared function */
00210   double relative_size_squared ;
00211   /** \sa v_quad_shape_and_size function */
00212   double shape_and_size ; 
00213   /** \sa v_quad_shear_and_size function */
00214   double shear_and_size ;
00215   /** \sa v_quad_distortion function */
00216   double distortion; 
00217 };
00218 
00219 /** PyramidMetricVals is a <em>struct</em> used to return calculated metrics  
00220     when calling the function <em>v_pyramid_quality(...)</em> 
00221 
00222     PyramidMetricVals is used just as QuadMetricVals.
00223     For an example, see Detailed Description in QuadMetricVals  
00224 */
00225 struct PyramidMetricVals
00226 {
00227   double volume ; 
00228 };
00229    
00230 /** WedgeMetricVals is a <em>struct</em> used to return calculated metrics  
00231     when calling the function <em>v_wedge_quality(...)</em> 
00232 
00233     WedgeMetricVals is used just as QuadMetricVals.
00234     For an example, see Detailed Description in QuadMetricVals  
00235 */
00236 struct WedgeMetricVals
00237 {
00238   double volume ; 
00239 };
00240      
00241 /** TetMetricVals is a <em>struct</em> used to return calculated metrics  
00242     when calling the function <em>v_tet_quality(...)</em> 
00243 
00244     TetMetricVals is used just as QuadMetricVals.
00245     For an example, see Detailed Description in QuadMetricVals  
00246 */
00247 struct TetMetricVals
00248 {
00249   /** \sa v_tet_edge_ratio*/
00250   double edge_ratio;
00251   /** \sa v_tet_radius_ratio*/
00252   double radius_ratio;
00253   /** \sa v_tet_aspect_beta*/
00254   double aspect_beta;
00255   /** \sa v_tet_aspect_ratio */
00256   double aspect_ratio ;
00257   /** \sa v_tet_aspect_gamma */
00258   double aspect_gamma ;
00259   /** \sa v_tet_aspect_frobenius */
00260   double aspect_frobenius ;
00261   /** \sa v_tet_minimum_angle */
00262   double minimum_angle ;
00263   /** \sa v_tet_collapse_ratio*/
00264   double collapse_ratio;
00265   /** \sa v_tet_volume */
00266   double volume ;
00267   /** \sa v_tet_condition */
00268   double condition ;
00269   /** \sa v_tet_jacobian */
00270   double jacobian ;
00271   /** \sa v_tet_scaled_jacobian */
00272   double scaled_jacobian ;
00273   /** \sa v_tet_shape */
00274   double shape ;
00275   /** \sa v_tet_relative_size */
00276   double relative_size_squared ;
00277   /** \sa v_tet_shape_and_size*/
00278   double shape_and_size ; 
00279   /** \sa v_tet_distortion */
00280   double distortion; 
00281 };
00282 
00283 /** TriMetricVals is a <em>struct</em> used to return calculated metrics  
00284     when calling the function <em>v_tri_quality(...)</em> 
00285 
00286     TriMetricVals is used just as QuadMetricVals.
00287     For an example, see Detailed Description in QuadMetricVals  
00288 */
00289 struct TriMetricVals
00290 {
00291   /** \sa v_tri_edge_ratio */
00292   double edge_ratio ;
00293   /** \sa v_tri_aspect_ratio */
00294   double aspect_ratio ;
00295   /** \sa v_tri_radius_ratio */
00296   double radius_ratio ;
00297   /** \sa v_tri_aspect_frobenius */
00298   double aspect_frobenius ;
00299   /** \sa v_tri_area*/
00300   double area ;
00301   /** \sa v_tri_minimum_angle*/
00302   double minimum_angle ;
00303   /** \sa v_tri_maximum_angle */
00304   double maximum_angle ;
00305   /** \sa v_tri_condition */
00306   double condition ;
00307   /** \sa v_tri_scaled_jacobian */
00308   double scaled_jacobian ;
00309   /** \sa v_tri_shape */
00310   double shape ;
00311   /** \sa v_tri_relative_size_squared */
00312   double relative_size_squared ;
00313   /** \sa v_tri_shape_and_size */
00314   double shape_and_size ; 
00315   /** \sa v_tri_distortion */
00316   double distortion; 
00317 };
00318 
00319 
00320 
00321 /* definition of bit fields to determine which metrics to calculate */
00322 
00323 //! \name Hex bit fields
00324 //! 
00325 //@{
00326 
00327 #define V_HEX_MAX_EDGE_RATIO        1      /*!< \hideinitializer */
00328 #define V_HEX_SKEW                   2      /*!< \hideinitializer */
00329 #define V_HEX_TAPER                  4      /*!< \hideinitializer */
00330 #define V_HEX_VOLUME                 8      /*!< \hideinitializer */
00331 #define V_HEX_STRETCH                16     /*!< \hideinitializer */
00332 #define V_HEX_DIAGONAL               32     /*!< \hideinitializer */
00333 #define V_HEX_DIMENSION              64     /*!< \hideinitializer */
00334 #define V_HEX_ODDY                   128    /*!< \hideinitializer */
00335 #define V_HEX_MAX_ASPECT_FROBENIUS   256    /*!< \hideinitializer */
00336 #define V_HEX_CONDITION              256    /*!< \hideinitializer */
00337 #define V_HEX_JACOBIAN               512    /*!< \hideinitializer */
00338 #define V_HEX_SCALED_JACOBIAN        1024   /*!< \hideinitializer */
00339 #define V_HEX_SHEAR                  2048   /*!< \hideinitializer */
00340 #define V_HEX_SHAPE                  4096   /*!< \hideinitializer */
00341 #define V_HEX_RELATIVE_SIZE_SQUARED  8192   /*!< \hideinitializer */
00342 #define V_HEX_SHAPE_AND_SIZE         16384  /*!< \hideinitializer */
00343 #define V_HEX_SHEAR_AND_SIZE         32768  /*!< \hideinitializer */
00344 #define V_HEX_DISTORTION             65536  /*!< \hideinitializer */
00345 #define V_HEX_EDGE_RATIO             131072 /*!< \hideinitializer */
00346 #define V_HEX_MED_ASPECT_FROBENIUS   262144 /*!< \hideinitializer */
00347 #define V_HEX_ALL                    524287 /*!< \hideinitializer */
00348 /*!< \hideinitializer */
00349 #define V_HEX_TRADITIONAL            (V_HEX_MAX_EDGE_RATIO + \
00350                                      V_HEX_SKEW            + \
00351                                      V_HEX_TAPER           + \
00352                                      V_HEX_STRETCH         + \
00353                                      V_HEX_DIAGONAL        + \
00354                                      V_HEX_ODDY            + \
00355                                      V_HEX_CONDITION       + \
00356                                      V_HEX_JACOBIAN        + \
00357                                      V_HEX_SCALED_JACOBIAN + \
00358                                      V_HEX_DIMENSION)
00359 
00360 /*!< \hideinitializer */
00361 #define V_HEX_DIAGNOSTIC             V_HEX_VOLUME
00362 /*!< \hideinitializer */
00363 #define V_HEX_ALGEBRAIC              (V_HEX_SHAPE                  + \
00364                                      V_HEX_SHEAR                  + \
00365                                      V_HEX_RELATIVE_SIZE_SQUARED  + \
00366                                      V_HEX_SHAPE_AND_SIZE         + \
00367                                      V_HEX_SHEAR_AND_SIZE)
00368 /*!< \hideinitializer */
00369 #define V_HEX_ROBINSON               (V_HEX_SKEW + \
00370                                      V_HEX_TAPER)    
00371 //@}
00372                                      
00373 //! \name Tet bit fields
00374 //! 
00375 //@{
00376 #define V_TET_RADIUS_RATIO           1   /*!< \hideinitializer */
00377 #define V_TET_ASPECT_BETA            2   /*!< \hideinitializer */
00378 #define V_TET_ASPECT_GAMMA           4   /*!< \hideinitializer */
00379 #define V_TET_VOLUME                 8   /*!< \hideinitializer */
00380 #define V_TET_CONDITION              16  /*!< \hideinitializer */
00381 #define V_TET_JACOBIAN               32   /*!< \hideinitializer */
00382 #define V_TET_SCALED_JACOBIAN        64   /*!< \hideinitializer */
00383 #define V_TET_SHAPE                  128  /*!< \hideinitializer */
00384 #define V_TET_RELATIVE_SIZE_SQUARED  256   /*!< \hideinitializer */
00385 #define V_TET_SHAPE_AND_SIZE         512   /*!< \hideinitializer */
00386 #define V_TET_DISTORTION             1024  /*!< \hideinitializer */
00387 #define V_TET_EDGE_RATIO             2048   /*!< \hideinitializer */
00388 #define V_TET_ASPECT_RATIO           4096   /*!< \hideinitializer */
00389 #define V_TET_ASPECT_FROBENIUS       8192   /*!< \hideinitializer */
00390 #define V_TET_MINIMUM_ANGLE          16384  /*!< \hideinitializer */
00391 #define V_TET_COLLAPSE_RATIO         32768   /*!< \hideinitializer */
00392 #define V_TET_ALL                    65535   /*!< \hideinitializer */
00393 /*!< \hideinitializer */
00394 #define V_TET_TRADITIONAL            (V_TET_ASPECT_BETA + \
00395                                      V_TET_ASPECT_GAMMA + \
00396                                      V_TET_CONDITION + \
00397                                      V_TET_JACOBIAN + \
00398                                      V_TET_SCALED_JACOBIAN)  
00399 /*!< \hideinitializer */
00400 #define V_TET_DIAGNOSTIC             V_TET_VOLUME
00401 /*!< \hideinitializer */
00402 #define V_TET_ALGEBRAIC              (V_TET_SHAPE                  + \
00403                                      V_TET_RELATIVE_SIZE_SQUARED  + \
00404                                      V_TET_SHAPE_AND_SIZE)
00405 //@}
00406 
00407  
00408 //! \name Pyramid bit fields
00409 //! 
00410 //@{
00411 #define V_PYRAMID_VOLUME             1   /*!< \hideinitializer */
00412 //@}
00413 
00414 //! \name Wedge bit fields
00415 //! 
00416 //@{
00417 #define V_WEDGE_VOLUME               1   /*!< \hideinitializer */
00418 //@}
00419  
00420 //! \name Knife bit fields
00421 //! 
00422 //@{
00423 #define V_KNIFE_VOLUME               1   /*!< \hideinitializer */
00424 //@}
00425  
00426 //! \name Quad bit fields
00427 //! 
00428 //@{
00429 #define V_QUAD_MAX_EDGE_RATIO       1   /*!< \hideinitializer */
00430 #define V_QUAD_SKEW                  2   /*!< \hideinitializer */
00431 #define V_QUAD_TAPER                 4   /*!< \hideinitializer */
00432 #define V_QUAD_WARPAGE               8   /*!< \hideinitializer */
00433 #define V_QUAD_AREA                  16   /*!< \hideinitializer */
00434 #define V_QUAD_STRETCH               32   /*!< \hideinitializer */
00435 #define V_QUAD_MINIMUM_ANGLE         64   /*!< \hideinitializer */
00436 #define V_QUAD_MAXIMUM_ANGLE         128   /*!< \hideinitializer */
00437 #define V_QUAD_ODDY                  256   /*!< \hideinitializer */
00438 #define V_QUAD_CONDITION             512   /*!< \hideinitializer */
00439 #define V_QUAD_JACOBIAN              1024   /*!< \hideinitializer */
00440 #define V_QUAD_SCALED_JACOBIAN       2048   /*!< \hideinitializer */
00441 #define V_QUAD_SHEAR                 4096   /*!< \hideinitializer */
00442 #define V_QUAD_SHAPE                 8192   /*!< \hideinitializer */
00443 #define V_QUAD_RELATIVE_SIZE_SQUARED 16384   /*!< \hideinitializer */
00444 #define V_QUAD_SHAPE_AND_SIZE        32768   /*!< \hideinitializer */
00445 #define V_QUAD_SHEAR_AND_SIZE        65536   /*!< \hideinitializer */
00446 #define V_QUAD_DISTORTION            131072   /*!< \hideinitializer */
00447 #define V_QUAD_EDGE_RATIO            262144   /*!< \hideinitializer */
00448 #define V_QUAD_ASPECT_RATIO          524288   /*!< \hideinitializer */
00449 #define V_QUAD_RADIUS_RATIO          1048576  /*!< \hideinitializer */
00450 #define V_QUAD_MED_ASPECT_FROBENIUS  2097152  /*!< \hideinitializer */
00451 #define V_QUAD_MAX_ASPECT_FROBENIUS  4194304  /*!< \hideinitializer */
00452 #define V_QUAD_ALL                   8388607  /*!< \hideinitializer */
00453 /*!< \hideinitializer */
00454 #define V_QUAD_TRADITIONAL           (V_QUAD_MAX_EDGE_RATIO + \
00455                                      V_QUAD_SKEW            + \
00456                                      V_QUAD_TAPER           + \
00457                                      V_QUAD_WARPAGE         + \
00458                                      V_QUAD_STRETCH         + \
00459                                      V_QUAD_MINIMUM_ANGLE   + \
00460                                      V_QUAD_MAXIMUM_ANGLE   + \
00461                                      V_QUAD_ODDY            + \
00462                                      V_QUAD_CONDITION       + \
00463                                      V_QUAD_JACOBIAN        + \
00464                                      V_QUAD_SCALED_JACOBIAN) 
00465 /*!< \hideinitializer */
00466 #define V_QUAD_DIAGNOSTIC            V_QUAD_AREA
00467 /*!< \hideinitializer */
00468 #define V_QUAD_ALGEBRAIC             (V_QUAD_SHEAR                 + \
00469                                      V_QUAD_SHAPE                 + \
00470                                      V_QUAD_RELATIVE_SIZE_SQUARED + \
00471                                      V_QUAD_SHAPE_AND_SIZE)     
00472 /*!< \hideinitializer */
00473 #define V_QUAD_ROBINSON              (V_QUAD_MAX_EDGE_RATIO + \
00474                                      V_QUAD_SKEW   + \
00475                                      V_QUAD_TAPER)
00476 //@}
00477 
00478 
00479 //! \name Tri bit fields
00480 //! 
00481 //@{
00482 #define V_TRI_ASPECT_FROBENIUS       1   /*!< \hideinitializer */
00483 #define V_TRI_AREA                   2   /*!< \hideinitializer */
00484 #define V_TRI_MINIMUM_ANGLE          4   /*!< \hideinitializer */
00485 #define V_TRI_MAXIMUM_ANGLE          8   /*!< \hideinitializer */
00486 #define V_TRI_CONDITION              16   /*!< \hideinitializer */
00487 #define V_TRI_SCALED_JACOBIAN        32   /*!< \hideinitializer */
00488 #define V_TRI_SHAPE                  64   /*!< \hideinitializer */
00489 #define V_TRI_RELATIVE_SIZE_SQUARED  128   /*!< \hideinitializer */
00490 #define V_TRI_SHAPE_AND_SIZE         256   /*!< \hideinitializer */
00491 #define V_TRI_DISTORTION             512   /*!< \hideinitializer */
00492 #define V_TRI_RADIUS_RATIO           1024   /*!< \hideinitializer */
00493 #define V_TRI_EDGE_RATIO             2048   /*!< \hideinitializer */
00494 #define V_TRI_ALL                    4095   /*!< \hideinitializer */
00495 /*!< \hideinitializer */
00496 #define V_TRI_TRADITIONAL            (V_TRI_ASPECT_FROBENIUS + \
00497                                      V_TRI_MINIMUM_ANGLE + \
00498                                      V_TRI_MAXIMUM_ANGLE + \
00499                                      V_TRI_CONDITION + \
00500                                      V_TRI_SCALED_JACOBIAN) 
00501 /*!< \hideinitializer */
00502 #define V_TRI_DIAGNOSTIC             V_TRI_AREA
00503 /*!< \hideinitializer */
00504 #define V_TRI_ALGEBRAIC              (V_TRI_SHAPE + \
00505                                      V_TRI_SHAPE_AND_SIZE + \
00506                                      V_TRI_RELATIVE_SIZE_SQUARED)
00507  
00508 #define V_EDGE_LENGTH                1   /*!< \hideinitializer */
00509 //@}
00510 
00511                                      
00512 /*! \mainpage
00513   Verdict is a library used to calculate metrics on the following type of elements:
00514 
00515     \li Hexahedra
00516     \li Tetrahedra
00517     \li Pryamid 
00518     \li Wedge 
00519     \li Knife 
00520     \li Quadrilateral
00521     \li Triangle
00522     \li Edge 
00523 
00524   Verdict calculates individual or multiple metrics on a single element.
00525   The v_*_quality(...) functions allow for efficient calculations of 
00526   multiple metrics on a single element.  Individual metrics may be 
00527   calculated on a single element as well. 
00528 
00529   \section jack Using Verdict
00530 
00531   The v_*_quality functions take the following parameters: 
00532 
00533   \param num_nodes Number of nodes in the element. 
00534   \param coordinates 2D array containing x,y,z coordinate data of the nodes.
00535   \param metrics_request_flag Bitfield to define which metrics to calculate.
00536   \param metric_vals Struct to hold the metric calculated values. 
00537 
00538   All other functions take these parameters below and return the calculated
00539   metric value.
00540 
00541   \param num_nodes Number of nodes in the element. 
00542   \param coordinates 2D array containing x,y,z coordinate data of the nodes.
00543 
00544   
00545   \par Setting the metrics_request_flag: 
00546   In order to use v_*_quality functions you must know how to set the bitfield argument 
00547   correctly.  To calculate aspect ratio, condition number, shape and shear metrics on a triangle, set
00548   the "metrics_request_flag" like so: 
00549 
00550   \code
00551   unsigned int metrics_request_flag = 0;
00552   metrics_request_flag += V_TRI_ASPECT_FROBENIUS;  
00553   metrics_request_flag += V_CONDITION;
00554   metrics_request_flag += V_SHAPE;
00555   metrics_request_flag += V_SHEAR;
00556   \endcode 
00557 
00558   The bitwise field can also be set for many metrics at once using #deinfed numbers.  V_HEX_ALL,
00559   V_HEX_DIAGNOSTIC, V_TRI_ALGEBRAIC are examples.
00560 
00561   Below is an example of how use Verdict's functions:
00562 
00563     
00564     Example: \code
00565     QuadMetricVals quad_metrics = {0};
00566     unsigned long metrics_flag = 0;
00567     metrics_flag += V_QUAD_SHAPE;
00568     metrics_flag += V_QUAD_DISTORTION;
00569     metrics_flag += V_QUAD_AREA;
00570     double quad_nodes[4][3];
00571  
00572     //node 1
00573     quad_node[0][0] = 0;  //x
00574     quad_node[0][1] = 0;  //y
00575     quad_node[0][2] = 0;  //z
00576 
00577     //node 2
00578     quad_node[1][0] = 1; 
00579     quad_node[1][1] = 0.1;
00580     quad_node[1][2] = 0.1;
00581 
00582     //node 3
00583     quad_node[2][0] = 0.9; 
00584     quad_node[2][1] = 0.9;
00585     quad_node[2][2] = -0.1;
00586 
00587     //node 4
00588     quad_node[3][0] = -0.05; 
00589     quad_node[3][1] = 1;
00590     quad_node[3][2] = 0;
00591 
00592     //calculate multiple metrics with one call
00593     v_quad_quality( 4, quad_nodes, metrics_flag, quad_metrics );
00594     double my_shape      = quad_metrics.shape; 
00595     double my_distortion = quad_metrics.distortion; 
00596     double my_area       = quad_metrics.area;  
00597   
00598     //calculate an individual metric 
00599     double my_relative_size = v_quad_relative_size( 4, quad_nodes );
00600     \endcode
00601 
00602 */
00603 
00604     //! Calculates quality metrics for hexahedral elements.
00605     C_FUNC_DEF void v_hex_quality( int num_nodes, double coordinates[][3], 
00606         unsigned int metrics_request_flag, struct HexMetricVals *metric_vals ); 
00607     
00608     //! Calculates quality metrics for tetrahedral elements.
00609     C_FUNC_DEF void v_tet_quality( int num_nodes, double coordinates[][3], 
00610         unsigned int metrics_request_flag, struct TetMetricVals *metric_vals ); 
00611     
00612     //! Calculates quality metrics for pyramid elements.
00613     C_FUNC_DEF void v_pyramid_quality( int num_nodes, double coordinates[][3], 
00614         unsigned int metrics_request_flag, struct PyramidMetricVals *metric_vals ); 
00615 
00616     //! Calculates quality metrics for wedge elements.
00617     C_FUNC_DEF void v_wedge_quality( int num_nodes, double coordinates[][3], 
00618         unsigned int metrics_request_flag, struct WedgeMetricVals *metric_vals ); 
00619 
00620     //! Calculates quality metrics for knife elements.
00621     C_FUNC_DEF void v_knife_quality( int num_nodes, double coordinates[][3], 
00622         unsigned int metrics_request_flag, struct KnifeMetricVals *metric_vals ); 
00623 
00624     //! Calculates quality metrics for quadrilateral elements.
00625     C_FUNC_DEF void v_quad_quality( int num_nodes, double coordinates[][3], 
00626         unsigned int metrics_request_flag, struct QuadMetricVals *metric_vals ); 
00627 
00628     //! Calculates quality metrics for triangle elements.
00629     C_FUNC_DEF void v_tri_quality( int num_nodes, double coordinates[][3], 
00630         unsigned int metrics_request_flag, struct TriMetricVals *metric_vals );
00631 
00632     //! Calculates quality metrics for edge elements.
00633     C_FUNC_DEF void v_edge_quality( int num_nodes, double coordinates[][3], 
00634         unsigned int metrics_request_flag, struct EdgeMetricVals *metric_vals ); 
00635 
00636 
00637 
00638 /* individual quality functions for hex elements */
00639 
00640     //! Sets average size (volume) of hex, needed for v_hex_relative_size(...)
00641     C_FUNC_DEF void v_set_hex_size( double size );
00642 
00643     //! Calculates hex edge ratio metric.
00644     /**  Hmax / Hmin where Hmax and Hmin are respectively the maximum and the
00645          minimum edge lengths */ 
00646     C_FUNC_DEF double v_hex_edge_ratio( int num_nodes, double coordinates[][3] );
00647 
00648     //! Calculates hex maximum of edge ratio
00649     /**Maximum edge length ratio at hex center.
00650       Reference --- L.M. Taylor, and D.P. Flanagan, Pronto3D - A Three Dimensional Transient
00651          Solid Dynamics Program, SAND87-1912, Sandia National Laboratories, 1989. */
00652     C_FUNC_DEF double v_hex_max_edge_ratio( int num_nodes, double coordinates[][3] );
00653 
00654     //! Calculates hex skew metric. 
00655     /** Maximum |cos A| where A is the angle between edges at hex center.   
00656       Reference --- L.M. Taylor, and D.P. Flanagan, Pronto3D - A Three Dimensional Transient
00657          Solid Dynamics Program, SAND87-1912, Sandia National Laboratories, 1989. */
00658     C_FUNC_DEF double v_hex_skew( int num_nodes, double coordinates[][3] ); 
00659 
00660     //! Calculates hex taper metric 
00661     /**  Maximum ratio of lengths derived from opposite edges. 
00662       Reference --- L.M. Taylor, and D.P. Flanagan, Pronto3D - A Three Dimensional Transient
00663          Solid Dynamics Program, SAND87-1912, Sandia National Laboratories, 1989. */
00664     C_FUNC_DEF double v_hex_taper( int num_nodes, double coordinates[][3] ); 
00665 
00666     //! Calculates hex volume 
00667     /**  Jacobian at hex center. 
00668       Reference --- L.M. Taylor, and D.P. Flanagan, Pronto3D - A Three Dimensional Transient
00669          Solid Dynamics Program, SAND87-1912, Sandia National Laboratories, 1989. */
00670     C_FUNC_DEF double v_hex_volume( int num_nodes, double coordinates[][3] ); 
00671 
00672     //! Calculates hex stretch metric   
00673     /**  Sqrt(3) * minimum edge length / maximum diagonal length. 
00674       Reference --- FIMESH code */ 
00675     C_FUNC_DEF double v_hex_stretch( int num_nodes, double coordinates[][3] ); 
00676 
00677     //! Calculates hex diagonal metric   
00678     /** Minimum diagonal length / maximum diagonal length. 
00679       Reference --- Unknown */ 
00680     C_FUNC_DEF double v_hex_diagonal( int num_nodes, double coordinates[][3] ); 
00681 
00682     //! Calculates hex dimension metric   
00683     /** Pronto-specific characteristic length for stable time step calculation.  
00684         Char_length = Volume / 2 grad Volume. 
00685       Reference --- L.M. Taylor, and D.P. Flanagan, Pronto3D - A Three Dimensional Transient
00686          Solid Dynamics Program, SAND87-1912, Sandia National Laboratories, 1989. */
00687     C_FUNC_DEF double v_hex_dimension( int num_nodes, double coordinates[][3] ); 
00688 
00689     //! Calculates hex oddy metric   
00690     C_FUNC_DEF double v_hex_oddy( int num_nodes, double coordinates[][3] ); 
00691 
00692     //! Calculates hex condition metric   
00693     /** Average Frobenius condition number of the Jacobian matrix at 8 corners. */ 
00694     C_FUNC_DEF double v_hex_med_aspect_frobenius( int num_nodes, double coordinates[][3] ); 
00695 
00696     //! Calculates hex condition metric   
00697     /** Maximum Frobenius condition number of the Jacobian matrix at 8 corners.
00698        Reference --- P. Knupp, Achieving Finite Element Mesh Quality via 
00699        Optimization of the Jacobian Matrix Norm and Associated Quantities, 
00700        Intl. J. Numer. Meth. Engng. 2000, 48:1165-1185. */ 
00701     C_FUNC_DEF double v_hex_max_aspect_frobenius( int num_nodes, double coordinates[][3] ); 
00702     C_FUNC_DEF double v_hex_condition( int num_nodes, double coordinates[][3] ); 
00703 
00704     //! Calculates hex jacobian metric   
00705     /** Minimum pointwise volume of local map at 8 corners & center of hex. 
00706        Reference --- P. Knupp, Achieving Finite Element Mesh Quality via 
00707        Optimization of the Jacobian Matrix Norm and Associated Quantities, 
00708        Intl. J. Numer. Meth. Engng. 2000, 48:1165-1185. */ 
00709     C_FUNC_DEF double v_hex_jacobian( int num_nodes, double coordinates[][3] ); 
00710     
00711     //! Calculates hex scaled jacobian metric   
00712     /** Minimum Jacobian divided by the lengths of the 3 edge vectors. 
00713        Reference --- P. Knupp, Achieving Finite Element Mesh Quality via 
00714        Optimization of the Jacobian Matrix Norm and Associated Quantities, 
00715        Intl. J. Numer. Meth. Engng. 2000, 48:1165-1185. */ 
00716     C_FUNC_DEF double v_hex_scaled_jacobian( int num_nodes, double coordinates[][3] ); 
00717 
00718     //! Calculates hex shear metric   
00719     /** 3/Mean Ratio of Jacobian Skew matrix.
00720        Reference --- P. Knupp, Algebraic Mesh Quality Metrics for
00721        Unstructured Initial Meshes, submitted for publication.  */
00722     C_FUNC_DEF double v_hex_shear( int num_nodes, double coordinates[][3] ); 
00723 
00724     //! Calculates hex shape metric.
00725     /** 3/Mean Ratio of weighted Jacobian matrix. 
00726        Reference --- P. Knupp, Algebraic Mesh Quality Metrics for
00727        Unstructured Initial Meshes, submitted for publication.  */
00728     C_FUNC_DEF double v_hex_shape( int num_nodes, double coordinates[][3] ); 
00729 
00730     //! Calculates hex relative size metric. 
00731     /** 3/Mean Ratio of weighted Jacobian matrix.
00732        Reference --- P. Knupp, Algebraic Mesh Quality Metrics for
00733        Unstructured Initial Meshes, submitted for publication.  */
00734     C_FUNC_DEF double v_hex_relative_size_squared( int num_nodes, double coordinates[][3] ); 
00735 
00736     //! Calculates hex shape-size metric.
00737     /** Product of Shape and Relative Size.
00738        Reference --- P. Knupp, Algebraic Mesh Quality Metrics for
00739        Unstructured Initial Meshes, submitted for publication.  */
00740     C_FUNC_DEF double v_hex_shape_and_size( int num_nodes, double coordinates[][3] ); 
00741 
00742     //! Calculates hex shear-size metric   
00743     /** Product of Shear and Relative Size.
00744        Reference --- P. Knupp, Algebraic Mesh Quality Metrics for
00745        Unstructured Initial Meshes, submitted for publication.  */
00746     C_FUNC_DEF double v_hex_shear_and_size( int num_nodes, double coordinates[][3] );
00747 
00748     //! Calculates hex distortion metric   
00749     /** {min(|J|)/actual volume}*parent volume, parent volume = 8 for hex.
00750        Reference --- SDRC/IDEAS Simulation: Finite Element Modeling--User's Guide */
00751     C_FUNC_DEF double v_hex_distortion( int num_nodes, double coordinates[][3] );
00752 
00753 /* individual quality functions for tet elements */
00754 
00755     //! Sets average size (volume) of tet, needed for v_tet_relative_size(...)
00756     C_FUNC_DEF void v_set_tet_size( double size );
00757 
00758     //! Calculates tet edge ratio metric.
00759     /**  Hmax / Hmin where Hmax and Hmin are respectively the maximum and the
00760        minimum edge lengths */ 
00761     C_FUNC_DEF double v_tet_edge_ratio( int num_nodes, double coordinates[][3] ); 
00762 
00763     //! Calculates tet radius ratio metric.
00764     /** CR / (3.0 * IR)  where CR = circumsphere radius, IR = inscribed sphere radius.
00765         Reference ---  V. N. Parthasarathy et al, A comparison of tetrahedron 
00766         quality measures, Finite Elem. Anal. Des., Vol 15(1993), 255-261. */ 
00767     C_FUNC_DEF double v_tet_radius_ratio( int num_nodes, double coordinates[][3] ); 
00768 
00769     //! Calculates the radius ratio metric of a positively oriented tet.
00770     /** CR / (3.0 * IR)  where CR = circumsphere radius, IR = inscribed sphere radius
00771         if the element is positively-oriented.
00772         Reference ---  V. N. Parthasarathy et al, A comparison of tetrahedron 
00773         quality measures, Finite Elem. Anal. Des., Vol 15(1993), 255-261. */ 
00774     C_FUNC_DEF double v_tet_aspect_beta( int num_nodes, double coordinates[][3] ); 
00775 
00776     //! Calculates tet aspect ratio metric.
00777     /**  Hmax / (2 sqrt(6) r) where Hmax and r respectively denote the greatest edge 
00778        length and the inradius of the tetrahedron
00779        Reference ---  P. Frey and P.-L. George, Meshing, Hermes (2000). */ 
00780     C_FUNC_DEF double v_tet_aspect_ratio( int num_nodes, double coordinates[][3] ); 
00781 
00782     //! Calculates tet aspect gamma metric.
00783     /**  Srms**3 / (8.479670*V) where Srms = sqrt(Sum(Si**2)/6), Si = edge length. 
00784        Reference ---  V. N. Parthasarathy et al, A comparison of tetrahedron 
00785        quality measures, Finite Elem. Anal. Des., Vol 15(1993), 255-261. */ 
00786     C_FUNC_DEF double v_tet_aspect_gamma( int num_nodes, double coordinates[][3] ); 
00787 
00788     //! Calculates tet aspect frobenius metric.
00789     /** Frobenius condition number when the reference element is regular
00790        Reference --- P. Knupp, Achieving Finite Element Mesh Quality via 
00791        Optimization of the Jacobian Matrix Norm and Associated Quantities,
00792        Intl. J. Numer. Meth. Engng. 2000, 48:1165-1185. */
00793     C_FUNC_DEF double v_tet_aspect_frobenius( int num_nodes, double coordinates[][3] ); 
00794 
00795     //! Calculates tet minimum dihedral angle.
00796     /** Minimum (nonoriented) dihedral angle of a tetrahedron, expressed in degrees. */
00797     C_FUNC_DEF double v_tet_minimum_angle( int num_nodes, double coordinates[][3] ); 
00798 
00799     //! Calculates tet collapse ratio metric.
00800     /**  Collapse ratio */ 
00801     C_FUNC_DEF double v_tet_collapse_ratio( int num_nodes, double coordinates[][3] ); 
00802 
00803     //! Calculates tet volume.
00804     /** (1/6) * Jacobian at corner node.
00805        Reference ---  V. N. Parthasarathy et al, A comparison of tetrahedron 
00806        quality measures, Finite Elem. Anal. Des., Vol 15(1993), 255-261. */ 
00807     C_FUNC_DEF double v_tet_volume( int num_nodes, double coordinates[][3] ); 
00808 
00809     //! Calculates tet condition metric.
00810     /** Condition number of the Jacobian matrix at any corner. 
00811        Reference --- P. Knupp, Achieving Finite Element Mesh Quality via 
00812        Optimization of the Jacobian Matrix Norm and Associated Quantities,
00813        Intl. J. Numer. Meth. Engng. 2000, 48:1165-1185. */
00814     C_FUNC_DEF double v_tet_condition( int num_nodes, double coordinates[][3] ); 
00815 
00816     //! Calculates tet jacobian. 
00817     /** Minimum pointwise volume at any corner. 
00818        Reference --- P. Knupp, Achieving Finite Element Mesh Quality via 
00819        Optimization of the Jacobian Matrix Norm and Associated Quantities,
00820        Intl. J. Numer. Meth. Engng. 2000, 48:1165-1185. */
00821     C_FUNC_DEF double v_tet_jacobian( int num_nodes, double coordinates[][3] ); 
00822 
00823     //! Calculates tet scaled jacobian. 
00824     /** Minimum Jacobian divided by the lengths of 3 edge vectors 
00825        Reference --- P. Knupp, Achieving Finite Element Mesh Quality via 
00826        Optimization of the Jacobian Matrix Norm and Associated Quantities,
00827        Intl. J. Numer. Meth. Engng. 2000, 48:1165-1185. */
00828     C_FUNC_DEF double v_tet_scaled_jacobian( int num_nodes, double coordinates[][3] ); 
00829 
00830     //! Calculates tet shape metric.
00831     /** 3/Mean Ratio of weighted Jacobian matrix.
00832        Reference --- P. Knupp, Algebraic Mesh Quality Metrics for
00833        Unstructured Initial Meshes, submitted for publication. */ 
00834     C_FUNC_DEF double v_tet_shape( int num_nodes, double coordinates[][3] ); 
00835 
00836     //! Calculates tet relative size metric.
00837     /** Min( J, 1/J ), where J is determinant of weighted Jacobian matrix.
00838        Reference --- P. Knupp, Algebraic Mesh Quality Metrics for
00839        Unstructured Initial Meshes, submitted for publication. */ 
00840     C_FUNC_DEF double v_tet_relative_size_squared( int num_nodes, double coordinates[][3] ); 
00841 
00842     //! Calculates tet shape-size metric.
00843     /** Product of Shape and Relative Size. 
00844        Reference --- P. Knupp, Algebraic Mesh Quality Metrics for
00845        Unstructured Initial Meshes, submitted for publication. */ 
00846     C_FUNC_DEF double v_tet_shape_and_size( int num_nodes, double coordinates[][3] ); 
00847 
00848     //! Calculates tet distortion metric.
00849     /** {min(|J|)/actual volume}*parent volume, parent volume = 1/6 for tet.
00850        Reference --- SDRC/IDEAS Simulation: Finite Element Modeling--User's Guide */ 
00851     C_FUNC_DEF double v_tet_distortion( int num_nodes, double coordinates[][3] ); 
00852     
00853 /* individual quality functions for pyramid elements */ 
00854 
00855     //! Calculates pyramid volume.
00856     C_FUNC_DEF double v_pyramid_volume( int num_nodes, double coordinates[][3] ); 
00857 
00858 
00859 /* individual quality functions for wedge elements */
00860 
00861     //! Calculates wedge volume.
00862     C_FUNC_DEF double v_wedge_volume( int num_nodes, double coordinates[][3] ); 
00863 
00864    
00865 /* individual quality functions for knife elements */
00866 
00867     //! Calculates knife volume.
00868     C_FUNC_DEF double v_knife_volume( int num_nodes, double coordinates[][3] ); 
00869 
00870     
00871 /* individual quality functions for edge elements */
00872 
00873     //! Calculates edge length. 
00874     C_FUNC_DEF double v_edge_length( int num_nodes, double coordinates[][3] ); 
00875 
00876     
00877 /* individual quality functions for quad elements */
00878     //! Sets average size (area) of quad, needed for v_quad_relative_size(...)
00879     C_FUNC_DEF void v_set_quad_size( double size );
00880 
00881     //! Calculates quad edge ratio
00882     /** edge ratio
00883         Reference --- P. P. Pebay, Planar Quadrangle Quality
00884         Measures, Eng. Comp., 2004, 20(2):157-173 */
00885     C_FUNC_DEF double v_quad_edge_ratio( int num_nodes, double coordinates[][3] ); 
00886 
00887     //! Calculates quad maximum of edge ratio.
00888     /** Maximum edge length ratio at quad center.
00889        Reference --- J. Robinson, CRE Method of element testing and the 
00890        Jacobian shape parameters, Eng. Comput., Vol 4, 1987. */ 
00891     C_FUNC_DEF double v_quad_max_edge_ratio( int num_nodes, double coordinates[][3] ); 
00892 
00893     //! Calculates quad aspect ratio
00894     /** aspect ratio
00895         Reference --- P. P. Pebay, Planar Quadrangle Quality
00896         Measures, Eng. Comp., 2004, 20(2):157-173 */
00897     C_FUNC_DEF double v_quad_aspect_ratio( int num_nodes, double coordinates[][3] ); 
00898 
00899     //! Calculates quad radius ratio
00900     /** radius ratio
00901         Reference --- P. P. Pebay, Planar Quadrangle Quality
00902         Measures, Eng. Comp., 2004, 20(2):157-173 */
00903     C_FUNC_DEF double v_quad_radius_ratio( int num_nodes, double coordinates[][3] ); 
00904 
00905     //! Calculates quad average Frobenius aspect
00906     /** average Frobenius aspect
00907         Reference --- P. P. Pebay, Planar Quadrangle Quality
00908         Measures, Eng. Comp., 2004, 20(2):157-173 */
00909     C_FUNC_DEF double v_quad_med_aspect_frobenius( int num_nodes, double coordinates[][3] ); 
00910 
00911     //! Calculates quad maximum Frobenius aspect
00912     /** average Frobenius aspect
00913         Reference --- P. P. Pebay, Planar Quadrangle Quality
00914         Measures, Eng. Comp., 2004, 20(2):157-173 */
00915     C_FUNC_DEF double v_quad_max_aspect_frobenius( int num_nodes, double coordinates[][3] ); 
00916 
00917     //! Calculates quad skew metric.
00918     /** Maximum |cos A| where A is the angle between edges at quad center. 
00919        Reference --- J. Robinson, CRE Method of element testing and the 
00920        Jacobian shape parameters, Eng. Comput., Vol 4, 1987. */ 
00921     C_FUNC_DEF double v_quad_skew( int num_nodes, double coordinates[][3] ); 
00922 
00923     //! Calculates quad taper metric.
00924     /** Maximum ratio of lengths derived from opposite edges. 
00925        Reference --- J. Robinson, CRE Method of element testing and the 
00926        Jacobian shape parameters, Eng. Comput., Vol 4, 1987. */ 
00927     C_FUNC_DEF double v_quad_taper( int num_nodes, double coordinates[][3] ); 
00928 
00929     //! Calculates quad warpage metric.
00930     /** Cosine of Minimum Dihedral Angle formed by Planes Intersecting in Diagonals. 
00931        Reference --- J. Robinson, CRE Method of element testing and the 
00932        Jacobian shape parameters, Eng. Comput., Vol 4, 1987. */ 
00933     C_FUNC_DEF double v_quad_warpage( int num_nodes, double coordinates[][3] ); 
00934 
00935     //! Calculates quad area.
00936     /** Jacobian at quad center.
00937        Reference --- J. Robinson, CRE Method of element testing and the 
00938        Jacobian shape parameters, Eng. Comput., Vol 4, 1987. */ 
00939     C_FUNC_DEF double v_quad_area( int num_nodes, double coordinates[][3] ); 
00940 
00941     //! Calculates quad strech metric.
00942     /** Sqrt(2) * minimum edge length / maximum diagonal length.
00943        Reference --- FIMESH code. */
00944     C_FUNC_DEF double v_quad_stretch( int num_nodes, double coordinates[][3] ); 
00945 
00946     //! Calculates quad's smallest angle.
00947     /** Smallest included quad angle (degrees).
00948        Reference --- Unknown. */ 
00949     C_FUNC_DEF double v_quad_minimum_angle( int num_nodes, double coordinates[][3] ); 
00950 
00951     //! Calculates quad's largest angle.
00952     /** Largest included quad angle (degrees). 
00953        Reference --- Unknown. */ 
00954     C_FUNC_DEF double v_quad_maximum_angle( int num_nodes, double coordinates[][3] ); 
00955 
00956     //! Calculates quad oddy metric.
00957     C_FUNC_DEF double v_quad_oddy( int num_nodes, double coordinates[][3] ); 
00958 
00959     //! Calculates quad condition number metric.
00960     /** Maximum condition number of the Jacobian matrix at 4 corners.
00961        Reference --- P. Knupp, Achieving Finite Element Mesh Quality via 
00962        Optimization of the Jacobian Matrix Norm and Associated Quantities,
00963        Intl. J. Numer. Meth. Engng. 2000, 48:1165-1185. */
00964     C_FUNC_DEF double v_quad_condition( int num_nodes, double coordinates[][3] ); 
00965 
00966     //! Calculates quad jacobian.
00967     /** Minimum pointwise volume of local map at 4 corners & center of quad. 
00968        Reference --- P. Knupp, Achieving Finite Element Mesh Quality via 
00969        Optimization of the Jacobian Matrix Norm and Associated Quantities,
00970        Intl. J. Numer. Meth. Engng. 2000, 48:1165-1185. */
00971     C_FUNC_DEF double v_quad_jacobian( int num_nodes, double coordinates[][3] ); 
00972 
00973     //! Calculates quad scaled jacobian.
00974     /** Minimum Jacobian divided by the lengths of the 2 edge vectors. 
00975        Reference --- P. Knupp, Achieving Finite Element Mesh Quality via 
00976        Optimization of the Jacobian Matrix Norm and Associated Quantities,
00977        Intl. J. Numer. Meth. Engng. 2000, 48:1165-1185. */
00978     C_FUNC_DEF double v_quad_scaled_jacobian( int num_nodes, double coordinates[][3] ); 
00979 
00980     //! Calculates quad shear metric.
00981     /** 2/Condition number of Jacobian Skew matrix.
00982        Reference --- P. Knupp, Algebraic Mesh Quality Metrics for
00983        Unstructured Initial Meshes, submitted for publication. */
00984     C_FUNC_DEF double v_quad_shear( int num_nodes, double coordinates[][3] ); 
00985 
00986     //! Calculates quad shape metric.
00987     /** 2/Condition number of weighted Jacobian matrix. 
00988        Reference --- P. Knupp, Algebraic Mesh Quality Metrics for
00989        Unstructured Initial Meshes, submitted for publication. */
00990     C_FUNC_DEF double v_quad_shape( int num_nodes, double coordinates[][3] ); 
00991 
00992     //! Calculates quad relative size metric.
00993     /** Min( J, 1/J ), where J is determinant of weighted Jacobian matrix. 
00994        Reference --- P. Knupp, Algebraic Mesh Quality Metrics for
00995        Unstructured Initial Meshes, submitted for publication. */
00996     C_FUNC_DEF double v_quad_relative_size_squared( int num_nodes, double coordinates[][3] ); 
00997 
00998     //! Calculates quad shape-size metric.
00999     /** Product of Shape and Relative Size. 
01000        Reference --- P. Knupp, Algebraic Mesh Quality Metrics for
01001        Unstructured Initial Meshes, submitted for publication. */
01002     C_FUNC_DEF double v_quad_shape_and_size( int num_nodes, double coordinates[][3] ); 
01003 
01004     //! Calculates quad shear-size metric.
01005     /** Product of Shear and Relative Size. 
01006        Reference --- P. Knupp, Algebraic Mesh Quality Metrics for
01007        Unstructured Initial Meshes, submitted for publication. */
01008     C_FUNC_DEF double v_quad_shear_and_size( int num_nodes, double coordinates[][3] ); 
01009 
01010     //! Calculates quad distortion metric.
01011     /** {min(|J|)/actual area}*parent area, parent area = 4 for quad.
01012        Reference --- SDRC/IDEAS Simulation: Finite Element Modeling--User's Guide */
01013     C_FUNC_DEF double v_quad_distortion( int num_nodes, double coordinates[][3] ); 
01014 
01015 
01016 /* individual quality functions for tri elements */
01017 
01018     //! Sets average size (area) of tri, needed for v_tri_relative_size(...) 
01019     C_FUNC_DEF void  v_set_tri_size( double size );
01020 
01021     //! Sets fuction pointer to calculate tri normal wrt surface 
01022     C_FUNC_DEF void v_set_tri_normal_func( ComputeNormal func );
01023 
01024     //! Calculates tri metric.
01025     /** edge ratio
01026         Reference --- P. P. Pebay & T. J. Baker, Analysis of Triangle Quality
01027         Measures, AMS Math. Comp., 2003, 72(244):1817-1839 */
01028     C_FUNC_DEF double v_tri_edge_ratio( int num_nodes, double coordinates[][3] ); 
01029 
01030     //! Calculates tri metric.
01031     /** aspect ratio
01032         Reference --- P. P. Pebay & T. J. Baker, Analysis of Triangle Quality
01033         Measures, AMS Math. Comp., 2003, 72(244):1817-1839 */
01034     C_FUNC_DEF double v_tri_aspect_ratio( int num_nodes, double coordinates[][3] ); 
01035 
01036     //! Calculates tri metric.
01037     /** radius ratio
01038         Reference --- P. P. Pebay & T. J. Baker, Analysis of Triangle Quality
01039         Measures, AMS Math. Comp., 2003, 72(244):1817-1839 */
01040     C_FUNC_DEF double v_tri_radius_ratio( int num_nodes, double coordinates[][3] ); 
01041 
01042     //! Calculates tri metric.
01043     /** Frobenius aspect */
01044     C_FUNC_DEF double v_tri_aspect_frobenius( int num_nodes, double coordinates[][3] ); 
01045 
01046     //! Calculates tri metric.
01047     /** Maximum included angle in triangle */
01048     C_FUNC_DEF double v_tri_area( int num_nodes, double coordinates[][3] ); 
01049 
01050     //! Calculates tri metric.
01051     /** Minimum included angle in triangle */
01052     C_FUNC_DEF double v_tri_minimum_angle( int num_nodes, double coordinates[][3] ); 
01053 
01054     //! Calculates tri metric.
01055     /** Maximum included angle in triangle */
01056     C_FUNC_DEF double v_tri_maximum_angle( int num_nodes, double coordinates[][3] ); 
01057 
01058     //! Calculates tri metric.
01059     /** Condition number of the Jacobian matrix.
01060        Reference --- P. Knupp, Achieving Finite Element Mesh Quality via 
01061        Optimization of the Jacobian Matrix Norm and Associated Quantities,
01062        Intl. J. Numer. Meth. Engng. 2000, 48:1165-1185. */ 
01063     C_FUNC_DEF double v_tri_condition( int num_nodes, double coordinates[][3] ); 
01064 
01065     //! Calculates tri metric.
01066     /** Minimum Jacobian divided by the lengths of 2 edge vectors. 
01067        Reference --- P. Knupp, Achieving Finite Element Mesh Quality via 
01068        Optimization of the Jacobian Matrix Norm and Associated Quantities,
01069        Intl. J. Numer. Meth. Engng. 2000, 48:1165-1185. */ 
01070     C_FUNC_DEF double v_tri_scaled_jacobian( int num_nodes, double coordinates[][3] );
01071     
01072     //! Calculates tri metric.
01073     /** Min( J, 1/J ), where J is determinant of weighted Jacobian matrix. 
01074        Reference ---  P. Knupp, Algebraic Mesh Quality Metrics for
01075        Unstructured Initial Meshes, submitted for publication. */
01076     C_FUNC_DEF double v_tri_relative_size_squared( int num_nodes, double coordinates[][3] ); 
01077 
01078     //! Calculates tri metric.
01079     /** 2/Condition number of weighted Jacobian matrix. 
01080        Reference ---  P. Knupp, Algebraic Mesh Quality Metrics for
01081        Unstructured Initial Meshes, submitted for publication. */
01082     C_FUNC_DEF double v_tri_shape( int num_nodes, double coordinates[][3] ); 
01083 
01084     //! Calculates tri metric.
01085     /**  Product of Shape and Relative Size. 
01086        Reference ---  P. Knupp, Algebraic Mesh Quality Metrics for
01087        Unstructured Initial Meshes, submitted for publication. */
01088     C_FUNC_DEF double v_tri_shape_and_size( int num_nodes, double coordinates[][3] );
01089 
01090     //! Calculates tri metric.
01091     /** {min(|J|)/actual area}*parent area, parent area = 1/2 for triangular element. 
01092        Reference --- SDRC/IDEAS Simulation: Finite Element Modeling--User's Guide */
01093     C_FUNC_DEF double v_tri_distortion( int num_nodes, double coordinates[][3] );
01094 
01095 
01096 
01097 #endif  /* VERDICT_INC_LIB */
01098 
01099 
01100 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines