Commit f6300611 authored by Christophe Geuzaine's avatar Christophe Geuzaine

clang-format

parent 9ba8d0f2
Pipeline #2255 failed with stage
in 218 minutes 27 seconds
......@@ -700,9 +700,9 @@ bool BDS_Mesh::split_edge(BDS_Edge *e, BDS_Point *mid)
e->oppositeof(op);
int CHECK1 = -1, CHECK2 = -1;
if (p1->iD == CHECK1 && p2->iD == CHECK2)
printf("coucou %d %d %d %d\n",p1->iD,p2->iD,op[0]->iD,op[1]->iD);
if(p1->iD == CHECK1 && p2->iD == CHECK2)
printf("coucou %d %d %d %d\n", p1->iD, p2->iD, op[0]->iD, op[1]->iD);
double ori0 = fabs(surface_triangle_param(p2, p1, op[0])) +
fabs(surface_triangle_param(p2, p1, op[1]));
......@@ -718,8 +718,8 @@ bool BDS_Mesh::split_edge(BDS_Edge *e, BDS_Point *mid)
// return false;
}
if (p1->iD == CHECK1 && p2->iD == CHECK2)
printf("coucou 2 %d %d %d %d\n",p1->iD,p2->iD,op[0]->iD,op[1]->iD);
if(p1->iD == CHECK1 && p2->iD == CHECK2)
printf("coucou 2 %d %d %d %d\n", p1->iD, p2->iD, op[0]->iD, op[1]->iD);
BDS_Point *pts1[4];
e->faces(0)->getNodes(pts1);
......@@ -833,14 +833,17 @@ bool BDS_SwapEdgeTestQuality::operator()(BDS_Point *_p1, BDS_Point *_p2,
{
if(!testSmallTriangles) return true;
// AVOID CREATING POINTS WITH 2 NEIGHBORING TRIANGLES
// AVOID CREATING POINTS WITH 2 NEIGHBORING TRIANGLES
// std::vector<BDS_Face*> f1 = p1->getTriangles();
// std::vector<BDS_Face*> f2 = p2->getTriangles();
if (_p1->g && _p1->g->classif_degree == 2 && _p1->edges.size() <= 4)return false;
if (_p2->g && _p2->g->classif_degree == 2 && _p2->edges.size() <= 4)return false;
if (_p1->g && _p1->g->classif_degree < 2 && _p1->edges.size() <= 3)return false;
if (_p2->g && _p2->g->classif_degree < 2 && _p2->edges.size() <= 3)return false;
if(_p1->g && _p1->g->classif_degree == 2 && _p1->edges.size() <= 4)
return false;
if(_p2->g && _p2->g->classif_degree == 2 && _p2->edges.size() <= 4)
return false;
if(_p1->g && _p1->g->classif_degree < 2 && _p1->edges.size() <= 3)
return false;
if(_p2->g && _p2->g->classif_degree < 2 && _p2->edges.size() <= 3)
return false;
double s1 = fabs(surface_triangle_param(_p1, _p2, _q1));
double s2 = fabs(surface_triangle_param(_p1, _p2, _q2));
......@@ -944,11 +947,11 @@ bool BDS_SwapEdgeTestQuality::operator()(BDS_Point *_p1, BDS_Point *_p2,
bool BDS_SwapEdgeTestNormals::operator()(BDS_Point *_p1, BDS_Point *_p2,
BDS_Point *_q1, BDS_Point *_q2) const
{
// if (_p1->g && _p1->g->classif_degree == 2 && _p1->edges.size() <= 4)return false;
// if (_p2->g && _p2->g->classif_degree == 2 && _p2->edges.size() <= 4)return false;
// if (_p1->g && _p1->g->classif_degree < 2 && _p1->edges.size() <= 3)return false;
// if (_p2->g && _p2->g->classif_degree < 2 && _p2->edges.size() <= 3)return false;
// if (_p1->g && _p1->g->classif_degree == 2 && _p1->edges.size() <= 4)return
// false; if (_p2->g && _p2->g->classif_degree == 2 && _p2->edges.size() <=
// 4)return false; if (_p1->g && _p1->g->classif_degree < 2 &&
// _p1->edges.size() <= 3)return false; if (_p2->g && _p2->g->classif_degree
// < 2 && _p2->edges.size() <= 3)return false;
double s1 = fabs(surface_triangle_param(_p1, _p2, _q1));
double s2 = fabs(surface_triangle_param(_p1, _p2, _q2));
......@@ -973,9 +976,8 @@ bool BDS_SwapEdgeTestNormals::operator()(BDS_Point *_p1, BDS_Point *_p2,
double qb1 = qmTriangle::gamma(_op1, _op2, _op3);
double qb2 = qmTriangle::gamma(_oq1, _oq2, _oq3);
double mina = std::min(qa1, qa2);
double minb = std::min(qb1, qb2);
//double mina = std::min(qa1, qa2);
//double minb = std::min(qb1, qb2);
// if(minb > 5 * mina) return true;
double OLD = std::min(_ori * qa1 * _COS_N(_p1, _p2, _p3, gf),
......@@ -1248,25 +1250,28 @@ bool BDS_Mesh::collapse_edge_parametric(BDS_Edge *e, BDS_Point *p, bool force)
if(e->g->classif_degree == 2 && p->g != e->g) return false;
}
if (!force){
for (size_t i = 0 ; i < e->p1->edges.size(); i ++){
for (size_t j = 0 ; j < e->p2->edges.size(); j ++){
BDS_Point *p1 = e->p1->edges[i]->p1 == e->p1 ? e->p1->edges[i]->p2 : e->p1->edges[i]->p1;
BDS_Point *p2 = e->p2->edges[j]->p1 == e->p2 ? e->p2->edges[j]->p2 : e->p2->edges[j]->p1;
if (p1->_periodicCounterpart == p2)return false;
if(!force) {
for(size_t i = 0; i < e->p1->edges.size(); i++) {
for(size_t j = 0; j < e->p2->edges.size(); j++) {
BDS_Point *p1 = e->p1->edges[i]->p1 == e->p1 ? e->p1->edges[i]->p2 :
e->p1->edges[i]->p1;
BDS_Point *p2 = e->p2->edges[j]->p1 == e->p2 ? e->p2->edges[j]->p2 :
e->p2->edges[j]->p1;
if(p1->_periodicCounterpart == p2) return false;
}
}
}
if(e->numfaces() == 2) {
BDS_Point *oface[2];
e->oppositeof(oface);
for (size_t i = 0; i < oface[0]->edges.size();i++){
if ( oface[0]->edges[i]->p1 == oface[0] &&
oface[0]->edges[i]->p2 == oface[1] )return false;
if ( oface[0]->edges[i]->p1 == oface[1] &&
oface[0]->edges[i]->p2 == oface[0] )return false;
for(size_t i = 0; i < oface[0]->edges.size(); i++) {
if(oface[0]->edges[i]->p1 == oface[0] &&
oface[0]->edges[i]->p2 == oface[1])
return false;
if(oface[0]->edges[i]->p1 == oface[1] &&
oface[0]->edges[i]->p2 == oface[0])
return false;
}
if(!force && oface[0]->g && oface[0]->g->classif_degree == 2 &&
oface[0]->edges.size() <= 4)
......@@ -1281,7 +1286,7 @@ bool BDS_Mesh::collapse_edge_parametric(BDS_Edge *e, BDS_Point *p, bool force)
oface[1]->edges.size() <= 3)
return false;
}
std::vector<BDS_Face *> t = p->getTriangles();
BDS_Point *o = e->othervertex(p);
......
......@@ -157,8 +157,8 @@ public:
std::vector<BDS_Face *> getTriangles() const;
BDS_Point(int id, double x = 0, double y = 0, double z = 0)
: _lcBGM(1.e22), _lcPTS(1.e22), X(x), Y(y), Z(z), u(0), v(0),
config_modified(true), degenerated(false),
_periodicCounterpart(NULL), iD(id), g(0)
config_modified(true), degenerated(false), _periodicCounterpart(NULL),
iD(id), g(0)
{
}
};
......
This diff is collapsed.
......@@ -6,7 +6,6 @@
#ifndef _BACKGROUND_MESH_BASE_H_
#define _BACKGROUND_MESH_BASE_H_
#include <string>
#include <map>
#include <vector>
......@@ -19,7 +18,6 @@
//#include <tr1/unordered_map>
//#include <tr1/unordered_set>
class MElementOctree;
class GFace;
class GRegion;
......@@ -30,68 +28,84 @@ class MElement;
class MVertex;
class GEntity;
class BGMBase{
public:
typedef MVertex const* const hash_key_ptr;
// typedef tr1::unordered_map<hash_key_ptr, STensor3 > TensorStorageType;
// typedef tr1::unordered_map<hash_key_ptr, double > DoubleStorageType;
// typedef tr1::unordered_map<hash_key_ptr, vector<double> > VectorStorageType;
typedef std::map<hash_key_ptr, STensor3 > TensorStorageType;
typedef std::map<hash_key_ptr, double > DoubleStorageType;
typedef std::map<hash_key_ptr, std::vector<double> > VectorStorageType;
protected:
mutable MElementOctree *octree;
GEntity *gf;
DoubleStorageType sizeField; // an attached size field
int DIM,order;
virtual void export_scalar(const std::string &filename, const DoubleStorageType&) const;
virtual void export_vector(const std::string &filename, const VectorStorageType&) const;
virtual void export_tensor_as_vectors(const std::string &filename, const TensorStorageType &_whatToPrint)const;
virtual void propagateValues(DoubleStorageType &dirichlet, simpleFunction<double> &eval_diffusivity, bool in_parametric_plane = false)=0;
virtual void computeSizeField()=0;
virtual GPoint get_GPoint_from_MVertex(const MVertex *) const=0;
virtual const MElement* getElement(unsigned int i)const=0;
virtual unsigned int getNumMeshElements()const=0;
virtual std::vector<double> get_nodal_values(const MElement *e,const DoubleStorageType &data)const;
virtual std::vector<std::vector<double> > get_nodal_values(const MElement *e,const VectorStorageType &data)const;
virtual std::vector<double> get_nodal_value(const MVertex *v,const VectorStorageType &data)const;
virtual double get_nodal_value(const MVertex *v,const DoubleStorageType &data)const;
virtual std::vector<double> get_element_uvw_from_xyz (const MElement *e, double x, double y,double z) const;
virtual double get_field_value(double u, double v, double w, const DoubleStorageType &data);
virtual std::vector<double> get_field_value(double u, double v, double w, const VectorStorageType &data);
public:
BGMBase(int dim,GEntity *_gf);
~BGMBase();
virtual MElementOctree* getOctree()=0;
virtual GEntity* getBackgroundGEntity();
virtual double size(double u, double v, double w=0.);// get the size field, element interpolation
virtual double size(const MVertex *v);// get the nodal size field
virtual bool inDomain (double u, double v, double w=0.);
virtual inline void exportSizeField(const std::string &filename) const{export_scalar(filename,sizeField);};
// warning: these are "3D", "real" vertices, not copies in a parametric domain
virtual std::set<MVertex*> get_vertices_of_maximum_dim(int dim);
virtual const MElement* findElement(double u, double v, double w=0.,bool strict=true);
class BGMBase {
public:
typedef MVertex const *const hash_key_ptr;
// typedef tr1::unordered_map<hash_key_ptr, STensor3 > TensorStorageType;
// typedef tr1::unordered_map<hash_key_ptr, double > DoubleStorageType;
// typedef tr1::unordered_map<hash_key_ptr, vector<double> >
// VectorStorageType;
typedef std::map<hash_key_ptr, STensor3> TensorStorageType;
typedef std::map<hash_key_ptr, double> DoubleStorageType;
typedef std::map<hash_key_ptr, std::vector<double> > VectorStorageType;
protected:
mutable MElementOctree *octree;
GEntity *gf;
DoubleStorageType sizeField; // an attached size field
int DIM, order;
virtual void export_scalar(const std::string &filename,
const DoubleStorageType &) const;
virtual void export_vector(const std::string &filename,
const VectorStorageType &) const;
virtual void
export_tensor_as_vectors(const std::string &filename,
const TensorStorageType &_whatToPrint) const;
virtual void propagateValues(DoubleStorageType &dirichlet,
simpleFunction<double> &eval_diffusivity,
bool in_parametric_plane = false) = 0;
virtual void computeSizeField() = 0;
virtual GPoint get_GPoint_from_MVertex(const MVertex *) const = 0;
virtual const MElement *getElement(unsigned int i) const = 0;
virtual unsigned int getNumMeshElements() const = 0;
virtual std::vector<double>
get_nodal_values(const MElement *e, const DoubleStorageType &data) const;
virtual std::vector<std::vector<double> >
get_nodal_values(const MElement *e, const VectorStorageType &data) const;
virtual std::vector<double>
get_nodal_value(const MVertex *v, const VectorStorageType &data) const;
virtual double get_nodal_value(const MVertex *v,
const DoubleStorageType &data) const;
virtual std::vector<double> get_element_uvw_from_xyz(const MElement *e,
double x, double y,
double z) const;
virtual double get_field_value(double u, double v, double w,
const DoubleStorageType &data);
virtual std::vector<double> get_field_value(double u, double v, double w,
const VectorStorageType &data);
public:
BGMBase(int dim, GEntity *_gf);
~BGMBase();
virtual MElementOctree *getOctree() = 0;
virtual GEntity *getBackgroundGEntity();
virtual double
size(double u, double v,
double w = 0.); // get the size field, element interpolation
virtual double size(const MVertex *v); // get the nodal size field
virtual bool inDomain(double u, double v, double w = 0.);
virtual inline void exportSizeField(const std::string &filename) const
{
export_scalar(filename, sizeField);
};
// warning: these are "3D", "real" vertices, not copies in a parametric domain
virtual std::set<MVertex *> get_vertices_of_maximum_dim(int dim);
virtual const MElement *findElement(double u, double v, double w = 0.,
bool strict = true);
};
#endif
This diff is collapsed.
......@@ -23,80 +23,98 @@ class GEdge;
class MElement;
class MVertex;
struct crossField2d
{
struct crossField2d {
double _angle;
static void normalizeAngle (double &angle) {
if (angle < 0)
while ( angle < 0 ) angle += (M_PI * .5);
else if (angle >= M_PI * .5)
while ( angle >= M_PI * .5 ) angle -= (M_PI * .5);
static void normalizeAngle(double &angle)
{
if(angle < 0)
while(angle < 0) angle += (M_PI * .5);
else if(angle >= M_PI * .5)
while(angle >= M_PI * .5) angle -= (M_PI * .5);
}
crossField2d (MVertex*, GEdge*);
crossField2d (double a) : _angle(a){}
crossField2d & operator += ( const crossField2d & );
crossField2d(MVertex *, GEdge *);
crossField2d(double a) : _angle(a) {}
crossField2d &operator+=(const crossField2d &);
};
class backgroundMesh : public simpleFunction<double>
{
class backgroundMesh : public simpleFunction<double> {
MElementOctree *_octree;
std::vector<MVertex*> _vertices;
std::vector<MElement*> _triangles;
std::map<MVertex*,double> _sizes;
std::map<MVertex*,MVertex*> _3Dto2D;
std::map<MVertex*,MVertex*> _2Dto3D;
std::map<MVertex*,double> _distance;
std::map<MVertex*,double> _angles;
static backgroundMesh * _current;
std::vector<MVertex *> _vertices;
std::vector<MElement *> _triangles;
std::map<MVertex *, double> _sizes;
std::map<MVertex *, MVertex *> _3Dto2D;
std::map<MVertex *, MVertex *> _2Dto3D;
std::map<MVertex *, double> _distance;
std::map<MVertex *, double> _angles;
static backgroundMesh *_current;
backgroundMesh(GFace *, bool dist = false);
~backgroundMesh();
#if defined(HAVE_ANN)
mutable ANNkd_tree *uv_kdtree;
mutable ANNpointArray nodes;
ANNidxArray index;
ANNdistArray dist;
mutable ANNpointArray angle_nodes;
mutable ANNkd_tree *angle_kdtree;
std::vector<double> _cos,_sin;
mutable ANNkd_tree *uv_kdtree;
mutable ANNpointArray nodes;
ANNidxArray index;
ANNdistArray dist;
mutable ANNpointArray angle_nodes;
mutable ANNkd_tree *angle_kdtree;
std::vector<double> _cos, _sin;
#endif
public:
public:
static void set(GFace *);
static void setCrossFieldsByDistance(GFace *);
static void unset();
static backgroundMesh *current () { return _current; }
static backgroundMesh *current() { return _current; }
void propagate1dMesh(GFace *);
void propagateCrossField(GFace *, simpleFunction<double> *);
void propagateCrossFieldHJ(GFace *);
void propagateCrossField(GFace *);
void propagateCrossFieldByDistance(GFace *);
void updateSizes(GFace *);
double operator () (double u, double v, double w) const; // returns mesh size
bool inDomain (double u, double v, double w) const; // returns true if in domain
double getAngle(double u, double v, double w) const ;
double getSmoothness(double u, double v, double w) ;
double getSmoothness(MElement*) ;
double operator()(double u, double v, double w) const; // returns mesh size
bool inDomain(double u, double v,
double w) const; // returns true if in domain
double getAngle(double u, double v, double w) const;
double getSmoothness(double u, double v, double w);
double getSmoothness(MElement *);
void print(const std::string &filename, GFace *gf,
const std::map<MVertex*, double>&, int smooth = 0) ;
const std::map<MVertex *, double> &, int smooth = 0);
void print(const std::string &filename, GFace *gf, int choice = 0)
{
switch(choice) {
case 0 : print(filename, gf, _sizes); return;
case 2 : print(filename, gf, _sizes, 1); return;
default : print(filename, gf, _angles); return;
case 0: print(filename, gf, _sizes); return;
case 2: print(filename, gf, _sizes, 1); return;
default: print(filename, gf, _angles); return;
}
}
MElementOctree* get_octree();
MElement *getMeshElementByCoord(double u, double v, double w, bool strict=true);
int getNumMeshElements()const{return _triangles.size();}
std::vector<MVertex*>::iterator begin_vertices(){return _vertices.begin();}
std::vector<MVertex*>::iterator end_vertices(){return _vertices.end();}
std::vector<MVertex*>::const_iterator begin_vertices()const{return _vertices.begin();}
std::vector<MVertex*>::const_iterator end_vertices()const{return _vertices.end();}
std::vector<MElement*>::iterator begin_triangles(){return _triangles.begin();}
std::vector<MElement*>::iterator end_triangles(){return _triangles.end();}
std::vector<MElement*>::const_iterator begin_triangles()const{return _triangles.begin();}
std::vector<MElement*>::const_iterator end_triangles()const{return _triangles.end();}
MElementOctree *get_octree();
MElement *getMeshElementByCoord(double u, double v, double w,
bool strict = true);
int getNumMeshElements() const { return _triangles.size(); }
std::vector<MVertex *>::iterator begin_vertices()
{
return _vertices.begin();
}
std::vector<MVertex *>::iterator end_vertices() { return _vertices.end(); }
std::vector<MVertex *>::const_iterator begin_vertices() const
{
return _vertices.begin();
}
std::vector<MVertex *>::const_iterator end_vertices() const
{
return _vertices.end();
}
std::vector<MElement *>::iterator begin_triangles()
{
return _triangles.begin();
}
std::vector<MElement *>::iterator end_triangles() { return _triangles.end(); }
std::vector<MElement *>::const_iterator begin_triangles() const
{
return _triangles.begin();
}
std::vector<MElement *>::const_iterator end_triangles() const
{
return _triangles.end();
}
};
#endif
This diff is collapsed.
......@@ -6,7 +6,6 @@
#ifndef _BACKGROUND_MESH2D_H_
#define _BACKGROUND_MESH2D_H_
#include <string>
#include <map>
#include <vector>
......@@ -18,10 +17,10 @@
class MTriangle;
/*
The backgroundMesh2D creates a bunch of triangles on the parametric space of a GFace.
Those triangles are local to the backgroundMesh2D so that
they do not depend on the actual mesh that can be deleted.
It extends the sizefield from the edges.
The backgroundMesh2D creates a bunch of triangles on the parametric space of
a GFace. Those triangles are local to the backgroundMesh2D so that they do
not depend on the actual mesh that can be deleted. It extends the sizefield
from the edges.
*/
class backgroundMesh2D : public BGMBase {
protected:
......@@ -29,56 +28,83 @@ protected:
simpleFunction<double> &eval_diffusivity,
bool in_parametric_plane = false);
virtual void computeSizeField();
virtual inline unsigned int getNumMeshElements()const{return elements.size();}
virtual const MElement* getElement(unsigned int i)const;
virtual inline unsigned int getNumMeshElements() const
{
return elements.size();
}
virtual const MElement *getElement(unsigned int i) const;
virtual GPoint get_GPoint_from_MVertex(const MVertex *) const;
// only 2D:
void updateSizes();
// copy the mesh stored in GFace in local
void create_mesh_copy();
// creates a mesh of GFace and store it in local !!!, does not store the mesh in GFace !
// creates a mesh of GFace and store it in local !!!, does not store the mesh
// in GFace !
void create_face_mesh();
double sizeFactor;
std::vector<MTriangle*> tempTR;
std::vector<MElement*> elements;
std::vector<MVertex*> vertices;
std::map<MVertex const* const, MVertex*> _3Dto2D;
std::map<MVertex const* const, MVertex*> _2Dto3D;
std::vector<MTriangle *> tempTR;
std::vector<MElement *> elements;
std::vector<MVertex *> vertices;
std::map<MVertex const *const, MVertex *> _3Dto2D;
std::map<MVertex const *const, MVertex *> _2Dto3D;
public:
backgroundMesh2D(GFace *, bool erase_2D3D=true);
backgroundMesh2D(GFace *, bool erase_2D3D = true);
virtual ~backgroundMesh2D();
virtual MElementOctree* getOctree();
virtual MElementOctree *getOctree();
// TODO: only 2D
virtual void reset(bool erase_2D3D=true);// deletes everything and rebuild with GFace*
virtual void unset();// deletes everything... called by destructor.
virtual void
reset(bool erase_2D3D = true); // deletes everything and rebuild with GFace*
virtual void unset(); // deletes everything... called by destructor.
// not used !!!! TODO !!!
void setSizeFactor (double s) {sizeFactor = s;}
virtual std::vector<MVertex*>::iterator beginvertices(){ return vertices.begin(); }
virtual std::vector<MVertex*>::iterator endvertices(){ return vertices.end(); }
virtual std::vector<MElement*>::iterator beginelements(){ return elements.begin(); }
virtual std::vector<MElement*>::iterator endelements(){ return elements.end(); }
virtual std::vector<MVertex*>::const_iterator beginvertices() const { return vertices.begin(); }
virtual std::vector<MVertex*>::const_iterator endvertices() const { return vertices.end(); }
virtual std::vector<MElement*>::const_iterator beginelements() const { return elements.begin(); }
virtual std::vector<MElement*>::const_iterator endelements() const { return elements.end(); }
};
void setSizeFactor(double s) { sizeFactor = s; }
class RK_form{ // informations for RK at one point
public:
RK_form() : angle(0.), localsize(0.)
virtual std::vector<MVertex *>::iterator beginvertices()
{
return vertices.begin();
}
virtual std::vector<MVertex *>::iterator endvertices()
{
return vertices.end();
}
virtual std::vector<MElement *>::iterator beginelements()
{
return elements.begin();
}
virtual std::vector<MElement *>::iterator endelements()
{
return elements.end();
}
virtual std::vector<MVertex *>::const_iterator beginvertices() const
{
return vertices.begin();
}
virtual std::vector<MVertex *>::const_iterator endvertices() const
{
return vertices.end();
}
virtual std::vector<MElement *>::const_iterator beginelements() const
{
return elements.begin();
}
virtual std::vector<MElement *>::const_iterator endelements() const
{
return elements.end();
}
};
class RK_form { // informations for RK at one point
public:
RK_form() : angle(0.), localsize(0.) {}
SMetric3 metricField;
SVector3 t1, t2;// 3D cross field directions
SVector3 normal;// 3D cross field directions
std::pair<double,double> h;// 3D sizes
std::pair<double,double> paramh;// sizes in parametric domain
SVector3 t1, t2; // 3D cross field directions
SVector3 normal; // 3D cross field directions
std::pair<double, double> h; // 3D sizes
std::pair<double, double> paramh; // sizes in parametric domain
SPoint2 paramt1, paramt2;
double angle, localsize;
};
......@@ -86,7 +112,7 @@ public:
class frameFieldBackgroundMesh2D : public backgroundMesh2D {
private:
// specification for cross field
DoubleStorageType angles; // an attached angle
DoubleStorageType angles; // an attached angle
DoubleStorageType smoothness;
void computeCrossField(simpleFunction<double> &eval_diffusivity);
void computeSmoothness();
......@@ -95,7 +121,7 @@ public:
frameFieldBackgroundMesh2D(GFace *_gf);
virtual ~frameFieldBackgroundMesh2D();
virtual void reset(bool erase_2D3D=true);
virtual void reset(bool erase_2D3D = true);
double angle(double u, double v);
double angle(MVertex *v);
......@@ -107,13 +133,14 @@ public:
void eval_crossfield(MVertex *vert, STensor3 &cf);
void exportCrossField(const std::string &filename);
Pair<SVector3, SVector3> compute_crossfield_directions(double u,double v,
Pair<SVector3, SVector3> compute_crossfield_directions(double u, double v,
double angle_current);
bool compute_RK_infos(double u,double v, double x, double y, double z,RK_form &infos);
bool compute_RK_infos(double u, double v, double x, double y, double z,
RK_form &infos);
void exportSmoothness(const std::string &filename) const
{
export_scalar(filename,smoothness);
export_scalar(filename, smoothness);
}
};
......
This diff is collapsed.
......@@ -23,57 +23,61 @@ class ANNkd_tree;
// account vertices at a given topological distance... but using distance=1, it
// seems to work... ?!
class montripletbis{
class montripletbis {
public:
~montripletbis(){};
montripletbis(int a,int b, int c):vec(3){
montripletbis(int a, int b, int c) : vec(3)
{
vec[0] = a;
vec[1] = b;
vec[2] = c;
};
inline int operator()(int i)const{return vec[i];}
inline int operator()(int i) const { return vec[i]; }
private:
std::vector<int> vec;
};
// difference with BackgroundMesh2D: no copy of components, working directly on the vertices and elements of GRegion
// difference with BackgroundMesh2D: no copy of components, working directly on
// the vertices and elements of GRegion
class backgroundMesh3D : public BGMBase {
protected:
virtual void computeSizeField();
virtual void propagateValues(DoubleStorageType &dirichlet, simpleFunction<double> &eval_diffusivity, bool in_parametric_plane = false);
virtual void propagateValues(DoubleStorageType &dirichlet,