diff --git a/Common/Main.cpp b/Common/Main.cpp index eefd628f25801423860b039d24c8fb7339fec5eb..801bafe05a1c9edd0917b038e0d59dd8ff217538 100644 --- a/Common/Main.cpp +++ b/Common/Main.cpp @@ -1,4 +1,4 @@ -// $Id: Main.cpp,v 1.4 2008-07-03 17:06:01 geuzaine Exp $ +// $Id: Main.cpp,v 1.5 2008-07-03 23:20:46 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -30,18 +30,16 @@ extern Context_T CTX; int main(int argc, char *argv[]) { - // print messages on stdout/stderr - CTX.terminal = 1; - // don't stop for questions (always return the default value) - CTX.nopopup = 1; - if(argc < 2){ + CTX.terminal = 1; Print_Usage(argv[0]); exit(0); } GmshInitialize(argc, argv); - // force this even if the options say it ain't so + + // force these even if the options say it ain't so + CTX.nopopup = 1; CTX.terminal = 1; new GModel; diff --git a/Common/Message.cpp b/Common/Message.cpp index 29897ff1cc7c4da65fca40dcb557ffcd20fe1c3b..129dcc23df3d3a001461da28f78662f6ff5cd710 100644 --- a/Common/Message.cpp +++ b/Common/Message.cpp @@ -1,4 +1,4 @@ -// $Id: Message.cpp,v 1.5 2008-07-03 17:06:01 geuzaine Exp $ +// $Id: Message.cpp,v 1.6 2008-07-03 23:20:46 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -465,7 +465,9 @@ void Message::PrintErrorCounter(const char *title) double Message::GetValue(const char *text, double defaultval) { - if(CTX.nopopup) return defaultval; + // if a callback is given let's assume we don't want to be bothered + // with interactive stuff + if(CTX.nopopup || _callback) return defaultval; #if defined(HAVE_FLTK) if(!CTX.batch){ @@ -489,9 +491,11 @@ double Message::GetValue(const char *text, double defaultval) } bool Message::GetBinaryAnswer(const char *question, const char *yes, - const char *no, bool defaultval) + const char *no, bool defaultval) { - if(CTX.nopopup) return defaultval; + // if a callback is given let's assume we don't want to be bothered + // with interactive stuff + if(CTX.nopopup || _callback) return defaultval; #if defined(HAVE_FLTK) if(!CTX.batch){ diff --git a/Geo/GEdge.h b/Geo/GEdge.h index afce1fd90e2d809ea4a840d1939a59d69be518a4..34860205424952cd2169e2f40c60a881a631ac5d 100644 --- a/Geo/GEdge.h +++ b/Geo/GEdge.h @@ -41,84 +41,91 @@ class GEdge : public GEntity { GEdge(GModel *model, int tag, GVertex *_v0, GVertex *_v1); virtual ~GEdge(); + // get the start/end vertices of the edge GVertex *getBeginVertex() const { return v0; } GVertex *getEndVertex() const { return v1; } + // add/delete a face bounded by this edge void addFace(GFace *f); void delFace(GFace *f); + // get the dimension of the edge (1) virtual int dim() const {return 1;} + + // set the visibility flag virtual void setVisibility(char val, bool recursive=false); - // True if the edge is a seam for the given face. + // true if the edge is a seam for the given face. virtual int isSeam(GFace *face) const { return 0; } - // The bounding box + // get the bounding box virtual SBoundingBox3d bounds() const; - // Faces that bound this entity or that this entity bounds. + // faces that bound this entity bounds virtual std::list<GFace*> faces() const { return l_faces; } - // Get the parameter location for a point in space on the edge. + // get the parameter location for a point in space on the edge virtual double parFromPoint(const SPoint3 &) const = 0; - // Get the point for the given parameter location. + // get the point for the given parameter location virtual GPoint point(double p) const = 0; - // Get the closest point on the edge to the given point. + // get the closest point on the edge to the given point virtual GPoint closestPoint(const SPoint3 & queryPoint) const; - // True if the edge contains the given parameter. + // true if the edge contains the given parameter virtual int containsParam(double pt) const; - // Get first derivative of edge at the given parameter. + // get first derivative of edge at the given parameter virtual SVector3 firstDer(double par) const = 0; - // Get second derivative of edge at the given parameter. - // Default implentation using central differences + // get second derivative of edge at the given parameter (default + // implentation using central differences) virtual SVector3 secondDer(double par) const; + + // get the curvature virtual double curvature(double par) const; - // Reparmaterize the point onto the given face. + // reparmaterize the point onto the given face virtual SPoint2 reparamOnFace(GFace *face, double epar,int dir) const; - // Recompute the mesh partitions defined on this edge. + // recompute the mesh partitions defined on this edge void recomputeMeshPartitions(); - // Delete the mesh partitions defined on this edge. + // delete the mesh partitions defined on this edge void deleteMeshPartitions(); - // Returns the minimum number of segments used for meshing the edge + // return the minimum number of segments used for meshing the edge virtual int minimumMeshSegments() const { return 1; } - // Returns the minimum number of segments used for drawing the edge + // return the minimum number of segments used for drawing the edge virtual int minimumDrawSegments() const { return 1; } - // Returns a type-specific additional information string + // return a type-specific additional information string virtual std::string getAdditionalInfoString(); - // tells if the edge is a 3D edge (in opposition with a trimmed curve on a surface) + // tell if the edge is a 3D edge (in opposition with a trimmed curve on a surface) virtual bool is3D() const { return true; } - // the length of the model edge + // get/set/compute the length of the model edge inline double length() const { return _length; } inline void setLength(const double l) { _length = l; } double length(const double &u0, const double &u1, const int nbQuadPoints = 4); - // one can impose the mesh size at an edge + // get the prescribed mesh size on the edge virtual double prescribedMeshSizeAtVertex() const { return meshAttributes.meshSize; } - // True if start == end and no more than 2 segments + // true if start == end and no more than 2 segments bool isMeshDegenerated() const{ return (v0 == v1 && mesh_vertices.size() < 2); } - // Get number of elements in the mesh and get element by index + // get number of elements in the mesh and get element by index unsigned int getNumMeshElements(); MElement *getMeshElement(unsigned int index); - // Resets the mesh attributes to default values + // reset the mesh attributes to default values virtual void resetMeshAttributes(); - // True if entity is periodic in the "dim" direction. + // true if entity is periodic in the "dim" direction. virtual bool periodic(int dim) const { return v0 == v1 ; } struct { diff --git a/Geo/GEdgeLoop.h b/Geo/GEdgeLoop.h index 3ffec04acd90736e2f428ee8d7f9c0e6b652f958..ba920f5ef3ef5c5110ee9b54945414b83cf258cd 100644 --- a/Geo/GEdgeLoop.h +++ b/Geo/GEdgeLoop.h @@ -41,7 +41,9 @@ struct GEdgeSigned class GEdgeLoop { -public: + private: + std::list<GEdgeSigned> loop; + public: typedef std::list<GEdgeSigned>::iterator iter; typedef std::list<GEdgeSigned>::const_iterator citer; GEdgeLoop(const std::list<GEdge*> &); @@ -52,8 +54,6 @@ public: inline citer end() const { return loop.end(); } int count(GEdge*) const; int count() const { return loop.size(); } -private: - std::list<GEdgeSigned> loop; }; #endif diff --git a/Geo/GEntity.h b/Geo/GEntity.h index d03bfec6e7e59763532461d9f21a13a8457af25c..203c8a29d5a9828cea5454ce5b90ccac5d09d367 100644 --- a/Geo/GEntity.h +++ b/Geo/GEntity.h @@ -40,33 +40,33 @@ class VertexArray; // A geometric model entity. class GEntity { private: - // All entities are owned by a GModel + // all entities are owned by a GModel GModel *_model; - // The tag (the number) of this entity + // the tag (the number) of this entity int _tag; - // The visibility and the selection flag + // the visibility and the selection flag char _visible, _selection; - // Flag storing if all mesh elements are visible + // flag storing if all mesh elements are visible char _allElementsVisible; - // The color of the entity (ignored if set to transparent blue) + // the color of the entity (ignored if set to transparent blue) unsigned int _color; public: // these will become protected at some point - // The mesh vertices uniquely owned by the entity + // the mesh vertices uniquely owned by the entity std::vector<MVertex*> mesh_vertices; - // The physical entitites (if any) that contain this entity + // the physical entitites (if any) that contain this entity std::vector<int> physicals; - // Vertex arrays to draw the mesh efficiently + // vertex arrays to draw the mesh efficiently VertexArray *va_lines, *va_triangles; public: - // All known native model types + // all known native model types enum ModelType { UnknownModel, GmshModel, @@ -74,7 +74,7 @@ class GEntity { OpenCascadeModel }; - // All known entity types + // all known entity types enum GeomType { Unknown, Point, @@ -110,7 +110,7 @@ class GEntity { DiscreteVolume }; - // Returns a string describing the entity type + // return a string describing the entity type virtual std::string getTypeString() { const char *name[] = { @@ -158,104 +158,99 @@ class GEntity { virtual ~GEntity(); + // delete the vertex arrays, used to to draw the mesh efficiently void deleteVertexArrays(); - // Spatial dimension of the entity + // spatial dimension of the entity virtual int dim() const { return -1; } - // Regions that bound this entity or that this entity bounds. + // regions that bound this entity or that this entity bounds. virtual std::list<GRegion*> regions() const { return std::list<GRegion*>(); } - // Faces that bound this entity or that this entity bounds. + // faces that bound this entity or that this entity bounds. virtual std::list<GFace*> faces() const { return std::list<GFace*>(); } - // Edges that bound this entity or that this entity bounds. + // edges that bound this entity or that this entity bounds. virtual std::list<GEdge*> edges() const { return std::list<GEdge*>(); } - // Vertices that bound this entity. + // vertices that bound this entity. virtual std::list<GVertex*> vertices() const { return std::list<GVertex*>(); } - /// Underlying geometric representation of this entity. + // underlying geometric representation of this entity. virtual GeomType geomType() const { return Unknown; } - // True if parametric space is continuous in the "dim" direction. + // true if parametric space is continuous in the "dim" direction. virtual bool continuous(int dim) const { return true; } - // True if entity is periodic in the "dim" direction. + // true if entity is periodic in the "dim" direction. virtual bool periodic(int dim) const { return false; } - // True if there are parametric degeneracies in the "dim" direction. + // true if there are parametric degeneracies in the "dim" direction. virtual bool degenerate(int dim) const { return false; } - // Parametric bounds of the entity in the "i" direction. + // parametric bounds of the entity in the "i" direction. virtual Range<double> parBounds(int i) const { return Range<double>(0., 0.); } - // Modeler tolerance for the entity. + // modeler tolerance for the entity. virtual double tolerance() const { return 1.e-14; } - // True if the entity contains the given point to within tolerance. + // true if the entity contains the given point to within tolerance. virtual bool containsPoint(const SPoint3 &pt) const { return false; } - // Get the native type of the particular representation + // get the native type of the particular representation virtual ModelType getNativeType() const { return UnknownModel; } - // Get the native pointer of the particular representation + // get the native pointer of the particular representation virtual void * getNativePtr() const { return 0; } - // The model owning this entity. + // the model owning this entity GModel *model() const { return _model; } - // The tag of the entity + // get/set the tag of the entity int tag() const { return _tag; } void setTag(int tag) { _tag = tag; } - // The bounding box + // get the bounding box virtual SBoundingBox3d bounds() const { return SBoundingBox3d(); } - // Get the visibility flag + // get/set the visibility flag virtual char getVisibility(); - - // Set the visibility flag virtual void setVisibility(char val, bool recursive=false){ _visible = val; } - // Get the selection flag + // get/set the selection flag virtual char getSelection(){ return _selection; } - - // Set the selection flag virtual void setSelection(char val){ _selection = val; } - // Get the color + // get/set the color virtual unsigned int getColor(){ return _color; } - - // Set the color virtual void setColor(unsigned color){ _color = color; } - // Returns true if we should use this color to represent the entity + // return true if we should use this color to represent the entity virtual bool useColor(); - // Returns an information string for the entity + // return an information string for the entity virtual std::string getInfoString(); - // Returns a type-specific additional information string + // return a type-specific additional information string virtual std::string getAdditionalInfoString() { return std::string(""); } - // Resets the mesh attributes to default values + // reset the mesh attributes to default values virtual void resetMeshAttributes() { return; } - // Gets the number of mesh elements in the entity + // get the number of mesh elements in the entity virtual unsigned int getNumMeshElements() { return 0; } - // Gets the element at the given index + // get the element at the given index virtual MElement *getMeshElement(unsigned int index) { return 0; } - // Get/set all mesh element visibility flag + // get/set all mesh element visibility flag bool getAllElementsVisible(){ return _allElementsVisible ? true : false; } void setAllElementsVisible(bool val){ _allElementsVisible = val ? 1 : 0; } - // Gets the number of mesh vertices in the entity + // get the number of mesh vertices in the entity unsigned int getNumMeshVertices() { return mesh_vertices.size(); } - // Gets the mesh vertex at the given index + // get the mesh vertex at the given index MVertex *getMeshVertex(unsigned int index) { return mesh_vertices[index]; } }; diff --git a/Geo/GFace.h b/Geo/GFace.h index d80e4c51303b8c0dfe31a7a81661f3b7bf1838e9..35e83e8fa30ce0417ead70337d6377ea9ee27827 100644 --- a/Geo/GFace.h +++ b/Geo/GFace.h @@ -50,8 +50,8 @@ class GRegion; class GFace : public GEntity { protected: - // edge loops, will replace what follows list of al the edges of the - // face + // edge loops will replace what follows (list of al the edges of the + // face + directions) std::list<GEdge *> l_edges; std::list<int> l_dirs; GRegion *r1, *r2; @@ -69,22 +69,26 @@ class GFace : public GEntity std::list<GEdgeLoop> edgeLoops; + // add/delete regions that are bounded by the face void addRegion(GRegion *r){ r1 ? r2 = r : r1 = r; } void delRegion(GRegion *r){ if(r1 == r) r1 = r2; r2 = 0; } - // edge orientations. + // edge orientations virtual std::list<int> orientations() const { return l_dirs; } - // Edges that bound this entity or that this entity bounds. + // edges that bound the face virtual std::list<GEdge*> edges() const { return l_edges; } - // Edges that are embedded in this face. + // edges that are embedded in the face virtual std::list<GEdge*> embeddedEdges() const { return embedded_edges; } - // Vertices that bound this entity or that this entity bounds. + // vertices that bound the face virtual std::list<GVertex*> vertices() const; + // dimension of the face (2) virtual int dim() const { return 2; } + + // set visibility flag virtual void setVisibility(char val, bool recursive=false); // compute the parameters UV from a point XYZ @@ -92,82 +96,83 @@ class GFace : public GEntity double &U, double &V, const double relax, const bool onSurface=true) const; - // The bounding box + // get the bounding box virtual SBoundingBox3d bounds() const; // retrieve surface params virtual surface_params getSurfaceParams() const; - // Return the point on the face corresponding to the given parameter. + // return the point on the face corresponding to the given parameter virtual GPoint point(double par1, double par2) const = 0; virtual GPoint point(const SPoint2 &pt) const { return point(pt.x(), pt.y()); } - // computes, in parametric space, the interpolation from pt1 to pt2 along a geodesic - // of the surface + // compute, in parametric space, the interpolation from pt1 to pt2 + // along a geodesic of the surface virtual SPoint2 geodesic(const SPoint2 &pt1, const SPoint2 &pt2, double t); - // computes the length of a geodesic between two points in parametric space + // compute the length of a geodesic between two points in parametric + // space virtual double length(const SPoint2 &pt1, const SPoint2 &pt2, int n=4); - // If the mapping is a conforming mapping, i.e. a mapping that + // if the mapping is a conforming mapping, i.e. a mapping that // conserves angles, this function returns the eigenvalue of the // metric at a given point this is a special feature for // stereographic mappings of the sphere that is used in 2D mesh // generation ! virtual double getMetricEigenvalue(const SPoint2 &); - // Return the parmater location on the face given a point in space - // that is on the face. + // return the parmater location on the face given a point in space + // that is on the face virtual SPoint2 parFromPoint(const SPoint3 &) const; - // True if the parameter value is interior to the face. + // true if the parameter value is interior to the face virtual int containsParam(const SPoint2 &pt) const; - // Return the point on the face closest to the given point. + // return the point on the face closest to the given point virtual GPoint closestPoint(const SPoint3 & queryPoint, const double initialGuess[2]) const; - // Return the normal to the face at the given parameter location. + // return the normal to the face at the given parameter location virtual SVector3 normal(const SPoint2 ¶m) const = 0; - // Return the first derivate of the face at the parameter location. + // return the first derivate of the face at the parameter location virtual Pair<SVector3,SVector3> firstDer(const SPoint2 ¶m) const = 0; - // Return the curvature i.e. the divergence of the normal + // return the curvature i.e. the divergence of the normal virtual double curvature(const SPoint2 ¶m) const; - // Recompute the mesh partitions defined on this face. + // recompute the mesh partitions defined on this face void recomputeMeshPartitions(); - // Delete the mesh partitions defined on this face. + // delete the mesh partitions defined on this face void deleteMeshPartitions(); - // Returns a type-specific additional information string + // return a type-specific additional information string virtual std::string getAdditionalInfoString(); - // Fills the crude representation cross + // fill the crude representation cross bool buildRepresentationCross(); - // Builds a STL triangulation and fills the vertex array + // build a STL triangulation and fills the vertex array // va_geom_triangles virtual bool buildSTLTriangulation(); - // Recompute the mean plane of the surface from a list of points + // recompute the mean plane of the surface from a list of points void computeMeanPlane(const std::vector<MVertex*> &points); void computeMeanPlane(const std::vector<SPoint3> &points); - // Recompute the mean plane of the surface from its bounding vertices + // recompute the mean plane of the surface from its bounding vertices void computeMeanPlane(); - // Get the mean plane info + // get the mean plane info void getMeanPlaneData(double VX[3], double VY[3], double &x, double &y, double &z) const; void getMeanPlaneData(double plan[3][3]) const; - // Get number of elements in the mesh and get element by index + // get number of elements in the mesh and get element by index unsigned int getNumMeshElements(); MElement *getMeshElement(unsigned int index); - // Resets the mesh attributes to default values + // reset the mesh attributes to default values virtual void resetMeshAttributes(); struct { diff --git a/Geo/GModel.h b/Geo/GModel.h index 69b236f02d2ff9fc2d4f38ff7023cf74d29e65ad..124cc7620ac7e973740275126f0d4140d2696146 100644 --- a/Geo/GModel.h +++ b/Geo/GModel.h @@ -39,26 +39,29 @@ class FieldManager; class GModel { private: - // Vertex cache to speed-up direct access by vertex number (used for + // vertex cache to speed-up direct access by vertex number (used for // post-processing I/O) std::vector<MVertex*> _vertexVectorCache; std::map<int, MVertex*> _vertexMapCache; + // geo model internal data GEO_Internals *_geo_internals; void _createGEOInternals(); void _deleteGEOInternals(); + // OpenCascade model internal data OCC_Internals *_occ_internals; void _deleteOCCInternals(); + // Fourier model internal data FM_Internals *_fm_internals; void _createFMInternals(); void _deleteFMInternals(); - // Characteristic Lengths fields + // characteristic Lengths fields FieldManager *_fields; - // Store the elements in the map (indexed by elementary region + // store the elements given in the map (indexed by elementary region // number) into the model, creating discrete geometrical entities on // the fly if needed void _storeElementsInEntities(std::map<int, std::vector<MElement*> > &map); @@ -66,7 +69,7 @@ class GModel // loop over all vertices connected to elements and associate geo entity void _associateEntityWithMeshVertices(); - // entity that is currently being meshed + // entity that is currently being meshed (used for error reporting) GEntity *_currentMeshEntity; // index of the current model @@ -92,25 +95,25 @@ class GModel // index >= 0 static GModel *current(int index=-1); - // finds the model by name + // find the model by name static GModel *findByName(std::string name); - // Deletes everything in a GModel + // delete everything in a GModel void destroy(); - // Access internal CAD representations + // access internal CAD representations GEO_Internals *getGEOInternals(){ return _geo_internals; } OCC_Internals *getOCCInternals(){ return _occ_internals; } FM_Internals *getFMInternals() { return _fm_internals; } - // Access characteristic length fields + // access characteristic length fields FieldManager *getFields(){ return _fields; } - // Get/set the model name + // get/set the model name void setName(std::string name){ modelName = name; } std::string getName(){ return modelName; } - // Get the number of regions in this model. + // get the number of regions in this model. int getNumRegions() const { return regions.size(); } int getNumFaces() const { return faces.size(); } int getNumEdges() const { return edges.size(); } @@ -122,7 +125,7 @@ class GModel typedef std::set<GVertex*, GEntityLessThan>::iterator viter; typedef std::map<int, std::string>::iterator piter; - // Get an iterator initialized to the first/last entity in this model. + // get an iterator initialized to the first/last entity in this model. riter firstRegion() { return regions.begin(); } fiter firstFace() { return faces.begin(); } eiter firstEdge() { return edges.begin(); } @@ -132,13 +135,13 @@ class GModel eiter lastEdge() { return edges.end(); } viter lastVertex() { return vertices.end(); } - // Find the entity with the given tag. + // find the entity with the given tag. GRegion *getRegionByTag(int n) const; GFace *getFaceByTag(int n) const; GEdge *getEdgeByTag(int n) const; GVertex *getVertexByTag(int n) const; - // Add/remove an entity in the model + // add/remove an entity in the model void add(GRegion *r) { regions.insert(r); } void add(GFace *f) { faces.insert(f); } void add(GEdge *e) { edges.insert(e); } diff --git a/Geo/GRegion.h b/Geo/GRegion.h index 9e1ea5e18efcfcd8483b7676368e30043323f94b..d69223d6a254ac01c099bfcf268114ca81fef502 100644 --- a/Geo/GRegion.h +++ b/Geo/GRegion.h @@ -39,32 +39,39 @@ class GRegion : public GEntity { GRegion(GModel *model, int tag); virtual ~GRegion(); + // get the dimension of the region (3) virtual int dim() const { return 3; } + + // set the visibility flag virtual void setVisibility(char val, bool recursive=false); + + // get/set faces that bound the region virtual std::list<GFace*> faces() const{ return l_faces; } - virtual std::list<GEdge*> edges() const; void set(std::list<GFace*> &f) { l_faces= f; } - // The bounding box + // edges that bound the region + virtual std::list<GEdge*> edges() const; + + // get the bounding box virtual SBoundingBox3d bounds() const; - // Checks if the region is connected to another region by an edge + // check if the region is connected to another region by an edge bool edgeConnected(GRegion *r) const; - // Recompute the mesh partitions defined on this region. + // recompute the mesh partitions defined on this region void recomputeMeshPartitions(); - // Delete the mesh partitions defined on this region. + // delete the mesh partitions defined on this region void deleteMeshPartitions(); - // Returns a type-specific additional information string + // return a type-specific additional information string virtual std::string getAdditionalInfoString(); - // Get number of elements in the mesh and get element by index + // get number of elements in the mesh and get element by index unsigned int getNumMeshElements(); MElement *getMeshElement(unsigned int index); - // Resets the mesh attributes to default values + // reset the mesh attributes to default values virtual void resetMeshAttributes(); struct { diff --git a/Geo/GVertex.h b/Geo/GVertex.h index cdef928a0e9f867c5b7fe9d193855c8486711de4..d33c2be060fc10903b2a439136ce5232148ea33a 100644 --- a/Geo/GVertex.h +++ b/Geo/GVertex.h @@ -24,7 +24,7 @@ #include "GPoint.h" #include "SPoint2.h" -// A model vertex +// A model vertex. class GVertex : public GEntity { protected: diff --git a/Geo/MElement.h b/Geo/MElement.h index 46bde832b2498c2ade1996e841b58d19eeafd385..81438026fe252ffaf8f1cb8335899249ea0c251c 100644 --- a/Geo/MElement.h +++ b/Geo/MElement.h @@ -72,13 +72,13 @@ class MElement // reset the global node number static void resetGlobalNumber(){ _globalNum = 0; } - // returns the tag of the element + // return the tag of the element virtual int getNum(){ return _num; } - // returns the geometrical dimension of the element + // return the geometrical dimension of the element virtual int getDim() = 0; - // returns the polynomial order the element + // return the polynomial order the element virtual int getPolynomialOrder(){ return 1; } // get/set the partition to which the element belongs @@ -143,7 +143,7 @@ class MElement virtual double gammaShapeMeasure(){ return 0.; } virtual double etaShapeMeasure(){ return 0.; } - // computes the barycenter + // compute the barycenter virtual SPoint3 barycenter(); // revert the orientation of the element @@ -155,32 +155,32 @@ class MElement virtual int getVolumeSign(){ return 1; } virtual void setVolumePositive(){ if(getVolumeSign() < 0) revert(); } - // Returns an information string for the element + // return an information string for the element virtual std::string getInfoString(); - // Returns the interpolating nodal shape function associated with + // return the interpolating nodal shape function associated with // node num, evaluated at point (u,v,w) in parametric coordinates virtual void getShapeFunction(int num, double u, double v, double w, double &s) = 0; - // Returns the gradient of of the nodal shape function associated + // return the gradient of of the nodal shape function associated // with node num, evaluated at point (u,v,w) in parametric // coordinates virtual void getGradShapeFunction(int num, double u, double v, double w, double s[3]) = 0; - // Returns the Jacobian of the element evaluated at point (u,v,w) in + // return the Jacobian of the element evaluated at point (u,v,w) in // parametric coordinates double getJacobian(double u, double v, double w, double jac[3][3]); - // Inverts the parametrisation + // invert the parametrisation virtual void xyz2uvw(double xyz[3], double uvw[3]); - // Tests if a point, given in parametric coordinates, belongs to the + // test if a point, given in parametric coordinates, belongs to the // element virtual bool isInside(double u, double v, double w, double tol=1.e-8) = 0; - // Interpolate the given nodal data (resp. its gradient, curl and + // interpolate the given nodal data (resp. its gradient, curl and // divergence) at point (u,v,w) in parametric coordinates double interpolate(double val[], double u, double v, double w, int stride=1); void interpolateGrad(double val[], double u, double v, double w, double f[3], @@ -188,6 +188,7 @@ class MElement void interpolateCurl(double val[], double u, double v, double w, double f[3], int stride=3); double interpolateDiv(double val[], double u, double v, double w, int stride=3); + // integration routine virtual void getIntegrationPoints(int pOrder, int *npts, IntPt **pts) const; diff --git a/Geo/MVertex.h b/Geo/MVertex.h index 46f66e662b9b82d959258cf313f34ca0558de8dd..35ca7343fcb8327397bfdebe1f264a6b4d3ae51f 100644 --- a/Geo/MVertex.h +++ b/Geo/MVertex.h @@ -134,8 +134,8 @@ class MEdgeVertex : public MVertex{ protected: double _u, _lc; public : - MEdgeVertex(double x, double y, double z, GEntity *ge, double u, double lc = -1.0) - : MVertex(x, y, z, ge), _u(u), _lc(lc) + MEdgeVertex(double x, double y, double z, GEntity *ge, double u, double lc = -1.0) + : MVertex(x, y, z, ge), _u(u), _lc(lc) { } virtual ~MEdgeVertex(){}