23#include "libmesh/libmesh_common.h"
24#include "libmesh/elem_quality.h"
25#include "libmesh/enum_elem_type.h"
26#include "libmesh/enum_elem_quality.h"
50 its_name =
"Edge Length Ratio";
54 its_name =
"Aspect Ratio";
70 its_name =
"Maximum Angle";
74 its_name =
"Minimum Angle";
78 its_name =
"Maximum Dihedral Angle";
82 its_name =
"Minimum Dihedral Angle";
86 its_name =
"Condition Number";
90 its_name =
"Distortion";
102 its_name =
"Stretch";
106 its_name =
"Diagonal";
110 its_name =
"AR Beta";
114 its_name =
"AR Gamma";
122 its_name =
"Jacobian";
126 its_name =
"Scaled Jacobian";
130 its_name =
"Unknown";
149 std::ostringstream desc;
156 desc <<
"Max edge length ratio\n"
157 <<
"at element center.\n"
159 <<
"Suggested ranges:\n"
160 <<
"Hexes: (1 -> 4)\n"
161 <<
"Quads: (1 -> 4)";
165 desc <<
"Maximum |cos A|, where A\n"
166 <<
"is the angle between edges\n"
167 <<
"at element center.\n"
169 <<
"Suggested ranges:\n"
170 <<
"Hexes: (0 -> 0.5)\n"
171 <<
"Quads: (0 -> 0.5)";
175 desc <<
"LIBMESH_DIM / K(Js)\n"
177 <<
"LIBMESH_DIM = element dimension.\n"
178 <<
"K(Js) = Condition number of \n"
179 <<
" Jacobian skew matrix.\n"
181 <<
"Suggested ranges:\n"
182 <<
"Hexes(LIBMESH_DIM=3): (0.3 -> 1)\n"
183 <<
"Quads(LIBMESH_DIM=2): (0.3 -> 1)";
187 desc <<
"LIBMESH_DIM / K(Jw)\n"
189 <<
"LIBMESH_DIM = element dimension.\n"
190 <<
"K(Jw) = Condition number of \n"
191 <<
" weighted Jacobian\n"
194 <<
"Suggested ranges:\n"
195 <<
"Hexes(LIBMESH_DIM=3): (0.3 -> 1)\n"
196 <<
"Tets(LIBMESH_DIM=3): (0.2 -> 1)\n"
197 <<
"Quads(LIBMESH_DIM=2): (0.3 -> 1).";
201 desc <<
"Largest angle between all adjacent pairs of edges (in 2D, sides).\n"
203 <<
"Suggested ranges:\n"
204 <<
"Quads: (90 -> 135)\n"
205 <<
"Triangles: (60 -> 90)";
209 desc <<
"Smallest angle between all adjacent pairs of edges (in 2D, sides).\n"
211 <<
"Suggested ranges:\n"
212 <<
"Quads: (45 -> 90)\n"
213 <<
"Triangles: (30 -> 60)";
217 desc <<
"Largest angle between all adjacent pairs of sides (in 2D, equivalent to MAX_ANGLE).\n"
218 <<
"In 3D, this is the largest unoriented angle between adjacent side planes, in the range [0, 90].\n"
220 <<
"Suggested ranges:\n"
221 <<
"Quads: (90 -> 135)\n"
222 <<
"Triangles: (60 -> 90)\n"
223 <<
"C0Polyhedra: (60 -> 90)";
227 desc <<
"Smallest angle between all adjacent pairs of sides (in 2D, equivalent to MIN_ANGLE).\n"
228 <<
"In 3D, this is the smallest unoriented angle between adjacent side planes, in the range [0, 90].\n"
230 <<
"Suggested ranges:\n"
231 <<
"Quads: (45 -> 90)\n"
232 <<
"Triangles: (30 -> 60)\n"
233 <<
"C0Polyhedra: (30 -> 90)";
237 desc <<
"Condition number of the\n"
238 <<
"Jacobian matrix.\n"
240 <<
"Suggested ranges:\n"
241 <<
"Quads: (1 -> 4)\n"
242 <<
"Hexes: (1 -> 8)\n"
243 <<
"Tris: (1 -> 1.3)\n"
248 desc <<
"min |J| * A / <A>\n"
250 <<
"|J| = norm of Jacobian matrix\n"
251 <<
" A = actual area\n"
252 <<
"<A> = reference area\n"
254 <<
"Suggested ranges:\n"
255 <<
"Quads: (0.6 -> 1), <A>=4\n"
256 <<
"Hexes: (0.6 -> 1), <A>=8\n"
257 <<
"Tris: (0.6 -> 1), <A>=1/2\n"
258 <<
"Tets: (0.6 -> 1), <A>=1/6";
262 desc <<
"Maximum ratio of lengths\n"
263 <<
"derived from opposite edges.\n"
265 <<
"Suggested ranges:\n"
266 <<
"Quads: (0.7 -> 1)\n"
267 <<
"Hexes: (0.4 -> 1)";
273 <<
"D = minimum dihedral angle\n"
274 <<
" formed by diagonals.\n"
276 <<
"Suggested ranges:\n"
277 <<
"Quads: (0.9 -> 1)";
281 desc <<
"Sqrt(3) * L_min / L_max\n"
283 <<
"L_min = minimum edge length.\n"
284 <<
"L_max = maximum edge length.\n"
286 <<
"Suggested ranges:\n"
287 <<
"Quads: (0.25 -> 1)\n"
288 <<
"Hexes: (0.25 -> 1)";
292 desc <<
"D_min / D_max\n"
294 <<
"D_min = minimum diagonal.\n"
295 <<
"D_max = maximum diagonal.\n"
297 <<
"Suggested ranges:\n"
298 <<
"Hexes: (0.65 -> 1)";
302 desc <<
"CR / (3 * IR)\n"
304 <<
"CR = circumsphere radius\n"
305 <<
"IR = inscribed sphere radius\n"
307 <<
"Suggested ranges:\n"
312 desc <<
"S^(3/2) / 8.479670 * V\n"
314 <<
"S = sum(si*si/6)\n"
315 <<
"si = edge length\n"
318 <<
"Suggested ranges:\n"
323 desc <<
"min (|J|, |1/J|)\n"
325 <<
"|J| = norm of Jacobian matrix.\n"
327 <<
"Suggested ranges:\n"
328 <<
"Quads: (0.3 -> 1)\n"
329 <<
"Hexes: (0.5 -> 1)\n"
330 <<
"Tris: (0.25 -> 1)\n"
331 <<
"Tets: (0.2 -> 1)";
336 desc <<
"Minimum nodal Jacobian.\n"
337 <<
"The nodal Jacobians are computed by taking the cross product (2D) or scalar product (3D) of the adjacent edges that meet at that node.\n"
338 <<
"In the SCALED_JACOBIAN case, we also then divide by the lengths of each of the associated edges.\n"
339 <<
"For Pyramid elements where four edges meet at the apex node, special handling is required.\n"
341 <<
"Suggested acceptable ranges (from Cubit documentation) for SCALED_JACOBIAN metric:\n"
342 <<
"Quads/Hexes: (0.5 -> 1)\n"
343 <<
"Tris/Tets: (0.2 -> 1.0)";
357 std::vector<ElemQuality> v;
530#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
560 libmesh_error_msg(
"Undefined element type!");
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
std::vector< ElemQuality > valid(const ElemType t)
std::string describe(const ElemQuality q)
This function returns a string containing a short description of q.
The libMesh namespace provides an interface to certain functionality in the library.
ElemType
Defines an enum for geometric element types.
ElemQuality
Defines an enum for element quality metrics.