mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-13 22:50:33 +05:00
fix SetMaxH in python
This commit is contained in:
parent
b611150ed3
commit
46aa785828
@ -95,6 +95,12 @@ namespace netgen
|
|||||||
return new Plane (p, n);
|
return new Plane (p, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Plane :: Print (ostream & ost) const
|
||||||
|
{
|
||||||
|
ost << "plane(" << p << "; " << n << ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Plane :: Transform (Transformation<3> & trans)
|
void Plane :: Transform (Transformation<3> & trans)
|
||||||
{
|
{
|
||||||
Point<3> hp;
|
Point<3> hp;
|
||||||
@ -828,6 +834,10 @@ namespace netgen
|
|||||||
return new Cylinder (a, b, r);
|
return new Cylinder (a, b, r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Cylinder :: Print (ostream & ost) const
|
||||||
|
{
|
||||||
|
ost << "cylinder(" << a << "; " << b << "; " << r << ")";
|
||||||
|
}
|
||||||
|
|
||||||
int Cylinder :: IsIdentic (const Surface & s2, int & inv, double eps) const
|
int Cylinder :: IsIdentic (const Surface & s2, int & inv, double eps) const
|
||||||
{
|
{
|
||||||
|
@ -44,7 +44,7 @@ namespace netgen
|
|||||||
virtual Point<3> GetSurfacePoint () const;
|
virtual Point<3> GetSurfacePoint () const;
|
||||||
|
|
||||||
|
|
||||||
virtual void Print (ostream & ist) const;
|
virtual void Print (ostream & str) const;
|
||||||
virtual void Read (istream & ist);
|
virtual void Read (istream & ist);
|
||||||
void PrintCoeff (ostream & ost) const;
|
void PrintCoeff (ostream & ost) const;
|
||||||
};
|
};
|
||||||
@ -70,6 +70,8 @@ namespace netgen
|
|||||||
static Primitive * CreateDefault ();
|
static Primitive * CreateDefault ();
|
||||||
|
|
||||||
virtual Primitive * Copy () const;
|
virtual Primitive * Copy () const;
|
||||||
|
virtual void Print (ostream & str) const;
|
||||||
|
|
||||||
virtual void Transform (Transformation<3> & trans);
|
virtual void Transform (Transformation<3> & trans);
|
||||||
|
|
||||||
|
|
||||||
@ -190,6 +192,8 @@ namespace netgen
|
|||||||
static Primitive * CreateDefault ();
|
static Primitive * CreateDefault ();
|
||||||
|
|
||||||
virtual Primitive * Copy () const;
|
virtual Primitive * Copy () const;
|
||||||
|
virtual void Print (ostream & str) const;
|
||||||
|
|
||||||
virtual void Transform (Transformation<3> & trans);
|
virtual void Transform (Transformation<3> & trans);
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -511,7 +511,7 @@ namespace netgen
|
|||||||
|
|
||||||
void CSGeometry :: AddSurface (char * name, Surface * surf)
|
void CSGeometry :: AddSurface (char * name, Surface * surf)
|
||||||
{
|
{
|
||||||
(*testout) << "Adding surface " << name << endl;
|
(*testout) << "Adding surface " << name << ": " << (*surf) << endl;
|
||||||
surfaces.Set (name, surf);
|
surfaces.Set (name, surf);
|
||||||
surf->SetName (name);
|
surf->SetName (name);
|
||||||
changeval++;
|
changeval++;
|
||||||
|
@ -41,9 +41,8 @@ namespace netgen
|
|||||||
PrintMessage (1, "Find edges");
|
PrintMessage (1, "Find edges");
|
||||||
PushStatus ("Find edges");
|
PushStatus ("Find edges");
|
||||||
|
|
||||||
for (int i = 1; i <= mesh.GetNP(); i++)
|
for (PointIndex pi : mesh.Points().Range())
|
||||||
meshpoint_tree->Insert (mesh.Point(i), i);
|
meshpoint_tree->Insert (mesh[pi], pi);
|
||||||
|
|
||||||
|
|
||||||
// add all special points before edge points (important for periodic identification)
|
// add all special points before edge points (important for periodic identification)
|
||||||
// JS, Jan 2007
|
// JS, Jan 2007
|
||||||
@ -64,6 +63,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// slow version
|
// slow version
|
||||||
for (int i = 0; i < specpoints.Size(); i++)
|
for (int i = 0; i < specpoints.Size(); i++)
|
||||||
@ -856,11 +856,9 @@ namespace netgen
|
|||||||
if (uselocalh)
|
if (uselocalh)
|
||||||
{
|
{
|
||||||
double lh = mesh.GetH(np);
|
double lh = mesh.GetH(np);
|
||||||
if (lh < loch)
|
if (lh < loch) loch = lh;
|
||||||
loch = lh;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
len += Dist (p, np) / loch;
|
len += Dist (p, np) / loch;
|
||||||
edgepoints.Append (np);
|
edgepoints.Append (np);
|
||||||
curvelength.Append (len);
|
curvelength.Append (len);
|
||||||
|
@ -93,7 +93,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetMaxH(int amaxh)
|
void SetMaxH(double amaxh)
|
||||||
{
|
{
|
||||||
if (maxh == -1)
|
if (maxh == -1)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user