Commit 920a7e4a by Michel Rasquin

Fix name-hiding issues of overriding member fcts in derived classes

parent f1d5dc2a
Pipeline #357 passed with stage
in 10 minutes 23 seconds
......@@ -146,6 +146,7 @@ class GFaceCompound : public GFace {
Range<double> parBounds(int i) const
{ return trivial() ? (*(_compound.begin()))->parBounds(i) : Range<double>(-1, 1); }
using GFace::point;
GPoint point(double par1, double par2) const;
GPoint pointInRemeshedOctree(double par1, double par2) const;
SPoint2 parFromPoint(const SPoint3 &p, bool onSurface=true) const;
......@@ -216,6 +217,7 @@ class GFaceCompound : public GFace {
}
virtual ~GFaceCompound() {}
virtual void deleteMesh() {}
using GFace::point;
GPoint point(double par1, double par2) const { return GPoint(); }
Pair<SVector3, SVector3> firstDer(const SPoint2 &param) const
{
......
......@@ -220,6 +220,7 @@ class GeoFactory : public GModelFactory {
GFace *addPlanarFace(GModel *gm, std::vector<std::vector<GEdge *> > edges);
GFace *addPlanarFace(GModel *gm, const std::vector<std::vector<GEdgeSigned> > &edges);
GRegion *addVolume(GModel *gm, std::vector<std::vector<GFace *> > faces);
using GModelFactory::addCircleArc;
GEdge *addCircleArc(GModel *gm,GVertex *begin, GVertex *center, GVertex *end);
std::vector<GFace *> addRuledFaces(GModel *gm, std::vector<std::vector<GEdge *> > edges);
std::vector<GEntity*> extrudeBoundaryLayer(GModel *gm, GEntity *e, int nbLayers,
......
......@@ -85,6 +85,11 @@ unsigned int GVertex::getNumMeshElements()
return points.size();
}
void GVertex::getNumMeshElements(unsigned *const c) const
{
c[0] += points.size();
}
MElement *GVertex::getMeshElement(unsigned int index)
{
if(index < points.size())
......
......@@ -79,7 +79,8 @@ class GVertex : public GEntity
// get number of elements in the mesh
unsigned int getNumMeshElements();
void getNumMeshElements(unsigned *const c) const;
// get the element at the given index
MElement *getMeshElement(unsigned int index);
......
......@@ -42,6 +42,7 @@ public:
virtual ~GenericFace();
Range<double> parBounds(int i) const;
using GFace::point;
virtual GPoint point(double par1, double par2) const;
virtual GPoint closestPoint(const SPoint3 & queryPoint,
const double initialGuess[2]) const;
......
......@@ -226,6 +226,7 @@ class discreteDiskFace : public GFace {
virtual ~discreteDiskFace();
void getTriangleUV(const double u,const double v,discreteDiskFaceTriangle **mt,
double &_u, double &_v) const;
using GFace::point;
GPoint point(double par1, double par2) const;
SPoint2 parFromVertex(MVertex *v) const;
SVector3 normal(const SPoint2&) const;
......
......@@ -33,6 +33,7 @@ class discreteFace : public GFace {
void addTriangle(triangulation*,MTriangle*);
void complex_crossField();
void crossField();
using GFace::point;
GPoint point(double par1, double par2) const;
SPoint2 parFromPoint(const SPoint3 &p, bool onSurface=true) const;
SVector3 normal(const SPoint2 &param) const;
......
......@@ -22,6 +22,7 @@ class gmshFace : public GFace {
virtual ~gmshFace(){}
Range<double> parBounds(int i) const;
void setModelEdges(std::list<GEdge*> &);
using GFace::point;
virtual GPoint point(double par1, double par2) const;
virtual GPoint closestPoint(const SPoint3 &queryPoint,
const double initialGuess[2]) const;
......
......@@ -72,6 +72,7 @@ class gmshSphere : public gmshSurface
return Range<double>(0., M_PI);
}
virtual gmshSurface::gmshSurfaceType geomType() const { return gmshSurface::Sphere; }
using gmshSurface::point;
virtual SPoint3 point(double par1, double par2) const;
virtual SVector3 normal(const SPoint2 &param) const
{
......@@ -100,6 +101,7 @@ class gmshPolarSphere : public gmshSurface
return Range<double>(-M_PI, M_PI);
}
virtual gmshSurface::gmshSurfaceType geomType() const { return gmshSurface::PolarSphere; }
using gmshSurface::point;
virtual SPoint3 point(double par1, double par2) const;
virtual SVector3 normal(const SPoint2 &param) const
{
......@@ -130,6 +132,7 @@ class gmshParametricSurface : public gmshSurface
{
return gmshSurface::ParametricSurface;
}
using gmshSurface::point;
virtual SPoint3 point(double par1, double par2) const;
};
......
......@@ -182,6 +182,7 @@ class StructuredField : public Field
{
if(data) delete[]data;
}
using Field::operator();
double operator() (double x, double y, double z, GEntity *ge=0)
{
if(update_needed) {
......@@ -370,6 +371,7 @@ class LonLatField : public Field
{
return "LonLat";
}
using Field::operator();
double operator() (double x, double y, double z, GEntity *ge=0)
{
Field *field = GModel::current()->getFields()->get(iField);
......@@ -423,6 +425,7 @@ class BoxField : public Field
{
return "Box";
}
using Field::operator();
double operator() (double x, double y, double z, GEntity *ge=0)
{
return (x <= x_max && x >= x_min && y <= y_max && y >= y_min && z <= z_max
......@@ -479,6 +482,7 @@ class CylinderField : public Field
{
return "Cylinder";
}
using Field::operator();
double operator() (double x, double y, double z, GEntity *ge=0)
{
double dx = x-xc;
......@@ -532,6 +536,7 @@ class BallField : public Field
{
return "Ball";
}
using Field::operator();
double operator() (double x, double y, double z, GEntity *ge=0)
{
double dx = x-xc;
......@@ -610,6 +615,7 @@ class FrustumField : public Field
{
return "Frustum";
}
using Field::operator();
double operator() (double x, double y, double z, GEntity *ge=0)
{
double dx = x-x1;
......@@ -680,6 +686,7 @@ class ThresholdField : public Field
(stopAtDistMax, "True to not impose element size outside DistMax (i.e., "
"F = a very big value if Field[IField] > DistMax)");
}
using Field::operator();
double operator() (double x, double y, double z, GEntity *ge=0)
{
Field *field = GModel::current()->getFields()->get(iField);
......@@ -729,6 +736,7 @@ class GradientField : public Field
options["Delta"] = new FieldOptionDouble
(delta, "Finite difference step");
}
using Field::operator();
double operator() (double x, double y, double z, GEntity *ge=0)
{
Field *field = GModel::current()->getFields()->get(iField);
......@@ -796,6 +804,7 @@ class CurvatureField : public Field
g[1] /= n;
g[2] /= n;
}
using Field::operator();
double operator() (double x, double y, double z, GEntity *ge=0)
{
Field *field = GModel::current()->getFields()->get(iField);
......@@ -836,6 +845,7 @@ class MaxEigenHessianField : public Field
options["Delta"] = new FieldOptionDouble
(delta, "Step used for the finite differences");
}
using Field::operator();
double operator() (double x, double y, double z, GEntity *ge=0)
{
Field *field = GModel::current()->getFields()->get(iField);
......@@ -888,6 +898,7 @@ class LaplacianField : public Field
options["Delta"] = new FieldOptionDouble
(delta, "Finite difference step");
}
using Field::operator();
double operator() (double x, double y, double z, GEntity *ge=0)
{
Field *field = GModel::current()->getFields()->get(iField);
......@@ -924,6 +935,7 @@ class MeanField : public Field
options["Delta"] = new FieldOptionDouble
(delta, "Distance used to compute the mean value");
}
using Field::operator();
double operator() (double x, double y, double z, GEntity *ge=0)
{
Field *field = GModel::current()->getFields()->get(iField);
......@@ -1089,6 +1101,7 @@ class MathEvalField : public Field
(f, "Mathematical function to evaluate.", &update_needed);
f = "F2 + Sin(z)";
}
using Field::operator();
double operator() (double x, double y, double z, GEntity *ge=0)
{
if(update_needed) {
......@@ -1320,6 +1333,7 @@ class ExternalProcessField : public Field
~ExternalProcessField() {
closePipes();
}
using Field::operator();
double operator() (double x, double y, double z, GEntity *ge=0)
{
double xyz[3] = {x, y, z};
......@@ -1430,6 +1444,7 @@ class ParametricField : public Field
"See the MathEval Field help to get a description of valid FX, FY "
"and FZ expressions.";
}
using Field::operator();
double operator() (double x, double y, double z, GEntity *ge=0)
{
if(update_needed) {
......@@ -1705,6 +1720,7 @@ class MinField : public Field
{
return "Take the minimum value of a list of fields.";
}
using Field::operator();
double operator() (double x, double y, double z, GEntity *ge=0)
{
double v = MAX_LC;
......@@ -1744,6 +1760,7 @@ class MaxField : public Field
{
return "Take the maximum value of a list of fields.";
}
using Field::operator();
double operator() (double x, double y, double z, GEntity *ge=0)
{
double v = -MAX_LC;
......@@ -1789,6 +1806,7 @@ class RestrictField : public Field
return "Restrict the application of a field to a given list of geometrical "
"points, curves, surfaces or volumes.";
}
using Field::operator();
double operator() (double x, double y, double z, GEntity *ge=0)
{
Field *f = (GModel::current()->getFields()->get(iField));
......@@ -2175,6 +2193,7 @@ public:
}
}
using Field::operator();
virtual double operator() (double X, double Y, double Z, GEntity *ge=0)
{
#if defined(_OPENMP)
......@@ -2363,6 +2382,7 @@ public:
}
}
using Field::operator();
virtual double operator() (double X, double Y, double Z, GEntity *ge=0)
{
double query_pt[3] = {X,Y,Z};
......@@ -2521,6 +2541,7 @@ class OctreeField : public Field {
_root->init(bounds.min().x(), bounds.min().y(), bounds.min().z(), _l0, *_inField, 4);
}
}
using Field::operator();
virtual double operator() (double X, double Y, double Z, GEntity *ge=0)
{
SPoint3 xmin = bounds.min();
......
......@@ -100,9 +100,6 @@ class Field {
virtual double operator() (double x, double y, double z, GEntity *ge=0) = 0;
// anisotropic
virtual void operator() (double x, double y, double z, SMetric3 &, GEntity *ge=0){}
// temporary
virtual void operator()(double x, double y, double z, SVector3& v1, SVector3& v2,
SVector3& v3,GEntity* ge=0){}
bool update_needed;
virtual const char *getName() = 0;
#if defined(HAVE_POST)
......@@ -388,6 +385,7 @@ class GenericField : public Field{
GenericField();
~GenericField();
using Field::operator();
virtual double operator() (double x, double y, double z, GEntity *ge=0);
virtual const char *getName(){return "GenericField";};
......
......@@ -784,6 +784,7 @@ protected:
}
// Throw an assertion
using Recombinator::merge;
void merge(GRegion*);
// ------- exports --------
......@@ -802,6 +803,7 @@ protected:
public:
Recombinator_Graph(unsigned int max_nb_cliques, string filename=string());
virtual ~Recombinator_Graph();
using Recombinator::execute;
virtual void execute(GRegion*);
virtual void buildGraphOnly(unsigned int max_nb_cliques, string filename=string());
......
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 sign in to comment