Skip to content
Snippets Groups Projects
Commit a23f2fa6 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

cleanup

parent 2df68b74
Branches
Tags
No related merge requests found
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#include "fullMatrix.h" #include "fullMatrix.h"
#include "BasisFactory.h" #include "BasisFactory.h"
#define SQU(a) ((a)*(a))
// The aim here is to build a polynomial representation that consist // The aim here is to build a polynomial representation that consist
// in polynomial segments of equal length // in polynomial segments of equal length
......
...@@ -4,13 +4,12 @@ ...@@ -4,13 +4,12 @@
#include <string> #include <string>
#include <math.h> #include <math.h>
#include "GmshConfig.h" #include "GmshConfig.h"
#include "OptHomMesh.h"
#if defined(HAVE_BFGS) #if defined(HAVE_BFGS)
#include "ap.h" #include "ap.h"
class Mesh;
class OptHOM class OptHOM
{ {
public: public:
......
...@@ -253,14 +253,6 @@ void highOrderTools::computeMetricInfo(GFace *gf, ...@@ -253,14 +253,6 @@ void highOrderTools::computeMetricInfo(GFace *gf,
D(XJ) = (gp.x() - ss.x()); D(XJ) = (gp.x() - ss.x());
D(YJ) = (gp.y() - ss.y()); D(YJ) = (gp.y() - ss.y());
D(ZJ) = (gp.z() - ss.z()); D(ZJ) = (gp.z() - ss.z());
/*
printf("point %d on %d %d dx = %g %g %g --> %g %g %g --> %g %g %g \n",e->getVertex(j)->getIndex(),
e->getVertex(j)->onWhat()->dim(),e->getVertex(j)->onWhat()->tag(),
D(XJ),D(YJ),D(ZJ),
ss.x(),ss.y(),ss.z(),
e->getVertex(j)->x(),e->getVertex(j)->y(),e->getVertex(j)->z());
*/
} }
} }
...@@ -367,11 +359,9 @@ double highOrderTools::smooth_metric_(std::vector<MElement*> & v, ...@@ -367,11 +359,9 @@ double highOrderTools::smooth_metric_(std::vector<MElement*> & v,
std::set<MVertex*>::iterator it; std::set<MVertex*>::iterator it;
double dx = 0.0; double dx = 0.0;
// printf("size %d\n",myAssembler.sizeOfR());
if (myAssembler.sizeOfR()){ if (myAssembler.sizeOfR()){
// while convergence ------------------------------------------------------- // while convergence
for (unsigned int i = 0; i < v.size(); i++){ for (unsigned int i = 0; i < v.size(); i++){
MElement *e = v[i]; MElement *e = v[i];
int nbNodes = e->getNumVertices(); int nbNodes = e->getNumVertices();
...@@ -391,10 +381,7 @@ double highOrderTools::smooth_metric_(std::vector<MElement*> & v, ...@@ -391,10 +381,7 @@ double highOrderTools::smooth_metric_(std::vector<MElement*> & v,
computeMetricInfo(gf, e, J32, J23, D3); computeMetricInfo(gf, e, J32, J23, D3);
J23K33.gemm(J23, K33, 1, 0); J23K33.gemm(J23, K33, 1, 0);
K22.gemm(J23K33, J32, 1, 0); K22.gemm(J23K33, J32, 1, 0);
// K33.print("K33");
// K22.print("K22");
J23K33.mult(D3, R2); J23K33.mult(D3, R2);
// R2.print("hopla");
for (int j = 0; j < n2; j++){ for (int j = 0; j < n2; j++){
Dof RDOF = El.getLocalDofR(&se, j); Dof RDOF = El.getLocalDofR(&se, j);
myAssembler.assemble(RDOF, -R2(j)); myAssembler.assemble(RDOF, -R2(j));
...@@ -405,8 +392,8 @@ double highOrderTools::smooth_metric_(std::vector<MElement*> & v, ...@@ -405,8 +392,8 @@ double highOrderTools::smooth_metric_(std::vector<MElement*> & v,
} }
} }
myAssembler.systemSolve(); myAssembler.systemSolve();
// for all element, compute detJ at integration points --> material law // for all element, compute detJ at integration points --> material law end
// end while convergence ------------------------------------------------------- // while convergence
for (it = verticesToMove.begin(); it != verticesToMove.end(); ++it){ for (it = verticesToMove.begin(); it != verticesToMove.end(); ++it){
if ((*it)->onWhat()->dim() == 2){ if ((*it)->onWhat()->dim() == 2){
...@@ -415,7 +402,6 @@ double highOrderTools::smooth_metric_(std::vector<MElement*> & v, ...@@ -415,7 +402,6 @@ double highOrderTools::smooth_metric_(std::vector<MElement*> & v,
SPoint2 dparam; SPoint2 dparam;
myAssembler.getDofValue((*it), 0, _tag, dparam[0]); myAssembler.getDofValue((*it), 0, _tag, dparam[0]);
myAssembler.getDofValue((*it), 1, _tag, dparam[1]); myAssembler.getDofValue((*it), 1, _tag, dparam[1]);
// printf("%g %g -- %g %g\n",dparam[0],dparam[1],param[0],param[1]);
SPoint2 newp = param+dparam; SPoint2 newp = param+dparam;
dx += newp.x() * newp.x() + newp.y() * newp.y(); dx += newp.x() * newp.x() + newp.y() * newp.y();
(*it)->setParameter(0, newp.x()); (*it)->setParameter(0, newp.x());
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#include <sstream> #include <sstream>
#include <iterator> #include <iterator>
#include <string.h> #include <string.h>
#include "OptHOM.h"
#include "OptHomRun.h" #include "OptHomRun.h"
#include "GModel.h" #include "GModel.h"
#include "Gmsh.h" #include "Gmsh.h"
...@@ -11,8 +12,6 @@ ...@@ -11,8 +12,6 @@
#include "MHexahedron.h" #include "MHexahedron.h"
#include "MPrism.h" #include "MPrism.h"
#include "MLine.h" #include "MLine.h"
#include "OptHomMesh.h"
#include "OptHOM.h"
#include "OS.h" #include "OS.h"
#include <stack> #include <stack>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment