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