diff --git a/Mesh/BGMBase.cpp b/Mesh/BGMBase.cpp index 6f64e2d88b481ccf33b9aa5c335a632e4a03b4b1..436c47430c4f3fb6e12f4714aa20d81c3b276e0f 100644 --- a/Mesh/BGMBase.cpp +++ b/Mesh/BGMBase.cpp @@ -57,7 +57,6 @@ void BGMBase::export_scalar(const string &filename, const DoubleStorageType &_wh // cout << "export_scalar DONE " << endl; } -//------------------------------------------------------------------------ void BGMBase::export_vector(const string &filename, const VectorStorageType &_whatToPrint)const{ FILE *f = Fopen (filename.c_str(),"w"); @@ -109,7 +108,6 @@ void BGMBase::export_vector(const string &filename, const VectorStorageType &_wh fclose(f); } -//------------------------------------------------------------------------ void BGMBase::export_tensor_as_vectors(const string &filename, const TensorStorageType &_whatToPrint)const{ FILE *f = Fopen (filename.c_str(),"w"); @@ -130,30 +128,25 @@ void BGMBase::export_tensor_as_vectors(const string &filename, const TensorStora fclose(f); } -//------------------------------------------------------------------------ BGMBase::BGMBase(int dim,GEntity *_gf):octree(NULL),gf(_gf), DIM(dim), order(1),debug(false){ if(debug) cout << "BGMBase::constructor " << endl; } -//------------------------------------------------------------------------ BGMBase::~BGMBase(){ } -//------------------------------------------------------------------------ bool BGMBase::inDomain (double u, double v, double w){ return (findElement(u, v, w) != NULL); } -//------------------------------------------------------------------------ const MElement* BGMBase::findElement(double u, double v, double w, bool strict){ return (getOctree()->find(u, v, w, DIM, strict)); } -//------------------------------------------------------------------------ vector<double> BGMBase::get_field_value(double u, double v, double w, const VectorStorageType &data){ MElement *e = const_cast<MElement*>(findElement(u, v, w )); @@ -170,7 +163,6 @@ vector<double> BGMBase::get_field_value(double u, double v, double w, const Vect return res; } -//------------------------------------------------------------------------ double BGMBase::get_field_value(double u, double v, double w, const DoubleStorageType &data){ MElement *e = const_cast<MElement*>(findElement(u, v, w)); @@ -184,19 +176,16 @@ double BGMBase::get_field_value(double u, double v, double w, const DoubleStorag return e->interpolate(values, element_uvw[0], element_uvw[1], element_uvw[2], 1, order); } -//------------------------------------------------------------------------ double BGMBase::size(double u, double v, double w){ return get_field_value(u,v,w,sizeField); } -//------------------------------------------------------------------------ double BGMBase::size(const MVertex *v){ return get_nodal_value(v,sizeField); } -//------------------------------------------------------------------------ vector<double> BGMBase::get_nodal_value(const MVertex *v,const VectorStorageType &data)const{ if(debug) cout << "BGMBase::get_nodal_value(const MVertex *v,const map<MVertex*,vector<double> > &data)" << endl; @@ -209,7 +198,6 @@ vector<double> BGMBase::get_nodal_value(const MVertex *v,const VectorStorageType return itfind->second; } -//------------------------------------------------------------------------ double BGMBase::get_nodal_value(const MVertex *v,const DoubleStorageType &data)const{ if(debug) cout << "BGMBase::get_nodal_value(const MVertex *v,const map<MVertex*,double> &data)" << endl; @@ -222,7 +210,6 @@ double BGMBase::get_nodal_value(const MVertex *v,const DoubleStorageType &data)c return itfind->second; } -//------------------------------------------------------------------------ vector<vector<double> > BGMBase::get_nodal_values(const MElement *e,const VectorStorageType &data)const{ if(debug) cout << "BGMBase::get_nodal_values(const MElement *e,const map<MVertex*,vector<double> > &data)" << endl; @@ -236,7 +223,6 @@ vector<vector<double> > BGMBase::get_nodal_values(const MElement *e,const Vector return res; } -//------------------------------------------------------------------------ vector<double> BGMBase::get_nodal_values(const MElement *e,const DoubleStorageType &data)const{ if(debug) cout << "BGMBase::get_nodal_values(const MElement *e,const map<MVertex*,double> &data)" << endl; @@ -247,7 +233,6 @@ vector<double> BGMBase::get_nodal_values(const MElement *e,const DoubleStorageTy return res; } -//------------------------------------------------------------------------ vector<double> BGMBase::get_element_uvw_from_xyz (const MElement *e, double x, double y,double z) const{ double element_uvw[3]; @@ -260,7 +245,6 @@ vector<double> BGMBase::get_element_uvw_from_xyz (const MElement *e, double x, d return res; } -//------------------------------------------------------------------------ set<MVertex*> BGMBase::get_vertices_of_maximum_dim(int dim){ set<MVertex*> bnd_vertices; @@ -274,13 +258,11 @@ set<MVertex*> BGMBase::get_vertices_of_maximum_dim(int dim){ return bnd_vertices; } -//------------------------------------------------------------------------ GEntity* BGMBase::getBackgroundGEntity(){ return gf; } -//------------------------------------------------------------------------ diff --git a/Mesh/BGMBase.h b/Mesh/BGMBase.h index e44a31d77b67b1440583ad4119dfe36f2b725e3a..1ba8e99125b884e87ef584051d6274c073ac4fe7 100644 --- a/Mesh/BGMBase.h +++ b/Mesh/BGMBase.h @@ -97,6 +97,5 @@ class BGMBase{ }; -//------------------------------------------------------------------------ #endif diff --git a/Mesh/BackgroundMesh2D.cpp b/Mesh/BackgroundMesh2D.cpp index 8f49d36279b52ec4de2d385b84d063f7633d680f..3170f888419e58ec10c94ad8b4259fc44c8d40fd 100644 --- a/Mesh/BackgroundMesh2D.cpp +++ b/Mesh/BackgroundMesh2D.cpp @@ -34,7 +34,6 @@ using namespace std; -//------------------------------------------------------------------------ class evalDiffusivityFunction : public simpleFunction<double>{ public: @@ -47,7 +46,6 @@ class evalDiffusivityFunction : public simpleFunction<double>{ const double threshold; }; -//------------------------------------------------------------------------ //TODO: move this fct ??? /* applies rotations of amplitude pi to set the @@ -59,7 +57,6 @@ void normalizeAngle(double &angle) { while ( angle >= M_PI * .5 ) angle -= (M_PI * .5); } -//------------------------------------------------------------------------ void backgroundMesh2D::create_face_mesh(){ @@ -85,7 +82,6 @@ void backgroundMesh2D::create_face_mesh(){ create_mesh_copy(); } -//------------------------------------------------------------------------ MElementOctree* backgroundMesh2D::getOctree(){ if(!octree){ @@ -95,13 +91,11 @@ MElementOctree* backgroundMesh2D::getOctree(){ return octree; } -//------------------------------------------------------------------------ const MElement* backgroundMesh2D::getElement(unsigned int i)const{ return elements[i]; } -//------------------------------------------------------------------------ void backgroundMesh2D::reset(bool erase_2D3D){ unset(); @@ -126,7 +120,6 @@ void backgroundMesh2D::reset(bool erase_2D3D){ } } -//------------------------------------------------------------------------ void backgroundMesh2D::unset(){ for (unsigned int i = 0; i < vertices.size(); i++) delete vertices[i]; @@ -135,7 +128,6 @@ void backgroundMesh2D::unset(){ octree=NULL; } -//------------------------------------------------------------------------ void backgroundMesh2D::create_mesh_copy(){ // TODO: useful to extend it to other elements ??? @@ -164,13 +156,11 @@ void backgroundMesh2D::create_mesh_copy(){ } } -//------------------------------------------------------------------------------------------ GPoint backgroundMesh2D::get_GPoint_from_MVertex(const MVertex *v)const{ return dynamic_cast<GFace*>(gf)->point(SPoint2(v->x(),v->y())); } -//------------------------------------------------------------------------ backgroundMesh2D::backgroundMesh2D(GFace *_gf, bool erase_2D3D):BGMBase(2,_gf),sizeFactor(1.){ if(debug) cout << "backgroundMesh2D::constructor " << endl; @@ -184,13 +174,11 @@ backgroundMesh2D::backgroundMesh2D(GFace *_gf, bool erase_2D3D):BGMBase(2,_gf),s } -//------------------------------------------------------------------------ backgroundMesh2D::~backgroundMesh2D(){ unset(); } -//------------------------------------------------------------------------ void backgroundMesh2D::propagateValues(DoubleStorageType &dirichlet, simpleFunction<double> &eval_diffusivity, bool in_parametric_plane){ #if defined(HAVE_SOLVER) @@ -266,7 +254,6 @@ void backgroundMesh2D::propagateValues(DoubleStorageType &dirichlet, simpleFunct #endif } -//------------------------------------------------------------------------ void backgroundMesh2D::computeSizeField(){ GFace *face = dynamic_cast<GFace*>(gf); @@ -308,7 +295,6 @@ void backgroundMesh2D::computeSizeField(){ } } -//------------------------------------------------------------------------ inline double myAngle (const SVector3 &a, const SVector3 &b, const SVector3 &d){ double cosTheta = dot(a,b); @@ -316,7 +302,6 @@ inline double myAngle (const SVector3 &a, const SVector3 &b, const SVector3 &d){ return atan2 (sinTheta,cosTheta); } -//------------------------------------------------------------------------ void backgroundMesh2D::updateSizes(){ DoubleStorageType::iterator itv = sizeField.begin(); @@ -368,14 +353,8 @@ void backgroundMesh2D::updateSizes(){ } -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ frameFieldBackgroundMesh2D::frameFieldBackgroundMesh2D(GFace *_gf):backgroundMesh2D(_gf,false){ @@ -388,11 +367,9 @@ frameFieldBackgroundMesh2D::frameFieldBackgroundMesh2D(GFace *_gf):backgroundMes face->triangles = tempTR; } -//------------------------------------------------------------------------ frameFieldBackgroundMesh2D::~frameFieldBackgroundMesh2D(){} -//------------------------------------------------------------------------ void frameFieldBackgroundMesh2D::reset(bool erase_2D3D){ @@ -425,28 +402,24 @@ void frameFieldBackgroundMesh2D::reset(bool erase_2D3D){ } } -//------------------------------------------------------------------------ double frameFieldBackgroundMesh2D::get_smoothness(MVertex *v){ if(debug) cout << "frameFieldBackgroundMesh2D::get_smoothness(MVertex *v)" << endl; return get_nodal_value(v,smoothness); } -//------------------------------------------------------------------------ double frameFieldBackgroundMesh2D::get_smoothness(double u, double v){ if(debug) cout << "frameFieldBackgroundMesh2D::get_smoothness(double u, double v)" << endl; return get_field_value(u,v,0.,smoothness); } -//------------------------------------------------------------------------ double frameFieldBackgroundMesh2D::angle(MVertex *v){ if(debug) cout << "frameFieldBackgroundMesh2D::angle(MVertex *v)" << endl; return get_nodal_value(v,angles); } -//------------------------------------------------------------------------ double frameFieldBackgroundMesh2D::angle(double u, double v){ MElement *e = const_cast<MElement*>(findElement(u, v)); @@ -465,7 +438,6 @@ double frameFieldBackgroundMesh2D::angle(double u, double v){ return a; } -//------------------------------------------------------------------------ void frameFieldBackgroundMesh2D::computeCrossField(simpleFunction<double> &eval_diffusivity){ angles.clear(); @@ -528,7 +500,6 @@ void frameFieldBackgroundMesh2D::computeCrossField(simpleFunction<double> &eval_ } } -//------------------------------------------------------------------------ void frameFieldBackgroundMesh2D::eval_crossfield(double u, double v, STensor3 &cf){ double quadAngle = angle(u,v); @@ -564,7 +535,6 @@ void frameFieldBackgroundMesh2D::eval_crossfield(double u, double v, STensor3 &c return; } -//------------------------------------------------------------------------ void frameFieldBackgroundMesh2D::eval_crossfield(MVertex *vert, STensor3 &cf){ SPoint2 parampoint; @@ -573,7 +543,6 @@ void frameFieldBackgroundMesh2D::eval_crossfield(MVertex *vert, STensor3 &cf){ return eval_crossfield(parampoint[0], parampoint[1], cf); } -//------------------------------------------------------------------------ void frameFieldBackgroundMesh2D::computeSmoothness(){ smoothness.clear(); @@ -618,7 +587,6 @@ void frameFieldBackgroundMesh2D::computeSmoothness(){ } } -//------------------------------------------------------------------------ void frameFieldBackgroundMesh2D::exportCrossField(const string &filename){ FILE *f = Fopen (filename.c_str(),"w"); @@ -641,7 +609,6 @@ void frameFieldBackgroundMesh2D::exportCrossField(const string &filename){ fclose(f); } -//------------------------------------------------------------------------ // returns the cross field as a pair of othogonal vectors (NOT in parametric coordinates, but real 3D coordinates) Pair<SVector3, SVector3> frameFieldBackgroundMesh2D::compute_crossfield_directions(double u,double v, double angle_current){ @@ -669,7 +636,6 @@ Pair<SVector3, SVector3> frameFieldBackgroundMesh2D::compute_crossfield_directio SVector3(t2[0],t2[1],t2[2])); } -//------------------------------------------------------------------------ bool frameFieldBackgroundMesh2D::compute_RK_infos(double u,double v, double x, double y, double z, RK_form &infos){ diff --git a/Mesh/BackgroundMesh2D.h b/Mesh/BackgroundMesh2D.h index a0820bcba2ce1e15f1212231014fdd5da0b0e123..820937bd8127f8cc219303926a4c75cdc8f97636 100644 --- a/Mesh/BackgroundMesh2D.h +++ b/Mesh/BackgroundMesh2D.h @@ -78,7 +78,6 @@ class backgroundMesh2D : public BGMBase { }; -//------------------------------------------------------------------------ class RK_form{// informations for RK at one point public: @@ -105,7 +104,6 @@ class RK_form{// informations for RK at one point double angle,localsize; }; -//------------------------------------------------------------------------ class frameFieldBackgroundMesh2D : public backgroundMesh2D{ diff --git a/Mesh/BackgroundMesh3D.cpp b/Mesh/BackgroundMesh3D.cpp index 628431c443dea010cbe0684fa633d9226f537c25..6e422d4f211eb16f00e949af380bd1475ed7efb8 100644 --- a/Mesh/BackgroundMesh3D.cpp +++ b/Mesh/BackgroundMesh3D.cpp @@ -33,7 +33,6 @@ int signof(int i){ return ((i < 0) ? -1 : 1); } -//------------------------------------------------------------------------ // TODO: virer les trucs "vertextorank", mettre cette classe-ci : @@ -48,18 +47,15 @@ int signof(int i){ // const double threshold; //}; -//------------------------------------------------------------------------------------------ backgroundMesh3D::backgroundMesh3D(GRegion *_gr):BGMBase(3,_gr),debug(false),verbose(false){ computeSizeField(); } -//------------------------------------------------------------------------------------------ backgroundMesh3D::~backgroundMesh3D(){ } -//------------------------------------------------------------------------------------------ void backgroundMesh3D::computeSizeField(){ @@ -94,7 +90,6 @@ void backgroundMesh3D::computeSizeField(){ // cout << "backgroundMesh3D::size of sizeField: " << sizeField.size() << endl; } -//------------------------------------------------------------------------------------------ void backgroundMesh3D::propagateValues(DoubleStorageType &dirichlet, simpleFunction<double> &eval_diffusivity, bool in_parametric_plane){ // same as Size_field::solve() @@ -166,41 +161,35 @@ void backgroundMesh3D::propagateValues(DoubleStorageType &dirichlet, simpleFunct #endif } -//------------------------------------------------------------------------------------------ GPoint backgroundMesh3D::get_GPoint_from_MVertex(const MVertex *v)const{ return GPoint(v->x(),v->y(),v->z(),dynamic_cast<GRegion*>(gf)); } -//------------------------------------------------------------------------------------------ MVertex* backgroundMesh3D::get_nearest_neighbor(const MVertex *v){ double distance; return get_nearest_neighbor(v->x(),v->y(),v->z(), distance); } -//------------------------------------------------------------------------------------------ MVertex* backgroundMesh3D::get_nearest_neighbor(const double* xyz){ double distance; return get_nearest_neighbor(xyz, distance); } -//------------------------------------------------------------------------------------------ MVertex* backgroundMesh3D::get_nearest_neighbor(double x, double y, double z){ double distance; return get_nearest_neighbor(x,y,z,distance); } -//------------------------------------------------------------------------------------------ MVertex* backgroundMesh3D::get_nearest_neighbor(double x, double y, double z, double &distance ){ double xyz[3] = {x,y,z}; return get_nearest_neighbor(xyz, distance); } -//------------------------------------------------------------------------ MElementOctree* backgroundMesh3D::getOctree(){ if(!octree){ @@ -211,7 +200,6 @@ MElementOctree* backgroundMesh3D::getOctree(){ return octree; } -//------------------------------------------------------------------------------------------ MVertex* backgroundMesh3D::get_nearest_neighbor(const double* xyz, double & distance ){ // using the octree instead of ANN, faster. @@ -240,16 +228,9 @@ MVertex* backgroundMesh3D::get_nearest_neighbor(const double* xyz, double & dist // return it->second; } -//------------------------------------------------------------------------------------------ -//------------------------------------------------------------------------------------------ -//------------------------------------------------------------------------------------------ -//------------------------------------------------------------------------------------------ -//------------------------------------------------------------------------------------------ -//------------------------------------------------------------------------------------------ vector<montripletbis> frameFieldBackgroundMesh3D::permutation = vector<montripletbis>(); -//------------------------------------------------------------------------------------------ frameFieldBackgroundMesh3D::frameFieldBackgroundMesh3D(GRegion *_gr):backgroundMesh3D(_gr){ @@ -286,7 +267,6 @@ frameFieldBackgroundMesh3D::frameFieldBackgroundMesh3D(GRegion *_gr):backgroundM } } -//------------------------------------------------------------------------------------------ frameFieldBackgroundMesh3D::~frameFieldBackgroundMesh3D(){ #if defined(HAVE_ANN) @@ -295,7 +275,6 @@ frameFieldBackgroundMesh3D::~frameFieldBackgroundMesh3D(){ #endif } -//------------------------------------------------------------------------------------------ void frameFieldBackgroundMesh3D::initiate_ANN_research(){ #ifdef HAVE_ANN @@ -315,7 +294,6 @@ void frameFieldBackgroundMesh3D::initiate_ANN_research(){ return; } -//------------------------------------------------------------------------------------------ void frameFieldBackgroundMesh3D::computeSmoothnessOnlyFromBoundaries(){ // this is used when the crossfield is not smoothed !!! @@ -351,7 +329,6 @@ void frameFieldBackgroundMesh3D::computeSmoothnessOnlyFromBoundaries(){ } } -//------------------------------------------------------------------------------------------ void frameFieldBackgroundMesh3D::computeCrossField(){ // TODO: mettre des parametres façon gmsh ??? @@ -564,7 +541,6 @@ void frameFieldBackgroundMesh3D::computeCrossField(){ } -//------------------------------------------------------------------------------------------ //STensor3 frameFieldBackgroundMesh3D::get_random_cross()const{ // SVector3 vec1(rand()%10000/9999. , rand()%10000/9999. , rand()%10000/9999. ); @@ -583,7 +559,6 @@ void frameFieldBackgroundMesh3D::computeCrossField(){ // return random_cross; //} -//------------------------------------------------------------------------------------------ void frameFieldBackgroundMesh3D::initiate_crossfield(){ crossField.clear(); @@ -634,14 +609,12 @@ void frameFieldBackgroundMesh3D::initiate_crossfield(){ } } -//------------------------------------------------------------------------------------------ MVertex* frameFieldBackgroundMesh3D::get_nearest_neighbor_on_boundary(MVertex* v){ double distance; return get_nearest_neighbor_on_boundary(v,distance); } -//------------------------------------------------------------------------------------------ MVertex* frameFieldBackgroundMesh3D::get_nearest_neighbor_on_boundary(MVertex* v, double &distance){ #ifdef HAVE_ANN @@ -665,37 +638,31 @@ MVertex* frameFieldBackgroundMesh3D::get_nearest_neighbor_on_boundary(MVertex* v #endif } -//------------------------------------------------------------------------------------------ double frameFieldBackgroundMesh3D::get_smoothness(double x, double y, double z){ return get_field_value(x,y,z,crossFieldSmoothness); }; -//------------------------------------------------------------------------------------------ double frameFieldBackgroundMesh3D::get_approximate_smoothness(double x, double y, double z){ return crossFieldSmoothness[get_nearest_neighbor(x,y,z)]; } -//------------------------------------------------------------------------------------------ double frameFieldBackgroundMesh3D::get_approximate_smoothness(MVertex *v){ return get_approximate_smoothness(v->x(),v->y(),v->z()); } -//------------------------------------------------------------------------------------------ double frameFieldBackgroundMesh3D::get_smoothness(MVertex *v){ return get_nodal_value(v,crossFieldSmoothness); }; -//------------------------------------------------------------------------------------------ void frameFieldBackgroundMesh3D::eval_approximate_crossfield(double x, double y, double z, STensor3 &cf){ cf = crossField[get_nearest_neighbor(x,y,z)]; }; -//------------------------------------------------------------------------------------------ void frameFieldBackgroundMesh3D::eval_approximate_crossfield(const MVertex *vert, STensor3 &cf){ // check if vertex is ours... @@ -706,35 +673,30 @@ void frameFieldBackgroundMesh3D::eval_approximate_crossfield(const MVertex *vert eval_approximate_crossfield(vert->x(),vert->y(),vert->z(),cf); }; -//------------------------------------------------------------------------------------------ void frameFieldBackgroundMesh3D::get_vectorial_smoothness(double x, double y, double z, SVector3 &cf){ vector<double>res = get_field_value(x,y,z,crossFieldVectorialSmoothness); for (int i=0;i<3;i++) cf(i)=res[i]; }; -//------------------------------------------------------------------------------------------ void frameFieldBackgroundMesh3D::get_vectorial_smoothness(const MVertex *vert, SVector3 &cf){ vector<double> res = get_nodal_value(vert,crossFieldVectorialSmoothness); for (int i=0;i<3;i++) cf(i)=res[i]; }; -//------------------------------------------------------------------------------------------ double frameFieldBackgroundMesh3D::get_vectorial_smoothness(const int idir, double x, double y, double z){ vector<double>res = get_field_value(x,y,z,crossFieldVectorialSmoothness); return res[idir]; }; -//------------------------------------------------------------------------------------------ double frameFieldBackgroundMesh3D::get_vectorial_smoothness(const int idir, const MVertex *vert){ vector<double> res = get_nodal_value(vert,crossFieldVectorialSmoothness); return res[idir]; }; -//------------------------------------------------------------------------------------------ void frameFieldBackgroundMesh3D::build_vertex_to_element_table(){ GRegion *gr = dynamic_cast<GRegion*>(gf); @@ -760,21 +722,18 @@ void frameFieldBackgroundMesh3D::build_vertex_to_element_table(){ } } -//------------------------------------------------------------------------ const MElement* backgroundMesh3D::getElement(unsigned int i)const{ GRegion *gr = dynamic_cast<GRegion*>(gf); return gr->getMeshElement(i); } -//------------------------------------------------------------------------ unsigned int backgroundMesh3D::getNumMeshElements()const{ GRegion *gr = dynamic_cast<GRegion*>(gf); return gr->getNumMeshElements(); } -//------------------------------------------------------------------------------------------ // this function fills the multimap "graph": vertex to direct neighbors, or indirect neighbors, depending on the "max_recursion_level". void frameFieldBackgroundMesh3D::build_neighbors(const int &max_recursion_level){ @@ -818,7 +777,6 @@ void frameFieldBackgroundMesh3D::build_neighbors(const int &max_recursion_level) } } -//------------------------------------------------------------------------------------------ void frameFieldBackgroundMesh3D::get_recursive_neighbors(set<MVertex*> &start, set<MVertex*> &visited, set<MElement*> &visited_elements, multimap<int,MVertex*> &proximity, int max_level, int level){ level++; @@ -857,7 +815,6 @@ void frameFieldBackgroundMesh3D::get_recursive_neighbors(set<MVertex*> &start, s } -//------------------------------------------------------------------------------------------ double frameFieldBackgroundMesh3D::compare_to_neighbors(SPoint3 current, STensor3 &ref, multimap<double,MVertex*>::iterator itbegin, multimap<double,MVertex*>::iterator itend, SVector3 &mean_axis,double &mean_angle, vector<double> &vectorial_smoothness){ for (int i=0;i<3;i++) mean_axis(i)=0.; @@ -942,7 +899,6 @@ double frameFieldBackgroundMesh3D::compare_to_neighbors(SPoint3 current, STensor return smoothness_scalar; } -//------------------------------------------------------------------------------------------ STensor3 frameFieldBackgroundMesh3D::apply_rotation(const SVector3 &axis, const double &angle, const STensor3 &thecross){ double rotmat[3][3]; @@ -1024,7 +980,6 @@ STensor3 frameFieldBackgroundMesh3D::apply_rotation(const SVector3 &axis, const // return res; } -//------------------------------------------------------------------------------------------ // TODO: ce genre de fct... mettre dans une classe FrameField ? Ou bien juste un set de fcts à part ? Parce que ça devient bizarre d'avoir ça dans un BGM ??? void frameFieldBackgroundMesh3D::get_rotation_matrix(const double &angle_to_go, const SVector3 &rotvec, double* rotmat){ @@ -1048,7 +1003,6 @@ void frameFieldBackgroundMesh3D::get_rotation_matrix(const double &angle_to_go, rotmat[8] = square2 +(1.-square2)*c; } -//------------------------------------------------------------------------------------------ void frameFieldBackgroundMesh3D::get_min_rotation_matrix(const STensor3 &reference, const STensor3 &thecross, double &minimum_angle, SVector3 &rotation_axis, double threshold, bool debugflag){ @@ -1085,7 +1039,6 @@ void frameFieldBackgroundMesh3D::get_min_rotation_matrix(const STensor3 &referen return; } -//------------------------------------------------------------------------------------------ // compute the angle and axis of rotation between two (unit-orthogonal) cross fields // using crossfield vectors permutations defined by modulo and trip @@ -1151,7 +1104,6 @@ void frameFieldBackgroundMesh3D::get_rotation_angle_and_axis(const STensor3 &ref return; } -//------------------------------------------------------------------------ void frameFieldBackgroundMesh3D::exportVectorialSmoothness(const string &filename){ FILE *f = Fopen (filename.c_str(),"w"); @@ -1178,5 +1130,4 @@ void frameFieldBackgroundMesh3D::exportVectorialSmoothness(const string &filenam fclose(f); } -//------------------------------------------------------------------------------------------ diff --git a/Mesh/BackgroundMesh3D.h b/Mesh/BackgroundMesh3D.h index 7aeb0b3bb50ae66b42e3f06dea5059a1777e0be6..51226b62c381714c9ab2c54e4a4101b873927089 100644 --- a/Mesh/BackgroundMesh3D.h +++ b/Mesh/BackgroundMesh3D.h @@ -38,7 +38,6 @@ using namespace std; -//------------------------------------------------------------------------------------------ class montripletbis{ public: @@ -53,7 +52,6 @@ class montripletbis{ vector<int> vec; }; -//------------------------------------------------------------------------------------------ // difference with BackgroundMesh2D: no copy of components, working directly on the vertices and elements of GRegion @@ -83,7 +81,6 @@ class backgroundMesh3D : public BGMBase { virtual MVertex* get_nearest_neighbor(double x, double y, double z, double &distance ); }; -//------------------------------------------------------------------------ class frameFieldBackgroundMesh3D : public backgroundMesh3D{ diff --git a/Mesh/BackgroundMeshManager.cpp b/Mesh/BackgroundMeshManager.cpp index 1aa93c3ad5243b89f483ace3b343806f297f8e86..c863cbc426c04697630574ec79358693ddaa589a 100644 --- a/Mesh/BackgroundMeshManager.cpp +++ b/Mesh/BackgroundMeshManager.cpp @@ -8,13 +8,11 @@ #include "BackgroundMesh3D.h" -//------------------------------------------------------------------------ map<GEntity*,BGMBase*> BGMManager::data = map<GEntity*,BGMBase*>(); BGMBase* BGMManager::latest2Dbgm = NULL; bool BGMManager::use_cross_field = true; -//------------------------------------------------------------------------ void BGMManager::set_use_cross_field(bool b){ if (b && (BGMManager::use_cross_field==false)){// need to change... @@ -23,7 +21,6 @@ void BGMManager::set_use_cross_field(bool b){ BGMManager::use_cross_field = b; } -//------------------------------------------------------------------------ BGMBase* BGMManager::get(GRegion* gf){ map<GEntity*,BGMBase*>::iterator itfind = data.find(gf); @@ -42,7 +39,6 @@ BGMBase* BGMManager::get(GRegion* gf){ return bgm; } -//------------------------------------------------------------------------ BGMBase* BGMManager::get(GFace* gf){ map<GEntity*,BGMBase*>::iterator itfind = data.find(gf); @@ -61,11 +57,9 @@ BGMBase* BGMManager::get(GFace* gf){ return bgm; } -//------------------------------------------------------------------------ BGMBase* BGMManager::current2D(){return latest2Dbgm;}; -//------------------------------------------------------------------------ diff --git a/Mesh/BackgroundMeshTools.cpp b/Mesh/BackgroundMeshTools.cpp index bed3c28f5b1aef464d4310f325560f402fef250f..b9a24773cc4ae295021518410a9238b4b6f37a2d 100644 --- a/Mesh/BackgroundMeshTools.cpp +++ b/Mesh/BackgroundMeshTools.cpp @@ -12,7 +12,6 @@ #include <iostream> -//------------------------------------------------------------------------ static double max_surf_curvature(const GEdge *ge, double u) { @@ -32,7 +31,6 @@ static double max_surf_curvature(const GEdge *ge, double u) } -//------------------------------------------------------------------------ static double max_edge_curvature(const GVertex *gv) { @@ -50,7 +48,6 @@ static double max_edge_curvature(const GVertex *gv) return val; } -//------------------------------------------------------------------------ // the mesh vertex is classified on a model vertex. we compute the // maximum of the curvature of model faces surrounding this point if @@ -86,7 +83,6 @@ static double LC_MVertex_CURV(GEntity *ge, double U, double V) return lc; } -//------------------------------------------------------------------------ SMetric3 max_edge_curvature_metric(const GEdge *ge, double u) { @@ -98,7 +94,6 @@ SMetric3 max_edge_curvature_metric(const GEdge *ge, double u) return buildMetricTangentToCurve(t,l_t,l_n); } -//------------------------------------------------------------------------ static SMetric3 metric_based_on_surface_curvature(const GEdge *ge, double u, bool iso_surf) { @@ -143,7 +138,6 @@ static SMetric3 metric_based_on_surface_curvature(const GEdge *ge, double u, boo } } -//------------------------------------------------------------------------ static SMetric3 metric_based_on_surface_curvature(const GVertex *gv, bool iso_surf) { @@ -172,7 +166,6 @@ static SMetric3 metric_based_on_surface_curvature(const GVertex *gv, bool iso_su return mesh_size; } -//------------------------------------------------------------------------ SMetric3 LC_MVertex_CURV_ANISO(GEntity *ge, double U, double V) { @@ -187,7 +180,6 @@ SMetric3 LC_MVertex_CURV_ANISO(GEntity *ge, double U, double V) return SMetric3(); } -//------------------------------------------------------------------------ // compute the mesh size at a given vertex due to prescribed sizes at // mesh vertices @@ -225,11 +217,6 @@ static double LC_MVertex_PNTS(GEntity *ge, double U, double V) } } -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ SMetric3 buildMetricTangentToCurve(SVector3 &t, double l_t, double l_n) { @@ -254,7 +241,6 @@ SMetric3 buildMetricTangentToCurve(SVector3 &t, double l_t, double l_n) return Metric; } -//------------------------------------------------------------------------ SMetric3 buildMetricTangentToSurface(SVector3 &t1, SVector3 &t2, double l_t1, double l_t2, double l_n) @@ -272,7 +258,6 @@ SMetric3 buildMetricTangentToSurface(SVector3 &t1, SVector3 &t2, return Metric; } -//------------------------------------------------------------------------ // This is the only function that is used by the meshers double BGM_MeshSize(GEntity *ge, double U, double V, @@ -320,7 +305,6 @@ double BGM_MeshSize(GEntity *ge, double U, double V, } -//------------------------------------------------------------------------ // anisotropic version of the background field SMetric3 BGM_MeshMetric(GEntity *ge, @@ -365,21 +349,18 @@ SMetric3 BGM_MeshMetric(GEntity *ge, } -//------------------------------------------------------------------------ bool Extend1dMeshIn2dSurfaces() { return CTX::instance()->mesh.lcExtendFromBoundary ? true : false; } -//------------------------------------------------------------------------ bool Extend2dMeshIn3dVolumes() { return CTX::instance()->mesh.lcExtendFromBoundary ? true : false; } -//------------------------------------------------------------------------ SMetric3 max_edge_curvature_metric(const GVertex *gv) { @@ -411,7 +392,6 @@ SMetric3 max_edge_curvature_metric(const GVertex *gv) return val; } -//------------------------------------------------------------------------ SMetric3 metric_based_on_surface_curvature(const GFace *gf, double u, double v, bool surface_isotropic, @@ -446,5 +426,4 @@ SMetric3 metric_based_on_surface_curvature(const GFace *gf, double u, double v, return curvMetric; } -//------------------------------------------------------------------------ diff --git a/Mesh/BackgroundMeshTools.h b/Mesh/BackgroundMeshTools.h index dccae2c8def44e0bb7680be0cf7bfb9ff9777cad..74a80753db1285b7bb9ec670bece9c7fc486e97c 100644 --- a/Mesh/BackgroundMeshTools.h +++ b/Mesh/BackgroundMeshTools.h @@ -10,7 +10,6 @@ class GVertex; class GEdge; class GEntity; -//------------------------------------------------------------- SMetric3 buildMetricTangentToCurve (SVector3 &t, double l_t, double l_n); SMetric3 buildMetricTangentToSurface (SVector3 &t1, SVector3 &t2, double l_t1, double l_t2, double l_n); @@ -22,7 +21,6 @@ SMetric3 max_edge_curvature_metric(const GVertex *gv); SMetric3 max_edge_curvature_metric(const GEdge *ge, double u, double &l); SMetric3 metric_based_on_surface_curvature(const GFace *gf, double u, double v, bool surface_isotropic = false,double d_normal = 1.e12,double d_tangent_max = 1.e12); -//------------------------------------------------------------- // //static double LC_MVertex_CURV(GEntity *ge, double U, double V); //SMetric3 LC_MVertex_CURV_ANISO(GEntity *ge, double U, double V); diff --git a/Mesh/Field.cpp b/Mesh/Field.cpp index fd50f7e5866d9f6f5eda072a631237bc71534c3b..4cfd48f114ed77157426a5f39a8b99644f1a122b 100644 --- a/Mesh/Field.cpp +++ b/Mesh/Field.cpp @@ -2401,15 +2401,12 @@ void FieldManager::setBackgroundMesh(int iView) -//-------------------------------------------------- GenericField::GenericField(){}; -//-------------------------------------------------- GenericField::~GenericField(){}; -//-------------------------------------------------- double GenericField::operator() (double x, double y, double z, GEntity *ge){ std::vector<double> sizes(cbs.size()); @@ -2429,12 +2426,12 @@ double GenericField::operator() (double x, double y, double z, GEntity *ge){ return (*std::min_element(sizes.begin(),sizes.end())); } -//-------------------------------------------------- + void GenericField::setCallbackWithData(ptrfunction fct, void *data){ user_data.push_back(data); cbs.push_back(fct); } -//-------------------------------------------------- + diff --git a/Mesh/pointInsertion.cpp b/Mesh/pointInsertion.cpp index ccfc4d352b5b5f20d7533afda6e571ffaa5f920e..6060a240e868404754b3a4da2c80e11ebb950b52 100644 --- a/Mesh/pointInsertion.cpp +++ b/Mesh/pointInsertion.cpp @@ -26,13 +26,11 @@ using namespace std; -//------------------------------------------------------------------------ bool old_algo_hexa(){ - return false; + return true; } -//------------------------------------------------------------------------ template<typename T> void print_nodal_info(string filename, map<MVertex*, T> &mapp){ @@ -48,7 +46,6 @@ void print_nodal_info(string filename, map<MVertex*, T> &mapp){ out.close(); } -//------------------------------------------------------------------------ bool shoot(const SPoint2 &start, const SPoint2 &dir, const double &h, SPoint2 &res){ @@ -63,7 +60,6 @@ bool shoot(const SPoint2 &start, const SPoint2 &dir, const double &h, SPoint2 &r return false; } -//------------------------------------------------------------------------ bool computeFourNeighbors (frameFieldBackgroundMesh2D *bgm, MVertex *v_center, // the vertex for which we want to generate 4 neighbors (real vertex (xyz), not parametric !!! ) SPoint2 &midpoint, @@ -127,7 +123,7 @@ bool computeFourNeighbors (frameFieldBackgroundMesh2D *bgm, MVertex *v_center, / // We could stop here. Yet, if the metric varies a lot, we can solve // a nonlinear problem in order to find a better approximation in the real // surface - if (1 && goNonLinear){//---------------------------------------------------// + if (1 && goNonLinear){ double L = infos.localsize; double newPoint[4][2]; for (int j=0;j<2;j++){ @@ -191,7 +187,6 @@ bool computeFourNeighbors (frameFieldBackgroundMesh2D *bgm, MVertex *v_center, / return true; } -//------------------------------------------------------------------------ void computeTwoNeighbors(frameFieldBackgroundMesh3D *bgm, MVertex *parent, vector<MVertex*> &spawns, SVector3 dir, double h){ @@ -214,7 +209,6 @@ void computeTwoNeighbors(frameFieldBackgroundMesh3D *bgm, MVertex *parent, vecto } -//------------------------------------------------------------------------ void computeSixNeighbors(frameFieldBackgroundMesh3D *bgm, MVertex *parent, vector<MVertex*> &spawns, STensor3 dir, double h){ @@ -238,16 +232,13 @@ void computeSixNeighbors(frameFieldBackgroundMesh3D *bgm, MVertex *parent, vecto } } -//------------------------------------------------------------------------ double Filler2D::time_bgm_and_smoothing = 0.; double Filler2D::time_insertion = 0.; -//------------------------------------------------------------------------ Filler2D::Filler2D(){} -//------------------------------------------------------------------------ Filler2D::~Filler2D(){ cout << "FILLER2D timing:" << endl; @@ -256,7 +247,6 @@ Filler2D::~Filler2D(){ cout << " ------- TOTAL 2D TIME (new) : " << time_bgm_and_smoothing+time_insertion << " s." << endl; } -//------------------------------------------------------------------------ void Filler2D::pointInsertion2D(GFace* gf, vector<MVertex*> &packed, vector<SMetric3> &metrics){ // NB/ do not use the mesh in GFace, use the one in backgroundMesh2D !!! @@ -462,7 +452,6 @@ void Filler2D::pointInsertion2D(GFace* gf, vector<MVertex*> &packed, vector<SMe } -//------------------------------------------------------------------------ bool Filler3D::treat_region(GRegion *gr){ @@ -801,23 +790,19 @@ bool Filler3D::treat_region(GRegion *gr){ return true; } -//------------------------------------------------------------------------ int Filler3D::get_nbr_new_vertices(){ return new_vertices.size(); } -//------------------------------------------------------------------------ MVertex* Filler3D::get_new_vertex(int i){ return new_vertices[i]; } -//------------------------------------------------------------------------ Filler3D::Filler3D(){} -//------------------------------------------------------------------------ Filler3D::~Filler3D(){ cout << "FILLER3D timing:" << endl; @@ -827,17 +812,14 @@ Filler3D::~Filler3D(){ cout << " ------- CUMULATIVE TOTAL 3D TIME (new) : " << time_meshing+time_smoothing+time_insert_points << " s." << endl; } -//------------------------------------------------------------------------ std::vector<MVertex*> Filler3D::new_vertices; -//------------------------------------------------------------------------ double Filler3D::time_smoothing = 0.; double Filler3D::time_insert_points = 0.; double Filler3D::time_meshing = 0.; -//------------------------------------------------------------------------ diff --git a/Mesh/pointInsertion.h b/Mesh/pointInsertion.h index 655b76b8c9670c19286cf86611608b8e39f7566f..74f3c7557e98589198117209bdfcbd6da79cfbf3 100644 --- a/Mesh/pointInsertion.h +++ b/Mesh/pointInsertion.h @@ -23,7 +23,6 @@ using namespace std; extern bool old_algo_hexa(); -//------------------------------------------------------------------------ class Filler2D{ public: @@ -34,7 +33,6 @@ class Filler2D{ static double time_bgm_and_smoothing,time_insertion; }; -//------------------------------------------------------------------------ class Filler3D{ private: @@ -52,7 +50,6 @@ class Filler3D{ -//------------------------------------------------------------------------------------------ //template<class T> //bool readValue(string filename, string keystr, T &value){ diff --git a/Mesh/pointInsertionRTreeTools.cpp b/Mesh/pointInsertionRTreeTools.cpp index 868d107714cb9d88dff7b01552ef2496fcc79922..d8845e1ad19b012846836616099313adfdb71fe1 100644 --- a/Mesh/pointInsertionRTreeTools.cpp +++ b/Mesh/pointInsertionRTreeTools.cpp @@ -8,7 +8,6 @@ #include "GEntity.h" -//------------------------------------------------------------------------ surfacePointWithExclusionRegion::surfacePointWithExclusionRegion (MVertex *v, SPoint2 p[4][NUMDIR], SPoint2 &_mp, SMetric3 & meshMetric, surfacePointWithExclusionRegion *father){ _v = v; @@ -29,7 +28,6 @@ surfacePointWithExclusionRegion::surfacePointWithExclusionRegion (MVertex *v, SP } } -//------------------------------------------------------------------------ bool surfacePointWithExclusionRegion::inExclusionZone (const SPoint2 &p){ double mat[2][2]; @@ -55,7 +53,6 @@ bool surfacePointWithExclusionRegion::inExclusionZone (const SPoint2 &p){ return false; } -//------------------------------------------------------------------------ void surfacePointWithExclusionRegion::minmax (double _min[2], double _max[2]) const{ _min[0] = std::min(std::min(std::min(_q[0].x(),_q[1].x()),_q[2].x()),_q[3].x()); @@ -64,7 +61,6 @@ void surfacePointWithExclusionRegion::minmax (double _min[2], double _max[2]) c _max[1] = std::max(std::max(std::max(_q[0].y(),_q[1].y()),_q[2].y()),_q[3].y()); } -//------------------------------------------------------------------------ void surfacePointWithExclusionRegion::print (FILE *f, int i){ fprintf(f,"SP(%g,%g,%g){%d};\n",_center.x(),_center.y(),0.0,i); @@ -76,14 +72,12 @@ void surfacePointWithExclusionRegion::print (FILE *f, int i){ } -//------------------------------------------------------------------------ my_wrapper::my_wrapper (SPoint2 sp) : _tooclose (false), _p(sp) {} -//------------------------------------------------------------------------ bool rtree_callback(surfacePointWithExclusionRegion *neighbour,void* point){ @@ -98,7 +92,6 @@ bool rtree_callback(surfacePointWithExclusionRegion *neighbour,void* point){ } -//------------------------------------------------------------------------ bool inExclusionZone (SPoint2 &p, RTree<surfacePointWithExclusionRegion*,double,2,double> &rtree, @@ -138,7 +131,6 @@ frameFieldBackgroundMesh3D* Wrapper3D::bgmesh = NULL; bool compareSmoothnessVertexPairs::vectorial = false; -//------------------------------------------------------------------------ double infinity_distance_3D(const MVertex *v1,const MVertex *v2,STensor3 &cf){ SPoint3 p1 = v1->point(); @@ -162,7 +154,6 @@ double infinity_distance_3D(const MVertex *v1,const MVertex *v2,STensor3 &cf){ return std::max(std::max(fabs(x2-x1),fabs(y2-y1)),fabs(z2-z1));// distance }; -//------------------------------------------------------------------------ void fill_min_max(double x,double y,double z,double h,double *min,double *max){ min[0] = x - sqrt3*h; @@ -173,7 +164,6 @@ void fill_min_max(double x,double y,double z,double h,double *min,double *max){ max[2] = z + sqrt3*h; }; -//------------------------------------------------------------------------ bool rtree_callback_3D(MVertex* neighbour,void* w){ Wrapper3D* wrapper; @@ -198,7 +188,6 @@ bool rtree_callback_3D(MVertex* neighbour,void* w){ return true; }; -//------------------------------------------------------------------------ bool far_from_boundary_3D(frameFieldBackgroundMesh3D *bgm, MVertex* v, double h){ // check if the box (v->point +- k2*h) is in domain @@ -217,7 +206,6 @@ bool far_from_boundary_3D(frameFieldBackgroundMesh3D *bgm, MVertex* v, double h) return true; }; -//------------------------------------------------------------------------ // vient de l'ancien code hexa, mais... kesskessai ? //int code_kesskessai(int tag){ @@ -241,5 +229,4 @@ bool far_from_boundary_3D(frameFieldBackgroundMesh3D *bgm, MVertex* v, double h) // return limit; //} -//------------------------------------------------------------------------ diff --git a/Mesh/pointInsertionRTreeTools.h b/Mesh/pointInsertionRTreeTools.h index 69d00dc900eca4c2710a33ce75a851c22be228ee..32daa4e422b4add31fcfab022c0883bc469ea400 100644 --- a/Mesh/pointInsertionRTreeTools.h +++ b/Mesh/pointInsertionRTreeTools.h @@ -29,7 +29,6 @@ static const double DIRS [NUMDIR] = {0.0}; -//------------------------------------------------------------------------ class surfacePointWithExclusionRegion { @@ -56,7 +55,6 @@ class surfacePointWithExclusionRegion { void print (FILE *f, int i); }; -//------------------------------------------------------------------------ class my_wrapper { @@ -66,7 +64,6 @@ class my_wrapper { my_wrapper (SPoint2 sp); }; -//------------------------------------------------------------------------ struct smoothness_point_pair{ @@ -74,7 +71,6 @@ struct smoothness_point_pair{ surfacePointWithExclusionRegion* ptr; }; -//------------------------------------------------------------------------ class compareSurfacePointWithExclusionRegionPtr_Smoothness @@ -93,7 +89,6 @@ class compareSurfacePointWithExclusionRegionPtr_Smoothness }; -//------------------------------------------------------------------------ class compareSurfacePointWithExclusionRegionPtr @@ -108,19 +103,16 @@ class compareSurfacePointWithExclusionRegionPtr }; -//------------------------------------------------------------------------ extern bool rtree_callback(surfacePointWithExclusionRegion *neighbour,void* point); -//------------------------------------------------------------------------ extern bool inExclusionZone (SPoint2 &p, RTree<surfacePointWithExclusionRegion*,double,2,double> &rtree, std::vector<surfacePointWithExclusionRegion*> & all ); -//------------------------------------------------------------------------ @@ -162,7 +154,6 @@ class Wrapper3D{ double* get_size(){return size;}; }; -//------------------------------------------------------------------------ @@ -172,7 +163,6 @@ extern bool far_from_boundary_3D(frameFieldBackgroundMesh3D *bgm, MVertex* v, do //extern int code_kesskessai(int tag); extern void fill_min_max(double x,double y,double z,double h,double *min,double *max); -//------------------------------------------------------------------------ @@ -195,7 +185,6 @@ class smoothness_vertex_pair{ int dir,layer; }; -//------------------------------------------------------------------------ class compareSmoothnessVertexPairs @@ -262,7 +251,6 @@ class compareSmoothnessVertexPairs }; -//------------------------------------------------------------------------ class listOfPoints{ public: @@ -279,7 +267,6 @@ class listOfPoints{ virtual bool empty()=0; }; -//------------------------------------------------------------------------ class listOfPointsScalarSmoothness : public listOfPoints{ public: @@ -312,7 +299,6 @@ class listOfPointsScalarSmoothness : public listOfPoints{ set<smoothness_vertex_pair*, compareSmoothnessVertexPairs> points; }; -//------------------------------------------------------------------------ class listOfPointsVectorialSmoothness : public listOfPointsScalarSmoothness{ public: @@ -329,7 +315,6 @@ class listOfPointsVectorialSmoothness : public listOfPointsScalarSmoothness{ set<smoothness_vertex_pair*, compareSmoothnessVertexPairs> points; }; -//------------------------------------------------------------------------ class listOfPointsFifo : public listOfPoints{ public: diff --git a/Mesh/surfaceFiller.cpp b/Mesh/surfaceFiller.cpp index 36f57cec046bdb25a62d99c86a95c88c8f9724be..aae6d520d04f11b9f695069d13d6c4e0f42d93ee 100644 --- a/Mesh/surfaceFiller.cpp +++ b/Mesh/surfaceFiller.cpp @@ -373,7 +373,7 @@ bool compute4neighbors (GFace *gf, // the surface // printf("L = %12.5E D = %12.5E ERR = %12.5E\n",L,D,100*fabs(D-L)/(D+L)); } - if (1 && goNonLinear){//---------------------------------------------------// + if (1 && goNonLinear){ surfaceFunctorGFace ss (gf); // SVector3 dirs[4] = {t1*(-1.0),t2*(-1.0),t1*(1.0),t2*(1.0)}; // for (int i=0;i<4;i++){ // @@ -418,7 +418,6 @@ bool compute4neighbors (GFace *gf, // the surface return true; } -// --------------------------------------------------------------------------------------------- // recover element around vertex v and interpolate smoothness on this element... double get_smoothness(MVertex *v, GFace *gf, const map<MVertex*,double> &vertices2smoothness){ @@ -470,7 +469,6 @@ double get_smoothness(MVertex *v, GFace *gf, const map<MVertex*,double> &vertice return res; } -// --------------------------------------------------------------------------------------------- void print_nodal_info_int(string filename, map<MVertex*, int> &mapp){ ofstream out(filename.c_str()); @@ -485,7 +483,6 @@ void print_nodal_info_int(string filename, map<MVertex*, int> &mapp){ out.close(); } -// --------------------------------------------------------------------------------------------- void print_nodal_info_double(string filename, map<MVertex*, double> &mapp){ ofstream out(filename.c_str()); @@ -500,7 +497,6 @@ void print_nodal_info_double(string filename, map<MVertex*, double> &mapp){ out.close(); } -// --------------------------------------------------------------------------------------------- void export_point(surfacePointWithExclusionRegion *sp, int DIR, FILE *crossf, GFace *gf){ // get the unit normal at that point @@ -550,7 +546,6 @@ void export_point(surfacePointWithExclusionRegion *sp, int DIR, FILE *crossf, GF fprintf(crossf,"VP(%g,%g,%g) {%g,%g,%g};\n",sp->_v->x(),sp->_v->y(),sp->_v->z(),-t2.x()*size_2,-t2.y()*size_2,-t2.z()*size_2); } -// --------------------------------------------------------------------------------------------- bool get_local_sizes_and_directions(const MVertex *v_center, const SPoint2 &midpoint, const int DIR, GFace* gf, double (&covar1)[2], double (&covar2)[2], double &size_param_1, double &size_param_2, double &L, SVector3 &t1, SVector3 &t2, SVector3 &n, FILE *crossf=NULL){ //bool get_RK_stuff(const MVertex *v_center, const SPoint2 &midpoint, const int DIR, GFace* gf, double (&covar1)[2], double (&covar2)[2], double &size_param_1, double &size_param_2, double &L, SVector3 &t1, SVector3 &t2, SVector3 &n, FILE *crossf, const SVector3 &previous_t1, const SVector3 &previous_t2, bool use_previous_basis=false, bool export_cross=true){ @@ -688,7 +683,6 @@ bool get_local_sizes_and_directions(const MVertex *v_center, const SPoint2 &midp } -// --------------------------------------------------------------------------------------------- // using fifo based on smoothness criteria void packingOfParallelogramsSmoothness(GFace* gf, std::vector<MVertex*> &packed, std::vector<SMetric3> &metrics){ @@ -909,7 +903,6 @@ void packingOfParallelogramsSmoothness(GFace* gf, std::vector<MVertex*> &packed } -// --------------------------------------------------------------------------------------------- // fills a surface with points in order to build a nice diff --git a/Mesh/yamakawa.cpp b/Mesh/yamakawa.cpp index d3051fdde3d2ac43f5d9a3e2b8ee14e80669a61e..83b54b9323a408a4223c99a6bf2f3a0b5d4e7013 100644 --- a/Mesh/yamakawa.cpp +++ b/Mesh/yamakawa.cpp @@ -25,7 +25,6 @@ -// -------------------------------------------------------------------- void export_gregion_mesh(GRegion *gr, string filename){ @@ -114,7 +113,6 @@ void export_gregion_mesh(GRegion *gr, string filename){ } -// -------------------------------------------------------------------- template <class T> void export_the_clique_graphviz_format(cliques_compatibility_graph<T> &cl, int clique_number,string filename){ @@ -217,18 +215,15 @@ void export_the_clique_graphviz_format(cliques_compatibility_graph<T> &cl, int c -//-------------------------------------------------------------------------------------- template<class T> clique_stop_criteria<T>::clique_stop_criteria(map<T, std::set<MElement*> > &_m, int _i):hex_to_tet(_m),total_number_tet(_i){ }; -//-------------------------------------------------------------------------------------- template<class T> clique_stop_criteria<T>::~clique_stop_criteria(){}; -//-------------------------------------------------------------------------------------- template<class T> void clique_stop_criteria<T>::export_corresponding_mesh(const graph_data_no_hash &clique)const{ @@ -322,7 +317,6 @@ void clique_stop_criteria<T>::export_corresponding_mesh(const graph_data_no_hash } -//-------------------------------------------------------------------------------------- template<class T> bool clique_stop_criteria<T>::stop(const graph_data_no_hash &clique)const{ @@ -378,7 +372,6 @@ bool clique_stop_criteria<T>::stop(const graph_data_no_hash &clique)const{ return false; } -//-------------------------------------------------------------------------------------- template<class T> cliques_compatibility_graph<T>::cliques_compatibility_graph(graph &_g, const map<T, std::vector<double> > &_hex_ranks, unsigned int _max_nb_cliques, unsigned int _nb_hex_potentiels, clique_stop_criteria<T> *csc, ptrfunction_export fct):debug(false), max_nb_cliques(_max_nb_cliques), nb_hex_potentiels(_nb_hex_potentiels), max_clique_size(0), position(0), total_nodes_number(0), cancel_search(false), hex_ranks(_hex_ranks), G(_g),criteria(csc),export_clique_graph(fct),found_the_ultimate_max_clique(false){ @@ -388,13 +381,11 @@ cliques_compatibility_graph<T>::cliques_compatibility_graph(graph &_g, const map }; -//-------------------------------------------------------------------------------------- template<class T> cliques_compatibility_graph<T>::~cliques_compatibility_graph(){ }; -//-------------------------------------------------------------------------------------- template<class T> void cliques_compatibility_graph<T>::find_cliques(){ @@ -411,7 +402,6 @@ void cliques_compatibility_graph<T>::find_cliques(){ }; -//-------------------------------------------------------------------------------------- template<class T> void cliques_compatibility_graph<T>::export_cliques(){ @@ -425,7 +415,6 @@ void cliques_compatibility_graph<T>::export_cliques(){ } }; -//-------------------------------------------------------------------------------------- template<class T> void cliques_compatibility_graph<T>::store_clique(int n){ @@ -548,7 +537,6 @@ void cliques_compatibility_graph<T>::store_clique(int n){ }; -//-------------------------------------------------------------------------------------- template<class T> void cliques_compatibility_graph<T>::find_cliques(graph_data &s, int n){ @@ -660,7 +648,6 @@ void cliques_compatibility_graph<T>::find_cliques(graph_data &s, int n){ } -//-------------------------------------------------------------------------------------- template<class T> void cliques_compatibility_graph<T>::erase_entry(graph_data &s, T &u, hash_key &key){ @@ -675,7 +662,6 @@ void cliques_compatibility_graph<T>::erase_entry(graph_data &s, T &u, hash_key & } } -//-------------------------------------------------------------------------------------- template<class T> void cliques_compatibility_graph<T>::choose_u(const graph_data &s, T &u, hash_key &u_key){ @@ -722,7 +708,6 @@ void cliques_compatibility_graph<T>::choose_u(const graph_data &s, T &u, hash_ke return; } -//-------------------------------------------------------------------------------------- template<class T> void cliques_compatibility_graph<T>::split_set_BW(const T &u, const hash_key &u_key, const graph_data &s, graph_data &white, graph_data &black){ @@ -738,7 +723,6 @@ void cliques_compatibility_graph<T>::split_set_BW(const T &u, const hash_key &u_ } } -//-------------------------------------------------------------------------------------- template<class T> @@ -752,7 +736,6 @@ void cliques_compatibility_graph<T>::fill_black_set(const T &u, const hash_key & } } -//-------------------------------------------------------------------------------------- // the maximum score (int) will be chosen... template<class T> @@ -775,7 +758,6 @@ double cliques_compatibility_graph<T>::function_to_maximize_for_u(const T &u, co return counter; } -//-------------------------------------------------------------------------------------- template<class T> bool cliques_compatibility_graph<T>::compatibility(const T &u, const hash_key &u_key, const T &v, const hash_key &v_key){ @@ -800,8 +782,6 @@ bool cliques_compatibility_graph<T>::compatibility(const T &u, const hash_key &u return (found_it); } -//-------------------------------------------------------------------------------------- -//-------------------------------------------------------------------------------------- template<class T> bool cliques_losses_graph<T>::compatibility(const T &u, const hash_key &u_key, const T &v, const hash_key &v_key){ @@ -826,25 +806,21 @@ bool cliques_losses_graph<T>::compatibility(const T &u, const hash_key &u_key, c return (!found_it); } -//-------------------------------------------------------------------------------------- template<class T> cliques_losses_graph<T>::cliques_losses_graph(graph &_g, const map<T, std::vector<double> > &_hex_ranks, unsigned int _max_nb_cliques, unsigned int _nb_hex_potentiels, clique_stop_criteria<T> *csc, ptrfunction_export fct):cliques_compatibility_graph<T>(_g, _hex_ranks, _max_nb_cliques, _nb_hex_potentiels,csc,fct),G(_g){ }; -//-------------------------------------------------------------------------------------- template<class T> cliques_losses_graph<T>::~cliques_losses_graph(){ }; -//-------------------------------------------------------------------------------------- -// -------------------------------------------------------------------- bool compare_hex_ptr_by_quality (Hex *a,Hex *b) { return (a->get_quality()>(b->get_quality())); } @@ -1036,7 +1012,6 @@ bool PEEntity::operator<(const PEEntity& t) const{ // return (hash==l); //} -// -------------------------------------------------------------------- PELine::~PELine(){}; @@ -1050,7 +1025,6 @@ PELine::PELine(const vector<const MVertex*> &_v):PEEntity(_v){ size_t PELine::get_max_nb_vertices()const{return 2;}; -// -------------------------------------------------------------------- PETriangle::~PETriangle(){}; @@ -1067,7 +1041,6 @@ PETriangle::PETriangle(const vector<const MVertex*> &_v):PEEntity(_v){ size_t PETriangle::get_max_nb_vertices()const{return 3;}; -// -------------------------------------------------------------------- PEQuadrangle::~PEQuadrangle(){}; @@ -5762,7 +5735,6 @@ void PostOp::erase_vertex_to_pyramids(MElement* element){ } } -// -------------------------------------------------------------------- void Recombinator_Graph::pattern1(GRegion* gr){ int size_init = hex_to_tet.size(); @@ -5839,7 +5811,6 @@ void Recombinator_Graph::pattern1(GRegion* gr){ cout << "Nb of hex found, pattern1: " << hex_to_tet.size()-size_init << endl; } -// -------------------------------------------------------------------- void Recombinator_Graph::pattern2(GRegion* gr){ int size_init = hex_to_tet.size(); @@ -5892,7 +5863,6 @@ void Recombinator_Graph::pattern2(GRegion* gr){ cout << "Nb of hex found, pattern2: " << hex_to_tet.size()-size_init << endl; } -// -------------------------------------------------------------------- void Recombinator_Graph::pattern3(GRegion* gr){ int size_init = hex_to_tet.size(); @@ -6018,7 +5988,6 @@ void Recombinator_Graph::pattern3(GRegion* gr){ cout << "Nb of hex found, pattern3: " << hex_to_tet.size()-size_init << endl; } -// -------------------------------------------------------------------- // check if hex is ok, and insert in "potential" table void Recombinator_Graph::fill_tet_to_hex_table(Hex *hex){ @@ -6150,7 +6119,6 @@ void Recombinator_Graph::fill_tet_to_hex_table(Hex *hex){ } } -// -------------------------------------------------------------------- void Recombinator_Graph::buildGraphOnly(unsigned int max_nb_cliques,string filename){ GRegion* gr; @@ -6166,7 +6134,6 @@ void Recombinator_Graph::buildGraphOnly(unsigned int max_nb_cliques,string filen } } -// -------------------------------------------------------------------- void Recombinator_Graph::buildGraphOnly(GRegion* gr, unsigned int max_nb_cliques,string filename){ printf("................HEXAHEDRA................\n"); @@ -6196,7 +6163,6 @@ void Recombinator_Graph::buildGraphOnly(GRegion* gr, unsigned int max_nb_cliques } -// -------------------------------------------------------------------- void Recombinator_Graph::execute(unsigned int max_nb_cliques,string filename){ GRegion* gr; @@ -6214,7 +6180,6 @@ void Recombinator_Graph::execute(unsigned int max_nb_cliques,string filename){ } } -// -------------------------------------------------------------------- void Recombinator_Graph::execute_blossom(unsigned int max_nb_cliques,string filename){ GRegion* gr; @@ -6233,7 +6198,6 @@ void Recombinator_Graph::execute_blossom(unsigned int max_nb_cliques,string file } -// -------------------------------------------------------------------- Recombinator_Graph::~Recombinator_Graph(){ for (iter it = triangular_faces.begin();it!=triangular_faces.end();it++){ delete it->second; @@ -6243,7 +6207,6 @@ Recombinator_Graph::~Recombinator_Graph(){ } } -// -------------------------------------------------------------------- void Recombinator_Graph::createBlossomInfo(){ @@ -6263,7 +6226,6 @@ void Recombinator_Graph::createBlossomInfo(){ } } -// -------------------------------------------------------------------- void Recombinator_Graph::createBlossomInfo(GRegion *gr){ @@ -6372,7 +6334,6 @@ void Recombinator_Graph::createBlossomInfo(GRegion *gr){ } -// -------------------------------------------------------------------- void Recombinator_Graph::execute_blossom(GRegion* gr, unsigned int max_nb_cliques,string filename){ @@ -6471,7 +6432,6 @@ void Recombinator_Graph::execute_blossom(GRegion* gr, unsigned int max_nb_clique // modify_surfaces(gr); } -// -------------------------------------------------------------------- // return the triangular face ijk if it exists. If not, creates it and returns it. PETriangle* Recombinator_Graph::get_triangle(MElement *element, int i, int j, int k){ @@ -6492,7 +6452,6 @@ PETriangle* Recombinator_Graph::get_triangle(MElement *element, int i, int j, in return t; } -// -------------------------------------------------------------------- void Recombinator_Graph::execute(GRegion* gr, unsigned int max_nb_cliques,string filename){ printf("................HEXAHEDRA................\n"); @@ -6574,7 +6533,6 @@ void Recombinator_Graph::execute(GRegion* gr, unsigned int max_nb_cliques,string // modify_surfaces(gr); } -// -------------------------------------------------------------------- void Recombinator_Graph::merge_clique(GRegion* gr, cliques_losses_graph<Hex*> &cl,int clique_number){ @@ -6704,13 +6662,11 @@ void Recombinator_Graph::merge_clique(GRegion* gr, cliques_losses_graph<Hex*> &c } -// -------------------------------------------------------------------- void Recombinator_Graph::merge(GRegion* gr){ throw; } -// -------------------------------------------------------------------- void Recombinator_Graph::export_tets(set<MElement*> &tetset, Hex* hex, string s){ stringstream ss; @@ -6743,7 +6699,6 @@ void Recombinator_Graph::export_tets(set<MElement*> &tetset, Hex* hex, string s) out.close(); } -// -------------------------------------------------------------------- void Recombinator_Graph::export_single_hex_tet(Hex* hex,string s){ stringstream ss; @@ -6776,7 +6731,6 @@ void Recombinator_Graph::export_single_hex_tet(Hex* hex,string s){ out.close(); } -// -------------------------------------------------------------------- void Recombinator_Graph::export_single_hex_all(Hex* hex,string s){ export_single_hex(hex, s); @@ -6784,7 +6738,6 @@ void Recombinator_Graph::export_single_hex_all(Hex* hex,string s){ export_single_hex_faces(hex, s); } -// -------------------------------------------------------------------- void Recombinator_Graph::export_single_hex(Hex* hex,string s){ stringstream ss; @@ -6813,7 +6766,6 @@ void Recombinator_Graph::export_single_hex(Hex* hex,string s){ } -// -------------------------------------------------------------------- void Recombinator_Graph::export_single_hex_faces(Hex* hex,string s){ stringstream ss; @@ -6846,7 +6798,6 @@ void Recombinator_Graph::export_single_hex_faces(Hex* hex,string s){ out.close(); } -// -------------------------------------------------------------------- void Recombinator_Graph::export_hex_init_degree(GRegion *gr, const std::map<Hex*,int> &init_degree, const vector<Hex*> &chosen_hex){ @@ -6880,7 +6831,6 @@ void Recombinator_Graph::export_hex_init_degree(GRegion *gr, const std::map<Hex* out.close(); } -// -------------------------------------------------------------------- void Recombinator_Graph::export_hexmesh_so_far(int &file){ stringstream ss; @@ -6899,7 +6849,6 @@ void Recombinator_Graph::export_hexmesh_so_far(int &file){ } -// -------------------------------------------------------------------- void Recombinator_Graph::export_all_hex(int &file, GRegion *gr){ stringstream ss; @@ -6940,7 +6889,6 @@ void Recombinator_Graph::export_all_hex(int &file, GRegion *gr){ out.close(); } -// -------------------------------------------------------------------- // check if the hex is good enough to be put into the graph. If not in the graph, it cannot be chosen... bool Recombinator_Graph::is_not_good_enough(Hex* hex){ @@ -6961,7 +6909,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ return false; } - // -------------------------------------------------------------------- // fills incompatibility_graph if two hex share a common (non-sliver!) tet void Recombinator_Graph::create_indirect_neighbors_graph(){ @@ -7013,7 +6960,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ } } - // -------------------------------------------------------------------- std::multimap<unsigned long long, Hex* >::const_iterator Recombinator_Graph::find_the_created_potential_hex(Hex *hex, const std::multimap<unsigned long long, Hex*> &list){ std::pair<std::multimap<unsigned long long, Hex* >::const_iterator, std::multimap<unsigned long long, Hex* >::const_iterator> range = list.equal_range(hex->get_hash()); @@ -7026,7 +6972,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ return list.end(); } - // -------------------------------------------------------------------- std::multimap<unsigned long long, pair<PETriangle*,int> >::iterator Recombinator_Graph::find_the_triangle(PETriangle *t, std::multimap<unsigned long long, pair<PETriangle*, int> > &list){ std::pair<std::multimap<unsigned long long, pair<PETriangle*,int> >::iterator, std::multimap<unsigned long long, pair<PETriangle*,int> >::iterator> range = list.equal_range(t->get_hash()); @@ -7041,7 +6986,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ } - // -------------------------------------------------------------------- Recombinator_Graph::citer Recombinator_Graph::find_the_triangle(PETriangle *t, const trimap &list){ std::pair<citer, citer> range = list.equal_range(t->get_hash()); @@ -7051,7 +6995,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ return list.end(); } - // -------------------------------------------------------------------- Recombinator_Graph::linemap::const_iterator Recombinator_Graph::find_the_line(PELine *t, const linemap &list){ std::pair<linemap::const_iterator, linemap::const_iterator> range = list.equal_range(t->get_hash()); @@ -7061,7 +7004,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ return list.end(); } - // -------------------------------------------------------------------- void Recombinator_Graph::export_direct_neighbor_table(int max){ stringstream ss; @@ -7106,7 +7048,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ out.close(); } - // -------------------------------------------------------------------- // if two hex are not connected in the incompatibility_graph, they are compatible void Recombinator_Graph::create_losses_graph(GRegion *gr){ @@ -7130,7 +7071,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ cout << "#hex potentiels recensés par les patterns de recombinaison: " << hex_to_tet.size() << endl; }; - // -------------------------------------------------------------------- // TODO: check only the direct neighbors !!! change the algo pour ne as parcourir les hex qui ont un tet commun. cad Filter au niveau des faces... juste les faces extérieures de l'hex !!! et attention aux slivers, du coup... c'est sans doute la source du pb... @@ -7205,7 +7145,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ } - // -------------------------------------------------------------------- void Recombinator_Graph::evaluate_hex_couple(Hex* hex, Hex* other_hex){ @@ -7311,7 +7250,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ // } } - // -------------------------------------------------------------------- bool Recombinator_Graph::post_check_validation(Hex* current_hex){ // post check... @@ -7370,7 +7308,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ return true; } - // -------------------------------------------------------------------- void Recombinator_Graph::add_face(const MVertex *a,const MVertex* b,const MVertex *c,std::multimap<unsigned long long, pair<PETriangle*,int> > &f){ vector<const MVertex*> v; @@ -7387,7 +7324,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ } } - // -------------------------------------------------------------------- void Recombinator_Graph::add_face(const MVertex *a,const MVertex* b,const MVertex *c,Hex *hex){ vector<const MVertex*> v; @@ -7408,7 +7344,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ faces_to_hex[q].insert(hex); } - // -------------------------------------------------------------------- void Recombinator_Graph::add_edges(Hex *hex){ MVertex *a,*b,*c,*d; @@ -7431,7 +7366,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ fill_edges_table(d,a,e,h,hex); } - // -------------------------------------------------------------------- void Recombinator_Graph::fill_edges_table(const MVertex *a, const MVertex *b, const MVertex *c, const MVertex *d, Hex *hex){ vector<const MVertex* > v; @@ -7467,7 +7401,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ } } - // -------------------------------------------------------------------- Recombinator_Graph::graph::iterator Recombinator_Graph::find_hex_in_graph(Hex* hex){ pair<graph::iterator, graph::iterator> range = incompatibility_graph.equal_range(hex->get_hash()); @@ -7482,7 +7415,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ return incompatibility_graph.end(); } - // -------------------------------------------------------------------- Recombinator_Graph::graph_data::iterator Recombinator_Graph::find_hex_in_graphrow(Hex* hex, graph_data &row){ pair<graph_data::iterator, graph_data::iterator> range = row.equal_range(hex->get_hash()); @@ -7498,7 +7430,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ } - // -------------------------------------------------------------------- bool Recombinator_Graph::find_hex_couple_in_graph(Hex* hex, Hex* other_hex){ graph::iterator it = find_hex_in_graph(hex); @@ -7510,7 +7441,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ } - // -------------------------------------------------------------------- void Recombinator_Graph::add_graph_entry(Hex* hex, Hex* other_hex){ @@ -7528,7 +7458,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ } - // -------------------------------------------------------------------- void Recombinator_Graph::compute_hex_ranks(){ @@ -7554,7 +7483,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ } } - // -------------------------------------------------------------------- void Recombinator_Graph::create_faces_connectivity(){ for (std::map<MElement*, std::set<Hex*> >::iterator it_tet = tet_to_hex.begin(); it_tet!=tet_to_hex.end();it_tet++){ @@ -7565,7 +7493,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ } } - // -------------------------------------------------------------------- void Recombinator_Graph::add_face_connectivity(MElement *tet, int i, int j, int k){ vector<const MVertex*> v; @@ -7581,7 +7508,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ delete t; } - // -------------------------------------------------------------------- void Recombinator_Graph::compute_hex_ranks_blossom(){ @@ -7630,7 +7556,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ } } - // -------------------------------------------------------------------- bool Recombinator_Graph::find_face_in_blossom_info(MVertex *a, MVertex *b, MVertex *c, MVertex *d){ PETriangle *t1,*t2; @@ -7650,7 +7575,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ return false; } - // -------------------------------------------------------------------- PETriangle* Recombinator_Graph::get_triangle(MVertex*a, MVertex* b, MVertex *c){ vector<const MVertex*> v; @@ -7663,7 +7587,6 @@ bool Recombinator_Graph::is_not_good_enough(Hex* hex){ return (it_find_tri->second); } - // -------------------------------------------------------------------- bool Recombinator_Graph::is_blossom_pair(PETriangle *t1, PETriangle *t2){ tripair::iterator itfind = blossom_info.find(t1); diff --git a/Mesh/yamakawa.h b/Mesh/yamakawa.h index 3ad1d7de04b6a539a32334991d2567765e121bf1..e11f7680b21035110422082c0d371508c4ce4f14 100644 --- a/Mesh/yamakawa.h +++ b/Mesh/yamakawa.h @@ -20,11 +20,9 @@ using namespace std; -//-------------------------------------------------------------------------------------- extern void export_gregion_mesh(GRegion *gr, string filename); -//-------------------------------------------------------------------------------------- class PEEntity{ protected: @@ -68,7 +66,6 @@ class PEQuadrangle : public PEEntity{ size_t get_max_nb_vertices() const; }; -//-------------------------------------------------------------------------------------- template<class T> class clique_stop_criteria{ @@ -85,7 +82,6 @@ class clique_stop_criteria{ const unsigned int total_number_tet; }; -//-------------------------------------------------------------------------------------- template<class T> class cliques_compatibility_graph{ @@ -150,7 +146,6 @@ class cliques_compatibility_graph{ }; -//-------------------------------------------------------------------------------------- template<class T> class cliques_losses_graph : public cliques_compatibility_graph<T> { @@ -174,7 +169,6 @@ class cliques_losses_graph : public cliques_compatibility_graph<T> { graph &G; }; -//-------------------------------------------------------------------------------------- class Hex{