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

HACK: force non-hermitian eigen solver in conformal-spectral reparam at the moment; it seems to

fix the "bad IP norm" slepc message we get for some test cases
parent 03c7ae88
No related branches found
No related tags found
No related merge requests found
...@@ -33,7 +33,6 @@ GEdgeCompound::GEdgeCompound(GModel *m, int tag, std::vector<GEdge*> &compound, ...@@ -33,7 +33,6 @@ GEdgeCompound::GEdgeCompound(GModel *m, int tag, std::vector<GEdge*> &compound,
} }
parametrize(); parametrize();
} }
GEdgeCompound::GEdgeCompound(GModel *m, int tag, std::vector<GEdge*> &compound) GEdgeCompound::GEdgeCompound(GModel *m, int tag, std::vector<GEdge*> &compound)
......
...@@ -50,12 +50,10 @@ static void fixEdgeToValue(GEdge *ed, double value, dofManager<double> &myAssemb ...@@ -50,12 +50,10 @@ static void fixEdgeToValue(GEdge *ed, double value, dofManager<double> &myAssemb
} }
} }
//--------------------------------------------------------------
static int intersection_segments (SPoint3 &p1, SPoint3 &p2, static int intersection_segments (SPoint3 &p1, SPoint3 &p2,
SPoint3 &q1, SPoint3 &q2, SPoint3 &q1, SPoint3 &q2,
double x[2]){ double x[2])
{
double xp_max = std::max(p1.x(),p2.x()); double xp_max = std::max(p1.x(),p2.x());
double yp_max = std::max(p1.y(),p2.y()); double yp_max = std::max(p1.y(),p2.y());
double xq_max = std::max(q1.x(),q2.x()); double xq_max = std::max(q1.x(),q2.x());
...@@ -81,10 +79,8 @@ static int intersection_segments (SPoint3 &p1, SPoint3 &p2, ...@@ -81,10 +79,8 @@ static int intersection_segments (SPoint3 &p1, SPoint3 &p2,
return (x[0] >= 0.0 && x[0] <= 1. && return (x[0] >= 0.0 && x[0] <= 1. &&
x[1] >= 0.0 && x[1] <= 1.); x[1] >= 0.0 && x[1] <= 1.);
} }
} }
//--------------------------------------------------------------
static bool orderVertices(const std::list<GEdge*> &e, std::vector<MVertex*> &l, static bool orderVertices(const std::list<GEdge*> &e, std::vector<MVertex*> &l,
std::vector<double> &coord) std::vector<double> &coord)
{ {
...@@ -147,7 +143,6 @@ static bool orderVertices(const std::list<GEdge*> &e, std::vector<MVertex*> &l, ...@@ -147,7 +143,6 @@ static bool orderVertices(const std::list<GEdge*> &e, std::vector<MVertex*> &l,
return true; return true;
} }
//--------------------------------------------------------------
static void computeCGKernelPolygon(std::map<MVertex*,SPoint3> &coordinates, static void computeCGKernelPolygon(std::map<MVertex*,SPoint3> &coordinates,
std::vector<MVertex*> &cavV, double &ucg, double &vcg) std::vector<MVertex*> &cavV, double &ucg, double &vcg)
{ {
...@@ -229,7 +224,7 @@ static void computeCGKernelPolygon(std::map<MVertex*,SPoint3> &coordinates, ...@@ -229,7 +224,7 @@ static void computeCGKernelPolygon(std::map<MVertex*,SPoint3> &coordinates,
vcg/=nbFinal; vcg/=nbFinal;
} }
else{ else{
Msg::Debug("----> No Kernel for polygon: place point at CG polygon."); Msg::Debug("----> No Kernel for polygon: place point at CG polygon");
//place at CG polygon //place at CG polygon
for(std::vector<MVertex*>::iterator it = cavV.begin() ; it != cavV.end() ; ++it){ for(std::vector<MVertex*>::iterator it = cavV.begin() ; it != cavV.end() ; ++it){
SPoint3 vsp = coordinates[*it]; SPoint3 vsp = coordinates[*it];
...@@ -290,10 +285,10 @@ static void myPolygon(std::vector<MElement*> &vTri, std::vector<MVertex*> &vPoly ...@@ -290,10 +285,10 @@ static void myPolygon(std::vector<MElement*> &vTri, std::vector<MVertex*> &vPoly
// for(std::vector<MVertex*>::iterator itv = vPoly.begin(); itv != vPoly.end(); itv++){ // for(std::vector<MVertex*>::iterator itv = vPoly.begin(); itv != vPoly.end(); itv++){
// printf("VV=%d \n", (*itv)->getNum()); // printf("VV=%d \n", (*itv)->getNum());
// } // }
} }
bool checkCavity(std::vector<MElement*> &vTri, std::map<MVertex*, SPoint2> &vCoord) {
bool checkCavity(std::vector<MElement*> &vTri, std::map<MVertex*, SPoint2> &vCoord)
{
bool badCavity = false; bool badCavity = false;
unsigned int nbV = vTri.size(); unsigned int nbV = vTri.size();
...@@ -315,7 +310,8 @@ bool checkCavity(std::vector<MElement*> &vTri, std::map<MVertex*, SPoint2> &vCoo ...@@ -315,7 +310,8 @@ bool checkCavity(std::vector<MElement*> &vTri, std::map<MVertex*, SPoint2> &vCoo
return badCavity; return badCavity;
} }
static bool closedCavity(MVertex *v, std::vector<MElement*> &vTri){ static bool closedCavity(MVertex *v, std::vector<MElement*> &vTri)
{
std::set<MVertex *> vs; std::set<MVertex *> vs;
for (unsigned int i = 0; i < vTri.size(); i++){ for (unsigned int i = 0; i < vTri.size(); i++){
MElement *t = vTri[i]; MElement *t = vTri[i];
...@@ -330,10 +326,8 @@ static bool closedCavity(MVertex *v, std::vector<MElement*> &vTri){ ...@@ -330,10 +326,8 @@ static bool closedCavity(MVertex *v, std::vector<MElement*> &vTri){
return vs.empty(); return vs.empty();
} }
void GFaceCompound::fillNeumannBCS() const void GFaceCompound::fillNeumannBCS() const
{ {
fillTris.clear(); fillTris.clear();
fillNodes.clear(); fillNodes.clear();
...@@ -464,11 +458,8 @@ void GFaceCompound::fillNeumannBCS() const ...@@ -464,11 +458,8 @@ void GFaceCompound::fillNeumannBCS() const
fclose(ftri); fclose(ftri);
} }
} }
} }
bool GFaceCompound::trivial() const bool GFaceCompound::trivial() const
{ {
if(_compound.size() == 1 && if(_compound.size() == 1 &&
...@@ -481,12 +472,10 @@ bool GFaceCompound::trivial() const ...@@ -481,12 +472,10 @@ bool GFaceCompound::trivial() const
return false; return false;
} }
// For the conformal map the linear system cannot guarantee there is
//For the conformal map the linear system cannot guarantee there is no overlapping // no overlapping of triangles
//of triangles
bool GFaceCompound::checkOverlap() const bool GFaceCompound::checkOverlap() const
{ {
bool has_no_overlap = true; bool has_no_overlap = true;
for(std::list<std::list<GEdge*> >::const_iterator iloop = _interior_loops.begin(); for(std::list<std::list<GEdge*> >::const_iterator iloop = _interior_loops.begin();
...@@ -526,12 +515,10 @@ bool GFaceCompound::checkOverlap() const ...@@ -526,12 +515,10 @@ bool GFaceCompound::checkOverlap() const
} }
//check if the discrete harmonic map is correct // check if the discrete harmonic map is correct by checking that all
//by checking that all the mapped triangles have // the mapped triangles have the same normal orientation
//the same normal orientation
bool GFaceCompound::checkOrientation(int iter) const bool GFaceCompound::checkOrientation(int iter) const
{ {
//Only check orientation for stl files (1 patch) //Only check orientation for stl files (1 patch)
//if(_compound.size() > 1.0) return true; //if(_compound.size() > 1.0) return true;
...@@ -577,7 +564,6 @@ bool GFaceCompound::checkOrientation(int iter) const ...@@ -577,7 +564,6 @@ bool GFaceCompound::checkOrientation(int iter) const
} }
return oriented; return oriented;
} }
void GFaceCompound::one2OneMap() const void GFaceCompound::one2OneMap() const
...@@ -641,7 +627,6 @@ bool GFaceCompound::parametrize() const ...@@ -641,7 +627,6 @@ bool GFaceCompound::parametrize() const
if(!success) Msg::Error("Could not order vertices on boundary"); if(!success) Msg::Error("Could not order vertices on boundary");
// Laplace parametrization // Laplace parametrization
//-----------------
if (_mapping == HARMONIC){ if (_mapping == HARMONIC){
Msg::Debug("Parametrizing surface %d with 'harmonic map'", tag()); Msg::Debug("Parametrizing surface %d with 'harmonic map'", tag());
fillNeumannBCS(); fillNeumannBCS();
...@@ -649,7 +634,6 @@ bool GFaceCompound::parametrize() const ...@@ -649,7 +634,6 @@ bool GFaceCompound::parametrize() const
parametrize(ITERV,HARMONIC); parametrize(ITERV,HARMONIC);
} }
// Multiscale Laplace parametrization // Multiscale Laplace parametrization
//-----------------
else if (_mapping == MULTISCALE){ else if (_mapping == MULTISCALE){
std::vector<MElement*> _elements; std::vector<MElement*> _elements;
for( std::list<GFace*>::const_iterator itt = _compound.begin(); itt != _compound.end(); ++itt) for( std::list<GFace*>::const_iterator itt = _compound.begin(); itt != _compound.end(); ++itt)
...@@ -658,7 +642,6 @@ bool GFaceCompound::parametrize() const ...@@ -658,7 +642,6 @@ bool GFaceCompound::parametrize() const
multiscaleLaplace multiLaplace(_elements, coordinates); multiscaleLaplace multiLaplace(_elements, coordinates);
} }
// Conformal map parametrization // Conformal map parametrization
//-----------------
else if (_mapping == CONFORMAL){ else if (_mapping == CONFORMAL){
Msg::Debug("Parametrizing surface %d with 'conformal map'", tag()); Msg::Debug("Parametrizing surface %d with 'conformal map'", tag());
fillNeumannBCS(); fillNeumannBCS();
...@@ -691,7 +674,6 @@ bool GFaceCompound::parametrize() const ...@@ -691,7 +674,6 @@ bool GFaceCompound::parametrize() const
buildOct(); buildOct();
} }
double AR = checkAspectRatio(); double AR = checkAspectRatio();
if (floor(AR) > AR_MAX){ if (floor(AR) > AR_MAX){
Msg::Warning("Geometrical aspect ratio is high AR=%d ", (int)AR); Msg::Warning("Geometrical aspect ratio is high AR=%d ", (int)AR);
...@@ -699,7 +681,6 @@ bool GFaceCompound::parametrize() const ...@@ -699,7 +681,6 @@ bool GFaceCompound::parametrize() const
} }
return paramOK; return paramOK;
} }
void GFaceCompound::getBoundingEdges() void GFaceCompound::getBoundingEdges()
...@@ -715,7 +696,7 @@ void GFaceCompound::getBoundingEdges() ...@@ -715,7 +696,7 @@ void GFaceCompound::getBoundingEdges()
l_edges.clear(); l_edges.clear();
if(_U0.size()){ if(_U0.size()){
//--- in case the bounding edges are explicitely given // in case the bounding edges are explicitely given
std::list<GEdge*>::const_iterator it = _U0.begin(); std::list<GEdge*>::const_iterator it = _U0.begin();
for( ; it != _U0.end() ; ++it){ for( ; it != _U0.end() ; ++it){
l_edges.push_back(*it); l_edges.push_back(*it);
...@@ -731,7 +712,7 @@ void GFaceCompound::getBoundingEdges() ...@@ -731,7 +712,7 @@ void GFaceCompound::getBoundingEdges()
while(!_unique.empty()) computeALoop(_unique,loop); while(!_unique.empty()) computeALoop(_unique,loop);
} }
else{ else{
//--- in case the bounding edges are NOT explicitely given // in case the bounding edges are NOT explicitely given
std::set<GEdge*>::iterator itf = _unique.begin(); std::set<GEdge*>::iterator itf = _unique.begin();
for( ; itf != _unique.end(); ++itf){ for( ; itf != _unique.end(); ++itf){
l_edges.push_back(*itf); l_edges.push_back(*itf);
...@@ -753,14 +734,10 @@ void GFaceCompound::getBoundingEdges() ...@@ -753,14 +734,10 @@ void GFaceCompound::getBoundingEdges()
} }
} }
return;
} }
double GFaceCompound::getSizeH() const double GFaceCompound::getSizeH() const
{ {
SBoundingBox3d bb; SBoundingBox3d bb;
std::vector<SPoint3> vertices; std::vector<SPoint3> vertices;
for(std::set<MVertex *>::iterator itv = allNodes.begin(); itv !=allNodes.end() ; ++itv){ for(std::set<MVertex *>::iterator itv = allNodes.begin(); itv !=allNodes.end() ; ++itv){
...@@ -774,11 +751,10 @@ double GFaceCompound::getSizeH() const ...@@ -774,11 +751,10 @@ double GFaceCompound::getSizeH() const
//double H = obbox.getMaxSize(); //double H = obbox.getMaxSize();
return H; return H;
} }
double GFaceCompound::getSizeBB(const std::list<GEdge* > &elist) const double GFaceCompound::getSizeBB(const std::list<GEdge* > &elist) const
{ {
//SOrientedBoundingBox obboxD = obb_boundEdges(elist); //SOrientedBoundingBox obboxD = obb_boundEdges(elist);
//double D = obboxD.getMaxSize(); //double D = obboxD.getMaxSize();
...@@ -786,11 +762,10 @@ double GFaceCompound::getSizeBB(const std::list<GEdge* > &elist) const ...@@ -786,11 +762,10 @@ double GFaceCompound::getSizeBB(const std::list<GEdge* > &elist) const
double D = norm(SVector3(bboxD.max(), bboxD.min())); double D = norm(SVector3(bboxD.max(), bboxD.min()));
return D; return D;
} }
SBoundingBox3d GFaceCompound::boundEdges(const std::list<GEdge* > &elist) const SBoundingBox3d GFaceCompound::boundEdges(const std::list<GEdge* > &elist) const
{ {
SBoundingBox3d res; SBoundingBox3d res;
std::list<GEdge*>::const_iterator it = elist.begin(); std::list<GEdge*>::const_iterator it = elist.begin();
for(; it != elist.end(); it++) for(; it != elist.end(); it++)
...@@ -798,9 +773,9 @@ SBoundingBox3d GFaceCompound::boundEdges(const std::list<GEdge* > &elist) const ...@@ -798,9 +773,9 @@ SBoundingBox3d GFaceCompound::boundEdges(const std::list<GEdge* > &elist) const
return res; return res;
} }
SOrientedBoundingBox GFaceCompound::obb_boundEdges(const std::list<GEdge* > &elist) const SOrientedBoundingBox GFaceCompound::obb_boundEdges(const std::list<GEdge* > &elist) const
{ {
SOrientedBoundingBox res; SOrientedBoundingBox res;
std::vector<SPoint3> vertices; std::vector<SPoint3> vertices;
...@@ -865,11 +840,12 @@ void GFaceCompound::getUniqueEdges(std::set<GEdge*> &_unique) ...@@ -865,11 +840,12 @@ void GFaceCompound::getUniqueEdges(std::set<GEdge*> &_unique)
std::list<GEdge*>::iterator ite = ed.begin(); std::list<GEdge*>::iterator ite = ed.begin();
for( ; ite != ed.end() ; ++ite){ for( ; ite != ed.end() ; ++ite){
if(!(*ite)->degenerate(0) && _touched.count(*ite) == 1){ if(!(*ite)->degenerate(0) && _touched.count(*ite) == 1){
_unique.insert(*ite); } _unique.insert(*ite);
}
} }
} }
} }
void GFaceCompound::computeALoop(std::set<GEdge*> &_unique, std::list<GEdge*> &loop) void GFaceCompound::computeALoop(std::set<GEdge*> &_unique, std::list<GEdge*> &loop)
{ {
std::list<GEdge*> _loop; std::list<GEdge*> _loop;
...@@ -929,9 +905,6 @@ void GFaceCompound::computeALoop(std::set<GEdge*> &_unique, std::list<GEdge*> &l ...@@ -929,9 +905,6 @@ void GFaceCompound::computeALoop(std::set<GEdge*> &_unique, std::list<GEdge*> &l
loop = _loop; loop = _loop;
_interior_loops.push_back(loop); _interior_loops.push_back(loop);
return;
} }
GFaceCompound::GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound, GFaceCompound::GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound,
...@@ -942,7 +915,6 @@ GFaceCompound::GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound, ...@@ -942,7 +915,6 @@ GFaceCompound::GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound,
: GFace(m, tag), _compound(compound), _U0(U0), _U1(U1), _V0(V0), _V1(V1), oct(0), : GFace(m, tag), _compound(compound), _U0(U0), _U1(U1), _V0(V0), _V1(V1), oct(0),
_lsys(lsys),_mapping(mpg), _allowPartition(allowPartition) _lsys(lsys),_mapping(mpg), _allowPartition(allowPartition)
{ {
ONE = new simpleFunction<double>(1.0); ONE = new simpleFunction<double>(1.0);
MONE = new simpleFunction<double>(-1.0); MONE = new simpleFunction<double>(-1.0);
...@@ -974,7 +946,6 @@ GFaceCompound::GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound, ...@@ -974,7 +946,6 @@ GFaceCompound::GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound,
nbSplit = 0; nbSplit = 0;
fillTris.clear(); fillTris.clear();
} }
GFaceCompound::~GFaceCompound() GFaceCompound::~GFaceCompound()
...@@ -988,7 +959,6 @@ GFaceCompound::~GFaceCompound() ...@@ -988,7 +959,6 @@ GFaceCompound::~GFaceCompound()
delete MONE; delete MONE;
} }
SPoint2 GFaceCompound::getCoordinates(MVertex *v) const SPoint2 GFaceCompound::getCoordinates(MVertex *v) const
{ {
if(trivial()){ if(trivial()){
...@@ -1197,7 +1167,6 @@ void GFaceCompound::computeThetaDerivatives (MVertex *prev, MVertex *curr, MVert ...@@ -1197,7 +1167,6 @@ void GFaceCompound::computeThetaDerivatives (MVertex *prev, MVertex *curr, MVert
double &dTdu2, double &dTdv2, double &dTdu2, double &dTdv2,
double &dTdu3, double &dTdv3) const double &dTdu3, double &dTdv3) const
{ {
SPoint2 p1 = getCoordinates(prev); SPoint2 p1 = getCoordinates(prev);
SPoint2 p2 = getCoordinates(curr); SPoint2 p2 = getCoordinates(curr);
SPoint2 p3 = getCoordinates(next); SPoint2 p3 = getCoordinates(next);
...@@ -1235,7 +1204,6 @@ void GFaceCompound::computeThetaDerivatives (MVertex *prev, MVertex *curr, MVert ...@@ -1235,7 +1204,6 @@ void GFaceCompound::computeThetaDerivatives (MVertex *prev, MVertex *curr, MVert
bool GFaceCompound::parametrize_conformal_nonLinear() const bool GFaceCompound::parametrize_conformal_nonLinear() const
{ {
bool converged = false; bool converged = false;
//--create dofManager //--create dofManager
...@@ -1416,33 +1384,20 @@ bool GFaceCompound::parametrize_conformal_nonLinear() const ...@@ -1416,33 +1384,20 @@ bool GFaceCompound::parametrize_conformal_nonLinear() const
//exit(1); //exit(1);
return converged; return converged;
} }
bool GFaceCompound::parametrize_conformal_spectral() const bool GFaceCompound::parametrize_conformal_spectral() const
{ {
#if !defined(HAVE_PETSC) && !defined(HAVE_SLEPC) #if !defined(HAVE_PETSC) && !defined(HAVE_SLEPC)
{ Msg::Error("Gmsh should be compiled with petsc and slepc for using the conformal map.");
Msg::Error("Switch to harmonic map or see doc on the wiki for installing petsc and slepc:");
Msg::Error("-----------------------------------------------------------------------------!"); Msg::Error("https://geuz.org/trac/gmsh/wiki/STLRemeshing (username:gmsh,passwd:gmsh)");
Msg::Error("Gmsh should be compiled with petsc and slepc for using the conformal map !");
Msg::Error("Switch to harmonic map or see doc on the wiki for installing petsc and slepc !");
Msg::Error("https://geuz.org/trac/gmsh/wiki/STLRemeshing (username:gmsh,passwd:gmsh) !");
Msg::Error("-----------------------------------------------------------------------------!");
Msg::Exit(1);
return false; return false;
}
#else #else
{
linearSystem <double> *lsysA = new linearSystemPETSc<double>; linearSystem <double> *lsysA = new linearSystemPETSc<double>;
linearSystem <double> *lsysB = new linearSystemPETSc<double>; linearSystem <double> *lsysB = new linearSystemPETSc<double>;
dofManager<double> myAssembler(lsysA, lsysB); dofManager<double> myAssembler(lsysA, lsysB);
//printf("nbNodes = %d in spectral param \n", allNodes.size());
//-------------------------------
myAssembler.setCurrentMatrix("A"); myAssembler.setCurrentMatrix("A");
for(std::set<MVertex *>::iterator itv = allNodes.begin(); itv !=allNodes.end() ; ++itv){ for(std::set<MVertex *>::iterator itv = allNodes.begin(); itv !=allNodes.end() ; ++itv){
MVertex *v = *itv; MVertex *v = *itv;
...@@ -1495,7 +1450,6 @@ bool GFaceCompound::parametrize_conformal_spectral() const ...@@ -1495,7 +1450,6 @@ bool GFaceCompound::parametrize_conformal_spectral() const
} }
} }
//-------------------------------
myAssembler.setCurrentMatrix("B"); myAssembler.setCurrentMatrix("B");
// mettre max NC contraintes par bord // mettre max NC contraintes par bord
...@@ -1503,7 +1457,7 @@ bool GFaceCompound::parametrize_conformal_spectral() const ...@@ -1503,7 +1457,7 @@ bool GFaceCompound::parametrize_conformal_spectral() const
int NC = std::min(70,NB); int NC = std::min(70,NB);
int jump = (int) NB/NC; int jump = (int) NB/NC;
int nbLoop = (int) NB/jump ; int nbLoop = (int) NB/jump ;
//printf("nb bound nodes=%d jump =%d \n", NB, jump);
for (int i = 0; i< nbLoop; i++){ for (int i = 0; i< nbLoop; i++){
MVertex *v1 = _ordered[i*jump]; MVertex *v1 = _ordered[i*jump];
myAssembler.assemble(v1, 0, 1, v1, 0, 1, 1.0); myAssembler.assemble(v1, 0, 1, v1, 0, 1, 1.0);
...@@ -1515,9 +1469,10 @@ bool GFaceCompound::parametrize_conformal_spectral() const ...@@ -1515,9 +1469,10 @@ bool GFaceCompound::parametrize_conformal_spectral() const
} }
} }
//------------------------------- // FIXME: force non-hermitian. For some reason (roundoff errors?)
//printf("Solve eigensystem \n"); // on some machines et for some meshes slepc complains about bad IP
eigenSolver eig(&myAssembler, "B" , "A", true); // norm otherwise
eigenSolver eig(&myAssembler, "B" , "A", false);
bool converged = eig.solve(1, "largest"); bool converged = eig.solve(1, "largest");
if(converged) { if(converged) {
...@@ -1546,13 +1501,11 @@ bool GFaceCompound::parametrize_conformal_spectral() const ...@@ -1546,13 +1501,11 @@ bool GFaceCompound::parametrize_conformal_spectral() const
} }
else return false; else return false;
}
#endif #endif
} }
bool GFaceCompound::parametrize_conformal() const bool GFaceCompound::parametrize_conformal() const
{ {
dofManager<double> myAssembler(_lsys); dofManager<double> myAssembler(_lsys);
MVertex *v1 = _ordered[0]; MVertex *v1 = _ordered[0];
...@@ -1936,7 +1889,6 @@ void GFaceCompound::getTriangle(double u, double v, ...@@ -1936,7 +1889,6 @@ void GFaceCompound::getTriangle(double u, double v,
GFaceCompoundTriangle **lt, GFaceCompoundTriangle **lt,
double &_u, double &_v) const double &_u, double &_v) const
{ {
double uv[3] = {u, v, 0}; double uv[3] = {u, v, 0};
*lt = (GFaceCompoundTriangle*)Octree_Search(uv, oct); *lt = (GFaceCompoundTriangle*)Octree_Search(uv, oct);
// if(!(*lt)) { // if(!(*lt)) {
...@@ -1969,7 +1921,6 @@ void GFaceCompound::getTriangle(double u, double v, ...@@ -1969,7 +1921,6 @@ void GFaceCompound::getTriangle(double u, double v,
void GFaceCompound::buildOct() const void GFaceCompound::buildOct() const
{ {
SBoundingBox3d bb; SBoundingBox3d bb;
int count = 0; int count = 0;
std::list<GFace*>::const_iterator it = _compound.begin(); std::list<GFace*>::const_iterator it = _compound.begin();
...@@ -2035,7 +1986,6 @@ void GFaceCompound::buildOct() const ...@@ -2035,7 +1986,6 @@ void GFaceCompound::buildOct() const
bool GFaceCompound::checkTopology() const bool GFaceCompound::checkTopology() const
{ {
// FIXME!!! I think those things are wrong with cross-patch reparametrization // FIXME!!! I think those things are wrong with cross-patch reparametrization
//if ((*(_compound.begin()))->geomType() != GEntity::DiscreteSurface)return true; //if ((*(_compound.begin()))->geomType() != GEntity::DiscreteSurface)return true;
...@@ -2097,7 +2047,6 @@ bool GFaceCompound::checkTopology() const ...@@ -2097,7 +2047,6 @@ bool GFaceCompound::checkTopology() const
double GFaceCompound::checkAspectRatio() const double GFaceCompound::checkAspectRatio() const
{ {
//if ((*(_compound.begin()))->geomType() != GEntity::DiscreteSurface) //if ((*(_compound.begin()))->geomType() != GEntity::DiscreteSurface)
// return true; // return true;
...@@ -2159,7 +2108,6 @@ double GFaceCompound::checkAspectRatio() const ...@@ -2159,7 +2108,6 @@ double GFaceCompound::checkAspectRatio() const
void GFaceCompound::coherencePatches() const void GFaceCompound::coherencePatches() const
{ {
Msg::Info("Re-orient all %d compound patches normals coherently", _compound.size()); Msg::Info("Re-orient all %d compound patches normals coherently", _compound.size());
std::map<MEdge, std::set<MElement*>, Less_Edge > edge2elems; std::map<MEdge, std::set<MElement*>, Less_Edge > edge2elems;
...@@ -2210,14 +2158,10 @@ void GFaceCompound::coherencePatches() const ...@@ -2210,14 +2158,10 @@ void GFaceCompound::coherencePatches() const
} }
} }
} }
return;
} }
void GFaceCompound::coherenceNormals() void GFaceCompound::coherenceNormals()
{ {
Msg::Info("Re-orient all %d face normals coherently", getNumMeshElements()); Msg::Info("Re-orient all %d face normals coherently", getNumMeshElements());
std::map<MEdge, std::set<MElement*>, Less_Edge > edge2elems; std::map<MEdge, std::set<MElement*>, Less_Edge > edge2elems;
...@@ -2263,14 +2207,10 @@ void GFaceCompound::coherenceNormals() ...@@ -2263,14 +2207,10 @@ void GFaceCompound::coherenceNormals()
} }
} }
} }
return;
} }
void GFaceCompound::buildAllNodes() const void GFaceCompound::buildAllNodes() const
{ {
std::list<GFace*>::const_iterator it = _compound.begin(); std::list<GFace*>::const_iterator it = _compound.begin();
for( ; it != _compound.end() ; ++it){ for( ; it != _compound.end() ; ++it){
for(unsigned int i = 0; i < (*it)->triangles.size(); ++i){ for(unsigned int i = 0; i < (*it)->triangles.size(); ++i){
...@@ -2304,12 +2244,10 @@ int GFaceCompound::genusGeom() const ...@@ -2304,12 +2244,10 @@ int GFaceCompound::genusGeom() const
int poincare = vs.size() - es.size() + N; int poincare = vs.size() - es.size() + N;
return (int)(-poincare + 2 - _interior_loops.size())/2; return (int)(-poincare + 2 - _interior_loops.size())/2;
} }
void GFaceCompound::printStuff(int iNewton) const void GFaceCompound::printStuff(int iNewton) const
{ {
if( !CTX::instance()->mesh.saveAll) return; if( !CTX::instance()->mesh.saveAll) return;
std::list<GFace*>::const_iterator it = _compound.begin(); std::list<GFace*>::const_iterator it = _compound.begin();
...@@ -2459,7 +2397,6 @@ void GFaceCompound::printStuff(int iNewton) const ...@@ -2459,7 +2397,6 @@ void GFaceCompound::printStuff(int iNewton) const
// fclose(xyzc); // fclose(xyzc);
// fprintf(uvm,"};\n"); // fprintf(uvm,"};\n");
// fclose(uvm); // fclose(uvm);
} }
#endif #endif
2.5.0 (?): new client/server visualization mode; new compound 2.5.0 (?): new compound geometrical entities (for remeshing and/or
geometrical entities (useful for remeshing); improved mesh trans-patch meshing); improved mesh reclassification tool; new
reclassification tool; new ability to watch a pattern of files to client/server visualization mode; new ability to watch a pattern of
merge; new integrated MPEG export; new option to force the type of files to merge; new integrated MPEG export; new option to force the
views dynamically; bumped mesh version format to 2.2 (change in the type of views dynamically; bumped mesh version format to 2.2 (small
meaning of the partition tags; this only affects partitioned change in the meaning of the partition tags; this only affects
(parallel) meshes); renamed several post-processing plugins (as well partitioned (i.e. parallel) meshes); renamed several post-processing
as plugin options) to make them easier to understand; many bug fixes plugins (as well as plugin options) to make them easier to understand;
and usability improvements all over the place. many bug fixes and usability improvements all over the place.
2.4.2 (Sep 21, 2009): solver code refactoring + better IDE 2.4.2 (Sep 21, 2009): solver code refactoring + better IDE
integration. integration.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment