Commit 1e829c97 authored by Christophe Geuzaine's avatar Christophe Geuzaine

Merge branch 'Partitioning_fix' into 'master'

Partitioning fix

See merge request !166
parents cec23971 8b65f4ec
Pipeline #2077 passed with stage
in 64 minutes and 54 seconds
......@@ -30,6 +30,14 @@ GEdge::GEdge(GModel *model, int tag, GVertex *_v0, GVertex *_v1)
resetMeshAttributes();
}
GEdge::GEdge(GModel *model, int tag)
: GEntity(model, tag), _length(0.), _tooSmall(false), _cp(0),
v0(0), v1(0), masterOrientation(0), compound_edge(NULL)
{
meshStatistics.status = GEdge::PENDING;
resetMeshAttributes();
}
GEdge::~GEdge()
{
if(v0) v0->delEdge(this);
......
......@@ -44,6 +44,7 @@ public:
public:
GEdge(GModel *model, int tag, GVertex *_v0, GVertex *_v1);
GEdge(GModel *model, int tag);
virtual ~GEdge();
// delete mesh data
......
......@@ -25,6 +25,14 @@ discreteEdge::discreteEdge(GModel *model, int num, GVertex *_v0, GVertex *_v1)
CreateReversedCurve(c);
}
discreteEdge::discreteEdge(GModel *model, int num)
: GEdge(model, num)
{
Curve *c = CreateCurve(num, MSH_SEGM_DISCRETE, 0, 0, 0, -1, -1, 0., 1.);
Tree_Add(model->getGEOInternals()->Curves, &c);
CreateReversedCurve(c);
}
discreteEdge::~discreteEdge()
{
for (unsigned int i=0 ; i<discrete_lines.size(); i++)delete discrete_lines[i];
......
......@@ -19,6 +19,7 @@ class discreteEdge : public GEdge {
bool getLocalParameter(const double &t, int &iEdge, double &tLoc) const;
public:
discreteEdge(GModel *model, int num, GVertex *_v0, GVertex *_v1);
discreteEdge(GModel *model, int num);
virtual ~discreteEdge();
virtual GeomType geomType() const { return DiscreteCurve; }
virtual GPoint point(double p) const;
......
......@@ -18,8 +18,8 @@ public:
const std::vector<unsigned int> &partitions)
: discreteEdge(model, num, _v0, _v1), _partitions(partitions),
_parentEntity(NULL) {}
partitionEdge(GModel *model, int num, GVertex *_v0, GVertex *_v1)
: discreteEdge(model, num, _v0, _v1), _partitions(), _parentEntity(NULL) {}
partitionEdge(GModel *model, int num, const std::vector<unsigned int> &partitions)
: discreteEdge(model, num), _partitions(partitions), _parentEntity(NULL) {}
virtual ~partitionEdge() {}
virtual GeomType geomType() const { return PartitionCurve; }
virtual void setParentEntity(GEntity* e) { _parentEntity = e; }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment