diff --git a/Common/License.cpp b/Common/License.cpp index daa50343c849fc4dae94d15775dbc830b7a774e8..c1c22f0f32bc6f1cdf5b820b0c92cb3f5d59a481 100644 --- a/Common/License.cpp +++ b/Common/License.cpp @@ -1,4 +1,4 @@ -// $Id: License.cpp,v 1.8 2007-01-18 09:12:44 geuzaine Exp $ +// $Id: License.cpp,v 1.9 2007-01-28 17:26:53 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -23,6 +23,27 @@ void print_license(void) { + Msg(DIRECT, "Gmsh is provided under the terms of the GNU General Public License"); + Msg(DIRECT, "(GPL) with the following exception:"); + Msg(DIRECT, " "); + Msg(DIRECT, " The copyright holders of Gmsh give you permission to combine Gmsh"); + Msg(DIRECT, " with code included in the standard release of Triangle (written by"); + Msg(DIRECT, " Jonathan Shewchuk), TetGen (written by Hang Si) and Netgen (written"); + Msg(DIRECT, " by Joachim Schoberl) under their respective licenses. You may copy"); + Msg(DIRECT, " and distribute such a system following the terms of the GNU GPL for"); + Msg(DIRECT, " Gmsh and the licenses of the other code concerned, provided that you"); + Msg(DIRECT, " include the source code of that other code when and as the GNU GPL"); + Msg(DIRECT, " requires distribution of source code."); + Msg(DIRECT, " "); + Msg(DIRECT, " Note that people who make modified versions of Gmsh are not"); + Msg(DIRECT, " obligated to grant this special exception for their modified"); + Msg(DIRECT, " versions; it is their choice whether to do so. The GNU General"); + Msg(DIRECT, " Public License gives permission to release a modified version"); + Msg(DIRECT, " without this exception; this exception also makes it possible to"); + Msg(DIRECT, " release a modified version which carries forward this exception."); + Msg(DIRECT, " "); + Msg(DIRECT, "End of exception."); + Msg(DIRECT, " "); Msg(DIRECT, " GNU GENERAL PUBLIC LICENSE"); Msg(DIRECT, " Version 2, June 1991"); Msg(DIRECT, " "); diff --git a/Geo/GEntity.h b/Geo/GEntity.h index 4547423bc22263d4acf8c84bcd31cc67eff2d2b6..25e692e1edd5e972b17ddfc2e21c062ef49c0975 100644 --- a/Geo/GEntity.h +++ b/Geo/GEntity.h @@ -128,9 +128,6 @@ class GEntity { // Spatial dimension of the entity virtual int dim() const { throw; } - // Returns true if ent is in the closure of this entity - virtual int inClosure(GEntity *ent) const { throw; } - // Regions that bound this entity or that this entity bounds. virtual std::list<GRegion*> regions() const { throw; } diff --git a/Geo/MElement.h b/Geo/MElement.h index 0546c3753f05e2de954bd0f6696d5064c9b2e489..2d01526fc70d7a48e49619cdc9c9c9c1e5e9ee98 100644 --- a/Geo/MElement.h +++ b/Geo/MElement.h @@ -82,15 +82,19 @@ class MElement // get the vertex using the Nastran BDF ordering virtual MVertex *getVertexBDF(int num){ return getVertex(num); } - // get the number of primary vertices (first-order element) - virtual int getNumPrimaryVertices() = 0; - // get the number of vertices associated with edges, faces and // volumes (nonzero only for higher order elements) virtual int getNumEdgeVertices(){ return 0; } virtual int getNumFaceVertices(){ return 0; } virtual int getNumVolumeVertices(){ return 0; } + // get the number of primary vertices (first-order element) + int getNumPrimaryVertices() + { + return getNumVertices() - getNumEdgeVertices() - + getNumFaceVertices() - getNumVolumeVertices(); + } + // get the edges virtual int getNumEdges() = 0; virtual MEdge getEdge(int num) = 0; @@ -181,7 +185,6 @@ class MLine : public MElement { ~MLine(){} virtual int getDim(){ return 1; } virtual int getNumVertices(){ return 2; } - virtual int getNumPrimaryVertices(){ return 2; } virtual MVertex *getVertex(int num){ return _v[num]; } virtual int getNumEdges(){ return 1; } virtual MEdge getEdge(int num){ return MEdge(_v[0], _v[1]); } @@ -205,11 +208,13 @@ class MLine3 : public MLine { : MLine(v0, v1, num, part) { _vs[0] = v2; + _vs[0]->setPolynomialOrder(2); } MLine3(std::vector<MVertex*> &v, int num=0, int part=0) : MLine(v, num, part) { _vs[0] = v[2]; + _vs[0]->setPolynomialOrder(2); } ~MLine3(){} virtual int getPolynomialOrder(){ return 2; } @@ -262,7 +267,6 @@ class MTriangle : public MElement { double getSurfaceXY() const; bool invertmappingXY(double *p, double *uv, double tol = 1.e-8); virtual int getNumVertices(){ return 3; } - virtual int getNumPrimaryVertices(){ return 3; } virtual MVertex *getVertex(int num){ return _v[num]; } virtual int getNumEdges(){ return 3; } virtual MEdge getEdge(int num) @@ -298,11 +302,13 @@ class MTriangle6 : public MTriangle { : MTriangle(v0, v1, v2, num, part) { _vs[0] = v3; _vs[1] = v4; _vs[2] = v5; + for(int i = 0; i < 3; i++) _vs[i]->setPolynomialOrder(2); } MTriangle6(std::vector<MVertex*> &v, int num=0, int part=0) : MTriangle(v, num, part) { for(int i = 0; i < 3; i++) _vs[i] = v[3 + i]; + for(int i = 0; i < 3; i++) _vs[i]->setPolynomialOrder(2); } ~MTriangle6(){} virtual int getPolynomialOrder(){ return 2; } @@ -401,7 +407,6 @@ class MQuadrangle : public MElement { ~MQuadrangle(){} virtual int getDim(){ return 2; } virtual int getNumVertices(){ return 4; } - virtual int getNumPrimaryVertices(){ return 4; } virtual MVertex *getVertex(int num){ return _v[num]; } virtual int getNumEdges(){ return 4; } virtual MEdge getEdge(int num) @@ -435,11 +440,13 @@ class MQuadrangle8 : public MQuadrangle { : MQuadrangle(v0, v1, v2, v3, num, part) { _vs[0] = v4; _vs[1] = v5; _vs[2] = v6; _vs[3] = v7; + for(int i = 0; i < 4; i++) _vs[i]->setPolynomialOrder(2); } MQuadrangle8(std::vector<MVertex*> &v, int num=0, int part=0) : MQuadrangle(v, num, part) { for(int i = 0; i < 4; i++) _vs[i] = v[4 + i]; + for(int i = 0; i < 4; i++) _vs[i]->setPolynomialOrder(2); } ~MQuadrangle8(){} virtual int getPolynomialOrder(){ return 2; } @@ -497,11 +504,13 @@ class MQuadrangle9 : public MQuadrangle { : MQuadrangle(v0, v1, v2, v3, num, part) { _vs[0] = v4; _vs[1] = v5; _vs[2] = v6; _vs[3] = v7; _vs[4] = v8; + for(int i = 0; i < 5; i++) _vs[i]->setPolynomialOrder(2); } MQuadrangle9(std::vector<MVertex*> &v, int num=0, int part=0) : MQuadrangle(v, num, part) { for(int i = 0; i < 5; i++) _vs[i] = v[4 + i]; + for(int i = 0; i < 5; i++) _vs[i]->setPolynomialOrder(2); } ~MQuadrangle9(){} virtual int getPolynomialOrder(){ return 2; } @@ -561,7 +570,6 @@ class MTetrahedron : public MElement { ~MTetrahedron(){} virtual int getDim(){ return 3; } virtual int getNumVertices(){ return 4; } - virtual int getNumPrimaryVertices(){ return 4; } virtual MVertex *getVertex(int num){ return _v[num]; } virtual int getNumEdges(){ return 6; } virtual MEdge getEdge(int num) @@ -674,11 +682,13 @@ class MTetrahedron10 : public MTetrahedron { : MTetrahedron(v0, v1, v2, v3, num, part) { _vs[0] = v4; _vs[1] = v5; _vs[2] = v6; _vs[3] = v7; _vs[4] = v8; _vs[5] = v9; + for(int i = 0; i < 6; i++) _vs[i]->setPolynomialOrder(2); } MTetrahedron10(std::vector<MVertex*> &v, int num=0, int part=0) : MTetrahedron(v, num, part) { for(int i = 0; i < 6; i++) _vs[i] = v[4 + i]; + for(int i = 0; i < 6; i++) _vs[i]->setPolynomialOrder(2); } ~MTetrahedron10(){} virtual int getPolynomialOrder(){ return 2; } @@ -753,7 +763,6 @@ class MHexahedron : public MElement { ~MHexahedron(){} virtual int getDim(){ return 3; } virtual int getNumVertices(){ return 8; } - virtual int getNumPrimaryVertices(){ return 8; } virtual MVertex *getVertex(int num){ return _v[num]; } virtual int getNumEdges(){ return 12; } virtual MEdge getEdge(int num) @@ -830,11 +839,13 @@ class MHexahedron20 : public MHexahedron { _vs[0] = v8; _vs[1] = v9; _vs[2] = v10; _vs[3] = v11; _vs[4] = v12; _vs[5] = v13; _vs[6] = v14; _vs[7] = v15; _vs[8] = v16; _vs[9] = v17; _vs[10] = v18; _vs[11] = v19; + for(int i = 0; i < 12; i++) _vs[i]->setPolynomialOrder(2); } MHexahedron20(std::vector<MVertex*> &v, int num=0, int part=0) : MHexahedron(v, num, part) { for(int i = 0; i < 12; i++) _vs[i] = v[8 + i]; + for(int i = 0; i < 12; i++) _vs[i]->setPolynomialOrder(2); } ~MHexahedron20(){} virtual int getPolynomialOrder(){ return 2; } @@ -935,11 +946,13 @@ class MHexahedron27 : public MHexahedron { _vs[5] = v13; _vs[6] = v14; _vs[7] = v15; _vs[8] = v16; _vs[9] = v17; _vs[10] = v18; _vs[11] = v19; _vs[12] = v20; _vs[13] = v21; _vs[14] = v22; _vs[15] = v23; _vs[16] = v24; _vs[17] = v25; _vs[18] = v26; + for(int i = 0; i < 19; i++) _vs[i]->setPolynomialOrder(2); } MHexahedron27(std::vector<MVertex*> &v, int num=0, int part=0) : MHexahedron(v, num, part) { for(int i = 0; i < 19; i++) _vs[i] = v[8 + i]; + for(int i = 0; i < 19; i++) _vs[i]->setPolynomialOrder(2); } ~MHexahedron27(){} virtual int getPolynomialOrder(){ return 2; } @@ -1020,7 +1033,6 @@ class MPrism : public MElement { ~MPrism(){} virtual int getDim(){ return 3; } virtual int getNumVertices(){ return 6; } - virtual int getNumPrimaryVertices(){ return 6; } virtual MVertex *getVertex(int num){ return _v[num]; } virtual int getNumEdges(){ return 9; } virtual MEdge getEdge(int num) @@ -1098,11 +1110,13 @@ class MPrism15 : public MPrism { { _vs[0] = v6; _vs[1] = v7; _vs[2] = v8; _vs[3] = v9; _vs[4] = v10; _vs[5] = v11; _vs[6] = v12; _vs[7] = v13; _vs[8] = v14; + for(int i = 0; i < 9; i++) _vs[i]->setPolynomialOrder(2); } MPrism15(std::vector<MVertex*> &v, int num=0, int part=0) : MPrism(v, num, part) { for(int i = 0; i < 9; i++) _vs[i] = v[6 + i]; + for(int i = 0; i < 9; i++) _vs[i]->setPolynomialOrder(2); } ~MPrism15(){} virtual int getPolynomialOrder(){ return 2; } @@ -1188,11 +1202,13 @@ class MPrism18 : public MPrism { _vs[0] = v6; _vs[1] = v7; _vs[2] = v8; _vs[3] = v9; _vs[4] = v10; _vs[5] = v11; _vs[6] = v12; _vs[7] = v13; _vs[8] = v14; _vs[9] = v15; _vs[10] = v16; _vs[11] = v17; + for(int i = 0; i < 12; i++) _vs[i]->setPolynomialOrder(2); } MPrism18(std::vector<MVertex*> &v, int num=0, int part=0) : MPrism(v, num, part) { for(int i = 0; i < 12; i++) _vs[i] = v[6 + i]; + for(int i = 0; i < 12; i++) _vs[i]->setPolynomialOrder(2); } ~MPrism18(){} virtual int getPolynomialOrder(){ return 2; } @@ -1271,7 +1287,6 @@ class MPyramid : public MElement { ~MPyramid(){} virtual int getDim(){ return 3; } virtual int getNumVertices(){ return 5; } - virtual int getNumPrimaryVertices(){ return 5; } virtual MVertex *getVertex(int num){ return _v[num]; } virtual int getNumEdges(){ return 8; } virtual MEdge getEdge(int num) @@ -1345,11 +1360,13 @@ class MPyramid13 : public MPyramid { { _vs[0] = v5; _vs[1] = v6; _vs[2] = v7; _vs[3] = v8; _vs[4] = v9; _vs[5] = v10; _vs[6] = v11; _vs[7] = v12; + for(int i = 0; i < 8; i++) _vs[i]->setPolynomialOrder(2); } MPyramid13(std::vector<MVertex*> &v, int num=0, int part=0) : MPyramid(v, num, part) { for(int i = 0; i < 8; i++) _vs[i] = v[5 + i]; + for(int i = 0; i < 8; i++) _vs[i]->setPolynomialOrder(2); } ~MPyramid13(){} virtual int getPolynomialOrder(){ return 2; } @@ -1420,11 +1437,13 @@ class MPyramid14 : public MPyramid { { _vs[0] = v5; _vs[1] = v6; _vs[2] = v7; _vs[3] = v8; _vs[4] = v9; _vs[5] = v10; _vs[6] = v11; _vs[7] = v12; _vs[8] = v13; + for(int i = 0; i < 9; i++) _vs[i]->setPolynomialOrder(2); } MPyramid14(std::vector<MVertex*> &v, int num=0, int part=0) : MPyramid(v, num, part) { for(int i = 0; i < 9; i++) _vs[i] = v[5 + i]; + for(int i = 0; i < 9; i++) _vs[i]->setPolynomialOrder(2); } ~MPyramid14(){} virtual int getPolynomialOrder(){ return 2; } diff --git a/Geo/MVertex.h b/Geo/MVertex.h index 3501aa873519e81df6c5bc7c8f37dd3f31c705c6..ba4b9c1ca64bbeabe4dbbe918e179e0f0627a19f 100644 --- a/Geo/MVertex.h +++ b/Geo/MVertex.h @@ -31,13 +31,13 @@ class MVertex{ private: static int _globalNum; int _num; - char _visible; + char _visible, _order; double _x, _y, _z; GEntity *_ge; public : MVertex(double x, double y, double z, GEntity *ge=0, int num=0) - : _visible(true), _x(x), _y(y), _z(z), _ge(ge) + : _visible(true), _order(1), _x(x), _y(y), _z(z), _ge(ge) { if(num){ _num = num; @@ -56,24 +56,25 @@ class MVertex{ virtual char getVisibility(){ return _visible; } virtual void setVisibility(char val){ _visible = val; } - // get the "order" of the vertex - virtual int getOrder(){ return 1; } + // get the "polynomial order" of the vertex + inline int getPolynomialOrder(){ return _order; } + inline int setPolynomialOrder(char order){ _order = order; } // get/set the coordinates - inline double x() const {return _x;} - inline double y() const {return _y;} - inline double z() const {return _z;} - inline double & x() {return _x;} - inline double & y() {return _y;} - inline double & z() {return _z;} + inline double x() const { return _x; } + inline double y() const { return _y; } + inline double z() const { return _z; } + inline double & x() { return _x; } + inline double & y() { return _y; } + inline double & z() { return _z; } inline SPoint3 point() { return SPoint3(_x, _y, _z); } // get/set the parent entity - inline GEntity* onWhat() const {return _ge;} + inline GEntity* onWhat() const { return _ge; } inline void setEntity(GEntity *ge) { _ge = ge; } // get/set the number - inline int getNum() const {return _num;} + inline int getNum() const { return _num; } inline void setNum(int num) { _num = num; } // get/set ith parameter @@ -102,13 +103,6 @@ class MVertex{ void writeBDF(FILE *fp, int format=0, double scalingFactor=1.0); }; -class MVertex2 : public MVertex { - public: - MVertex2(double x, double y, double z, GEntity *ge=0, int num=0) - : MVertex(x, y, z, ge, num){} - virtual int getOrder(){ return 2; } -}; - class MEdgeVertex : public MVertex{ protected: double _u; @@ -122,13 +116,6 @@ class MEdgeVertex : public MVertex{ virtual bool setParameter(int i, double par){ _u = par; return true; } }; -class MEdgeVertex2 : public MEdgeVertex{ - public: - MEdgeVertex2(double x, double y, double z, GEntity *ge, double u) - : MEdgeVertex(x, y, z, ge, u) {} - virtual int getOrder(){ return 2; } -}; - class MFaceVertex : public MVertex{ protected: double _u, _v; @@ -142,13 +129,6 @@ class MFaceVertex : public MVertex{ virtual bool setParameter(int i, double par){ if(!i) _u = par; else _v = par; return true; } }; -class MFaceVertex2 : public MFaceVertex{ - public: - MFaceVertex2(double x, double y, double z, GEntity *ge, double u, double v) - : MFaceVertex(x, y, z, ge, u, v){} - virtual int getOrder(){ return 2; } -}; - template<class T> class MDataFaceVertex : public MFaceVertex{ private: diff --git a/Graphics/Mesh.cpp b/Graphics/Mesh.cpp index b76c422a80f34315ac79ac6892b12b24c226e6e5..571bc78297fdd5f4c5579aa85937f2f4627184ee 100644 --- a/Graphics/Mesh.cpp +++ b/Graphics/Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: Mesh.cpp,v 1.195 2007-01-26 17:51:55 geuzaine Exp $ +// $Id: Mesh.cpp,v 1.196 2007-01-28 17:26:53 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -235,7 +235,7 @@ static void drawVertexLabel(GEntity *e, MVertex *v, int partition=-1) else sprintf(str, "%d", v->getNum()); - if(v->getOrder() > 1) + if(v->getPolynomialOrder() > 1) glColor4ubv((GLubyte *) & CTX.color.mesh.vertex_sup); else glColor4ubv((GLubyte *) & CTX.color.mesh.vertex); @@ -250,7 +250,7 @@ static void drawVerticesPerEntity(GEntity *e) for(unsigned int i = 0; i < e->mesh_vertices.size(); i++){ MVertex *v = e->mesh_vertices[i]; if(!v->getVisibility()) continue; - if(v->getOrder() > 1) + if(v->getPolynomialOrder() > 1) glColor4ubv((GLubyte *) & CTX.color.mesh.vertex_sup); else glColor4ubv((GLubyte *) & CTX.color.mesh.vertex); @@ -262,7 +262,7 @@ static void drawVerticesPerEntity(GEntity *e) for(unsigned int i = 0; i < e->mesh_vertices.size(); i++){ MVertex *v = e->mesh_vertices[i]; if(!v->getVisibility()) continue; - if(v->getOrder() > 1) + if(v->getPolynomialOrder() > 1) glColor4ubv((GLubyte *) & CTX.color.mesh.vertex_sup); else glColor4ubv((GLubyte *) & CTX.color.mesh.vertex); @@ -287,7 +287,7 @@ static void drawVerticesPerElement(GEntity *e, std::vector<T*> &elements) MVertex *v = ele->getVertex(j); if(isElementVisible(ele) && v->getVisibility()){ if(CTX.mesh.points) { - if(v->getOrder() > 1) + if(v->getPolynomialOrder() > 1) glColor4ubv((GLubyte *) & CTX.color.mesh.vertex_sup); else glColor4ubv((GLubyte *) & CTX.color.mesh.vertex); diff --git a/Mesh/SecondOrder.cpp b/Mesh/SecondOrder.cpp index cadc79b2411976b1a44faa81931b47c34dc6a032..284db1f71be9facc63790d79c5d13d9faf77eb73 100644 --- a/Mesh/SecondOrder.cpp +++ b/Mesh/SecondOrder.cpp @@ -1,4 +1,4 @@ -// $Id: SecondOrder.cpp,v 1.50 2007-01-26 17:51:56 geuzaine Exp $ +// $Id: SecondOrder.cpp,v 1.51 2007-01-28 17:26:53 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -43,7 +43,7 @@ void getEdgeVertices(GEdge *ge, MElement *ele, std::vector<MVertex*> &ve, MVertex *v, *v0 = edge.getVertex(0), *v1 = edge.getVertex(1); if(linear || ge->geomType() == GEntity::DiscreteCurve){ SPoint3 pc = edge.barycenter(); - v = new MVertex2(pc.x(), pc.y(), pc.z(), ge); + v = new MVertex(pc.x(), pc.y(), pc.z(), ge); } else{ double u0 = 1e6, u1 = 1e6; @@ -63,12 +63,12 @@ void getEdgeVertices(GEdge *ge, MElement *ele, std::vector<MVertex*> &ve, if(u0 < 1e6 && u1 < 1e6){ double uc = 0.5 * (u0 + u1); GPoint pc = ge->point(uc); - v = new MEdgeVertex2(pc.x(), pc.y(), pc.z(), ge, uc); + v = new MEdgeVertex(pc.x(), pc.y(), pc.z(), ge, uc); } else{ // we should normally never end up here SPoint3 pc = edge.barycenter(); - v = new MVertex2(pc.x(), pc.y(), pc.z(), ge); + v = new MVertex(pc.x(), pc.y(), pc.z(), ge); } } edgeVertices[p] = v; @@ -92,7 +92,7 @@ void getEdgeVertices(GFace *gf, MElement *ele, std::vector<MVertex*> &ve, MVertex *v, *v0 = edge.getVertex(0), *v1 = edge.getVertex(1); if(linear || gf->geomType() == GEntity::DiscreteSurface){ SPoint3 pc = edge.barycenter(); - v = new MVertex2(pc.x(), pc.y(), pc.z(), gf); + v = new MVertex(pc.x(), pc.y(), pc.z(), gf); } else{ SPoint2 p0 = gf->parFromPoint(SPoint3(v0->x(), v0->y(), v0->z())); @@ -100,7 +100,7 @@ void getEdgeVertices(GFace *gf, MElement *ele, std::vector<MVertex*> &ve, double uc = 0.5 * (p0[0] + p1[0]); double vc = 0.5 * (p0[1] + p1[1]); GPoint pc = gf->point(uc, vc); - v = new MFaceVertex2(pc.x(), pc.y(), pc.z(), gf, uc, vc); + v = new MFaceVertex(pc.x(), pc.y(), pc.z(), gf, uc, vc); } edgeVertices[p] = v; gf->mesh_vertices.push_back(v); @@ -121,7 +121,7 @@ void getEdgeVertices(GRegion *gr, MElement *ele, std::vector<MVertex*> &ve, } else{ SPoint3 pc = edge.barycenter(); - MVertex *v = new MVertex2(pc.x(), pc.y(), pc.z(), gr); + MVertex *v = new MVertex(pc.x(), pc.y(), pc.z(), gr); edgeVertices[p] = v; gr->mesh_vertices.push_back(v); ve.push_back(v); @@ -145,7 +145,7 @@ void getFaceVertices(GFace *gf, MElement *ele, std::vector<MVertex*> &vf, MVertex *v; if(linear || gf->geomType() == GEntity::DiscreteSurface){ SPoint3 pc = face.barycenter(); - v = new MVertex2(pc.x(), pc.y(), pc.z(), gf); + v = new MVertex(pc.x(), pc.y(), pc.z(), gf); } else{ SPoint2 p0 = gf->parFromPoint(SPoint3(p[0]->x(), p[0]->y(), p[0]->z())); @@ -155,7 +155,7 @@ void getFaceVertices(GFace *gf, MElement *ele, std::vector<MVertex*> &vf, double uc = 0.25 * (p0[0] + p1[0] + p2[0] + p3[0]); double vc = 0.25 * (p0[1] + p1[1] + p2[1] + p3[1]); GPoint pc = gf->point(uc, vc); - v = new MFaceVertex2(pc.x(), pc.y(), pc.z(), gf, uc, vc); + v = new MFaceVertex(pc.x(), pc.y(), pc.z(), gf, uc, vc); } faceVertices[p] = v; gf->mesh_vertices.push_back(v); @@ -178,7 +178,7 @@ void getFaceVertices(GRegion *gr, MElement *ele, std::vector<MVertex*> &vf, } else{ SPoint3 pc = face.barycenter(); - MVertex *v = new MVertex2(pc.x(), pc.y(), pc.z(), gr); + MVertex *v = new MVertex(pc.x(), pc.y(), pc.z(), gr); faceVertices[p] = v; gr->mesh_vertices.push_back(v); vf.push_back(v); @@ -343,8 +343,7 @@ void setFirstOrder(GEntity *e, std::vector<T*> &elements) std::vector<T*> elements1; for(unsigned int i = 0; i < elements.size(); i++){ T *ele = elements[i]; - int n = ele->getNumVertices() - ele->getNumEdgeVertices() - - ele->getNumFaceVertices() - ele->getNumVolumeVertices(); + int n = ele->getNumPrimaryVertices(); std::vector<MVertex*> v1; for(int j = 0; j < n; j++) v1.push_back(ele->getVertex(j)); diff --git a/benchmarks/2d/projection.geo b/benchmarks/2d/projection.geo index ca302181108ba14784307ca748320fe1a9d0479d..40f296b67ee494b886ee310770fc566a1a20d52e 100644 --- a/benchmarks/2d/projection.geo +++ b/benchmarks/2d/projection.geo @@ -2,12 +2,12 @@ Point(1) = {0,0,0,1}; Point(2) = {0,10,0,1}; Line(1) = {2,1}; -Extrude Line {1, {50.0,0.0,0.0}, {1,0,0}, {0,5,0}, Pi}{Recombine;Layers{50,9000,1};}; +Extrude Line {1, {50.0,0.0,0.0}, {1,0,0}, {0,5,0}, 2*Pi}{Recombine;Layers{50,9000,1};}; // Point(1000) = {0,0,20,1}; Point(2000) = {0,10,20,1}; Line(1000) = {2000,1000}; -Extrude Line {1000, {50.0,0.0,0.0}, {1,0,0}, {0,5,20}, Pi*0.45}; +Extrude Line {1000, {50.0,0.0,0.0}, {1,0,0}, {0,5,20}, 2*Pi}; diff --git a/benchmarks/bugs/bicrystal-medium-bc-2.geo b/benchmarks/3d/bicrystal-degre2.geo similarity index 100% rename from benchmarks/bugs/bicrystal-medium-bc-2.geo rename to benchmarks/3d/bicrystal-degre2.geo diff --git a/benchmarks/bugs/bug-gcc2.95-clscale1.8.geo b/benchmarks/bugs/bug-gcc2.95-clscale1.8.geo deleted file mode 100644 index 018c5c38facbfa97c2dbcf2cc96aaefe6981462d..0000000000000000000000000000000000000000 --- a/benchmarks/bugs/bug-gcc2.95-clscale1.8.geo +++ /dev/null @@ -1,194 +0,0 @@ -ep = 0.9; -Ri = 22.5; -PI = 3.14159; -tag = ep/8; -posinit = 0.2 ; -espch = 0.4 ; -ht = espch; -espcv = 0.0349; -an = espcv; - -chr = 23.15; -cvr = 22.95; -zcha = posinit; -Rcha = 0.04 ; -taf = Rcha; -tetainit = an/2; -dm=taf*0.8; - -ep1= 0.55 ; -ep2= 0.35; - - -Point(1) = {Ri,0,0,tag}; -Point(2) = {Ri+ep1,0,0,tag/2}; -Point(3) = {(Ri+ep1)*(Cos(an)),(Ri+ep1)*(Sin(an)),0,tag/2}; -Point(4) = {Ri*(Cos(an)),Ri*(Sin(an)),0,tag}; - - -Line(1) = {1,2}; -Line(2) = {2,3}; -Line(3) = {3,4}; -Line(4) = {4,1}; - -Point(238) = {cvr*(Cos(tetainit)),cvr*(Sin(tetainit)),0,taf/2}; -Point(239) = {cvr*(Cos(tetainit))+Rcha,cvr*(Sin(tetainit)),0.,taf/2}; -Point(240) = {cvr*(Cos(tetainit))-Rcha,cvr*(Sin(tetainit)),0.,taf/2}; -Point(241) = {cvr*(Cos(tetainit)),cvr*(Sin(tetainit))-Rcha,0.,taf/2}; -Point(242) = {cvr*(Cos(tetainit)),cvr*(Sin(tetainit))+Rcha,0.,taf/2}; - -Circle(41) = {239,238,242}; -Circle(42) = {242,238,240}; -Circle(43) = {240,238,241}; -Circle(44) = {241,238,239}; - - -Line Loop(45) = {41,42,43,44}; -Plane Surface(46) = {45}; - - - -Line Loop(47) = {3,4,1,2}; -Plane Surface(48) = {47,45}; -aa[] = Extrude Surface {48, {0,0,0.4}}; ; -Delete {Volume{aa[1]};} - -Line Loop(91) = {57,54,55,56}; -Plane Surface(92) = {91}; - - - -Surface Loop(93) = {92,89,46,77,81,85}; -Volume(94) = {93}; - - -Point(5) = {Ri+ep,0,0,tag}; -Point(6) = {Ri+ep,0,ht,tag}; -Point(7) = {(Ri+ep)*(Cos(an)),(Ri+ep)*(Sin(an)),0,tag}; -Point(8) = {(Ri+ep)*(Cos(an)),(Ri+ep)*(Sin(an)),ht,tag}; - - -Line(5) = {2,5}; -Line(6) = {5,6}; -Line(7) = {6,252}; -Line(8) = {7,8}; -Line(9) = {8,243}; -Line(10) = {7,3}; -Line(11)={5,7}; -Line(12) = {6,8}; - - -Point(13) = {chr,0,zcha,taf/2}; -Point(14) = {chr+Rcha,0,zcha,taf/2}; -Point(15) = {chr-Rcha,0,zcha,taf/2}; -Point(16) = {chr,0,zcha+Rcha,taf/2}; -Point(17) = {chr,0,zcha-Rcha,taf/2}; - -Circle(13) = {14,13,16}; -Circle(14) = {16,13,15}; -Circle(15) = {15,13,17}; -Circle(16) = {17,13,14}; - - -Line Loop(95) = {16,13,14,15}; -Plane Surface(96) = {95}; - -Line Loop(97) = {-7,-6,-5,68}; -Plane Surface(98) = {97,95}; - - -Line Loop(99) = {12,-8,-11,6}; -Plane Surface(100) = {99}; -aa[] = Extrude Surface {96, {0,0,1}, {0,0,0}, 0.0349}; ; -Delete {Volume{aa[1]};} - - -Line Loop(123) = {-9,-8,10,59}; -Line Loop(124) = {102,103,104,105}; -Plane Surface(125) = {123,124}; - - - - -Surface Loop(126) = {122,109,96,113,117,121}; -Volume(127) = {126}; - - -Line Loop(128) = {-9,-12,7,53}; -Ruled Surface(129) = {128}; - - -Line Loop(130) = {-10,-11,-5,2}; -Ruled Surface(131) = {130}; - - -Surface Loop(132) = {113,98,129,125,100,131,73,117,121,109}; -Volume(133) = {132}; - - -Surface Loop(134) = {77,48,61,65,69,73,90,81,85,89}; -Volume(135) = {134}; - -//Transfinite Surface {121} = {252,2,3,243}; -//Transfinite Line {53,68,2,59} = 10 Using Progression 1; -//Transfinite Line {53} = 15 Using Progression 1; -//Transfinite Line {68} = 15 Using Progression 1; -//Transfinite Line {64} = 5 Using Progression 1; -//Transfinite Line {2} = 10 Using Progression 1; -Characteristic Length {252} = dm; -Characteristic Length {243} = dm; -Characteristic Length {2} = dm; -Characteristic Length {3} = dm; - -// surface basse du cable gauche-CVB -Physical Surface(200) = {46}; - -// surface basse du beton gauche-SB -Physical Surface(110) = {48}; - -// surface haute du beton gauche-SH -Physical Surface(1120) = {90}; - -// surface haute du cable gauche-CVH -Physical Surface(210) = {92}; - -// surface interne-SI -Physical Surface(150) = {65}; - -// surface droite beton gauche - SD -Physical Surface(1140) = {61}; - -// surface gauche beton gauche -SG -Physical Surface(1130) = {69}; - -// cable vertical � gauche - CABLEV -Physical Volume(170) = {94}; - -//cable horizontal surface gauche -CHG -Physical Surface(180) = {96}; - -//surface gauche beton droit avec trou -SG -Physical Surface(130) = {98}; - -//cable horizontal surface droite - CHD -Physical Surface(190) = {122}; - -//surface gauche beton droit avec trou - SD -Physical Surface(140) = {125}; - -// cable horizontal � droite - CABLEH -Physical Volume(160) = {127}; - -//surface haute beton droit -SH -Physical Surface(120) = {129}; - -//surface basse beton droit - SB -Physical Surface(1110) = {131}; - -// volume beton droite - BETON -Physical Volume(100) = {133}; - -//volume beton gauche - BETON -Physical Volume(1100) = {135}; - -Physical Point(220) = {1}; diff --git a/doc/VERSIONS b/doc/VERSIONS index 076da5c01cafc69035563ab6104bf472b2d01514..7ad7e02f6b775508eb038ee2cd1cab227b250625 100644 --- a/doc/VERSIONS +++ b/doc/VERSIONS @@ -1,18 +1,17 @@ -$Id: VERSIONS,v 1.372 2007-01-19 15:34:05 geuzaine Exp $ +$Id: VERSIONS,v 1.373 2007-01-28 17:26:53 geuzaine Exp $ 2.0: new geometry and mesh databases, with support for STEP and IGES -input via OpenCascade; complete rewrite of geometry and mesh drawing +import via OpenCascade; complete rewrite of geometry and mesh drawing code; complete rewrite of mesh I/O layer (with new native binary MSH format and support for import/export of I-deas UNV, Nastran BDF, STL, Medit MESH and VRML 1.0 files); added support for incomplete second -order elements; new default 2D and 3D meshing algorithms; improved -integration of Netgen and TetGen algorithms; removed anisotropic -meshing algorithm (as well as attractors); removed explicit region -number specification in extrusions; option changes in the graphical -interface are now applied instantaneously; added support for offscreen -rendering using OSMesa; added support for SVG output; added string -labels for Physical entities; lots of other improvements all over the -place. +order elements; new 2D and 3D meshing algorithms; improved integration +of Netgen and TetGen algorithms; removed anisotropic meshing algorithm +(as well as attractors); removed explicit region number specification +in extrusions; option changes in the graphical interface are now +applied instantaneously; added support for offscreen rendering using +OSMesa; added support for SVG output; added string labels for Physical +entities; lots of other improvements all over the place. 1.65 (May 15, 2006): new Plugin(ExtractEdges); fixed compilation errors with gcc4.1; replaced Plugin(DisplacementRaise) and diff --git a/doc/texinfo/license.texi b/doc/texinfo/license.texi index 2ccc5510fd38ea00418e76d4d43b94aa6b61a91a..04485f7b18c917298d92cbba8ba2a5c7e9e35049 100644 --- a/doc/texinfo/license.texi +++ b/doc/texinfo/license.texi @@ -1,6 +1,29 @@ @cindex GNU General Public License +Gmsh is provided under the terms of the GNU General Public License +(GPL) with the following exception: + + The copyright holders of Gmsh give you permission to combine Gmsh + with code included in the standard release of Triangle (written by + Jonathan Shewchuk), TetGen (written by Hang Si) and Netgen (written + by Joachim Sch"oberl) under their respective licenses. You may copy + and distribute such a system following the terms of the GNU GPL for + Gmsh and the licenses of the other code concerned, provided that you + include the source code of that other code when and as the GNU GPL + requires distribution of source code. + + Note that people who make modified versions of Gmsh are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU General + Public License gives permission to release a modified version + without this exception; this exception also makes it possible to + release a modified version which carries forward this exception. + +End of exception. + +@sp 1 + @center GNU General Public License @sp 1