Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F108486794
mesh_helper.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Apr 17, 01:36
Size
1 KB
Mime Type
text/x-c++
Expires
Sat, Apr 19, 01:36 (2 d)
Engine
blob
Format
Raw Data
Handle
25614084
Attached To
rCADDMESH CADD_mesher
mesh_helper.hh
View Options
// external routines for quality measures
#include "tet_mesh_quality.hh"
#include "triangulation_quality.hh"
template <Uint DIM>
inline Real computeRadiusRatio(const Real * points, const int * element, Uint nb_points) {
Uint nb_elements = 1;
Real q_min= std::numeric_limits<Real>::max(), q_max=0;
int tri_order = DIM + 1; // it's weird, but this seems to be what it wants
Real q_ave, q_area, q_var; //garbage, throwaway
Real ratio = 0;
int offset = 0;
if (DIM == twoD) {
triangle_quality::q_measure(nb_points, points, tri_order, nb_elements,
element, &q_min, &q_max, &q_ave, &q_area,
&ratio, offset);
} else if (DIM == threeD) {
tetrahedron_quality::tet_mesh_quality1(nb_points, points, tri_order, nb_elements,
element, &q_min, &q_ave, &q_max, &q_var,
&ratio, offset);
} else {
std::stringstream error_stream;
error_stream << "computeRadiusRatio not implemented for DIM = " << DIM;
throw (error_stream.str());
}
return 1./ratio;
}
Event Timeline
Log In to Comment