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";
62 its_name =
"Skew Angle";
74 its_name =
"Maximum Angle";
78 its_name =
"Minimum Angle";
82 its_name =
"Maximum Dihedral Angle";
86 its_name =
"Minimum Dihedral Angle";
90 its_name =
"Condition Number";
94 its_name =
"Distortion";
106 its_name =
"Stretch";
110 its_name =
"Diagonal";
114 its_name =
"AR Beta";
118 its_name =
"AR Gamma";
126 its_name =
"Jacobian";
130 its_name =
"Scaled Jacobian";
134 its_name =
"Unknown";
153 std::ostringstream desc;
160 desc <<
"Max edge length ratio\n"
161 <<
"at element center.\n"
163 <<
"Suggested ranges:\n"
164 <<
"Hexes: (1 -> 4)\n"
165 <<
"Quads: (1 -> 4)";
169 desc <<
"Knupp's algebraic skew metric,\n"
170 <<
"based on the nodal Jacobian\n"
171 <<
"skew matrices. 1 is ideal,\n"
172 <<
"smaller values are worse.\n"
174 <<
"Suggested ranges:\n"
175 <<
"Hexes: (0.3 -> 1)\n"
176 <<
"Quads: (0.3 -> 1)";
180 desc <<
"Maximum |cos A|, where A\n"
181 <<
"is the angle between edges\n"
182 <<
"at element center.\n"
183 <<
"NOTE: some degenerate elements\n"
184 <<
"score 0 if zero-length along principal axis.\n"
185 <<
"Suggested ranges:\n"
186 <<
"Hexes: (0 -> 0.5)\n"
187 <<
"Quads: (0 -> 0.5)";
191 desc <<
"LIBMESH_DIM / K(Js)\n"
193 <<
"LIBMESH_DIM = element dimension.\n"
194 <<
"K(Js) = Condition number of \n"
195 <<
" Jacobian skew matrix.\n"
197 <<
"Suggested ranges:\n"
198 <<
"Hexes(LIBMESH_DIM=3): (0.3 -> 1)\n"
199 <<
"Quads(LIBMESH_DIM=2): (0.3 -> 1)";
203 desc <<
"LIBMESH_DIM / K(Jw)\n"
205 <<
"LIBMESH_DIM = element dimension.\n"
206 <<
"K(Jw) = Condition number of \n"
207 <<
" weighted Jacobian\n"
210 <<
"Suggested ranges:\n"
211 <<
"Hexes(LIBMESH_DIM=3): (0.3 -> 1)\n"
212 <<
"Tets(LIBMESH_DIM=3): (0.2 -> 1)\n"
213 <<
"Quads(LIBMESH_DIM=2): (0.3 -> 1).";
217 desc <<
"Largest angle between all adjacent pairs of edges (in 2D, sides).\n"
219 <<
"Suggested ranges:\n"
220 <<
"Quads: (90 -> 135)\n"
221 <<
"Triangles: (60 -> 90)";
225 desc <<
"Smallest angle between all adjacent pairs of edges (in 2D, sides).\n"
227 <<
"Suggested ranges:\n"
228 <<
"Quads: (45 -> 90)\n"
229 <<
"Triangles: (30 -> 60)";
233 desc <<
"Largest angle between all adjacent pairs of sides (in 2D, equivalent to MAX_ANGLE).\n"
234 <<
"In 3D, this is the largest unoriented angle between adjacent side planes, in the range [0, 90].\n"
236 <<
"Suggested ranges:\n"
237 <<
"Quads: (90 -> 135)\n"
238 <<
"Triangles: (60 -> 90)\n"
239 <<
"C0Polyhedra: (60 -> 90)";
243 desc <<
"Smallest angle between all adjacent pairs of sides (in 2D, equivalent to MIN_ANGLE).\n"
244 <<
"In 3D, this is the smallest unoriented angle between adjacent side planes, in the range [0, 90].\n"
246 <<
"Suggested ranges:\n"
247 <<
"Quads: (45 -> 90)\n"
248 <<
"Triangles: (30 -> 60)\n"
249 <<
"C0Polyhedra: (30 -> 90)";
253 desc <<
"Maximum condition number of\n"
254 <<
"the Jacobian matrix at each\n"
255 <<
"corner, relative to an ideal\n"
256 <<
"(regular) element. 1 is ideal,\n"
257 <<
"larger values are worse.\n"
259 <<
"Suggested ranges:\n"
260 <<
"Quads: (1 -> 4)\n"
261 <<
"Hexes: (1 -> 8)\n"
262 <<
"Tris: (1 -> 1.3)\n"
267 desc <<
"min |J| * A / <A>\n"
269 <<
"|J| = norm of Jacobian matrix\n"
270 <<
" A = actual area\n"
271 <<
"<A> = reference area\n"
273 <<
"Suggested ranges:\n"
274 <<
"Quads: (0.6 -> 1), <A>=4\n"
275 <<
"Hexes: (0.6 -> 1), <A>=8\n"
276 <<
"Tris: (0.6 -> 1), <A>=1/2\n"
277 <<
"Tets: (0.6 -> 1), <A>=1/6";
281 desc <<
"Maximum ratio of lengths\n"
282 <<
"derived from opposite edges.\n"
284 <<
"Suggested ranges:\n"
285 <<
"Quads: (0.7 -> 1)\n"
286 <<
"Hexes: (0.4 -> 1)";
292 <<
"D = minimum dihedral angle\n"
293 <<
" formed by diagonals.\n"
295 <<
"Suggested ranges:\n"
296 <<
"Quads: (0.9 -> 1)";
300 desc <<
"Sqrt(3) * L_min / L_max\n"
302 <<
"L_min = minimum edge length.\n"
303 <<
"L_max = maximum edge length.\n"
305 <<
"Suggested ranges:\n"
306 <<
"Quads: (0.25 -> 1)\n"
307 <<
"Hexes: (0.25 -> 1)";
311 desc <<
"D_min / D_max\n"
313 <<
"D_min = minimum diagonal.\n"
314 <<
"D_max = maximum diagonal.\n"
316 <<
"Suggested ranges:\n"
317 <<
"Hexes: (0.65 -> 1)";
321 desc <<
"CR / (3 * IR)\n"
323 <<
"CR = circumsphere radius\n"
324 <<
"IR = inscribed sphere radius\n"
326 <<
"Suggested ranges:\n"
331 desc <<
"S^(3/2) / 8.479670 * V\n"
333 <<
"S = sum(si*si/6)\n"
334 <<
"si = edge length\n"
337 <<
"Suggested ranges:\n"
342 desc <<
"Relative size: min(J, 1/J),\n"
343 <<
"where J is the determinant of\n"
344 <<
"the nodal Jacobian relative to\n"
345 <<
"an ideal element of the same\n"
346 <<
"volume. 1 for a uniform\n"
347 <<
"(affine) element.\n"
349 <<
"Suggested ranges:\n"
350 <<
"Quads: (0.3 -> 1)\n"
351 <<
"Hexes: (0.5 -> 1)\n"
352 <<
"Tris: (0.25 -> 1)\n"
353 <<
"Tets: (0.2 -> 1)";
358 desc <<
"Minimum nodal Jacobian.\n"
359 <<
"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"
360 <<
"In the SCALED_JACOBIAN case, we also then divide by the lengths of each of the associated edges.\n"
361 <<
"For Pyramid elements where four edges meet at the apex node, special handling is required.\n"
363 <<
"Suggested acceptable ranges (from Cubit documentation) for SCALED_JACOBIAN metric:\n"
364 <<
"Quads/Hexes: (0.5 -> 1)\n"
365 <<
"Tris/Tets: (0.2 -> 1.0)";
379 std::vector<ElemQuality> v;
556#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
586 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.