6 #include "GmshConfig.h"
14 #if defined(HAVE_QUADMESHINGTOOLS)
16 #include "qmtMeshUtils.h"
17 #include "qmtCrossField.h"
18 #include "qmtSizeMap.h"
21 static void printSizeField(
const char *fn, std::vector<MTriangle *> &triangles,
22 std::unordered_map<MVertex *, double> &sizeField)
24 FILE *
f = fopen(fn,
"w");
25 fprintf(
f,
"View\"SIZE FIELD\"{\n");
26 for(
auto t : triangles) {
28 "ST(%12.5E,%12.5E,%12.5E,%12.5E,%12.5E,%12.5E,%12.5E,%12.5E,%12.5E)"
29 "{%12.5E,%12.5E,%12.5E};\n",
30 t->getVertex(0)->x(), t->getVertex(0)->y(), t->getVertex(0)->z(),
31 t->getVertex(1)->x(), t->getVertex(1)->y(), t->getVertex(1)->z(),
32 t->getVertex(2)->x(), t->getVertex(2)->y(), t->getVertex(2)->z(),
33 sizeField[t->getVertex(0)], sizeField[t->getVertex(1)],
34 sizeField[t->getVertex(2)]);
43 #if defined(HAVE_QUADMESHINGTOOLS)
45 std::vector<MTriangle *> triangles;
48 if((*itf)->tag() < 100000)
49 triangles.insert(triangles.end(), (*itf)->triangles.begin(),
50 (*itf)->triangles.end());
53 std::unordered_map<MVertex *, std::vector<MVertex *> > v2v;
54 buildVertexToVertexMap(triangles, v2v);
56 std::unordered_map<MVertex *, double> sizeField;
60 double size = 1.e22, U, V;
76 int sows = sizeMapOneWaySmoothing(triangles, sizeField, 1.2);