38 v0[0] = 0.0; v0[1] = 0.0; v0[2] = 0.0;
39 v1[0] = 1.0; v1[1] = 0.0; v1[2] = 0.0;
40 v2[0] = 0.5; v2[1] = .866025; v2[2] = 0.0;
41 v3[0] = 0.5; v3[1] = .288675; v3[2] = .816497;
47 p0[0] = 0.0; p0[1] = 0.0; p0[2] = 0.0;
48 p1[0] = 1.0; p1[1] = 0.0; p1[2] = 0.0;
49 p2[0] = 0.0; p2[1] = 1.0; p2[2] = 0.0;
50 p3[0] = 0.0; p3[1] = 0.0; p3[2] = 1.0;
58 double tet_aspects[2];
64 double tri_aspects[2];
83 Shape3.
initialize(ref_tet,COM::Connectivity::TET4);
84 Size3.
initialize(ref_tet,COM::Connectivity::TET4);
85 Skew3.
initialize(ref_tet,COM::Connectivity::TET4);
86 Angle3.
initialize(ref_tet,COM::Connectivity::TET4);
87 Aspect3.
initialize(ref_tet,COM::Connectivity::TET4);
89 Shape2.
initialize(ref_tet,COM::Connectivity::TRI3);
90 Size2.
initialize(ref_tet,COM::Connectivity::TRI3);
91 Skew2.
initialize(ref_tet,COM::Connectivity::TRI3);
92 Angle2.
initialize(ref_tri,COM::Connectivity::TRI3);
93 Aspect2.
initialize(ref_tri,COM::Connectivity::TRI3);
110 cout <<
"For the regular tetrahedron, metric values are: " << endl;
111 cout <<
" Algebraic Metrics: " << endl;
112 cout <<
" shape = " << tet_shape[0] << endl;
113 cout <<
" size = " << tet_size[0] << endl;
114 cout <<
" skew = " << tet_skew[0] << endl;
115 cout <<
" Geometric Metrics: " << endl;
116 cout <<
" min angle = " << tet_angles[0] << endl;
117 cout <<
" max angle = " << tet_angles[1] << endl;
118 cout <<
" R/r = " << tet_aspects[0] << endl;
119 cout <<
" R/l = " << tet_aspects[1] << endl;
120 cout <<
"The range of values for the metrics are: " << endl;
121 cout <<
" shape = [" << Shape3.
minValue() <<
"," << Shape3.
maxValue() <<
"]" << endl;
122 cout <<
" size = [" << Size3.
minValue() <<
"," << Size3.
maxValue() <<
"]" << endl;
123 cout <<
" skew = [" << Skew3.
minValue() <<
"," << Skew3.
maxValue() <<
"]" << endl;
124 cout <<
" angles = [" << Angle3.
minValue() <<
"," << Angle3.
maxValue() <<
"]" << endl;
125 cout <<
" a. ratios = [" << Aspect3.
minValue() <<
"," << Aspect3.
maxValue() <<
"]" << endl << endl;
127 cout <<
"For the equilateral triangle, metric values are: " << endl;
128 cout <<
" Algebraic Metrics: " << endl;
129 cout <<
" shape = " << tri_shape[0] << endl;
130 cout <<
" size = " << tri_size[0] << endl;
131 cout <<
" skew = " << tri_skew[0] << endl;
132 cout <<
" Geometric Metrics: " << endl;
133 cout <<
" min angle = " << tri_angles[0] << endl;
134 cout <<
" max angle = " << tri_angles[1] << endl;
135 cout <<
" R/r = " << tri_aspects[0] << endl;
136 cout <<
" R/l = " << tri_aspects[1] << endl;
137 cout <<
"The range of values for the metrics are: " << endl;
138 cout <<
" shape = [" << Shape3.
minValue() <<
"," << Shape3.
maxValue() <<
"]" << endl;
139 cout <<
" size = [" << Size3.
minValue() <<
"," << Size3.
maxValue() <<
"]" << endl;
140 cout <<
" skew = [" << Skew3.
minValue() <<
"," << Skew3.
maxValue() <<
"]" << endl;
141 cout <<
" angles = [" << Angle3.
minValue() <<
"," << Angle3.
maxValue() <<
"]" << endl;
142 cout <<
" a. ratios = [" << Aspect3.
minValue() <<
"," << Aspect3.
maxValue() <<
"]" << endl << endl;
146 Shape3.
initialize(log_tet,COM::Connectivity::TET4);
147 Size3.
initialize(log_tet,COM::Connectivity::TET4);
148 Skew3.
initialize(log_tet,COM::Connectivity::TET4);
149 Angle3.
initialize(log_tet,COM::Connectivity::TET4);
150 Aspect3.
initialize(log_tet,COM::Connectivity::TET4);
152 Shape2.
initialize(log_tet,COM::Connectivity::TRI3);
153 Size2.
initialize(log_tet,COM::Connectivity::TRI3);
154 Skew2.
initialize(log_tet,COM::Connectivity::TRI3);
155 Angle2.
initialize(log_tri,COM::Connectivity::TRI3);
156 Aspect2.
initialize(log_tri,COM::Connectivity::TRI3);
173 cout <<
"For the logical tetrahedron, metric values are: " << endl;
174 cout <<
" Algebraic Metrics: " << endl;
175 cout <<
" shape = " << tet_shape[0] << endl;
176 cout <<
" size = " << tet_size[0] << endl;
177 cout <<
" skew = " << tet_skew[0] << endl;
178 cout <<
" Geometric Metrics: " << endl;
179 cout <<
" min angle = " << tet_angles[0] << endl;
180 cout <<
" max angle = " << tet_angles[1] << endl;
181 cout <<
" R/r = " << tet_aspects[0] << endl;
182 cout <<
" R/l = " << tet_aspects[1] << endl;
183 cout <<
"The range of values for the metrics are: " << endl;
184 cout <<
" shape = [" << Shape3.
minValue() <<
"," << Shape3.
maxValue() <<
"]" << endl;
185 cout <<
" size = [" << Size3.
minValue() <<
"," << Size3.
maxValue() <<
"]" << endl;
186 cout <<
" skew = [" << Skew3.
minValue() <<
"," << Skew3.
maxValue() <<
"]" << endl;
187 cout <<
" angles = [" << Angle3.
minValue() <<
"," << Angle3.
maxValue() <<
"]" << endl;
188 cout <<
" a. ratios = [" << Aspect3.
minValue() <<
"," << Aspect3.
maxValue() <<
"]" << endl << endl;
190 cout <<
"For the logical triangle, metric values are: " << endl;
191 cout <<
" Algebraic Metrics: " << endl;
192 cout <<
" shape = " << tri_shape[0] << endl;
193 cout <<
" size = " << tri_size[0] << endl;
194 cout <<
" skew = " << tri_skew[0] << endl;
195 cout <<
" Geometric Metrics: " << endl;
196 cout <<
" min angle = " << tri_angles[0] << endl;
197 cout <<
" max angle = " << tri_angles[1] << endl;
198 cout <<
" R/r = " << tri_aspects[0] << endl;
199 cout <<
" R/l = " << tri_aspects[1] << endl;
200 cout <<
"The range of values for the metrics are: " << endl;
201 cout <<
" shape = [" << Shape3.
minValue() <<
"," << Shape3.
maxValue() <<
"]" << endl;
202 cout <<
" size = [" << Size3.
minValue() <<
"," << Size3.
maxValue() <<
"]" << endl;
203 cout <<
" skew = [" << Skew3.
minValue() <<
"," << Skew3.
maxValue() <<
"]" << endl;
204 cout <<
" angles = [" << Angle3.
minValue() <<
"," << Angle3.
maxValue() <<
"]" << endl;
205 cout <<
" a. ratios = [" << Aspect3.
minValue() <<
"," << Aspect3.
maxValue() <<
"]" << endl << endl;
210 v2_0[0] = 0.0; v2_0[1] = 0.0; v2_0[2] = 0.0;
211 v2_1[0] = 1.0; v2_1[1] = 0.0; v2_1[2] = 0.0;
212 v2_2[0] = 1.0; v2_2[1] = 1.0; v2_2[2] = 0.0;
213 v2_3[0] = 0.0; v2_3[1] = 1.0; v2_3[2] = 0.0;
214 v2_4[0] = 0.0; v2_4[1] = 0.0; v2_4[2] = 1.0;
215 v2_5[0] = 1.0; v2_5[1] = 0.0; v2_5[2] = 1.0;
216 v2_6[0] = 1.0; v2_6[1] = 1.0; v2_6[2] = 1.0;
217 v2_7[0] = 0.0; v2_7[1] = 1.0; v2_7[2] = 1.0;
228 double hex_angles[2];
229 double hex_aspects[2];
231 double quad_shape[1];
234 double quad_angles[2];
235 double quad_aspects[2];
238 Shape3.
initialize(ref_hex,COM::Connectivity::HEX8);
239 Size_3.
initialize(ref_hex,COM::Connectivity::HEX8);
240 Skew3.
initialize(ref_hex,COM::Connectivity::HEX8);
241 Angle3.
initialize(ref_hex,COM::Connectivity::HEX8);
242 Aspect3.
initialize(ref_hex,COM::Connectivity::HEX8);
244 Shape2.
initialize(ref_quad,COM::Connectivity::QUAD4);
245 Size_2.
initialize(ref_quad,COM::Connectivity::QUAD4);
246 Skew2.
initialize(ref_quad,COM::Connectivity::QUAD4);
247 Angle2.
initialize(ref_quad,COM::Connectivity::QUAD4);
248 Aspect2.
initialize(ref_quad,COM::Connectivity::QUAD4);
264 cout <<
"For the regular hexahedron, metric values are: " << endl;
265 cout <<
" Algebraic Metrics: " << endl;
266 cout <<
" shape = " << hex_shape[0] << endl;
267 cout <<
" size = " << hex_size[0] << endl;
268 cout <<
" skew = " << hex_skew[0] << endl;
269 cout <<
" Geometric Metrics: " << endl;
270 cout <<
" min angle = " << hex_angles[0] << endl;
271 cout <<
" max angle = " << hex_angles[1] << endl;
272 cout <<
" R/r = " << hex_aspects[0] << endl;
273 cout <<
" R/l = " << hex_aspects[1] << endl;
274 cout <<
"The range of values for the metrics are: " << endl;
275 cout <<
" shape = [" << Shape3.
minValue() <<
"," << Shape3.
maxValue() <<
"]" << endl;
276 cout <<
" size = [" << Size_3.
minValue() <<
"," << Size_3.
maxValue() <<
"]" << endl;
277 cout <<
" skew = [" << Skew3.
minValue() <<
"," << Skew3.
maxValue() <<
"]" << endl;
278 cout <<
" angles = [" << Angle3.
minValue() <<
"," << Angle3.
maxValue() <<
"]" << endl;
279 cout <<
" a. ratios = [" << Aspect3.
minValue() <<
"," << Aspect3.
maxValue() <<
"]" << endl << endl;
281 cout <<
"For the square, metric values are: " << endl;
282 cout <<
" Algebraic Metrics: " << endl;
283 cout <<
" shape = " << quad_shape[0] << endl;
284 cout <<
" size = " << quad_size[0] << endl;
285 cout <<
" skew = " << quad_skew[0] << endl;
286 cout <<
" Geometric Metrics: " << endl;
287 cout <<
" min angle = " << quad_angles[0] << endl;
288 cout <<
" max angle = " << quad_angles[1] << endl;
289 cout <<
" R/r = " << quad_aspects[0] << endl;
290 cout <<
" r/l = " << quad_aspects[1] << endl;
291 cout <<
"The range of values for the metrics are: " << endl;
292 cout <<
" shape = [" << Shape2.
minValue() <<
"," << Shape2.
maxValue() <<
"]" << endl;
293 cout <<
" size = [" << Size2.
minValue() <<
"," << Size2.
maxValue() <<
"]" << endl;
294 cout <<
" skew = [" << Skew2.
minValue() <<
"," << Skew2.
maxValue() <<
"]" << endl;
295 cout <<
" angles = [" << Angle2.
minValue() <<
"," << Angle2.
maxValue() <<
"]" << endl;
296 cout <<
" a. ratios = [" << Aspect2.
minValue() <<
"," << Aspect2.
maxValue() <<
"]" << endl << endl;
300 p2_0[0] = 0.0; p2_0[1] = 0.0; p2_0[2] = 0.0;
301 p2_1[0] = .9; p2_1[1] = 0.0; p2_1[2] = 0.1;
302 p2_2[0] = 1.0; p2_2[1] = 1.1; p2_2[2] = 0.0;
303 p2_3[0] = 0.2; p2_3[1] = .85; p2_3[2] = 0.0;
304 p2_4[0] = 0.0; p2_4[1] = 0.0; p2_4[2] = 1.1;
305 p2_5[0] = 1.0; p2_5[1] = 0.0; p2_5[2] = 1.0;
306 p2_6[0] = 1.2; p2_6[1] = .9; p2_6[2] = 1.0;
307 p2_7[0] = 0.2; p2_7[1] = 1.0; p2_7[2] = 1.2;
313 Shape3.
initialize(misc_hex,COM::Connectivity::HEX8);
314 Size_3.
initialize(misc_hex,COM::Connectivity::HEX8);
315 Skew3.
initialize(misc_hex,COM::Connectivity::HEX8);
316 Angle3.
initialize(misc_hex,COM::Connectivity::HEX8);
317 Aspect3.
initialize(misc_hex,COM::Connectivity::HEX8);
319 Shape2.
initialize(misc_quad,COM::Connectivity::QUAD4);
320 Size_2.
initialize(misc_quad,COM::Connectivity::QUAD4);
321 Skew2.
initialize(misc_quad,COM::Connectivity::QUAD4);
322 Angle2.
initialize(misc_quad,COM::Connectivity::QUAD4);
323 Aspect2.
initialize(misc_quad,COM::Connectivity::QUAD4);
337 cout <<
"For the non-regular hexahedron, metric values are: " << endl;
338 cout <<
" Algebraic Metrics: " << endl;
339 cout <<
" shape = " << hex_shape[0] << endl;
340 cout <<
" size = " << hex_size[0] << endl;
341 cout <<
" skew = " << hex_skew[0] << endl;
342 cout <<
" Geometric Metrics: " << endl;
343 cout <<
" min angle = " << hex_angles[0] << endl;
344 cout <<
" max angle = " << hex_angles[1] << endl;
345 cout <<
" R/r = " << hex_aspects[0] << endl;
346 cout <<
" R/l = " << hex_aspects[1] << endl;
347 cout <<
"The range of values for the metrics are: " << endl;
348 cout <<
" shape = [" << Shape3.
minValue() <<
"," << Shape3.
maxValue() <<
"]" << endl;
349 cout <<
" size = [" << Size_3.
minValue() <<
"," << Size_3.
maxValue() <<
"]" << endl;
350 cout <<
" skew = [" << Skew3.
minValue() <<
"," << Skew3.
maxValue() <<
"]" << endl;
351 cout <<
" angles = [" << Angle3.
minValue() <<
"," << Angle3.
maxValue() <<
"]" << endl;
352 cout <<
" a. ratios = [" << Aspect3.
minValue() <<
"," << Aspect3.
maxValue() <<
"]" << endl << endl;
354 cout <<
"For the non-regular quadrilateral, metric values are: " << endl;
355 cout <<
" Algebraic Metrics: " << endl;
356 cout <<
" shape = " << quad_shape[0] << endl;
357 cout <<
" size = " << quad_size[0] << endl;
358 cout <<
" skew = " << quad_skew[0] << endl;
359 cout <<
" Geometric Metrics: " << endl;
360 cout <<
" min angle = " << quad_angles[0] << endl;
361 cout <<
" max angle = " << quad_angles[1] << endl;
362 cout <<
" R/r = " << quad_aspects[0] << endl;
363 cout <<
" r/l = " << quad_aspects[1] << endl;
364 cout <<
"The range of values for the metrics are: " << endl;
365 cout <<
" shape = [" << Shape2.
minValue() <<
"," << Shape2.
maxValue() <<
"]" << endl;
366 cout <<
" size = [" << Size2.
minValue() <<
"," << Size2.
maxValue() <<
"]" << endl;
367 cout <<
" skew = [" << Skew2.
minValue() <<
"," << Skew2.
maxValue() <<
"]" << endl;
368 cout <<
" angles = [" << Angle2.
minValue() <<
"," << Angle2.
maxValue() <<
"]" << endl;
369 cout <<
" a. ratios = [" << Aspect2.
minValue() <<
"," << Aspect2.
maxValue() <<
"]" << endl << endl;
3D Aspect Ratios Metric Class
virtual double maxValue() const
The maximum value for this metric.
virtual void compute(double atts[]) const
Calculate the metric value on this element.
double maxValue() const
Get the maximum value for this metric.
double minValue() const
Get the minimum value for this metric.
2D Aspect Ratios Metric Class
virtual void compute(double atts[]) const
Calculate the metric value on this element.
virtual void compute(double atts[]) const
Calculate the metric value on this element.
virtual void compute(double atts[]) const
Calculate scaled R/r and R/l.
virtual void compute(double atts[]) const
Calculate the shape metric value.
3D geometric quality Metric declarations.
double minValue() const
Get the minimum value for this metric.
double maxValue() const
The maximum value for this metric.
double minValue() const
The minimum value for this metric.
virtual void initialize(Vector_3< double > n[], int type)
Initialize a 2D Algebraic Metric.
2D Max and Min Angle Metric Class
double maxValue() const
Get the maximum value for this metric.
virtual void compute(double atts[]) const
Calculate the metric value on this element.
virtual void compute(double atts[]) const
Calculate the metric value.
virtual void initialize(Vector_3< double > n[], int type)
Initialize a 3D Algebraic Metric.
double minValue() const
The minimum value for this metric.
virtual void compute(double atts[]) const
Calculate max and min angles.
virtual void initialize(Vector_3< double > n[], int type)
Initialize a 2D Geometric Metric.
virtual void initialize(Vector_3< double > n[], int type)
Initialize a 3D Geometric Metric by nodal coords and element type.
Contains the prototype of Connectivity.
2D geometric quality Metric declarations.
3d algebraic quality Metric declarations.
int main(int argc, char *argv[])
2D algebraic quality Metric declaration..
virtual void compute(double atts[]) const
Calculate the metric value on this element.
double maxValue() const
The maximum value for this metric.
3D Max and Min Angle Metric Class
virtual double minValue() const
The minimum value for this metric.
virtual void compute(double atts[]) const
Calculate the shape metric value.
virtual double maxValue() const
The maximum value for this metric.
virtual double minValue() const
The minimum value for this metric.