Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
moab::VerdictWrapper Class Reference

#include <VerdictWrapper.hpp>

+ Collaboration diagram for moab::VerdictWrapper:

Public Member Functions

 VerdictWrapper (Interface *mb)
 
virtual ~VerdictWrapper ()
 
ErrorCode quality_measure (EntityHandle eh, QualityType q, double &quality, int num_nodes=0, EntityType etype=MBMAXTYPE, double *coords=NULL)
 return a quality for an entity More...
 
const char * quality_name (QualityType q)
 return a quality name More...
 
const char * entity_type_name (EntityType etype)
 return a string with entity type name More...
 
int num_qualities (EntityType etype)
 return an int with total available qualities for type More...
 
int possible_quality (EntityType et, QualityType q)
 return true if quality possible More...
 
ErrorCode set_size (double size)
 
ErrorCode all_quality_measures (EntityHandle eh, std::map< QualityType, double > &qualities)
 return all qualities for an element More...
 

Private Attributes

InterfacembImpl
 

Detailed Description

Definition at line 131 of file VerdictWrapper.hpp.

Constructor & Destructor Documentation

◆ VerdictWrapper()

moab::VerdictWrapper::VerdictWrapper ( Interface mb)

Definition at line 15 of file VerdictWrapper.cpp.

15  : mbImpl( mb )
16 {
17  // TODO Auto-generated constructor stub
18 }

◆ ~VerdictWrapper()

moab::VerdictWrapper::~VerdictWrapper ( )
virtual

Definition at line 20 of file VerdictWrapper.cpp.

21 {
22  // TODO Auto-generated destructor stub
23 }

Member Function Documentation

◆ all_quality_measures()

ErrorCode moab::VerdictWrapper::all_quality_measures ( EntityHandle  eh,
std::map< QualityType, double > &  qualities 
)

return all qualities for an element

compute all qualities for an element

Parameters
ehelement entity handle.
qslist of QualityType
qualitieslist of qualities return MB_SUCCESS Example:
std::vector<QualityType> qs;
std::vector<double> qualities;
all_quality_measures(hex, qs, qualities);

Definition at line 507 of file VerdictWrapper.cpp.

508 {
509  EntityType etype = TYPE_FROM_HANDLE( eh );
510  if( etype == MBPOLYHEDRON || etype == MBVERTEX || etype == MBENTITYSET )
511  return MB_SUCCESS; // no quality for polyhedron or vertex or set
512 
513  double coordinates[27][3]; // at most 27 nodes per element
514  // get coordinates of points, if not passed already
515  const EntityHandle* conn = NULL;
516  int num_nodes;
517  ErrorCode rval = mbImpl->get_connectivity( eh, conn, num_nodes );
518  if( rval != MB_SUCCESS ) return rval;
519  rval = mbImpl->get_coords( conn, num_nodes, &( coordinates[0][0] ) );
520  if( rval != MB_SUCCESS ) return rval;
521 
522  switch( etype )
523  {
524  case MBEDGE: {
525  double leng = v_edge_length( 2, coordinates );
526  qualities[MB_LENGTH] = leng;
527  break;
528  }
529  case MBHEX: {
530  num_nodes = 8;
531  HexMetricVals hexMetric;
532  v_hex_quality( num_nodes, coordinates, V_HEX_ALL, &hexMetric );
533  qualities[MB_EDGE_RATIO] = hexMetric.edge_ratio;
534  qualities[MB_MAX_EDGE_RATIO] = hexMetric.max_edge_ratio;
535  qualities[MB_SKEW] = hexMetric.skew;
536  qualities[MB_TAPER] = hexMetric.taper;
537  qualities[MB_VOLUME] = hexMetric.volume;
538  qualities[MB_STRETCH] = hexMetric.stretch;
539  qualities[MB_DIAGONAL] = hexMetric.diagonal;
540  qualities[MB_DIMENSION] = hexMetric.dimension;
541  qualities[MB_ODDY] = hexMetric.oddy;
542  qualities[MB_MED_ASPECT_FROBENIUS] = hexMetric.med_aspect_frobenius;
543  // MB_CONDITION is the same as MB_MAX_ASPECT_FROBENIUS
544  qualities[MB_MAX_ASPECT_FROBENIUS] = hexMetric.condition;
545  qualities[MB_CONDITION] = hexMetric.condition;
546  qualities[MB_JACOBIAN] = hexMetric.jacobian;
547  qualities[MB_SCALED_JACOBIAN] = hexMetric.scaled_jacobian;
548  qualities[MB_SHEAR] = hexMetric.shear;
549  qualities[MB_SHAPE] = hexMetric.shape;
550  qualities[MB_RELATIVE_SIZE_SQUARED] = hexMetric.relative_size_squared;
551  qualities[MB_SHAPE_AND_SIZE] = hexMetric.shape_and_size;
552  qualities[MB_SHEAR_AND_SIZE] = hexMetric.shear_and_size;
553  qualities[MB_DISTORTION] = hexMetric.distortion;
554  break;
555  }
556 
557  case MBTET: {
558  num_nodes = 4;
559  TetMetricVals tetMetrics;
560  v_tet_quality( num_nodes, coordinates, V_TET_ALL, &tetMetrics );
561  qualities[MB_EDGE_RATIO] = tetMetrics.edge_ratio;
562  qualities[MB_RADIUS_RATIO] = tetMetrics.radius_ratio;
563  qualities[MB_ASPECT_BETA] = tetMetrics.aspect_beta;
564  qualities[MB_ASPECT_RATIO] = tetMetrics.aspect_ratio;
565  qualities[MB_ASPECT_GAMMA] = tetMetrics.aspect_gamma;
566  qualities[MB_MAX_ASPECT_FROBENIUS] = tetMetrics.aspect_frobenius;
567  qualities[MB_MINIMUM_ANGLE] = tetMetrics.minimum_angle;
568  qualities[MB_COLLAPSE_RATIO] = tetMetrics.collapse_ratio;
569  qualities[MB_VOLUME] = tetMetrics.volume;
570  qualities[MB_CONDITION] = tetMetrics.condition;
571  qualities[MB_JACOBIAN] = tetMetrics.jacobian;
572  qualities[MB_SCALED_JACOBIAN] = tetMetrics.scaled_jacobian;
573  qualities[MB_SHAPE] = tetMetrics.shape;
574  qualities[MB_RELATIVE_SIZE_SQUARED] = tetMetrics.relative_size_squared;
575  qualities[MB_SHAPE_AND_SIZE] = tetMetrics.shape_and_size;
576  qualities[MB_DISTORTION] = tetMetrics.distortion;
577  break;
578  }
579  case MBPRISM: {
580  num_nodes = 6;
581  double volu = v_wedge_volume( num_nodes, coordinates );
582  qualities[MB_VOLUME] = volu;
583  break;
584  }
585  case MBKNIFE: {
586  num_nodes = 7;
587  double volu = v_knife_volume( num_nodes, coordinates );
588  qualities[MB_VOLUME] = volu;
589  break;
590  }
591  case MBQUAD: {
592  num_nodes = 4;
593  QuadMetricVals quadMetrics;
594  v_quad_quality( num_nodes, coordinates, V_QUAD_ALL, &quadMetrics );
595  qualities[MB_EDGE_RATIO] = quadMetrics.edge_ratio;
596  qualities[MB_MAX_EDGE_RATIO] = quadMetrics.max_edge_ratio;
597  qualities[MB_ASPECT_RATIO] = quadMetrics.aspect_ratio; // 23
598  qualities[MB_RADIUS_RATIO] = quadMetrics.radius_ratio; // 21
599  qualities[MB_MED_ASPECT_FROBENIUS] = quadMetrics.med_aspect_frobenius; // 9
600  qualities[MB_MAX_ASPECT_FROBENIUS] = quadMetrics.max_aspect_frobenius; // 10
601  qualities[MB_SKEW] = quadMetrics.skew; // 2
602  qualities[MB_TAPER] = quadMetrics.taper; // 3
603  qualities[MB_WARPAGE] = quadMetrics.warpage; // 27
604  qualities[MB_AREA] = quadMetrics.area; // 28
605  qualities[MB_STRETCH] = quadMetrics.stretch; // 5
606  qualities[MB_MINIMUM_ANGLE] = quadMetrics.minimum_angle; // 25
607  qualities[MB_MAXIMUM_ANGLE] = quadMetrics.maximum_angle; // 29
608  qualities[MB_ODDY] = quadMetrics.oddy; // 8
609  qualities[MB_CONDITION] = quadMetrics.condition; // 11
610  qualities[MB_JACOBIAN] = quadMetrics.jacobian; // 12
611  qualities[MB_SCALED_JACOBIAN] = quadMetrics.scaled_jacobian; // 13
612  qualities[MB_SHEAR] = quadMetrics.shear; // 14
613  qualities[MB_SHAPE] = quadMetrics.shape; // 15
614  qualities[MB_RELATIVE_SIZE_SQUARED] = quadMetrics.relative_size_squared; // 16
615  qualities[MB_SHAPE_AND_SIZE] = quadMetrics.shape_and_size; // 17
616  qualities[MB_SHEAR_AND_SIZE] = quadMetrics.shear_and_size; // 18
617  qualities[MB_DISTORTION] = quadMetrics.distortion; // 19
618  break;
619  }
620 
621  case MBTRI: {
622  num_nodes = 3;
623  TriMetricVals triMetrics;
624  v_tri_quality( num_nodes, coordinates, V_TRI_ALL, &triMetrics );
625  qualities[MB_EDGE_RATIO] = triMetrics.edge_ratio; // 0
626  qualities[MB_ASPECT_RATIO] = triMetrics.aspect_ratio; // 23
627  qualities[MB_RADIUS_RATIO] = triMetrics.radius_ratio; // 21
628  qualities[MB_MAX_ASPECT_FROBENIUS] = triMetrics.aspect_frobenius; // 10
629  qualities[MB_AREA] = triMetrics.area; // 28
630  qualities[MB_MINIMUM_ANGLE] = triMetrics.minimum_angle; // 25
631  qualities[MB_MAXIMUM_ANGLE] = triMetrics.maximum_angle; // 29
632  qualities[MB_CONDITION] = triMetrics.condition; // 11
633  qualities[MB_SCALED_JACOBIAN] = triMetrics.scaled_jacobian; // 13
634  // does not exist, even though it was defined in verdict.h; remove it from there too
635  // case MB_SHEAR: func = v_tri_shear; break; // 14
636  qualities[MB_RELATIVE_SIZE_SQUARED] = triMetrics.relative_size_squared; // 16
637  qualities[MB_SHAPE] = triMetrics.shape; // 15
638  qualities[MB_SHAPE_AND_SIZE] = triMetrics.shape_and_size; // 17
639  qualities[MB_DISTORTION] = triMetrics.distortion; // 19
640  break;
641  }
642  default:
643  return MB_NOT_IMPLEMENTED;
644  }
645  return MB_SUCCESS;
646 }

References QuadMetricVals::area, TriMetricVals::area, TetMetricVals::aspect_beta, TetMetricVals::aspect_frobenius, TriMetricVals::aspect_frobenius, TetMetricVals::aspect_gamma, QuadMetricVals::aspect_ratio, TetMetricVals::aspect_ratio, TriMetricVals::aspect_ratio, TetMetricVals::collapse_ratio, HexMetricVals::condition, QuadMetricVals::condition, TetMetricVals::condition, TriMetricVals::condition, HexMetricVals::diagonal, HexMetricVals::dimension, HexMetricVals::distortion, QuadMetricVals::distortion, TetMetricVals::distortion, TriMetricVals::distortion, HexMetricVals::edge_ratio, QuadMetricVals::edge_ratio, TetMetricVals::edge_ratio, TriMetricVals::edge_ratio, ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_coords(), HexMetricVals::jacobian, QuadMetricVals::jacobian, TetMetricVals::jacobian, QuadMetricVals::max_aspect_frobenius, HexMetricVals::max_edge_ratio, QuadMetricVals::max_edge_ratio, QuadMetricVals::maximum_angle, TriMetricVals::maximum_angle, moab::MB_AREA, moab::MB_ASPECT_BETA, moab::MB_ASPECT_GAMMA, moab::MB_ASPECT_RATIO, moab::MB_COLLAPSE_RATIO, moab::MB_CONDITION, moab::MB_DIAGONAL, moab::MB_DIMENSION, moab::MB_DISTORTION, moab::MB_EDGE_RATIO, moab::MB_JACOBIAN, moab::MB_LENGTH, moab::MB_MAX_ASPECT_FROBENIUS, moab::MB_MAX_EDGE_RATIO, moab::MB_MAXIMUM_ANGLE, moab::MB_MED_ASPECT_FROBENIUS, moab::MB_MINIMUM_ANGLE, MB_NOT_IMPLEMENTED, moab::MB_ODDY, moab::MB_RADIUS_RATIO, moab::MB_RELATIVE_SIZE_SQUARED, moab::MB_SCALED_JACOBIAN, moab::MB_SHAPE, moab::MB_SHAPE_AND_SIZE, moab::MB_SHEAR, moab::MB_SHEAR_AND_SIZE, moab::MB_SKEW, moab::MB_STRETCH, MB_SUCCESS, moab::MB_TAPER, moab::MB_VOLUME, moab::MB_WARPAGE, MBEDGE, MBENTITYSET, MBHEX, mbImpl, MBKNIFE, MBPOLYHEDRON, MBPRISM, MBQUAD, MBTET, MBTRI, MBVERTEX, HexMetricVals::med_aspect_frobenius, QuadMetricVals::med_aspect_frobenius, QuadMetricVals::minimum_angle, TetMetricVals::minimum_angle, TriMetricVals::minimum_angle, HexMetricVals::oddy, QuadMetricVals::oddy, QuadMetricVals::radius_ratio, TetMetricVals::radius_ratio, TriMetricVals::radius_ratio, HexMetricVals::relative_size_squared, QuadMetricVals::relative_size_squared, TetMetricVals::relative_size_squared, TriMetricVals::relative_size_squared, HexMetricVals::scaled_jacobian, QuadMetricVals::scaled_jacobian, TetMetricVals::scaled_jacobian, TriMetricVals::scaled_jacobian, HexMetricVals::shape, QuadMetricVals::shape, TetMetricVals::shape, TriMetricVals::shape, HexMetricVals::shape_and_size, QuadMetricVals::shape_and_size, TetMetricVals::shape_and_size, TriMetricVals::shape_and_size, HexMetricVals::shear, QuadMetricVals::shear, HexMetricVals::shear_and_size, QuadMetricVals::shear_and_size, HexMetricVals::skew, QuadMetricVals::skew, HexMetricVals::stretch, QuadMetricVals::stretch, HexMetricVals::taper, QuadMetricVals::taper, moab::TYPE_FROM_HANDLE(), v_edge_length(), V_HEX_ALL, v_hex_quality(), v_knife_volume(), V_QUAD_ALL, v_quad_quality(), V_TET_ALL, v_tet_quality(), V_TRI_ALL, v_tri_quality(), v_wedge_volume(), HexMetricVals::volume, TetMetricVals::volume, and QuadMetricVals::warpage.

Referenced by main().

◆ entity_type_name()

const char * moab::VerdictWrapper::entity_type_name ( EntityType  etype)

return a string with entity type name

Definition at line 483 of file VerdictWrapper.cpp.

484 {
485  return nameType[etype];
486 }

References moab::nameType.

Referenced by main().

◆ num_qualities()

int moab::VerdictWrapper::num_qualities ( EntityType  etype)

return an int with total available qualities for type

Definition at line 487 of file VerdictWrapper.cpp.

488 {
489  return numQualities[etype];
490 }

References moab::numQualities.

Referenced by main().

◆ possible_quality()

int moab::VerdictWrapper::possible_quality ( EntityType  et,
QualityType  q 
)

return true if quality possible

Definition at line 491 of file VerdictWrapper.cpp.

492 {
493  return possibleQuality[et][q];
494 }

References moab::possibleQuality.

Referenced by main().

◆ quality_measure()

ErrorCode moab::VerdictWrapper::quality_measure ( EntityHandle  eh,
QualityType  q,
double &  quality,
int  num_nodes = 0,
EntityType  etype = MBMAXTYPE,
double *  coords = NULL 
)

return a quality for an entity

compute the quality for an element; the coordinates and number of nodes can be passed if available

Parameters
ehelement entity handle.
qquality requested
qualityoutput
num_nodesoptional, number of vertices
coordsoptions, interleaved coordinates return MB_SUCCESS Example:
double jac;
rval = quality_measure(hex, MB_JACOBIAN, jac);

Definition at line 140 of file VerdictWrapper.cpp.

146 {
147  double coordinates[27][3]; // at most 27 nodes per element
148 
149  if( 0 == num_nodes && NULL == coords )
150  {
151  etype = TYPE_FROM_HANDLE( eh );
152  if( possibleQuality[etype][q] == 0 ) return MB_NOT_IMPLEMENTED;
153 
154  // get coordinates of points, if not passed already
155  const EntityHandle* conn = NULL;
156  // int num_nodes;
157  ErrorCode rval = mbImpl->get_connectivity( eh, conn, num_nodes );
158  if( rval != MB_SUCCESS ) return rval;
159  if( etype != MBPOLYHEDRON )
160  {
161  rval = mbImpl->get_coords( conn, num_nodes, &( coordinates[0][0] ) );
162  if( rval != MB_SUCCESS ) return rval;
163  }
164  }
165  else
166  {
167  if( num_nodes > 27 ) return MB_FAILURE;
168  for( int i = 0; i < num_nodes; i++ )
169  {
170  for( int j = 0; j < 3; j++ )
171  coordinates[i][j] = coords[3 * i + j];
172  }
173  }
174  VerdictFunction func = 0;
175 
176  switch( etype )
177  {
178  case MBHEX: {
179  num_nodes = 8;
180  switch( q )
181  {
182  case MB_EDGE_RATIO:
183  func = v_hex_edge_ratio;
184  break; // 0
185  case MB_MAX_EDGE_RATIO:
186  func = v_hex_max_edge_ratio;
187  break; // 1
188  case MB_SKEW:
189  func = v_hex_skew;
190  break; // 2
191  case MB_TAPER:
192  func = v_hex_taper;
193  break; // 3
194  case MB_VOLUME:
195  func = v_hex_volume;
196  break; // 4
197  case MB_STRETCH:
198  func = v_hex_stretch;
199  break; // 5
200  case MB_DIAGONAL:
201  func = v_hex_diagonal;
202  break; // 6
203  case MB_DIMENSION:
204  func = v_hex_dimension;
205  break; // 7
206  case MB_ODDY:
207  func = v_hex_oddy;
208  break; // 8
211  break; // 9
214  break; // 10
215  case MB_CONDITION:
216  func = v_hex_condition;
217  break; // 11
218  case MB_JACOBIAN:
219  func = v_hex_jacobian;
220  break; // 12
221  case MB_SCALED_JACOBIAN:
222  func = v_hex_scaled_jacobian;
223  break; // 13
224  case MB_SHEAR:
225  func = v_hex_shear;
226  break; // 14
227  case MB_SHAPE:
228  func = v_hex_shape;
229  break; // 15
232  break; // 16
233  case MB_SHAPE_AND_SIZE:
234  func = v_hex_shape_and_size;
235  break; // 17
236  case MB_SHEAR_AND_SIZE:
237  func = v_hex_shear_and_size;
238  break; // 18
239  case MB_DISTORTION:
240  func = v_hex_distortion;
241  break; // 19
242  default:
243  return MB_FAILURE;
244  }
245  break;
246  }
247  case MBEDGE: {
248  num_nodes = 2;
249  switch( q )
250  {
251  case MB_LENGTH:
252  func = v_edge_length;
253  break; // 20
254  default:
255  return MB_FAILURE;
256  }
257  break;
258  }
259  case MBTET: {
260  num_nodes = 4;
261  switch( q )
262  {
263  case MB_EDGE_RATIO:
264  func = v_tet_edge_ratio;
265  break; // 0 //! Calculates tet edge ratio metric.
266  case MB_RADIUS_RATIO:
267  func = v_tet_radius_ratio;
268  break; // 21
269  case MB_ASPECT_BETA:
270  func = v_tet_aspect_beta;
271  break; // 22
272  case MB_ASPECT_RATIO:
273  func = v_tet_aspect_ratio;
274  break; // 23
275  case MB_ASPECT_GAMMA:
276  func = v_tet_aspect_gamma;
277  break; // 24
279  func = v_tet_aspect_frobenius;
280  break; // 10
281  case MB_MINIMUM_ANGLE:
282  func = v_tet_minimum_angle;
283  break; // 25
284  case MB_COLLAPSE_RATIO:
285  func = v_tet_collapse_ratio;
286  break; // 26
287  case MB_VOLUME:
288  func = v_tet_volume;
289  break; // 4
290  case MB_CONDITION:
291  func = v_tet_condition;
292  break; // 11
293  case MB_JACOBIAN:
294  func = v_tet_jacobian;
295  break; // 12
296  case MB_SCALED_JACOBIAN:
297  func = v_tet_scaled_jacobian;
298  break; // 13
299  case MB_SHAPE:
300  func = v_tet_shape;
301  break; // 15
304  break; // 16
305  case MB_SHAPE_AND_SIZE:
306  func = v_tet_shape_and_size;
307  break; // 17
308  case MB_DISTORTION:
309  func = v_tet_distortion;
310  break; // 19
311  default:
312  return MB_FAILURE;
313  }
314  break;
315  }
316  case MBPRISM: {
317  num_nodes = 6;
318  switch( q )
319  {
320  case MB_VOLUME:
321  func = v_wedge_volume;
322  break; // 4
323  default:
324  return MB_FAILURE;
325  }
326  break;
327  }
328  case MBKNIFE: {
329  num_nodes = 7;
330  switch( q )
331  {
332  case MB_VOLUME:
333  func = v_knife_volume;
334  break; // 4
335  default:
336  return MB_FAILURE;
337  }
338  break;
339  }
340  case MBQUAD: {
341  num_nodes = 4;
342  switch( q )
343  {
344  case MB_EDGE_RATIO:
345  func = v_quad_edge_ratio;
346  break; // 0
347  case MB_MAX_EDGE_RATIO:
348  func = v_quad_max_edge_ratio;
349  break; // 1
350  case MB_ASPECT_RATIO:
351  func = v_quad_aspect_ratio;
352  break; // 23
353  case MB_RADIUS_RATIO:
354  func = v_quad_radius_ratio;
355  break; // 21
358  break; // 9
361  break; // 10
362  case MB_SKEW:
363  func = v_quad_skew;
364  break; // 2
365  case MB_TAPER:
366  func = v_quad_taper;
367  break; // 3
368  case MB_WARPAGE:
369  func = v_quad_warpage;
370  break; // 27
371  case MB_AREA:
372  func = v_quad_area;
373  break; // 28
374  case MB_STRETCH:
375  func = v_quad_stretch;
376  break; // 5
377  case MB_MINIMUM_ANGLE:
378  func = v_quad_minimum_angle;
379  break; // 25
380  case MB_MAXIMUM_ANGLE:
381  func = v_quad_maximum_angle;
382  break; // 29
383  case MB_ODDY:
384  func = v_quad_oddy;
385  break; // 8
386  case MB_CONDITION:
387  func = v_quad_condition;
388  break; // 11
389  case MB_JACOBIAN:
390  func = v_quad_jacobian;
391  break; // 12
392  case MB_SCALED_JACOBIAN:
393  func = v_quad_scaled_jacobian;
394  break; // 13
395  case MB_SHEAR:
396  func = v_quad_shear;
397  break; // 14
398  case MB_SHAPE:
399  func = v_quad_shape;
400  break; // 15
403  break; // 16
404  case MB_SHAPE_AND_SIZE:
405  func = v_quad_shape_and_size;
406  break; // 17
407  case MB_SHEAR_AND_SIZE:
408  func = v_quad_shear_and_size;
409  break; // 18
410  case MB_DISTORTION:
411  func = v_quad_distortion;
412  break; // 19
413  default:
414  return MB_FAILURE;
415  }
416  break;
417  }
418 
419  case MBTRI: {
420  num_nodes = 3;
421  switch( q )
422  {
423  case MB_EDGE_RATIO:
424  func = v_tri_edge_ratio;
425  break; // 0
426  case MB_ASPECT_RATIO:
427  func = v_tri_aspect_ratio;
428  break; // 23
429  case MB_RADIUS_RATIO:
430  func = v_tri_radius_ratio;
431  break; // 21
433  func = v_tri_aspect_frobenius;
434  break; // 10
435  case MB_AREA:
436  func = v_tri_area;
437  break; // 28
438  case MB_MINIMUM_ANGLE:
439  func = v_tri_minimum_angle;
440  break; // 25
441  case MB_MAXIMUM_ANGLE:
442  func = v_tri_maximum_angle;
443  break; // 29
444  case MB_CONDITION:
445  func = v_tri_condition;
446  break; // 11
447  case MB_SCALED_JACOBIAN:
448  func = v_tri_scaled_jacobian;
449  break; // 13
450  // does not exist, even though it was defined in verdict.h; remove it from there too
451  // case MB_SHEAR: func = v_tri_shear; break; // 14
454  break; // 16
455  case MB_SHAPE:
456  func = v_tri_shape;
457  break; // 15
458  case MB_SHAPE_AND_SIZE:
459  func = v_tri_shape_and_size;
460  break; // 17
461  case MB_DISTORTION:
462  func = v_tri_distortion;
463  break; // 19
464  default:
465  return MB_FAILURE;
466  }
467  break;
468  }
469  default:
470  break; // some have no measures
471  }
472 
473  if( !func ) return MB_NOT_IMPLEMENTED;
474  // actual computation happens here
475  quality = ( *func )( num_nodes, coordinates );
476 
477  return MB_SUCCESS;
478 }

References ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_coords(), moab::MB_AREA, moab::MB_ASPECT_BETA, moab::MB_ASPECT_GAMMA, moab::MB_ASPECT_RATIO, moab::MB_COLLAPSE_RATIO, moab::MB_CONDITION, moab::MB_DIAGONAL, moab::MB_DIMENSION, moab::MB_DISTORTION, moab::MB_EDGE_RATIO, moab::MB_JACOBIAN, moab::MB_LENGTH, moab::MB_MAX_ASPECT_FROBENIUS, moab::MB_MAX_EDGE_RATIO, moab::MB_MAXIMUM_ANGLE, moab::MB_MED_ASPECT_FROBENIUS, moab::MB_MINIMUM_ANGLE, MB_NOT_IMPLEMENTED, moab::MB_ODDY, moab::MB_RADIUS_RATIO, moab::MB_RELATIVE_SIZE_SQUARED, moab::MB_SCALED_JACOBIAN, moab::MB_SHAPE, moab::MB_SHAPE_AND_SIZE, moab::MB_SHEAR, moab::MB_SHEAR_AND_SIZE, moab::MB_SKEW, moab::MB_STRETCH, MB_SUCCESS, moab::MB_TAPER, moab::MB_VOLUME, moab::MB_WARPAGE, MBEDGE, MBHEX, mbImpl, MBKNIFE, MBPOLYHEDRON, MBPRISM, MBQUAD, MBTET, MBTRI, moab::possibleQuality, moab::TYPE_FROM_HANDLE(), v_edge_length(), v_hex_condition(), v_hex_diagonal(), v_hex_dimension(), v_hex_distortion(), v_hex_edge_ratio(), v_hex_jacobian(), v_hex_max_aspect_frobenius(), v_hex_max_edge_ratio(), v_hex_med_aspect_frobenius(), v_hex_oddy(), v_hex_relative_size_squared(), v_hex_scaled_jacobian(), v_hex_shape(), v_hex_shape_and_size(), v_hex_shear(), v_hex_shear_and_size(), v_hex_skew(), v_hex_stretch(), v_hex_taper(), v_hex_volume(), v_knife_volume(), v_quad_area(), v_quad_aspect_ratio(), v_quad_condition(), v_quad_distortion(), v_quad_edge_ratio(), v_quad_jacobian(), v_quad_max_aspect_frobenius(), v_quad_max_edge_ratio(), v_quad_maximum_angle(), v_quad_med_aspect_frobenius(), v_quad_minimum_angle(), v_quad_oddy(), v_quad_radius_ratio(), v_quad_relative_size_squared(), v_quad_scaled_jacobian(), v_quad_shape(), v_quad_shape_and_size(), v_quad_shear(), v_quad_shear_and_size(), v_quad_skew(), v_quad_stretch(), v_quad_taper(), v_quad_warpage(), v_tet_aspect_beta(), v_tet_aspect_frobenius(), v_tet_aspect_gamma(), v_tet_aspect_ratio(), v_tet_collapse_ratio(), v_tet_condition(), v_tet_distortion(), v_tet_edge_ratio(), v_tet_jacobian(), v_tet_minimum_angle(), v_tet_radius_ratio(), v_tet_relative_size_squared(), v_tet_scaled_jacobian(), v_tet_shape(), v_tet_shape_and_size(), v_tet_volume(), v_tri_area(), v_tri_aspect_frobenius(), v_tri_aspect_ratio(), v_tri_condition(), v_tri_distortion(), v_tri_edge_ratio(), v_tri_maximum_angle(), v_tri_minimum_angle(), v_tri_radius_ratio(), v_tri_relative_size_squared(), v_tri_scaled_jacobian(), v_tri_shape(), v_tri_shape_and_size(), and v_wedge_volume().

Referenced by get_max_volume(), and perform_laplacian_smoothing().

◆ quality_name()

const char * moab::VerdictWrapper::quality_name ( QualityType  q)

return a quality name

return quality name (convert an enum QualityType to a string)

Parameters
qquality type return string Example:
const char * name = quality_name(MB_JACOBIAN);

Definition at line 479 of file VerdictWrapper.cpp.

480 {
481  return nameQuality[q];
482 }

References moab::nameQuality.

Referenced by main().

◆ set_size()

ErrorCode moab::VerdictWrapper::set_size ( double  size)

Definition at line 497 of file VerdictWrapper.cpp.

498 {
499  // set the sizes for all of them; maybe we can set by type, this should be enough for simplicity
500  v_set_hex_size( size );
501  v_set_tet_size( size );
503  v_set_tri_size( size );
504  return MB_SUCCESS;
505 }

References MB_SUCCESS, size, v_set_hex_size(), v_set_quad_size(), v_set_tet_size(), and v_set_tri_size().

Referenced by main(), and perform_laplacian_smoothing().

Member Data Documentation

◆ mbImpl

Interface* moab::VerdictWrapper::mbImpl
private

Definition at line 189 of file VerdictWrapper.hpp.

Referenced by all_quality_measures(), and quality_measure().


The documentation for this class was generated from the following files: