diff --git a/Fltk/highOrderToolsWindow.cpp b/Fltk/highOrderToolsWindow.cpp index 64dde818f79e020b6848c2c227b8ad55f2c71f32..fed9cb6e865e9c96e57692ef03c37a12a3cca255 100644 --- a/Fltk/highOrderToolsWindow.cpp +++ b/Fltk/highOrderToolsWindow.cpp @@ -148,7 +148,6 @@ static void highordertools_runopti_cb(Fl_Widget *w, void *data) p.onlyVisible = onlyVisible; // change dim if no 3D elements are there p.dim = GModel::current()->getDim() == 3 ? ( NE ? 3 : 2 ) : GModel::current()->getDim(); - printf("%d %d\n",NE,p.dim); p.itMax = (int) o->value[3]->value(); p.optPassMax = (int) o->value[4]->value(); p.weightFixed = o->value[5]->value(); diff --git a/contrib/HighOrderMeshOptimizer/OptHomRun.cpp b/contrib/HighOrderMeshOptimizer/OptHomRun.cpp index b5f5d615eccf9497310ee21b90d5cc506f7b9d6c..2e0df6963df6a879994486dd17c9e44a10d42d84 100644 --- a/contrib/HighOrderMeshOptimizer/OptHomRun.cpp +++ b/contrib/HighOrderMeshOptimizer/OptHomRun.cpp @@ -154,8 +154,8 @@ static std::set<MElement*> getSurroundingBlob ((*it)->getVertex(i))->second; for (std::vector<MElement*>::const_iterator itN = neighbours.begin(); itN != neighbours.end(); ++itN){ - if ((d < forceDepth) || (p.distance((*itN)->barycenter_infty()) < limDist)){ - // Assume that if an el is too far, its neighbours are too far as wella + if ((d < forceDepth) || (p.distance((*itN)->barycenter()) < limDist)){ + // Assume that if an el is too far, its neighbours are too far as well if (blob.insert(*itN).second) currentLayer.push_back(*itN); } } @@ -383,7 +383,7 @@ static std::set<MElement*> getSurroundingBlob3D for (std::vector<MElement*>::const_iterator itN = neighbours.begin(); itN != neighbours.end(); ++itN) { // Check distance from all seed points - SPoint3 pt = (*itN)->barycenter_infty(); + SPoint3 pt = (*itN)->barycenter(); bool nearSeed = false; for (std::list<SPoint3>::const_iterator itS = seedPts.begin(); itS != seedPts.end(); ++itS) diff --git a/contrib/HighOrderMeshOptimizer/SuperEl.cpp b/contrib/HighOrderMeshOptimizer/SuperEl.cpp index d564553c8d3af23efb1939d8303c74936ade0ac4..295968872cea5eb3aa84b11f900a734b172629f5 100644 --- a/contrib/HighOrderMeshOptimizer/SuperEl.cpp +++ b/contrib/HighOrderMeshOptimizer/SuperEl.cpp @@ -90,12 +90,12 @@ void SuperEl::createSuperElQuad(int order, double dist, const std::vector<MVerte // Get basis functions MQuadrangle quad1(v0,v1,v2,v3); - const nodalBasis *quadBasis = quad1.getFunctionSpace(order); + const nodalBasis *quadBasis = quad1.getFunctionSpace(order,true); // Get HO serendip nodal basis const int Nv = quadBasis->getNumShapeFunctions(); // Store/create all vertices for super-element _superVert.resize(Nv); - _superVert[0] = v0; // First-order vertices + _superVert[0] = v0; // First-order vertices _superVert[1] = v1; _superVert[2] = v2; _superVert[3] = v3; @@ -139,7 +139,7 @@ void SuperEl::createSuperElPrism(int order, double dist, const std::vector<MVert // Get basis functions MPrism prism1(v0,v1,v2,v3,v4,v5); - const nodalBasis *prismBasis = prism1.getFunctionSpace(order); + const nodalBasis *prismBasis = prism1.getFunctionSpace(order,true); // Get HO serendip nodal basis const int Nv = prismBasis->getNumShapeFunctions(); // Number of vertices in HO prism // Store/create all vertices for super-element @@ -154,14 +154,14 @@ void SuperEl::createSuperElPrism(int order, double dist, const std::vector<MVert _superVert[6] = new MVertex(*baseVert[3]); // HO vertices on base face _superVert[9] = new MVertex(*baseVert[4]); _superVert[7] = new MVertex(*baseVert[5]); - const int indAddVerts[9] = {8,10,11,12,13,14,15,16,17}; // Additional HO vertices + const int indAddVerts[6] = {8,10,11,12,13,14}; // Additional HO vertices SPoint3 p; - for (int i=0; i<9; ++i) { + for (int i=0; i<6; ++i) { const int &ind = indAddVerts[i]; prism1.pnt(prismBasis->points(ind,0),prismBasis->points(ind,1),prismBasis->points(ind,2),p); _superVert[ind] = new MVertex(p.x(),p.y(),p.z()); } - _superEl = new MPrism18(_superVert); + _superEl = new MPrism15(_superVert); } else { std::cout << "ERROR: Prismatic superEl. of order " << order << " not supported\n"; @@ -203,7 +203,7 @@ void SuperEl::createSuperElHex(int order, double dist, const std::vector<MVertex // Get basis functions MHexahedron *hex1 = new MHexahedron(v0,v1,v2,v3,v4,v5,v6,v7); - const nodalBasis *prismBasis = hex1->getFunctionSpace(order); + const nodalBasis *prismBasis = hex1->getFunctionSpace(order,true); // Get HO serendip nodal basis const int Nv = prismBasis->getNumShapeFunctions(); // Number of vertices in HO hex // Store/create all vertices for super-element @@ -222,14 +222,14 @@ void SuperEl::createSuperElHex(int order, double dist, const std::vector<MVertex _superVert[13] = new MVertex(*baseVert[6]); // HO vertices on base face _superVert[9] = new MVertex(*baseVert[7]); _superVert[20] = new MVertex(*baseVert[8]); - const int indAddVerts[14] = {10,12,14,15,16,17,18,19,21,22,23,24,25,26}; // Additional HO vertices + const int indAddVerts[8] = {10,12,14,15,16,17,18,19}; // Additional HO vertices SPoint3 p; - for (int i=0; i<14; ++i) { + for (int i=0; i<8; ++i) { const int &ind = indAddVerts[i]; hex1->pnt(prismBasis->points(ind,0),prismBasis->points(ind,1),prismBasis->points(ind,2),p); _superVert[ind] = new MVertex(p.x(),p.y(),p.z()); } - _superEl = new MHexahedron27(_superVert); + _superEl = new MHexahedron20(_superVert); } else { std::cout << "ERROR: Hex. superEl. of order " << order << " not supported\n";