Newer
Older
// Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to <gmsh@geuz.org>.
#include "GEntity.h"
#include "GVertex.h"
#include "SVector3.h"
#include "SPoint3.h"
#include "SPoint2.h"
protected:
GVertex *v0, *v1;
std::list<GFace *> l_faces;
GEdge(GModel *model, int tag, GVertex *_v0, GVertex *_v1);
virtual ~GEdge();
GVertex *getBeginVertex() const { return v0; }
GVertex *getEndVertex() const { return v1; }
void addFace(GFace *f);
void delFace(GFace *f);
virtual void setVisibility(char val, bool recursive=false);
Stefen Guzik
committed
virtual bool isSeam(const GFace *face) const { return false; }
// faces that this entity bounds
virtual GPoint point(double p) const = 0;
virtual bool containsParam(double pt) const;
virtual SVector3 firstDer(double par) const = 0;
// get second derivative of edge at the given parameter (default
// implentation using central differences)
Stefen Guzik
committed
virtual SPoint2 reparamOnFace(const GFace *face, double epar, int dir) const;
// return the minimum number of segments used for meshing the edge
// return the minimum number of segments used for drawing the edge
virtual std::string getAdditionalInfoString();
// tell if the edge is a 3D edge (in opposition with a trimmed curve on a surface)
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);
virtual double prescribedMeshSizeAtVertex() const { return meshAttributes.meshSize; }
void setTooSmall(bool b) { _tooSmall = b; }
bool isMeshDegenerated() const
{ return _tooSmall || (v0 == v1 && mesh_vertices.size() < 2); }
// number of types of elements
int getNumElementTypes() const { return 1; }
// get total/by-type number of elements in the mesh
void getNumMeshElements(unsigned *const c) const;
// get the start of the array of a type of element
MElement *const *getStartElementType(int type) const;
// get the element at the given index
virtual bool periodic(int dim) const { return v0 == v1; }
int nbPointsTransfinite;
int typeTransfinite;
int minimumMeshSegments;