mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-11 21:50:34 +05:00
Rename Array to NgArray
This commit is contained in:
parent
2c14dd6350
commit
cb87362f64
@ -116,7 +116,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
void Plane :: GetPrimitiveData (const char *& classname,
|
void Plane :: GetPrimitiveData (const char *& classname,
|
||||||
Array<double> & coeffs) const
|
NgArray<double> & coeffs) const
|
||||||
{
|
{
|
||||||
classname = "plane";
|
classname = "plane";
|
||||||
coeffs.SetSize (6);
|
coeffs.SetSize (6);
|
||||||
@ -128,7 +128,7 @@ namespace netgen
|
|||||||
coeffs.Elem(6) = n(2);
|
coeffs.Elem(6) = n(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Plane :: SetPrimitiveData (Array<double> & coeffs)
|
void Plane :: SetPrimitiveData (NgArray<double> & coeffs)
|
||||||
{
|
{
|
||||||
p(0) = coeffs.Elem(1);
|
p(0) = coeffs.Elem(1);
|
||||||
p(1) = coeffs.Elem(2);
|
p(1) = coeffs.Elem(2);
|
||||||
@ -367,7 +367,7 @@ namespace netgen
|
|||||||
c1 = (c(0) * c(0) + c(1) * c(1) + c(2) * c(2)) / (2 * r) - r / 2;
|
c1 = (c(0) * c(0) + c(1) * c(1) + c(2) * c(2)) / (2 * r) - r / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sphere :: GetPrimitiveData (const char *& classname, Array<double> & coeffs) const
|
void Sphere :: GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const
|
||||||
{
|
{
|
||||||
classname = "sphere";
|
classname = "sphere";
|
||||||
coeffs.SetSize (4);
|
coeffs.SetSize (4);
|
||||||
@ -377,7 +377,7 @@ namespace netgen
|
|||||||
coeffs.Elem(4) = r;
|
coeffs.Elem(4) = r;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sphere :: SetPrimitiveData (Array<double> & coeffs)
|
void Sphere :: SetPrimitiveData (NgArray<double> & coeffs)
|
||||||
{
|
{
|
||||||
c(0) = coeffs.Elem(1);
|
c(0) = coeffs.Elem(1);
|
||||||
c(1) = coeffs.Elem(2);
|
c(1) = coeffs.Elem(2);
|
||||||
@ -731,7 +731,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Cylinder :: Cylinder (Array<double> & coeffs)
|
Cylinder :: Cylinder (NgArray<double> & coeffs)
|
||||||
{
|
{
|
||||||
SetPrimitiveData(coeffs);
|
SetPrimitiveData(coeffs);
|
||||||
}
|
}
|
||||||
@ -773,7 +773,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Cylinder :: GetPrimitiveData (const char *& classname, Array<double> & coeffs) const
|
void Cylinder :: GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const
|
||||||
{
|
{
|
||||||
classname = "cylinder";
|
classname = "cylinder";
|
||||||
coeffs.SetSize (7);
|
coeffs.SetSize (7);
|
||||||
@ -786,7 +786,7 @@ namespace netgen
|
|||||||
coeffs.Elem(7) = r;
|
coeffs.Elem(7) = r;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Cylinder :: SetPrimitiveData (Array<double> & coeffs)
|
void Cylinder :: SetPrimitiveData (NgArray<double> & coeffs)
|
||||||
{
|
{
|
||||||
a(0) = coeffs.Elem(1);
|
a(0) = coeffs.Elem(1);
|
||||||
a(1) = coeffs.Elem(2);
|
a(1) = coeffs.Elem(2);
|
||||||
@ -1127,14 +1127,14 @@ namespace netgen
|
|||||||
CalcData();
|
CalcData();
|
||||||
}
|
}
|
||||||
|
|
||||||
EllipticCylinder :: EllipticCylinder (Array<double> & coeffs)
|
EllipticCylinder :: EllipticCylinder (NgArray<double> & coeffs)
|
||||||
{
|
{
|
||||||
SetPrimitiveData(coeffs);
|
SetPrimitiveData(coeffs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void EllipticCylinder :: GetPrimitiveData (const char *& classname, Array<double> & coeffs) const
|
void EllipticCylinder :: GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const
|
||||||
{
|
{
|
||||||
classname = "ellipticcylinder";
|
classname = "ellipticcylinder";
|
||||||
coeffs.SetSize (9);
|
coeffs.SetSize (9);
|
||||||
@ -1149,7 +1149,7 @@ namespace netgen
|
|||||||
coeffs[8] = vs(2);
|
coeffs[8] = vs(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EllipticCylinder :: SetPrimitiveData (Array<double> & coeffs)
|
void EllipticCylinder :: SetPrimitiveData (NgArray<double> & coeffs)
|
||||||
{
|
{
|
||||||
a(0) = coeffs[0];
|
a(0) = coeffs[0];
|
||||||
a(1) = coeffs[1];
|
a(1) = coeffs[1];
|
||||||
@ -1312,7 +1312,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Cone :: GetPrimitiveData (const char *& classname, Array<double> & coeffs) const
|
void Cone :: GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const
|
||||||
{
|
{
|
||||||
classname = "cone";
|
classname = "cone";
|
||||||
coeffs.SetSize (8);
|
coeffs.SetSize (8);
|
||||||
@ -1326,7 +1326,7 @@ namespace netgen
|
|||||||
coeffs.Elem(8) = rb;
|
coeffs.Elem(8) = rb;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Cone :: SetPrimitiveData (Array<double> & coeffs)
|
void Cone :: SetPrimitiveData (NgArray<double> & coeffs)
|
||||||
{
|
{
|
||||||
a(0) = coeffs.Elem(1);
|
a(0) = coeffs.Elem(1);
|
||||||
a(1) = coeffs.Elem(2);
|
a(1) = coeffs.Elem(2);
|
||||||
@ -1537,7 +1537,7 @@ Primitive * EllipticCone :: CreateDefault ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EllipticCone :: GetPrimitiveData (const char *& classname, Array<double> & coeffs) const
|
void EllipticCone :: GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const
|
||||||
{
|
{
|
||||||
classname = "ellipticcone";
|
classname = "ellipticcone";
|
||||||
coeffs.SetSize (15);
|
coeffs.SetSize (15);
|
||||||
@ -1556,7 +1556,7 @@ Primitive * EllipticCone :: CreateDefault ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EllipticCone :: SetPrimitiveData (Array<double> & coeffs)
|
void EllipticCone :: SetPrimitiveData (NgArray<double> & coeffs)
|
||||||
{
|
{
|
||||||
|
|
||||||
a(0) = coeffs.Elem(1);
|
a(0) = coeffs.Elem(1);
|
||||||
@ -1727,7 +1727,7 @@ void EllipticCone :: GetTriangleApproximation
|
|||||||
r = ar;
|
r = ar;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Torus :: GetPrimitiveData (const char *& classname, Array<double> & coeffs) const
|
void Torus :: GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const
|
||||||
{
|
{
|
||||||
classname = "torus";
|
classname = "torus";
|
||||||
coeffs.SetSize (8);
|
coeffs.SetSize (8);
|
||||||
@ -1741,7 +1741,7 @@ void EllipticCone :: GetTriangleApproximation
|
|||||||
coeffs.Elem(8) = r;
|
coeffs.Elem(8) = r;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Torus :: SetPrimitiveData (Array<double> & coeffs)
|
void Torus :: SetPrimitiveData (NgArray<double> & coeffs)
|
||||||
{
|
{
|
||||||
c(0) = coeffs.Elem(1);
|
c(0) = coeffs.Elem(1);
|
||||||
c(1) = coeffs.Elem(2);
|
c(1) = coeffs.Elem(2);
|
||||||
|
@ -80,8 +80,8 @@ namespace netgen
|
|||||||
Point<3> P() const { return p; }
|
Point<3> P() const { return p; }
|
||||||
Vec<3> N() const { return n; }
|
Vec<3> N() const { return n; }
|
||||||
virtual void GetPrimitiveData (const char *& classname,
|
virtual void GetPrimitiveData (const char *& classname,
|
||||||
Array<double> & coeffs) const;
|
NgArray<double> & coeffs) const;
|
||||||
virtual void SetPrimitiveData (Array<double> & coeffs);
|
virtual void SetPrimitiveData (NgArray<double> & coeffs);
|
||||||
static Primitive * CreateDefault ();
|
static Primitive * CreateDefault ();
|
||||||
|
|
||||||
virtual Primitive * Copy () const;
|
virtual Primitive * Copy () const;
|
||||||
@ -153,8 +153,8 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void GetPrimitiveData (const char *& classname,
|
virtual void GetPrimitiveData (const char *& classname,
|
||||||
Array<double> & coeffs) const;
|
NgArray<double> & coeffs) const;
|
||||||
virtual void SetPrimitiveData (Array<double> & coeffs);
|
virtual void SetPrimitiveData (NgArray<double> & coeffs);
|
||||||
static Primitive * CreateDefault ();
|
static Primitive * CreateDefault ();
|
||||||
|
|
||||||
virtual Primitive * Copy () const;
|
virtual Primitive * Copy () const;
|
||||||
@ -208,7 +208,7 @@ namespace netgen
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
Cylinder (const Point<3> & aa, const Point<3> & ab, double ar);
|
Cylinder (const Point<3> & aa, const Point<3> & ab, double ar);
|
||||||
Cylinder (Array<double> & coeffs);
|
Cylinder (NgArray<double> & coeffs);
|
||||||
// default constructor for archive
|
// default constructor for archive
|
||||||
Cylinder() {}
|
Cylinder() {}
|
||||||
|
|
||||||
@ -220,8 +220,8 @@ namespace netgen
|
|||||||
Point<3> A() const { return a; }
|
Point<3> A() const { return a; }
|
||||||
Point<3> B() const { return b; }
|
Point<3> B() const { return b; }
|
||||||
double R() const { return r; }
|
double R() const { return r; }
|
||||||
virtual void GetPrimitiveData (const char *& classname, Array<double> & coeffs) const;
|
virtual void GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const;
|
||||||
virtual void SetPrimitiveData (Array<double> & coeffs);
|
virtual void SetPrimitiveData (NgArray<double> & coeffs);
|
||||||
static Primitive * CreateDefault ();
|
static Primitive * CreateDefault ();
|
||||||
|
|
||||||
virtual Primitive * Copy () const;
|
virtual Primitive * Copy () const;
|
||||||
@ -278,7 +278,7 @@ namespace netgen
|
|||||||
///
|
///
|
||||||
EllipticCylinder (const Point<3> & aa,
|
EllipticCylinder (const Point<3> & aa,
|
||||||
const Vec<3> & avl, const Vec<3> & avs);
|
const Vec<3> & avl, const Vec<3> & avs);
|
||||||
EllipticCylinder (Array<double> & coeffs);
|
EllipticCylinder (NgArray<double> & coeffs);
|
||||||
// default constructor for archive
|
// default constructor for archive
|
||||||
EllipticCylinder() {}
|
EllipticCylinder() {}
|
||||||
|
|
||||||
@ -289,8 +289,8 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
// static Primitive * CreateDefault ();
|
// static Primitive * CreateDefault ();
|
||||||
virtual void GetPrimitiveData (const char *& classname, Array<double> & coeffs) const;
|
virtual void GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const;
|
||||||
virtual void SetPrimitiveData (Array<double> & coeffs);
|
virtual void SetPrimitiveData (NgArray<double> & coeffs);
|
||||||
|
|
||||||
///
|
///
|
||||||
virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const;
|
virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const;
|
||||||
@ -393,8 +393,8 @@ namespace netgen
|
|||||||
ar & a & b & ra & rb & minr & vab & t0vec & t1vec & vabl & t0 & t1 & cosphi;
|
ar & a & b & ra & rb & minr & vab & t0vec & t1vec & vabl & t0 & t1 & cosphi;
|
||||||
}
|
}
|
||||||
static Primitive * CreateDefault ();
|
static Primitive * CreateDefault ();
|
||||||
virtual void GetPrimitiveData (const char *& classname, Array<double> & coeffs) const;
|
virtual void GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const;
|
||||||
virtual void SetPrimitiveData (Array<double> & coeffs);
|
virtual void SetPrimitiveData (NgArray<double> & coeffs);
|
||||||
|
|
||||||
///
|
///
|
||||||
virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const;
|
virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const;
|
||||||
@ -445,8 +445,8 @@ namespace netgen
|
|||||||
ar & a & vl & vs & h & vlr;
|
ar & a & vl & vs & h & vlr;
|
||||||
}
|
}
|
||||||
static Primitive * CreateDefault ();
|
static Primitive * CreateDefault ();
|
||||||
virtual void GetPrimitiveData (const char *& classname, Array<double> & coeffs) const;
|
virtual void GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const;
|
||||||
virtual void SetPrimitiveData (Array<double> & coeffs);
|
virtual void SetPrimitiveData (NgArray<double> & coeffs);
|
||||||
|
|
||||||
///
|
///
|
||||||
virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const;
|
virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const;
|
||||||
@ -513,9 +513,9 @@ namespace netgen
|
|||||||
virtual Point<3> GetSurfacePoint () const;
|
virtual Point<3> GetSurfacePoint () const;
|
||||||
/// OK
|
/// OK
|
||||||
virtual void GetPrimitiveData (const char *& classname,
|
virtual void GetPrimitiveData (const char *& classname,
|
||||||
Array<double> & coeffs) const;
|
NgArray<double> & coeffs) const;
|
||||||
/// OK
|
/// OK
|
||||||
virtual void SetPrimitiveData (Array<double> & coeffs);
|
virtual void SetPrimitiveData (NgArray<double> & coeffs);
|
||||||
/// OK
|
/// OK
|
||||||
static Primitive * CreateDefault ();
|
static Primitive * CreateDefault ();
|
||||||
/// OK
|
/// OK
|
||||||
|
@ -343,7 +343,7 @@ INSOLID_TYPE Brick :: VecInSolid4 (const Point<3> & p,
|
|||||||
|
|
||||||
|
|
||||||
void Brick ::
|
void Brick ::
|
||||||
GetPrimitiveData (const char *& classname, Array<double> & coeffs) const
|
GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const
|
||||||
{
|
{
|
||||||
classname = "brick";
|
classname = "brick";
|
||||||
coeffs.SetSize(12);
|
coeffs.SetSize(12);
|
||||||
@ -364,7 +364,7 @@ GetPrimitiveData (const char *& classname, Array<double> & coeffs) const
|
|||||||
coeffs.Elem(12) = p4(2);
|
coeffs.Elem(12) = p4(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Brick :: SetPrimitiveData (Array<double> & coeffs)
|
void Brick :: SetPrimitiveData (NgArray<double> & coeffs)
|
||||||
{
|
{
|
||||||
p1(0) = coeffs.Elem(1);
|
p1(0) = coeffs.Elem(1);
|
||||||
p1(1) = coeffs.Elem(2);
|
p1(1) = coeffs.Elem(2);
|
||||||
@ -414,7 +414,7 @@ void Brick :: CalcData()
|
|||||||
{ 1, 5, 3, 7 },
|
{ 1, 5, 3, 7 },
|
||||||
{ 2, 4, 6, 8 } };
|
{ 2, 4, 6, 8 } };
|
||||||
|
|
||||||
Array<double> data(6);
|
NgArray<double> data(6);
|
||||||
for (i = 0; i < 6; i++)
|
for (i = 0; i < 6; i++)
|
||||||
{
|
{
|
||||||
const Point<3> lp1 = pi[lface[i][0]-1];
|
const Point<3> lp1 = pi[lface[i][0]-1];
|
||||||
|
@ -63,8 +63,8 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
Point<3> p1, p2, p3, p4;
|
Point<3> p1, p2, p3, p4;
|
||||||
Vec<3> v12, v13, v14;
|
Vec<3> v12, v13, v14;
|
||||||
// Array<OneSurfacePrimitive*> faces;
|
// NgArray<OneSurfacePrimitive*> faces;
|
||||||
Array<Plane*> faces;
|
NgArray<Plane*> faces;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Brick (Point<3> ap1, Point<3> ap2, Point<3> ap3, Point<3> ap4);
|
Brick (Point<3> ap1, Point<3> ap2, Point<3> ap3, Point<3> ap4);
|
||||||
@ -115,8 +115,8 @@ namespace netgen
|
|||||||
{ return *faces[i]; }
|
{ return *faces[i]; }
|
||||||
|
|
||||||
|
|
||||||
virtual void GetPrimitiveData (const char *& classname, Array<double> & coeffs) const;
|
virtual void GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const;
|
||||||
virtual void SetPrimitiveData (Array<double> & coeffs);
|
virtual void SetPrimitiveData (NgArray<double> & coeffs);
|
||||||
|
|
||||||
virtual void Reduce (const BoxSphere<3> & box);
|
virtual void Reduce (const BoxSphere<3> & box);
|
||||||
virtual void UnReduce ();
|
virtual void UnReduce ();
|
||||||
|
@ -75,7 +75,7 @@ namespace netgen
|
|||||||
|
|
||||||
void CSGeometry :: Clean ()
|
void CSGeometry :: Clean ()
|
||||||
{
|
{
|
||||||
Array< Solid* > to_delete;
|
NgArray< Solid* > to_delete;
|
||||||
|
|
||||||
for (int i = 0; i < solids.Size(); i++)
|
for (int i = 0; i < solids.Size(); i++)
|
||||||
if(!to_delete.Contains(solids[i]->S1()))
|
if(!to_delete.Contains(solids[i]->S1()))
|
||||||
@ -162,7 +162,7 @@ namespace netgen
|
|||||||
if (prim)
|
if (prim)
|
||||||
{
|
{
|
||||||
const char * classname;
|
const char * classname;
|
||||||
Array<double> coeffs;
|
NgArray<double> coeffs;
|
||||||
|
|
||||||
prim -> GetPrimitiveData (classname, coeffs);
|
prim -> GetPrimitiveData (classname, coeffs);
|
||||||
|
|
||||||
@ -237,7 +237,7 @@ namespace netgen
|
|||||||
|
|
||||||
char key[100], name[100], classname[100], sname[100];
|
char key[100], name[100], classname[100], sname[100];
|
||||||
int ncoeff, i, j;
|
int ncoeff, i, j;
|
||||||
Array<double> coeff;
|
NgArray<double> coeff;
|
||||||
|
|
||||||
while (ist.good())
|
while (ist.good())
|
||||||
{
|
{
|
||||||
@ -343,7 +343,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Array<double> coeffs;
|
NgArray<double> coeffs;
|
||||||
const char * classname;
|
const char * classname;
|
||||||
|
|
||||||
out << "csgsurfaces " << GetNSurf() << "\n";
|
out << "csgsurfaces " << GetNSurf() << "\n";
|
||||||
@ -408,7 +408,7 @@ namespace netgen
|
|||||||
|
|
||||||
void CSGeometry :: LoadSurfaces (istream & in)
|
void CSGeometry :: LoadSurfaces (istream & in)
|
||||||
{
|
{
|
||||||
Array<double> coeffs;
|
NgArray<double> coeffs;
|
||||||
string classname;
|
string classname;
|
||||||
int nsurfaces,size;
|
int nsurfaces,size;
|
||||||
|
|
||||||
@ -722,7 +722,7 @@ namespace netgen
|
|||||||
void CSGeometry :: SetFlags (const char * solidname, const Flags & flags)
|
void CSGeometry :: SetFlags (const char * solidname, const Flags & flags)
|
||||||
{
|
{
|
||||||
Solid * solid = solids[solidname];
|
Solid * solid = solids[solidname];
|
||||||
Array<int> surfind;
|
NgArray<int> surfind;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
double maxh = flags.GetNumFlag ("maxh", -1);
|
double maxh = flags.GetNumFlag ("maxh", -1);
|
||||||
@ -752,7 +752,7 @@ namespace netgen
|
|||||||
|
|
||||||
if (flags.StringListFlagDefined ("bcname"))
|
if (flags.StringListFlagDefined ("bcname"))
|
||||||
{
|
{
|
||||||
const Array<char*> & bcname = flags.GetStringListFlag("bcname");
|
const NgArray<char*> & bcname = flags.GetStringListFlag("bcname");
|
||||||
|
|
||||||
Polyhedra * polyh;
|
Polyhedra * polyh;
|
||||||
if(solid->S1())
|
if(solid->S1())
|
||||||
@ -762,7 +762,7 @@ namespace netgen
|
|||||||
|
|
||||||
if(polyh)
|
if(polyh)
|
||||||
{
|
{
|
||||||
Array < Array<int> * > polysurfs;
|
NgArray < NgArray<int> * > polysurfs;
|
||||||
polyh->GetPolySurfs(polysurfs);
|
polyh->GetPolySurfs(polysurfs);
|
||||||
if(bcname.Size() != polysurfs.Size())
|
if(bcname.Size() != polysurfs.Size())
|
||||||
cerr << "WARNING: solid \"" << solidname << "\" has " << polysurfs.Size()
|
cerr << "WARNING: solid \"" << solidname << "\" has " << polysurfs.Size()
|
||||||
@ -806,7 +806,7 @@ namespace netgen
|
|||||||
|
|
||||||
if (flags.NumListFlagDefined ("bc"))
|
if (flags.NumListFlagDefined ("bc"))
|
||||||
{
|
{
|
||||||
const Array<double> & bcnum = flags.GetNumListFlag("bc");
|
const NgArray<double> & bcnum = flags.GetNumListFlag("bc");
|
||||||
|
|
||||||
Polyhedra * polyh;
|
Polyhedra * polyh;
|
||||||
if(solid->S1())
|
if(solid->S1())
|
||||||
@ -816,7 +816,7 @@ namespace netgen
|
|||||||
|
|
||||||
if(polyh)
|
if(polyh)
|
||||||
{
|
{
|
||||||
Array < Array<int> * > polysurfs;
|
NgArray < NgArray<int> * > polysurfs;
|
||||||
polyh->GetPolySurfs(polysurfs);
|
polyh->GetPolySurfs(polysurfs);
|
||||||
if(bcnum.Size() != polysurfs.Size())
|
if(bcnum.Size() != polysurfs.Size())
|
||||||
cerr << "WARNING: solid \"" << solidname << "\" has " << polysurfs.Size()
|
cerr << "WARNING: solid \"" << solidname << "\" has " << polysurfs.Size()
|
||||||
@ -880,7 +880,7 @@ namespace netgen
|
|||||||
void CSGeometry ::
|
void CSGeometry ::
|
||||||
GetSurfaceIndices (const Solid * sol,
|
GetSurfaceIndices (const Solid * sol,
|
||||||
const BoxSphere<3> & box,
|
const BoxSphere<3> & box,
|
||||||
Array<int> & locsurf) const
|
NgArray<int> & locsurf) const
|
||||||
{
|
{
|
||||||
ReducePrimitiveIterator rpi(box);
|
ReducePrimitiveIterator rpi(box);
|
||||||
UnReducePrimitiveIterator urpi;
|
UnReducePrimitiveIterator urpi;
|
||||||
@ -909,7 +909,7 @@ namespace netgen
|
|||||||
void CSGeometry ::
|
void CSGeometry ::
|
||||||
GetIndependentSurfaceIndices (const Solid * sol,
|
GetIndependentSurfaceIndices (const Solid * sol,
|
||||||
const BoxSphere<3> & box,
|
const BoxSphere<3> & box,
|
||||||
Array<int> & locsurf) const
|
NgArray<int> & locsurf) const
|
||||||
{
|
{
|
||||||
ReducePrimitiveIterator rpi(box);
|
ReducePrimitiveIterator rpi(box);
|
||||||
UnReducePrimitiveIterator urpi;
|
UnReducePrimitiveIterator urpi;
|
||||||
@ -968,7 +968,7 @@ namespace netgen
|
|||||||
void CSGeometry ::
|
void CSGeometry ::
|
||||||
GetIndependentSurfaceIndices (const Solid * sol,
|
GetIndependentSurfaceIndices (const Solid * sol,
|
||||||
const Point<3> & p, Vec<3> & v,
|
const Point<3> & p, Vec<3> & v,
|
||||||
Array<int> & locsurf) const
|
NgArray<int> & locsurf) const
|
||||||
{
|
{
|
||||||
cout << "very dangerous" << endl;
|
cout << "very dangerous" << endl;
|
||||||
Point<3> p2 = p + 1e-2 * v;
|
Point<3> p2 = p + 1e-2 * v;
|
||||||
@ -980,7 +980,7 @@ namespace netgen
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
void CSGeometry ::
|
void CSGeometry ::
|
||||||
GetIndependentSurfaceIndices (Array<int> & locsurf) const
|
GetIndependentSurfaceIndices (NgArray<int> & locsurf) const
|
||||||
{
|
{
|
||||||
for (int i = 0; i < locsurf.Size(); i++)
|
for (int i = 0; i < locsurf.Size(); i++)
|
||||||
locsurf[i] = isidenticto[locsurf[i]];
|
locsurf[i] = isidenticto[locsurf[i]];
|
||||||
@ -1022,7 +1022,7 @@ namespace netgen
|
|||||||
delete triapprox[i];
|
delete triapprox[i];
|
||||||
triapprox.SetSize (ntlo);
|
triapprox.SetSize (ntlo);
|
||||||
|
|
||||||
Array<int> surfind;
|
NgArray<int> surfind;
|
||||||
IndexSet iset(GetNSurf());
|
IndexSet iset(GetNSurf());
|
||||||
|
|
||||||
for (int i = 0; i < ntlo; i++)
|
for (int i = 0; i < ntlo; i++)
|
||||||
@ -1159,7 +1159,7 @@ namespace netgen
|
|||||||
|
|
||||||
// IndexSet iset(GetNSurf());
|
// IndexSet iset(GetNSurf());
|
||||||
locsol -> GetSurfaceIndices (iset);
|
locsol -> GetSurfaceIndices (iset);
|
||||||
const Array<int> & lsurfi = iset.GetArray();
|
const NgArray<int> & lsurfi = iset.GetArray();
|
||||||
|
|
||||||
locsol -> IterateSolid (urpi);
|
locsol -> IterateSolid (urpi);
|
||||||
|
|
||||||
|
@ -106,10 +106,10 @@ namespace netgen
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
/// primitive of surface
|
/// primitive of surface
|
||||||
Array<const Primitive*> surf2prim;
|
NgArray<const Primitive*> surf2prim;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Array<Surface*> delete_them;
|
NgArray<Surface*> delete_them;
|
||||||
|
|
||||||
/// all named solids
|
/// all named solids
|
||||||
SymbolTable<Solid*> solids;
|
SymbolTable<Solid*> solids;
|
||||||
@ -120,7 +120,7 @@ namespace netgen
|
|||||||
SymbolTable< SplineGeometry<3>* > splinecurves3d;
|
SymbolTable< SplineGeometry<3>* > splinecurves3d;
|
||||||
|
|
||||||
/// all top level objects: solids and surfaces
|
/// all top level objects: solids and surfaces
|
||||||
Array<TopLevelObject*> toplevelobjects;
|
NgArray<TopLevelObject*> toplevelobjects;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// additional points specified by user
|
/// additional points specified by user
|
||||||
@ -139,14 +139,14 @@ namespace netgen
|
|||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Array<Point<3> > userpoints;
|
// NgArray<Point<3> > userpoints;
|
||||||
Array<UserPoint> userpoints;
|
NgArray<UserPoint> userpoints;
|
||||||
Array<double> userpoints_ref_factor;
|
NgArray<double> userpoints_ref_factor;
|
||||||
|
|
||||||
mutable Array<Point<3> > identpoints;
|
mutable NgArray<Point<3> > identpoints;
|
||||||
|
|
||||||
/// triangular approximation of top level objects
|
/// triangular approximation of top level objects
|
||||||
Array<TriangleApproximation*> triapprox;
|
NgArray<TriangleApproximation*> triapprox;
|
||||||
|
|
||||||
/// increment, if geometry is changed
|
/// increment, if geometry is changed
|
||||||
static int changeval;
|
static int changeval;
|
||||||
@ -159,7 +159,7 @@ namespace netgen
|
|||||||
|
|
||||||
/// identic surfaces are stored by pair of indizes, val = inverse
|
/// identic surfaces are stored by pair of indizes, val = inverse
|
||||||
INDEX_2_HASHTABLE<int> identicsurfaces;
|
INDEX_2_HASHTABLE<int> identicsurfaces;
|
||||||
Array<int> isidenticto;
|
NgArray<int> isidenticto;
|
||||||
/// identification of boundaries (periodic, thin domains, ...)
|
/// identification of boundaries (periodic, thin domains, ...)
|
||||||
|
|
||||||
double ideps;
|
double ideps;
|
||||||
@ -168,7 +168,7 @@ namespace netgen
|
|||||||
string filename;
|
string filename;
|
||||||
|
|
||||||
/// store splinesurfaces, such that added ones do not get deleted before geometry does
|
/// store splinesurfaces, such that added ones do not get deleted before geometry does
|
||||||
Array<shared_ptr<SplineSurface>> spline_surfaces;
|
NgArray<shared_ptr<SplineSurface>> spline_surfaces;
|
||||||
|
|
||||||
shared_ptr<BlockAllocator> solid_ball = Solid::ball;
|
shared_ptr<BlockAllocator> solid_ball = Solid::ball;
|
||||||
|
|
||||||
@ -263,10 +263,10 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
// quick implementations:
|
// quick implementations:
|
||||||
Array<SingularFace*> singfaces;
|
NgArray<SingularFace*> singfaces;
|
||||||
Array<SingularEdge*> singedges;
|
NgArray<SingularEdge*> singedges;
|
||||||
Array<SingularPoint*> singpoints;
|
NgArray<SingularPoint*> singpoints;
|
||||||
Array<Identification*> identifications;
|
NgArray<Identification*> identifications;
|
||||||
|
|
||||||
int GetNIdentifications (void) const { return identifications.Size(); }
|
int GetNIdentifications (void) const { return identifications.Size(); }
|
||||||
void AddIdentification (Identification * ident);
|
void AddIdentification (Identification * ident);
|
||||||
@ -280,19 +280,19 @@ namespace netgen
|
|||||||
///
|
///
|
||||||
void GetSurfaceIndices (const Solid * sol,
|
void GetSurfaceIndices (const Solid * sol,
|
||||||
const BoxSphere<3> & box,
|
const BoxSphere<3> & box,
|
||||||
Array<int> & locsurf) const;
|
NgArray<int> & locsurf) const;
|
||||||
///
|
///
|
||||||
void GetIndependentSurfaceIndices (const Solid * sol,
|
void GetIndependentSurfaceIndices (const Solid * sol,
|
||||||
const BoxSphere<3> & box,
|
const BoxSphere<3> & box,
|
||||||
Array<int> & locsurf) const;
|
NgArray<int> & locsurf) const;
|
||||||
///
|
///
|
||||||
/*
|
/*
|
||||||
void GetIndependentSurfaceIndices (const Solid * sol,
|
void GetIndependentSurfaceIndices (const Solid * sol,
|
||||||
const Point<3> & p, Vec<3> & v,
|
const Point<3> & p, Vec<3> & v,
|
||||||
Array<int> & locsurf) const;
|
NgArray<int> & locsurf) const;
|
||||||
*/
|
*/
|
||||||
///
|
///
|
||||||
void GetIndependentSurfaceIndices (Array<int> & locsurf) const;
|
void GetIndependentSurfaceIndices (NgArray<int> & locsurf) const;
|
||||||
|
|
||||||
///
|
///
|
||||||
int GetSurfaceClassRepresentant (int si) const
|
int GetSurfaceClassRepresentant (int si) const
|
||||||
@ -344,7 +344,7 @@ namespace netgen
|
|||||||
string * bcname;
|
string * bcname;
|
||||||
};
|
};
|
||||||
|
|
||||||
Array<BCModification> bcmodifications;
|
NgArray<BCModification> bcmodifications;
|
||||||
|
|
||||||
virtual int GenerateMesh (shared_ptr<Mesh> & mesh, MeshingParameters & mparam) override;
|
virtual int GenerateMesh (shared_ptr<Mesh> & mesh, MeshingParameters & mparam) override;
|
||||||
|
|
||||||
|
@ -399,7 +399,7 @@ namespace netgen
|
|||||||
int inputface = 0;
|
int inputface = 0;
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
Array<int> pnums,cleaned_pnums;
|
NgArray<int> pnums,cleaned_pnums;
|
||||||
for(int i=0; i<3; i++)
|
for(int i=0; i<3; i++)
|
||||||
{
|
{
|
||||||
pnums.Append((int) (ParseNumber (scan)));
|
pnums.Append((int) (ParseNumber (scan)));
|
||||||
@ -786,7 +786,7 @@ namespace netgen
|
|||||||
|
|
||||||
if(scan.GetToken() == '-' || scan.GetToken() == TOK_NUM)
|
if(scan.GetToken() == '-' || scan.GetToken() == TOK_NUM)
|
||||||
{
|
{
|
||||||
Array<double> vals;
|
NgArray<double> vals;
|
||||||
vals.Append (ParseNumber(scan));
|
vals.Append (ParseNumber(scan));
|
||||||
while (scan.GetToken() == ',')
|
while (scan.GetToken() == ',')
|
||||||
{
|
{
|
||||||
@ -798,7 +798,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // string list
|
{ // string list
|
||||||
Array<char*> vals;
|
NgArray<char*> vals;
|
||||||
string val = scan.GetStringValue();
|
string val = scan.GetStringValue();
|
||||||
vals.Append(new char[val.size()+1]);
|
vals.Append(new char[val.size()+1]);
|
||||||
strcpy(vals.Last(),val.c_str());
|
strcpy(vals.Last(),val.c_str());
|
||||||
@ -908,7 +908,7 @@ namespace netgen
|
|||||||
|
|
||||||
if (flags.NumListFlagDefined ("col"))
|
if (flags.NumListFlagDefined ("col"))
|
||||||
{
|
{
|
||||||
const Array<double> & col =
|
const NgArray<double> & col =
|
||||||
flags.GetNumListFlag ("col");
|
flags.GetNumListFlag ("col");
|
||||||
tlo->SetRGB (col[0], col[1], col[2]);
|
tlo->SetRGB (col[0], col[1], col[2]);
|
||||||
}
|
}
|
||||||
@ -934,7 +934,7 @@ namespace netgen
|
|||||||
|
|
||||||
ParseChar (scan, ';');
|
ParseChar (scan, ';');
|
||||||
|
|
||||||
Array<int> si;
|
NgArray<int> si;
|
||||||
geom->GetSolid(surfname)->GetSurfaceIndices(si);
|
geom->GetSolid(surfname)->GetSurfaceIndices(si);
|
||||||
int tlonr =
|
int tlonr =
|
||||||
geom->SetTopLevelObject ((Solid*)geom->GetSolid(name),
|
geom->SetTopLevelObject ((Solid*)geom->GetSolid(name),
|
||||||
@ -942,7 +942,7 @@ namespace netgen
|
|||||||
TopLevelObject * tlo = geom->GetTopLevelObject (tlonr);
|
TopLevelObject * tlo = geom->GetTopLevelObject (tlonr);
|
||||||
if (flags.NumListFlagDefined ("col"))
|
if (flags.NumListFlagDefined ("col"))
|
||||||
{
|
{
|
||||||
const Array<double> & col = flags.GetNumListFlag ("col");
|
const NgArray<double> & col = flags.GetNumListFlag ("col");
|
||||||
tlo->SetRGB (col.Get(1), col.Get(2), col.Get(3));
|
tlo->SetRGB (col.Get(1), col.Get(2), col.Get(3));
|
||||||
}
|
}
|
||||||
if (flags.GetDefineFlag ("transparent"))
|
if (flags.GetDefineFlag ("transparent"))
|
||||||
@ -980,7 +980,7 @@ namespace netgen
|
|||||||
ParseChar (scan, ';');
|
ParseChar (scan, ';');
|
||||||
|
|
||||||
|
|
||||||
Array<int> si1, si2;
|
NgArray<int> si1, si2;
|
||||||
geom->GetSolid(name1)->GetSurfaceIndices(si1);
|
geom->GetSolid(name1)->GetSurfaceIndices(si1);
|
||||||
geom->GetSolid(name2)->GetSurfaceIndices(si2);
|
geom->GetSolid(name2)->GetSurfaceIndices(si2);
|
||||||
|
|
||||||
@ -1016,7 +1016,7 @@ namespace netgen
|
|||||||
ParseChar (scan, ';');
|
ParseChar (scan, ';');
|
||||||
|
|
||||||
|
|
||||||
Array<int> si1, si2;
|
NgArray<int> si1, si2;
|
||||||
geom->GetSolid(name1)->GetSurfaceIndices(si1);
|
geom->GetSolid(name1)->GetSurfaceIndices(si1);
|
||||||
geom->GetSolid(name2)->GetSurfaceIndices(si2);
|
geom->GetSolid(name2)->GetSurfaceIndices(si2);
|
||||||
|
|
||||||
@ -1246,7 +1246,7 @@ namespace netgen
|
|||||||
|
|
||||||
CSGeometry::BCModification bcm;
|
CSGeometry::BCModification bcm;
|
||||||
bcm.bcname = NULL;
|
bcm.bcname = NULL;
|
||||||
Array<int> si;
|
NgArray<int> si;
|
||||||
|
|
||||||
geom->GetSolid(name1)->GetSurfaceIndices(si);
|
geom->GetSolid(name1)->GetSurfaceIndices(si);
|
||||||
if(si.Size() == 0)
|
if(si.Size() == 0)
|
||||||
@ -1298,7 +1298,7 @@ namespace netgen
|
|||||||
bcm.bcname = NULL;
|
bcm.bcname = NULL;
|
||||||
|
|
||||||
|
|
||||||
Array<int> si;
|
NgArray<int> si;
|
||||||
|
|
||||||
geom->GetSolid(name1)->GetSurfaceIndices(si);
|
geom->GetSolid(name1)->GetSurfaceIndices(si);
|
||||||
if(si.Size() == 0)
|
if(si.Size() == 0)
|
||||||
|
@ -154,7 +154,7 @@ namespace netgen
|
|||||||
tcl_const char * name = argv[1];
|
tcl_const char * name = argv[1];
|
||||||
tcl_const char * value = argv[2];
|
tcl_const char * value = argv[2];
|
||||||
|
|
||||||
Array<double> coeffs;
|
NgArray<double> coeffs;
|
||||||
|
|
||||||
|
|
||||||
cout << "Set primitive data, name = " << name
|
cout << "Set primitive data, name = " << name
|
||||||
@ -222,7 +222,7 @@ namespace netgen
|
|||||||
|
|
||||||
const char * classname;
|
const char * classname;
|
||||||
|
|
||||||
Array<double> coeffs;
|
NgArray<double> coeffs;
|
||||||
|
|
||||||
geometry->GetSolid (name)->GetPrimitive()->GetPrimitiveData (classname, coeffs);
|
geometry->GetSolid (name)->GetPrimitive()->GetPrimitiveData (classname, coeffs);
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ namespace netgen
|
|||||||
|
|
||||||
EdgeCalculation ::
|
EdgeCalculation ::
|
||||||
EdgeCalculation (const CSGeometry & ageometry,
|
EdgeCalculation (const CSGeometry & ageometry,
|
||||||
Array<SpecialPoint> & aspecpoints,
|
NgArray<SpecialPoint> & aspecpoints,
|
||||||
MeshingParameters & amparam)
|
MeshingParameters & amparam)
|
||||||
: geometry(ageometry), specpoints(aspecpoints), mparam(amparam)
|
: geometry(ageometry), specpoints(aspecpoints), mparam(amparam)
|
||||||
{
|
{
|
||||||
@ -48,7 +48,7 @@ namespace netgen
|
|||||||
// 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
|
||||||
const double di=1e-7*geometry.MaxSize();
|
const double di=1e-7*geometry.MaxSize();
|
||||||
Array<int> locsearch;
|
NgArray<int> locsearch;
|
||||||
|
|
||||||
for (int i = 0; i < specpoints.Size(); i++)
|
for (int i = 0; i < specpoints.Size(); i++)
|
||||||
if (specpoints[i].unconditional)
|
if (specpoints[i].unconditional)
|
||||||
@ -96,9 +96,9 @@ namespace netgen
|
|||||||
|
|
||||||
void EdgeCalculation :: CalcEdges1 (double h, Mesh & mesh)
|
void EdgeCalculation :: CalcEdges1 (double h, Mesh & mesh)
|
||||||
{
|
{
|
||||||
Array<int> hsp(specpoints.Size());
|
NgArray<int> hsp(specpoints.Size());
|
||||||
Array<int> glob2hsp(specpoints.Size());
|
NgArray<int> glob2hsp(specpoints.Size());
|
||||||
Array<int> startpoints, endpoints;
|
NgArray<int> startpoints, endpoints;
|
||||||
|
|
||||||
|
|
||||||
int pos, ep;
|
int pos, ep;
|
||||||
@ -107,11 +107,11 @@ namespace netgen
|
|||||||
Point<3> p, np;
|
Point<3> p, np;
|
||||||
int pi1, s1, s2, s1_orig, s2_orig;
|
int pi1, s1, s2, s1_orig, s2_orig;
|
||||||
|
|
||||||
Array<Point<3> > edgepoints;
|
NgArray<Point<3> > edgepoints;
|
||||||
Array<double> curvelength;
|
NgArray<double> curvelength;
|
||||||
int copyedge = 0, copyfromedge = -1, copyedgeidentification = -1;
|
int copyedge = 0, copyfromedge = -1, copyedgeidentification = -1;
|
||||||
|
|
||||||
Array<int> locsurfind, locind;
|
NgArray<int> locsurfind, locind;
|
||||||
|
|
||||||
int checkedcopy = 0;
|
int checkedcopy = 0;
|
||||||
|
|
||||||
@ -406,8 +406,8 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Array<Segment> refedges;
|
NgArray<Segment> refedges;
|
||||||
Array<bool> refedgesinv;
|
NgArray<bool> refedgesinv;
|
||||||
|
|
||||||
|
|
||||||
AnalyzeEdge (s1_orig, s2_orig, s1, s2, pos, layer,
|
AnalyzeEdge (s1_orig, s2_orig, s1, s2, pos, layer,
|
||||||
@ -546,7 +546,7 @@ namespace netgen
|
|||||||
SegmentIndex si;
|
SegmentIndex si;
|
||||||
PointIndex pi;
|
PointIndex pi;
|
||||||
|
|
||||||
Array<int> osedges(cntedge);
|
NgArray<int> osedges(cntedge);
|
||||||
INDEX_2_HASHTABLE<int> osedgesht (cntedge+1);
|
INDEX_2_HASHTABLE<int> osedgesht (cntedge+1);
|
||||||
|
|
||||||
osedges = 2;
|
osedges = 2;
|
||||||
@ -678,17 +678,17 @@ namespace netgen
|
|||||||
|
|
||||||
void EdgeCalculation ::
|
void EdgeCalculation ::
|
||||||
FollowEdge (int pi1, int & ep, int & pos,
|
FollowEdge (int pi1, int & ep, int & pos,
|
||||||
const Array<int> & hsp,
|
const NgArray<int> & hsp,
|
||||||
double h, const Mesh & mesh,
|
double h, const Mesh & mesh,
|
||||||
Array<Point<3> > & edgepoints,
|
NgArray<Point<3> > & edgepoints,
|
||||||
Array<double> & curvelength)
|
NgArray<double> & curvelength)
|
||||||
{
|
{
|
||||||
int s1, s2, s1_rep, s2_rep;
|
int s1, s2, s1_rep, s2_rep;
|
||||||
double len, steplen, cursteplen, loch;
|
double len, steplen, cursteplen, loch;
|
||||||
Point<3> p, np, pnp;
|
Point<3> p, np, pnp;
|
||||||
Vec<3> a1, a2, t;
|
Vec<3> a1, a2, t;
|
||||||
|
|
||||||
Array<int> locind;
|
NgArray<int> locind;
|
||||||
|
|
||||||
double size = geometry.MaxSize();
|
double size = geometry.MaxSize();
|
||||||
double epspointdist2 = size * 1e-6;
|
double epspointdist2 = size * 1e-6;
|
||||||
@ -904,14 +904,14 @@ namespace netgen
|
|||||||
|
|
||||||
void EdgeCalculation ::
|
void EdgeCalculation ::
|
||||||
AnalyzeEdge (int s1, int s2, int s1_rep, int s2_rep, int pos, int layer,
|
AnalyzeEdge (int s1, int s2, int s1_rep, int s2_rep, int pos, int layer,
|
||||||
const Array<Point<3> > & edgepoints,
|
const NgArray<Point<3> > & edgepoints,
|
||||||
Array<Segment> & refedges,
|
NgArray<Segment> & refedges,
|
||||||
Array<bool> & refedgesinv)
|
NgArray<bool> & refedgesinv)
|
||||||
{
|
{
|
||||||
Segment seg;
|
Segment seg;
|
||||||
Array<int> locsurfind, locsurfind2;
|
NgArray<int> locsurfind, locsurfind2;
|
||||||
|
|
||||||
Array<int> edges_priority;
|
NgArray<int> edges_priority;
|
||||||
|
|
||||||
double size = geometry.MaxSize();
|
double size = geometry.MaxSize();
|
||||||
bool debug = 0;
|
bool debug = 0;
|
||||||
@ -1062,7 +1062,7 @@ namespace netgen
|
|||||||
//int k;
|
//int k;
|
||||||
double eps = 1e-8*size;
|
double eps = 1e-8*size;
|
||||||
|
|
||||||
Array<bool> pre_ok(2);
|
NgArray<bool> pre_ok(2);
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@ -1291,10 +1291,10 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
void EdgeCalculation ::
|
void EdgeCalculation ::
|
||||||
StoreEdge (const Array<Segment> & refedges,
|
StoreEdge (const NgArray<Segment> & refedges,
|
||||||
const Array<bool> & refedgesinv,
|
const NgArray<bool> & refedgesinv,
|
||||||
const Array<Point<3> > & edgepoints,
|
const NgArray<Point<3> > & edgepoints,
|
||||||
const Array<double> & curvelength,
|
const NgArray<double> & curvelength,
|
||||||
int layer,
|
int layer,
|
||||||
Mesh & mesh)
|
Mesh & mesh)
|
||||||
{
|
{
|
||||||
@ -1340,7 +1340,7 @@ namespace netgen
|
|||||||
|
|
||||||
const double di=1e-7*geometry.MaxSize();
|
const double di=1e-7*geometry.MaxSize();
|
||||||
|
|
||||||
Array<int> locsearch;
|
NgArray<int> locsearch;
|
||||||
meshpoint_tree -> GetIntersecting (p-Vec<3> (di,di,di),
|
meshpoint_tree -> GetIntersecting (p-Vec<3> (di,di,di),
|
||||||
p+Vec<3> (di,di,di), locsearch);
|
p+Vec<3> (di,di,di), locsearch);
|
||||||
if (locsearch.Size())
|
if (locsearch.Size())
|
||||||
@ -1463,10 +1463,10 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
void EdgeCalculation ::
|
void EdgeCalculation ::
|
||||||
StoreShortEdge (const Array<Segment> & refedges,
|
StoreShortEdge (const NgArray<Segment> & refedges,
|
||||||
const Array<bool> & refedgesinv,
|
const NgArray<bool> & refedgesinv,
|
||||||
const Array<Point<3> > & edgepoints,
|
const NgArray<Point<3> > & edgepoints,
|
||||||
const Array<double> & curvelength,
|
const NgArray<double> & curvelength,
|
||||||
int layer,
|
int layer,
|
||||||
Mesh & mesh)
|
Mesh & mesh)
|
||||||
{
|
{
|
||||||
@ -1594,8 +1594,8 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
void EdgeCalculation ::
|
void EdgeCalculation ::
|
||||||
CopyEdge (const Array<Segment> & refedges,
|
CopyEdge (const NgArray<Segment> & refedges,
|
||||||
const Array<bool> & refedgesinv,
|
const NgArray<bool> & refedgesinv,
|
||||||
int copyfromedge,
|
int copyfromedge,
|
||||||
const Point<3> & fromstart, const Point<3> & fromend,
|
const Point<3> & fromstart, const Point<3> & fromend,
|
||||||
const Point<3> & tostart, const Point<3> & toend,
|
const Point<3> & tostart, const Point<3> & toend,
|
||||||
@ -1742,7 +1742,7 @@ namespace netgen
|
|||||||
int layer = 0;
|
int layer = 0;
|
||||||
|
|
||||||
Solid * tansol;
|
Solid * tansol;
|
||||||
Array<int> tansurfind;
|
NgArray<int> tansurfind;
|
||||||
|
|
||||||
double size = geometry.MaxSize();
|
double size = geometry.MaxSize();
|
||||||
int nsol = geometry.GetNTopLevelObjects();
|
int nsol = geometry.GetNTopLevelObjects();
|
||||||
|
@ -26,7 +26,7 @@ namespace netgen
|
|||||||
points have to be given.
|
points have to be given.
|
||||||
*/
|
*/
|
||||||
extern void CalcEdges (const CSGeometry & geometry,
|
extern void CalcEdges (const CSGeometry & geometry,
|
||||||
const Array<SpecialPoint> & specpoints,
|
const NgArray<SpecialPoint> & specpoints,
|
||||||
double h, Mesh & mesh);
|
double h, Mesh & mesh);
|
||||||
|
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ namespace netgen
|
|||||||
class EdgeCalculation
|
class EdgeCalculation
|
||||||
{
|
{
|
||||||
const CSGeometry & geometry;
|
const CSGeometry & geometry;
|
||||||
Array<SpecialPoint> & specpoints;
|
NgArray<SpecialPoint> & specpoints;
|
||||||
Point3dTree * searchtree;
|
Point3dTree * searchtree;
|
||||||
Point3dTree * meshpoint_tree;
|
Point3dTree * meshpoint_tree;
|
||||||
int cntedge;
|
int cntedge;
|
||||||
@ -46,7 +46,7 @@ namespace netgen
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
EdgeCalculation (const CSGeometry & ageometry,
|
EdgeCalculation (const CSGeometry & ageometry,
|
||||||
Array<SpecialPoint> & aspecpoints,
|
NgArray<SpecialPoint> & aspecpoints,
|
||||||
MeshingParameters & amparam);
|
MeshingParameters & amparam);
|
||||||
|
|
||||||
~EdgeCalculation();
|
~EdgeCalculation();
|
||||||
@ -61,34 +61,34 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
void FollowEdge (int pi1, int & ep, int & pos,
|
void FollowEdge (int pi1, int & ep, int & pos,
|
||||||
// const Array<SpecialPoint> & hsp,
|
// const NgArray<SpecialPoint> & hsp,
|
||||||
const Array<int> & hsp,
|
const NgArray<int> & hsp,
|
||||||
double h, const Mesh & mesh,
|
double h, const Mesh & mesh,
|
||||||
Array<Point<3> > & edgepoints,
|
NgArray<Point<3> > & edgepoints,
|
||||||
Array<double> & curvelength);
|
NgArray<double> & curvelength);
|
||||||
|
|
||||||
|
|
||||||
void AnalyzeEdge (int s1, int s2, int s1_rep, int s2_rep, int pos, int layer,
|
void AnalyzeEdge (int s1, int s2, int s1_rep, int s2_rep, int pos, int layer,
|
||||||
const Array<Point<3> > & edgepoints,
|
const NgArray<Point<3> > & edgepoints,
|
||||||
Array<Segment> & refedges,
|
NgArray<Segment> & refedges,
|
||||||
Array<bool> & refedgesinv);
|
NgArray<bool> & refedgesinv);
|
||||||
|
|
||||||
void StoreEdge (const Array<Segment> & refedges,
|
void StoreEdge (const NgArray<Segment> & refedges,
|
||||||
const Array<bool> & refedgesinv,
|
const NgArray<bool> & refedgesinv,
|
||||||
const Array<Point<3> > & edgepoints,
|
const NgArray<Point<3> > & edgepoints,
|
||||||
const Array<double> & curvelength,
|
const NgArray<double> & curvelength,
|
||||||
int layer,
|
int layer,
|
||||||
Mesh & mesh);
|
Mesh & mesh);
|
||||||
|
|
||||||
void StoreShortEdge (const Array<Segment> & refedges,
|
void StoreShortEdge (const NgArray<Segment> & refedges,
|
||||||
const Array<bool> & refedgesinv,
|
const NgArray<bool> & refedgesinv,
|
||||||
const Array<Point<3> > & edgepoints,
|
const NgArray<Point<3> > & edgepoints,
|
||||||
const Array<double> & curvelength,
|
const NgArray<double> & curvelength,
|
||||||
int layer,
|
int layer,
|
||||||
Mesh & mesh);
|
Mesh & mesh);
|
||||||
|
|
||||||
void CopyEdge (const Array<Segment> & refedges,
|
void CopyEdge (const NgArray<Segment> & refedges,
|
||||||
const Array<bool> & refedgesinv,
|
const NgArray<bool> & refedgesinv,
|
||||||
int copyfromedge,
|
int copyfromedge,
|
||||||
const Point<3> & fromstart, const Point<3> & fromend,
|
const Point<3> & fromstart, const Point<3> & fromend,
|
||||||
const Point<3> & tostart, const Point<3> & toend,
|
const Point<3> & tostart, const Point<3> & toend,
|
||||||
|
@ -70,9 +70,9 @@ namespace netgen
|
|||||||
class BSplineCurve2d : public ExplicitCurve2d
|
class BSplineCurve2d : public ExplicitCurve2d
|
||||||
{
|
{
|
||||||
///
|
///
|
||||||
Array<Point<2> > points;
|
NgArray<Point<2> > points;
|
||||||
///
|
///
|
||||||
Array<int> intervallused;
|
NgArray<int> intervallused;
|
||||||
///
|
///
|
||||||
int redlevel;
|
int redlevel;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
namespace netgen
|
namespace netgen
|
||||||
{
|
{
|
||||||
|
|
||||||
Array<Point<3> > project1, project2;
|
NgArray<Point<3> > project1, project2;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -57,13 +57,13 @@ namespace netgen
|
|||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
ExtrusionFace :: ExtrusionFace(const Array<double> & raw_data)
|
ExtrusionFace :: ExtrusionFace(const NgArray<double> & raw_data)
|
||||||
{
|
{
|
||||||
deletable = true;
|
deletable = true;
|
||||||
|
|
||||||
int pos=0;
|
int pos=0;
|
||||||
|
|
||||||
Array< Point<2> > p(3);
|
NgArray< Point<2> > p(3);
|
||||||
|
|
||||||
int ptype = int(raw_data[pos]); pos++;
|
int ptype = int(raw_data[pos]); pos++;
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ namespace netgen
|
|||||||
double cutdist = -1;
|
double cutdist = -1;
|
||||||
|
|
||||||
|
|
||||||
Array<double> mindist(path->GetNSplines());
|
NgArray<double> mindist(path->GetNSplines());
|
||||||
|
|
||||||
for(int i = 0; i < path->GetNSplines(); i++)
|
for(int i = 0; i < path->GetNSplines(); i++)
|
||||||
{
|
{
|
||||||
@ -453,7 +453,7 @@ namespace netgen
|
|||||||
v2d(1) = v * loc_z_dir[seg];
|
v2d(1) = v * loc_z_dir[seg];
|
||||||
|
|
||||||
Vec<2> n(v2d(1),-v2d(0));
|
Vec<2> n(v2d(1),-v2d(0));
|
||||||
Array < Point<2> > ips;
|
NgArray < Point<2> > ips;
|
||||||
|
|
||||||
|
|
||||||
profile->LineIntersections(v2d(1),
|
profile->LineIntersections(v2d(1),
|
||||||
@ -593,7 +593,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ExtrusionFace :: GetRawData(Array<double> & data) const
|
void ExtrusionFace :: GetRawData(NgArray<double> & data) const
|
||||||
{
|
{
|
||||||
data.DeleteAll();
|
data.DeleteAll();
|
||||||
profile->GetRawData(data);
|
profile->GetRawData(data);
|
||||||
@ -695,7 +695,7 @@ namespace netgen
|
|||||||
|
|
||||||
INSOLID_TYPE Extrusion :: PointInSolid (const Point<3> & p,
|
INSOLID_TYPE Extrusion :: PointInSolid (const Point<3> & p,
|
||||||
const double eps,
|
const double eps,
|
||||||
Array<int> * const facenums) const
|
NgArray<int> * const facenums) const
|
||||||
{
|
{
|
||||||
Vec<3> random_vec(-0.4561,0.7382,0.4970247);
|
Vec<3> random_vec(-0.4561,0.7382,0.4970247);
|
||||||
|
|
||||||
@ -741,7 +741,7 @@ namespace netgen
|
|||||||
const Vec<3> & v,
|
const Vec<3> & v,
|
||||||
double eps) const
|
double eps) const
|
||||||
{
|
{
|
||||||
Array<int> facenums;
|
NgArray<int> facenums;
|
||||||
INSOLID_TYPE pInSolid = PointInSolid(p,eps,&facenums);
|
INSOLID_TYPE pInSolid = PointInSolid(p,eps,&facenums);
|
||||||
|
|
||||||
if(pInSolid != DOES_INTERSECT)
|
if(pInSolid != DOES_INTERSECT)
|
||||||
|
@ -15,11 +15,11 @@ namespace netgen
|
|||||||
|
|
||||||
bool deletable;
|
bool deletable;
|
||||||
|
|
||||||
Array< const SplineSeg3<3> * > spline3_path;
|
NgArray< const SplineSeg3<3> * > spline3_path;
|
||||||
Array< const LineSeg<3> * > line_path;
|
NgArray< const LineSeg<3> * > line_path;
|
||||||
|
|
||||||
mutable Array < Vec<3> > x_dir, y_dir, z_dir, loc_z_dir;
|
mutable NgArray < Vec<3> > x_dir, y_dir, z_dir, loc_z_dir;
|
||||||
mutable Array < Point<3> > p0;
|
mutable NgArray < Point<3> > p0;
|
||||||
|
|
||||||
mutable Vec<3> profile_tangent;
|
mutable Vec<3> profile_tangent;
|
||||||
mutable double profile_par;
|
mutable double profile_par;
|
||||||
@ -48,7 +48,7 @@ namespace netgen
|
|||||||
const SplineGeometry<3> * path_in,
|
const SplineGeometry<3> * path_in,
|
||||||
const Vec<3> & z_direction);
|
const Vec<3> & z_direction);
|
||||||
|
|
||||||
ExtrusionFace(const Array<double> & raw_data);
|
ExtrusionFace(const NgArray<double> & raw_data);
|
||||||
// default constructor for archive
|
// default constructor for archive
|
||||||
ExtrusionFace() {}
|
ExtrusionFace() {}
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ namespace netgen
|
|||||||
const Vec<3> & GetProfileTangent (void) const {return profile_tangent;}
|
const Vec<3> & GetProfileTangent (void) const {return profile_tangent;}
|
||||||
double GetProfilePar(void) const {return profile_par;}
|
double GetProfilePar(void) const {return profile_par;}
|
||||||
|
|
||||||
void GetRawData(Array<double> & data) const;
|
void GetRawData(NgArray<double> & data) const;
|
||||||
|
|
||||||
void CalcLocalCoordinates (int seg, double t,
|
void CalcLocalCoordinates (int seg, double t,
|
||||||
Vec<3> & ex, Vec<3> & ey, Vec<3> & ez) const;
|
Vec<3> & ex, Vec<3> & ey, Vec<3> & ez) const;
|
||||||
@ -123,7 +123,7 @@ namespace netgen
|
|||||||
|
|
||||||
Vec<3> z_direction;
|
Vec<3> z_direction;
|
||||||
|
|
||||||
Array<ExtrusionFace*> faces;
|
NgArray<ExtrusionFace*> faces;
|
||||||
|
|
||||||
mutable int latestfacenum;
|
mutable int latestfacenum;
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ namespace netgen
|
|||||||
double eps) const;
|
double eps) const;
|
||||||
INSOLID_TYPE PointInSolid (const Point<3> & p,
|
INSOLID_TYPE PointInSolid (const Point<3> & p,
|
||||||
double eps,
|
double eps,
|
||||||
Array<int> * const facenums) const;
|
NgArray<int> * const facenums) const;
|
||||||
virtual INSOLID_TYPE VecInSolid (const Point<3> & p,
|
virtual INSOLID_TYPE VecInSolid (const Point<3> & p,
|
||||||
const Vec<3> & v,
|
const Vec<3> & v,
|
||||||
double eps) const;
|
double eps) const;
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
namespace netgen
|
namespace netgen
|
||||||
{
|
{
|
||||||
Array<SpecialPoint> specpoints;
|
NgArray<SpecialPoint> specpoints;
|
||||||
static Array<MeshPoint> spoints;
|
static NgArray<MeshPoint> spoints;
|
||||||
|
|
||||||
#define TCL_OK 0
|
#define TCL_OK 0
|
||||||
#define TCL_ERROR 1
|
#define TCL_ERROR 1
|
||||||
@ -140,7 +140,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Array<int> loc;
|
NgArray<int> loc;
|
||||||
if (!ec.point_on_edge_problem)
|
if (!ec.point_on_edge_problem)
|
||||||
for (SegmentIndex si = 0; si < mesh.GetNSeg(); si++)
|
for (SegmentIndex si = 0; si < mesh.GetNSeg(); si++)
|
||||||
{
|
{
|
||||||
@ -234,17 +234,17 @@ namespace netgen
|
|||||||
const char * savetask = multithread.task;
|
const char * savetask = multithread.task;
|
||||||
multithread.task = "Surface meshing";
|
multithread.task = "Surface meshing";
|
||||||
|
|
||||||
Array<Segment> segments;
|
NgArray<Segment> segments;
|
||||||
int noldp = mesh.GetNP();
|
int noldp = mesh.GetNP();
|
||||||
|
|
||||||
double starttime = GetTime();
|
double starttime = GetTime();
|
||||||
|
|
||||||
// find master faces from identified
|
// find master faces from identified
|
||||||
Array<int> masterface(mesh.GetNFD());
|
NgArray<int> masterface(mesh.GetNFD());
|
||||||
for (int i = 1; i <= mesh.GetNFD(); i++)
|
for (int i = 1; i <= mesh.GetNFD(); i++)
|
||||||
masterface.Elem(i) = i;
|
masterface.Elem(i) = i;
|
||||||
|
|
||||||
Array<INDEX_2> fpairs;
|
NgArray<INDEX_2> fpairs;
|
||||||
bool changed;
|
bool changed;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@ -382,7 +382,7 @@ namespace netgen
|
|||||||
|
|
||||||
for (int j = 0; j < geom.singfaces.Size(); j++)
|
for (int j = 0; j < geom.singfaces.Size(); j++)
|
||||||
{
|
{
|
||||||
Array<int> surfs;
|
NgArray<int> surfs;
|
||||||
geom.GetIndependentSurfaceIndices (geom.singfaces[j]->GetSolid(),
|
geom.GetIndependentSurfaceIndices (geom.singfaces[j]->GetSolid(),
|
||||||
geom.BoundingBox(), surfs);
|
geom.BoundingBox(), surfs);
|
||||||
for (int k = 1; k <= mesh.GetNFD(); k++)
|
for (int k = 1; k <= mesh.GetNFD(); k++)
|
||||||
@ -680,7 +680,7 @@ namespace netgen
|
|||||||
mesh->SetGlobalH (mparam.maxh);
|
mesh->SetGlobalH (mparam.maxh);
|
||||||
mesh->SetMinimalH (mparam.minh);
|
mesh->SetMinimalH (mparam.minh);
|
||||||
|
|
||||||
Array<double> maxhdom(geom.GetNTopLevelObjects());
|
NgArray<double> maxhdom(geom.GetNTopLevelObjects());
|
||||||
for (int i = 0; i < maxhdom.Size(); i++)
|
for (int i = 0; i < maxhdom.Size(); i++)
|
||||||
maxhdom[i] = geom.GetTopLevelObject(i)->GetMaxH();
|
maxhdom[i] = geom.GetTopLevelObject(i)->GetMaxH();
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ ostream & operator<< (ostream & ost, Identification & ident)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
void Identification :: IdentifySpecialPoints (Array<class SpecialPoint> & points)
|
void Identification :: IdentifySpecialPoints (NgArray<class SpecialPoint> & points)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@ -84,7 +84,7 @@ void Identification :: IdentifyFaces (class Mesh & mesh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Identification ::
|
void Identification ::
|
||||||
BuildSurfaceElements (Array<Segment> & segs,
|
BuildSurfaceElements (NgArray<Segment> & segs,
|
||||||
Mesh & mesh, const Surface * surf)
|
Mesh & mesh, const Surface * surf)
|
||||||
{
|
{
|
||||||
cout << "Identification::BuildSurfaceElements called for base-class" << endl;
|
cout << "Identification::BuildSurfaceElements called for base-class" << endl;
|
||||||
@ -93,14 +93,14 @@ BuildSurfaceElements (Array<Segment> & segs,
|
|||||||
|
|
||||||
|
|
||||||
void Identification ::
|
void Identification ::
|
||||||
BuildVolumeElements (Array<class Element2d> & surfels,
|
BuildVolumeElements (NgArray<class Element2d> & surfels,
|
||||||
class Mesh & mesh)
|
class Mesh & mesh)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Identification ::
|
void Identification ::
|
||||||
GetIdentifiedFaces (Array<INDEX_2> & idfaces) const
|
GetIdentifiedFaces (NgArray<INDEX_2> & idfaces) const
|
||||||
{
|
{
|
||||||
idfaces.SetSize(0);
|
idfaces.SetSize(0);
|
||||||
for (int i = 1; i <= identfaces.GetNBags(); i++)
|
for (int i = 1; i <= identfaces.GetNBags(); i++)
|
||||||
@ -136,7 +136,7 @@ PeriodicIdentification :: ~PeriodicIdentification ()
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
void PeriodicIdentification :: IdentifySpecialPoints
|
void PeriodicIdentification :: IdentifySpecialPoints
|
||||||
(Array<class SpecialPoint> & points)
|
(NgArray<class SpecialPoint> & points)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
int bestj;
|
int bestj;
|
||||||
@ -446,7 +446,7 @@ void PeriodicIdentification :: IdentifyFaces (class Mesh & mesh)
|
|||||||
|
|
||||||
|
|
||||||
void PeriodicIdentification ::
|
void PeriodicIdentification ::
|
||||||
BuildSurfaceElements (Array<Segment> & segs,
|
BuildSurfaceElements (NgArray<Segment> & segs,
|
||||||
Mesh & mesh, const Surface * surf)
|
Mesh & mesh, const Surface * surf)
|
||||||
{
|
{
|
||||||
int found = 0;
|
int found = 0;
|
||||||
@ -458,7 +458,7 @@ BuildSurfaceElements (Array<Segment> & segs,
|
|||||||
if (geom.GetSurface(surfnr) == s1 ||
|
if (geom.GetSurface(surfnr) == s1 ||
|
||||||
geom.GetSurface(surfnr) == s2)
|
geom.GetSurface(surfnr) == s2)
|
||||||
{
|
{
|
||||||
Array<int> copy_points;
|
NgArray<int> copy_points;
|
||||||
|
|
||||||
for (SurfaceElementIndex sei = 0; sei < mesh.GetNSE(); sei++)
|
for (SurfaceElementIndex sei = 0; sei < mesh.GetNSE(); sei++)
|
||||||
{
|
{
|
||||||
@ -609,7 +609,7 @@ void CloseSurfaceIdentification :: GetData (ostream & ost) const
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
void CloseSurfaceIdentification :: IdentifySpecialPoints
|
void CloseSurfaceIdentification :: IdentifySpecialPoints
|
||||||
(Array<class SpecialPoint> & points)
|
(NgArray<class SpecialPoint> & points)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
int bestj;
|
int bestj;
|
||||||
@ -677,7 +677,7 @@ Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2,
|
|||||||
if (!dom_surf_valid)
|
if (!dom_surf_valid)
|
||||||
{
|
{
|
||||||
const_cast<bool&> (dom_surf_valid) = 1;
|
const_cast<bool&> (dom_surf_valid) = 1;
|
||||||
Array<int> & hsurf = const_cast<Array<int>&> (domain_surfaces);
|
NgArray<int> & hsurf = const_cast<NgArray<int>&> (domain_surfaces);
|
||||||
|
|
||||||
if (domain)
|
if (domain)
|
||||||
{
|
{
|
||||||
@ -887,7 +887,7 @@ GetIdentifiedPoint (class Mesh & mesh, int pi)
|
|||||||
const Surface *snew;
|
const Surface *snew;
|
||||||
const Point<3> & p = mesh.Point (pi);
|
const Point<3> & p = mesh.Point (pi);
|
||||||
|
|
||||||
Array<int,PointIndex::BASE> identmap(mesh.GetNP());
|
NgArray<int,PointIndex::BASE> identmap(mesh.GetNP());
|
||||||
mesh.GetIdentifications().GetMap (nr, identmap);
|
mesh.GetIdentifications().GetMap (nr, identmap);
|
||||||
if (identmap.Get(pi))
|
if (identmap.Get(pi))
|
||||||
return identmap.Get(pi);
|
return identmap.Get(pi);
|
||||||
@ -958,13 +958,13 @@ void CloseSurfaceIdentification :: IdentifyPoints (Mesh & mesh)
|
|||||||
{
|
{
|
||||||
int np = mesh.GetNP();
|
int np = mesh.GetNP();
|
||||||
|
|
||||||
Array<int> points_on_surf2;
|
NgArray<int> points_on_surf2;
|
||||||
|
|
||||||
for (int i2 = 1; i2 <= np; i2++)
|
for (int i2 = 1; i2 <= np; i2++)
|
||||||
if (s2->PointOnSurface (mesh.Point(i2)))
|
if (s2->PointOnSurface (mesh.Point(i2)))
|
||||||
points_on_surf2.Append (i2);
|
points_on_surf2.Append (i2);
|
||||||
|
|
||||||
Array<int> surfs_of_p1;
|
NgArray<int> surfs_of_p1;
|
||||||
|
|
||||||
for (int i1 = 1; i1 <= np; i1++)
|
for (int i1 = 1; i1 <= np; i1++)
|
||||||
{
|
{
|
||||||
@ -1080,7 +1080,7 @@ void CloseSurfaceIdentification :: IdentifyFaces (class Mesh & mesh)
|
|||||||
s2rep = geom.GetSurfaceClassRepresentant(i);
|
s2rep = geom.GetSurfaceClassRepresentant(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
Array<int> segs_on_face1, segs_on_face2;
|
NgArray<int> segs_on_face1, segs_on_face2;
|
||||||
|
|
||||||
identfaces.DeleteData();
|
identfaces.DeleteData();
|
||||||
|
|
||||||
@ -1219,13 +1219,13 @@ void CloseSurfaceIdentification :: IdentifyFaces (class Mesh & mesh)
|
|||||||
|
|
||||||
|
|
||||||
void CloseSurfaceIdentification ::
|
void CloseSurfaceIdentification ::
|
||||||
BuildSurfaceElements (Array<Segment> & segs,
|
BuildSurfaceElements (NgArray<Segment> & segs,
|
||||||
Mesh & mesh, const Surface * surf)
|
Mesh & mesh, const Surface * surf)
|
||||||
{
|
{
|
||||||
bool found = 0;
|
bool found = 0;
|
||||||
int cntquads = 0;
|
int cntquads = 0;
|
||||||
|
|
||||||
Array<int,PointIndex::BASE> identmap;
|
NgArray<int,PointIndex::BASE> identmap;
|
||||||
identmap = 0;
|
identmap = 0;
|
||||||
|
|
||||||
mesh.GetIdentifications().GetMap (nr, identmap);
|
mesh.GetIdentifications().GetMap (nr, identmap);
|
||||||
@ -1240,7 +1240,7 @@ BuildSurfaceElements (Array<Segment> & segs,
|
|||||||
//(*testout) << "segs = " << endl << segs << endl;
|
//(*testout) << "segs = " << endl << segs << endl;
|
||||||
//(*testout) << "identmap = " << endl << identmap << endl;
|
//(*testout) << "identmap = " << endl << identmap << endl;
|
||||||
|
|
||||||
//Array<bool> foundseg(segs.Size());
|
//NgArray<bool> foundseg(segs.Size());
|
||||||
//foundseg = false;
|
//foundseg = false;
|
||||||
|
|
||||||
// insert quad layer:
|
// insert quad layer:
|
||||||
@ -1301,7 +1301,7 @@ BuildSurfaceElements (Array<Segment> & segs,
|
|||||||
{
|
{
|
||||||
PrintMessage(3, "insert quad layer of ", cntquads,
|
PrintMessage(3, "insert quad layer of ", cntquads,
|
||||||
" elements at face ", segs.Get(1).si);
|
" elements at face ", segs.Get(1).si);
|
||||||
//Array<Segment> aux;
|
//NgArray<Segment> aux;
|
||||||
//for(int i=0; i<segs.Size();i++)
|
//for(int i=0; i<segs.Size();i++)
|
||||||
// if(!foundseg[i])
|
// if(!foundseg[i])
|
||||||
// aux.Append(segs[i]);
|
// aux.Append(segs[i]);
|
||||||
@ -1319,7 +1319,7 @@ BuildSurfaceElements (Array<Segment> & segs,
|
|||||||
|
|
||||||
|
|
||||||
void CloseSurfaceIdentification ::
|
void CloseSurfaceIdentification ::
|
||||||
BuildSurfaceElements2 (Array<Segment> & segs,
|
BuildSurfaceElements2 (NgArray<Segment> & segs,
|
||||||
Mesh & mesh, const Surface * surf)
|
Mesh & mesh, const Surface * surf)
|
||||||
{
|
{
|
||||||
// copy mesh
|
// copy mesh
|
||||||
@ -1420,7 +1420,7 @@ BuildSurfaceElements2 (Array<Segment> & segs,
|
|||||||
|
|
||||||
|
|
||||||
void CloseSurfaceIdentification ::
|
void CloseSurfaceIdentification ::
|
||||||
BuildVolumeElements (Array<class Element2d> & surfels,
|
BuildVolumeElements (NgArray<class Element2d> & surfels,
|
||||||
class Mesh & mesh)
|
class Mesh & mesh)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
@ -1481,7 +1481,7 @@ void CloseEdgesIdentification :: GetData (ostream & ost) const
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
void CloseEdgesIdentification :: IdentifySpecialPoints
|
void CloseEdgesIdentification :: IdentifySpecialPoints
|
||||||
(Array<class SpecialPoint> & points)
|
(NgArray<class SpecialPoint> & points)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
int bestj;
|
int bestj;
|
||||||
@ -1633,7 +1633,7 @@ void CloseEdgesIdentification :: IdentifyPoints (Mesh & mesh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CloseEdgesIdentification ::
|
void CloseEdgesIdentification ::
|
||||||
BuildSurfaceElements (Array<Segment> & segs,
|
BuildSurfaceElements (NgArray<Segment> & segs,
|
||||||
Mesh & mesh, const Surface * surf)
|
Mesh & mesh, const Surface * surf)
|
||||||
{
|
{
|
||||||
int found = 0;
|
int found = 0;
|
||||||
|
@ -34,7 +34,7 @@ namespace netgen
|
|||||||
DLL_HEADER virtual void GetData (ostream & ost) const = 0;
|
DLL_HEADER virtual void GetData (ostream & ost) const = 0;
|
||||||
|
|
||||||
/// obsolete
|
/// obsolete
|
||||||
// virtual void IdentifySpecialPoints (Array<class SpecialPoint> & points);
|
// virtual void IdentifySpecialPoints (NgArray<class SpecialPoint> & points);
|
||||||
|
|
||||||
/// can identify both special points (fixed direction)
|
/// can identify both special points (fixed direction)
|
||||||
/// (identified points, same tangent)
|
/// (identified points, same tangent)
|
||||||
@ -59,16 +59,16 @@ namespace netgen
|
|||||||
virtual int GetIdentifiedPoint (class Mesh & mesh, int pi1);
|
virtual int GetIdentifiedPoint (class Mesh & mesh, int pi1);
|
||||||
|
|
||||||
/// copy surfaces, or fill rectangles
|
/// copy surfaces, or fill rectangles
|
||||||
virtual void BuildSurfaceElements (Array<class Segment> & segs,
|
virtual void BuildSurfaceElements (NgArray<class Segment> & segs,
|
||||||
class Mesh & mesh,
|
class Mesh & mesh,
|
||||||
const Surface * surf);
|
const Surface * surf);
|
||||||
|
|
||||||
/// insert volume elements in thin layers
|
/// insert volume elements in thin layers
|
||||||
virtual void BuildVolumeElements (Array<class Element2d> & surfels,
|
virtual void BuildVolumeElements (NgArray<class Element2d> & surfels,
|
||||||
class Mesh & mesh);
|
class Mesh & mesh);
|
||||||
|
|
||||||
/// get list of identified faces
|
/// get list of identified faces
|
||||||
virtual void GetIdentifiedFaces (Array<INDEX_2> & idfaces) const;
|
virtual void GetIdentifiedFaces (NgArray<INDEX_2> & idfaces) const;
|
||||||
|
|
||||||
friend ostream & operator<< (ostream & ost, Identification & ident);
|
friend ostream & operator<< (ostream & ost, Identification & ident);
|
||||||
};
|
};
|
||||||
@ -91,7 +91,7 @@ namespace netgen
|
|||||||
virtual void GetData (ostream & ost) const override;
|
virtual void GetData (ostream & ost) const override;
|
||||||
|
|
||||||
|
|
||||||
// virtual void IdentifySpecialPoints (Array<class SpecialPoint> & points);
|
// virtual void IdentifySpecialPoints (NgArray<class SpecialPoint> & points);
|
||||||
virtual int Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2,
|
virtual int Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2,
|
||||||
const TABLE<int> & specpoint2solid,
|
const TABLE<int> & specpoint2solid,
|
||||||
const TABLE<int> & specpoint2surface) const override;
|
const TABLE<int> & specpoint2surface) const override;
|
||||||
@ -100,7 +100,7 @@ namespace netgen
|
|||||||
virtual int GetIdentifiedPoint (class Mesh & mesh, int pi1) override;
|
virtual int GetIdentifiedPoint (class Mesh & mesh, int pi1) override;
|
||||||
virtual void IdentifyPoints (class Mesh & mesh) override;
|
virtual void IdentifyPoints (class Mesh & mesh) override;
|
||||||
virtual void IdentifyFaces (class Mesh & mesh) override;
|
virtual void IdentifyFaces (class Mesh & mesh) override;
|
||||||
virtual void BuildSurfaceElements (Array<class Segment> & segs,
|
virtual void BuildSurfaceElements (NgArray<class Segment> & segs,
|
||||||
class Mesh & mesh,
|
class Mesh & mesh,
|
||||||
const Surface * surf) override;
|
const Surface * surf) override;
|
||||||
};
|
};
|
||||||
@ -123,9 +123,9 @@ namespace netgen
|
|||||||
int ref_levels_s2;
|
int ref_levels_s2;
|
||||||
///
|
///
|
||||||
double eps_n;
|
double eps_n;
|
||||||
Array<double> slices;
|
NgArray<double> slices;
|
||||||
/// used only for domain-local identification:
|
/// used only for domain-local identification:
|
||||||
Array<int> domain_surfaces;
|
NgArray<int> domain_surfaces;
|
||||||
///
|
///
|
||||||
bool dom_surf_valid;
|
bool dom_surf_valid;
|
||||||
|
|
||||||
@ -146,7 +146,7 @@ namespace netgen
|
|||||||
virtual void GetData (ostream & ost) const;
|
virtual void GetData (ostream & ost) const;
|
||||||
|
|
||||||
|
|
||||||
// virtual void IdentifySpecialPoints (Array<class SpecialPoint> & points);
|
// virtual void IdentifySpecialPoints (NgArray<class SpecialPoint> & points);
|
||||||
virtual int Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2,
|
virtual int Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2,
|
||||||
const TABLE<int> & specpoint2solid,
|
const TABLE<int> & specpoint2solid,
|
||||||
const TABLE<int> & specpoint2surface) const;
|
const TABLE<int> & specpoint2surface) const;
|
||||||
@ -154,17 +154,17 @@ namespace netgen
|
|||||||
virtual int IdentifyableCandidate (const SpecialPoint & sp1) const;
|
virtual int IdentifyableCandidate (const SpecialPoint & sp1) const;
|
||||||
virtual int ShortEdge (const SpecialPoint & sp1, const SpecialPoint & sp2) const;
|
virtual int ShortEdge (const SpecialPoint & sp1, const SpecialPoint & sp2) const;
|
||||||
virtual int GetIdentifiedPoint (class Mesh & mesh, int pi1);
|
virtual int GetIdentifiedPoint (class Mesh & mesh, int pi1);
|
||||||
const Array<double> & GetSlices () const { return slices; }
|
const NgArray<double> & GetSlices () const { return slices; }
|
||||||
virtual void IdentifyPoints (class Mesh & mesh);
|
virtual void IdentifyPoints (class Mesh & mesh);
|
||||||
virtual void IdentifyFaces (class Mesh & mesh);
|
virtual void IdentifyFaces (class Mesh & mesh);
|
||||||
virtual void BuildSurfaceElements (Array<class Segment> & segs,
|
virtual void BuildSurfaceElements (NgArray<class Segment> & segs,
|
||||||
class Mesh & mesh,
|
class Mesh & mesh,
|
||||||
const Surface * surf);
|
const Surface * surf);
|
||||||
void BuildSurfaceElements2 (Array<class Segment> & segs,
|
void BuildSurfaceElements2 (NgArray<class Segment> & segs,
|
||||||
class Mesh & mesh,
|
class Mesh & mesh,
|
||||||
const Surface * surf);
|
const Surface * surf);
|
||||||
|
|
||||||
virtual void BuildVolumeElements (Array<class Element2d> & surfels,
|
virtual void BuildVolumeElements (NgArray<class Element2d> & surfels,
|
||||||
class Mesh & mesh);
|
class Mesh & mesh);
|
||||||
|
|
||||||
int RefLevels () const { return ref_levels; }
|
int RefLevels () const { return ref_levels; }
|
||||||
@ -196,14 +196,14 @@ namespace netgen
|
|||||||
virtual void Print (ostream & ost) const;
|
virtual void Print (ostream & ost) const;
|
||||||
virtual void GetData (ostream & ost) const;
|
virtual void GetData (ostream & ost) const;
|
||||||
|
|
||||||
// virtual void IdentifySpecialPoints (Array<class SpecialPoint> & points);
|
// virtual void IdentifySpecialPoints (NgArray<class SpecialPoint> & points);
|
||||||
virtual int Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2,
|
virtual int Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2,
|
||||||
const TABLE<int> & specpoint2solid,
|
const TABLE<int> & specpoint2solid,
|
||||||
const TABLE<int> & specpoint2surface) const;
|
const TABLE<int> & specpoint2surface) const;
|
||||||
|
|
||||||
|
|
||||||
virtual void IdentifyPoints (class Mesh & mesh);
|
virtual void IdentifyPoints (class Mesh & mesh);
|
||||||
virtual void BuildSurfaceElements (Array<class Segment> & segs,
|
virtual void BuildSurfaceElements (NgArray<class Segment> & segs,
|
||||||
class Mesh & mesh,
|
class Mesh & mesh,
|
||||||
const Surface * surf);
|
const Surface * surf);
|
||||||
};
|
};
|
||||||
|
@ -7,7 +7,7 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
|
|
||||||
Polyhedra::Face::Face (int pi1, int pi2, int pi3,
|
Polyhedra::Face::Face (int pi1, int pi2, int pi3,
|
||||||
const Array<Point<3> > & points,
|
const NgArray<Point<3> > & points,
|
||||||
int ainputnr)
|
int ainputnr)
|
||||||
{
|
{
|
||||||
inputnr = ainputnr;
|
inputnr = ainputnr;
|
||||||
@ -165,7 +165,7 @@ INSOLID_TYPE Polyhedra :: PointInSolid (const Point<3> & p,
|
|||||||
|
|
||||||
|
|
||||||
void Polyhedra :: GetTangentialSurfaceIndices (const Point<3> & p,
|
void Polyhedra :: GetTangentialSurfaceIndices (const Point<3> & p,
|
||||||
Array<int> & surfind, double eps) const
|
NgArray<int> & surfind, double eps) const
|
||||||
{
|
{
|
||||||
for (int i = 0; i < faces.Size(); i++)
|
for (int i = 0; i < faces.Size(); i++)
|
||||||
{
|
{
|
||||||
@ -192,7 +192,7 @@ INSOLID_TYPE Polyhedra :: VecInSolid (const Point<3> & p,
|
|||||||
const Vec<3> & v,
|
const Vec<3> & v,
|
||||||
double eps) const
|
double eps) const
|
||||||
{
|
{
|
||||||
Array<int> point_on_faces;
|
NgArray<int> point_on_faces;
|
||||||
INSOLID_TYPE res(DOES_INTERSECT);
|
INSOLID_TYPE res(DOES_INTERSECT);
|
||||||
|
|
||||||
Vec<3> vn = v;
|
Vec<3> vn = v;
|
||||||
@ -388,7 +388,7 @@ INSOLID_TYPE Polyhedra :: VecInSolid2 (const Point<3> & p,
|
|||||||
|
|
||||||
|
|
||||||
void Polyhedra :: GetTangentialVecSurfaceIndices2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2,
|
void Polyhedra :: GetTangentialVecSurfaceIndices2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2,
|
||||||
Array<int> & surfind, double eps) const
|
NgArray<int> & surfind, double eps) const
|
||||||
{
|
{
|
||||||
Vec<3> v1n = v1;
|
Vec<3> v1n = v1;
|
||||||
v1n.Normalize();
|
v1n.Normalize();
|
||||||
@ -447,7 +447,7 @@ void Polyhedra :: GetTangentialVecSurfaceIndices2 (const Point<3> & p, const Vec
|
|||||||
|
|
||||||
|
|
||||||
void Polyhedra :: GetPrimitiveData (const char *& classname,
|
void Polyhedra :: GetPrimitiveData (const char *& classname,
|
||||||
Array<double> & coeffs) const
|
NgArray<double> & coeffs) const
|
||||||
{
|
{
|
||||||
classname = "Polyhedra";
|
classname = "Polyhedra";
|
||||||
coeffs.SetSize(0);
|
coeffs.SetSize(0);
|
||||||
@ -471,7 +471,7 @@ void Polyhedra :: GetPrimitiveData (const char *& classname,
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void Polyhedra :: SetPrimitiveData (Array<double> & /* coeffs */)
|
void Polyhedra :: SetPrimitiveData (NgArray<double> & /* coeffs */)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@ -590,7 +590,7 @@ int Polyhedra :: FaceBoxIntersection (int fnr, const BoxSphere<3> & box) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Polyhedra :: GetPolySurfs(Array < Array<int> * > & polysurfs)
|
void Polyhedra :: GetPolySurfs(NgArray < NgArray<int> * > & polysurfs)
|
||||||
{
|
{
|
||||||
int maxnum = -1;
|
int maxnum = -1;
|
||||||
|
|
||||||
@ -602,14 +602,14 @@ void Polyhedra :: GetPolySurfs(Array < Array<int> * > & polysurfs)
|
|||||||
|
|
||||||
polysurfs.SetSize(maxnum+1);
|
polysurfs.SetSize(maxnum+1);
|
||||||
for(int i=0; i<polysurfs.Size(); i++)
|
for(int i=0; i<polysurfs.Size(); i++)
|
||||||
polysurfs[i] = new Array<int>;
|
polysurfs[i] = new NgArray<int>;
|
||||||
|
|
||||||
for(int i = 0; i<faces.Size(); i++)
|
for(int i = 0; i<faces.Size(); i++)
|
||||||
polysurfs[faces[i].inputnr]->Append(faces[i].planenr);
|
polysurfs[faces[i].inputnr]->Append(faces[i].planenr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Polyhedra::CalcSpecialPoints (Array<Point<3> > & pts) const
|
void Polyhedra::CalcSpecialPoints (NgArray<Point<3> > & pts) const
|
||||||
{
|
{
|
||||||
for (int i = 0; i < points.Size(); i++)
|
for (int i = 0; i < points.Size(); i++)
|
||||||
pts.Append (points[i]);
|
pts.Append (points[i]);
|
||||||
@ -617,7 +617,7 @@ void Polyhedra::CalcSpecialPoints (Array<Point<3> > & pts) const
|
|||||||
|
|
||||||
|
|
||||||
void Polyhedra :: AnalyzeSpecialPoint (const Point<3> & /* pt */,
|
void Polyhedra :: AnalyzeSpecialPoint (const Point<3> & /* pt */,
|
||||||
Array<Point<3> > & /* specpts */) const
|
NgArray<Point<3> > & /* specpts */) const
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
@ -35,13 +35,13 @@ namespace netgen
|
|||||||
|
|
||||||
Face () { ; }
|
Face () { ; }
|
||||||
Face (int pi1, int pi2, int pi3,
|
Face (int pi1, int pi2, int pi3,
|
||||||
const Array<Point<3> > & points,
|
const NgArray<Point<3> > & points,
|
||||||
int ainputnr);
|
int ainputnr);
|
||||||
};
|
};
|
||||||
|
|
||||||
Array<Point<3> > points;
|
NgArray<Point<3> > points;
|
||||||
Array<Face> faces;
|
NgArray<Face> faces;
|
||||||
Array<Plane*> planes;
|
NgArray<Plane*> planes;
|
||||||
Box<3> poly_bbox;
|
Box<3> poly_bbox;
|
||||||
|
|
||||||
double eps_base1;
|
double eps_base1;
|
||||||
@ -65,15 +65,15 @@ namespace netgen
|
|||||||
double eps) const;
|
double eps) const;
|
||||||
|
|
||||||
virtual void GetTangentialSurfaceIndices (const Point<3> & p,
|
virtual void GetTangentialSurfaceIndices (const Point<3> & p,
|
||||||
Array<int> & surfind, double eps) const;
|
NgArray<int> & surfind, double eps) const;
|
||||||
|
|
||||||
|
|
||||||
virtual void GetTangentialVecSurfaceIndices2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2,
|
virtual void GetTangentialVecSurfaceIndices2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2,
|
||||||
Array<int> & surfind, double eps) const;
|
NgArray<int> & surfind, double eps) const;
|
||||||
|
|
||||||
virtual void CalcSpecialPoints (Array<Point<3> > & pts) const;
|
virtual void CalcSpecialPoints (NgArray<Point<3> > & pts) const;
|
||||||
virtual void AnalyzeSpecialPoint (const Point<3> & pt,
|
virtual void AnalyzeSpecialPoint (const Point<3> & pt,
|
||||||
Array<Point<3> > & specpts) const;
|
NgArray<Point<3> > & specpts) const;
|
||||||
virtual Vec<3> SpecialPointTangentialVector (const Point<3> & p, int s1, int s2) const;
|
virtual Vec<3> SpecialPointTangentialVector (const Point<3> & p, int s1, int s2) const;
|
||||||
|
|
||||||
virtual int GetNSurfaces() const
|
virtual int GetNSurfaces() const
|
||||||
@ -83,8 +83,8 @@ namespace netgen
|
|||||||
virtual const Surface & GetSurface (int i) const
|
virtual const Surface & GetSurface (int i) const
|
||||||
{ return *planes[i]; }
|
{ return *planes[i]; }
|
||||||
|
|
||||||
virtual void GetPrimitiveData (const char *& classname, Array<double> & coeffs) const;
|
virtual void GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const;
|
||||||
virtual void SetPrimitiveData (Array<double> & coeffs);
|
virtual void SetPrimitiveData (NgArray<double> & coeffs);
|
||||||
|
|
||||||
virtual void Reduce (const BoxSphere<3> & box);
|
virtual void Reduce (const BoxSphere<3> & box);
|
||||||
virtual void UnReduce ();
|
virtual void UnReduce ();
|
||||||
@ -92,7 +92,7 @@ namespace netgen
|
|||||||
int AddPoint (const Point<3> & p);
|
int AddPoint (const Point<3> & p);
|
||||||
int AddFace (int pi1, int pi2, int pi3, int inputnum);
|
int AddFace (int pi1, int pi2, int pi3, int inputnum);
|
||||||
|
|
||||||
void GetPolySurfs(Array < Array<int> * > & polysurfs);
|
void GetPolySurfs(NgArray < NgArray<int> * > & polysurfs);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int FaceBoxIntersection (int fnr, const BoxSphere<3> & box) const;
|
int FaceBoxIntersection (int fnr, const BoxSphere<3> & box) const;
|
||||||
|
@ -211,7 +211,7 @@ DLL_HEADER void ExportCSG(py::module &m)
|
|||||||
.def("__init__", FunctionPointer ([](SplineSurface* instance, shared_ptr<SPSolid> base, py::list cuts)
|
.def("__init__", FunctionPointer ([](SplineSurface* instance, shared_ptr<SPSolid> base, py::list cuts)
|
||||||
{
|
{
|
||||||
auto primitive = dynamic_cast<OneSurfacePrimitive*> (base->GetSolid()->GetPrimitive());
|
auto primitive = dynamic_cast<OneSurfacePrimitive*> (base->GetSolid()->GetPrimitive());
|
||||||
auto acuts = make_shared<Array<shared_ptr<OneSurfacePrimitive>>>();
|
auto acuts = make_shared<NgArray<shared_ptr<OneSurfacePrimitive>>>();
|
||||||
for(int i = 0; i<py::len(cuts);i++)
|
for(int i = 0; i<py::len(cuts);i++)
|
||||||
{
|
{
|
||||||
py::extract<shared_ptr<SPSolid>> sps(cuts[i]);
|
py::extract<shared_ptr<SPSolid>> sps(cuts[i]);
|
||||||
@ -409,7 +409,7 @@ However, when r = 0, the top part becomes a point(tip) and meshing fails!
|
|||||||
if (py::extract<int>(val).check()) mod_nr = py::extract<int> (val)();
|
if (py::extract<int>(val).check()) mod_nr = py::extract<int> (val)();
|
||||||
if (py::extract<string>(val).check()) bcname = new string ( py::extract<string> (val)());
|
if (py::extract<string>(val).check()) bcname = new string ( py::extract<string> (val)());
|
||||||
|
|
||||||
Array<int> si;
|
NgArray<int> si;
|
||||||
mod_solid -> GetSolid() -> GetSurfaceIndices (si);
|
mod_solid -> GetSolid() -> GetSurfaceIndices (si);
|
||||||
// cout << "change bc on surfaces: " << si << " to " << mod_nr << endl;
|
// cout << "change bc on surfaces: " << si << " to " << mod_nr << endl;
|
||||||
|
|
||||||
@ -459,7 +459,7 @@ However, when r = 0, the top part becomes a point(tip) and meshing fails!
|
|||||||
self.GetTopLevelObject(tlonr) -> SetBCProp(surf->GetBase()->GetBCProperty());
|
self.GetTopLevelObject(tlonr) -> SetBCProp(surf->GetBase()->GetBCProperty());
|
||||||
self.GetTopLevelObject(tlonr) -> SetBCName(surf->GetBase()->GetBCName());
|
self.GetTopLevelObject(tlonr) -> SetBCName(surf->GetBase()->GetBCName());
|
||||||
self.GetTopLevelObject(tlonr) -> SetMaxH(surf->GetBase()->GetMaxH());
|
self.GetTopLevelObject(tlonr) -> SetMaxH(surf->GetBase()->GetMaxH());
|
||||||
Array<Point<3>> non_midpoints;
|
NgArray<Point<3>> non_midpoints;
|
||||||
for(auto spline : surf->GetSplines())
|
for(auto spline : surf->GetSplines())
|
||||||
{
|
{
|
||||||
non_midpoints.Append(spline->GetPoint(0));
|
non_midpoints.Append(spline->GetPoint(0));
|
||||||
@ -494,7 +494,7 @@ However, when r = 0, the top part becomes a point(tip) and meshing fails!
|
|||||||
.def("CloseSurfaces", FunctionPointer
|
.def("CloseSurfaces", FunctionPointer
|
||||||
([] (CSGeometry & self, shared_ptr<SPSolid> s1, shared_ptr<SPSolid> s2, py::list aslices )
|
([] (CSGeometry & self, shared_ptr<SPSolid> s1, shared_ptr<SPSolid> s2, py::list aslices )
|
||||||
{
|
{
|
||||||
Array<int> si1, si2;
|
NgArray<int> si1, si2;
|
||||||
s1->GetSolid()->GetSurfaceIndices (si1);
|
s1->GetSolid()->GetSurfaceIndices (si1);
|
||||||
s2->GetSolid()->GetSurfaceIndices (si2);
|
s2->GetSolid()->GetSurfaceIndices (si2);
|
||||||
cout << "surface ids1 = " << si1 << endl;
|
cout << "surface ids1 = " << si1 << endl;
|
||||||
@ -505,7 +505,7 @@ However, when r = 0, the top part becomes a point(tip) and meshing fails!
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
int n = py::len(aslices);
|
int n = py::len(aslices);
|
||||||
Array<double> slices(n);
|
NgArray<double> slices(n);
|
||||||
for(int i=0; i<n; i++)
|
for(int i=0; i<n; i++)
|
||||||
{
|
{
|
||||||
slices[i]= py::extract<double>(aslices[i])();
|
slices[i]= py::extract<double>(aslices[i])();
|
||||||
@ -531,7 +531,7 @@ However, when r = 0, the top part becomes a point(tip) and meshing fails!
|
|||||||
([] (CSGeometry & self, shared_ptr<SPSolid> s1, shared_ptr<SPSolid> s2,
|
([] (CSGeometry & self, shared_ptr<SPSolid> s1, shared_ptr<SPSolid> s2,
|
||||||
int reflevels, shared_ptr<SPSolid> domain_solid)
|
int reflevels, shared_ptr<SPSolid> domain_solid)
|
||||||
{
|
{
|
||||||
Array<int> si1, si2;
|
NgArray<int> si1, si2;
|
||||||
s1->GetSolid()->GetSurfaceIndices (si1);
|
s1->GetSolid()->GetSurfaceIndices (si1);
|
||||||
s2->GetSolid()->GetSurfaceIndices (si2);
|
s2->GetSolid()->GetSurfaceIndices (si2);
|
||||||
cout << "surface ids1 = " << si1 << endl;
|
cout << "surface ids1 = " << si1 << endl;
|
||||||
@ -556,7 +556,7 @@ However, when r = 0, the top part becomes a point(tip) and meshing fails!
|
|||||||
([] (CSGeometry & self, shared_ptr<SPSolid> s1, shared_ptr<SPSolid> s2,
|
([] (CSGeometry & self, shared_ptr<SPSolid> s1, shared_ptr<SPSolid> s2,
|
||||||
Transformation<3> trafo)
|
Transformation<3> trafo)
|
||||||
{
|
{
|
||||||
Array<int> si1, si2;
|
NgArray<int> si1, si2;
|
||||||
s1->GetSolid()->GetSurfaceIndices (si1);
|
s1->GetSolid()->GetSurfaceIndices (si1);
|
||||||
s2->GetSolid()->GetSurfaceIndices (si2);
|
s2->GetSolid()->GetSurfaceIndices (si2);
|
||||||
cout << "identify surfaces " << si1[0] << " and " << si2[0] << endl;
|
cout << "identify surfaces " << si1[0] << " and " << si2[0] << endl;
|
||||||
|
@ -52,13 +52,13 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
RevolutionFace :: RevolutionFace(const Array<double> & raw_data)
|
RevolutionFace :: RevolutionFace(const NgArray<double> & raw_data)
|
||||||
{
|
{
|
||||||
deletable = true;
|
deletable = true;
|
||||||
|
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
|
|
||||||
Array< Point<2> > p(3);
|
NgArray< Point<2> > p(3);
|
||||||
|
|
||||||
int stype = int(raw_data[pos]); pos++;
|
int stype = int(raw_data[pos]); pos++;
|
||||||
|
|
||||||
@ -333,7 +333,7 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
double retval = spline->MaxCurvature();
|
double retval = spline->MaxCurvature();
|
||||||
|
|
||||||
Array < Point<2> > checkpoints;
|
NgArray < Point<2> > checkpoints;
|
||||||
|
|
||||||
const SplineSeg3<2> * ss3 = dynamic_cast<const SplineSeg3<2> *>(spline);
|
const SplineSeg3<2> * ss3 = dynamic_cast<const SplineSeg3<2> *>(spline);
|
||||||
const LineSeg<2> * ls = dynamic_cast<const LineSeg<2> *>(spline);
|
const LineSeg<2> * ls = dynamic_cast<const LineSeg<2> *>(spline);
|
||||||
@ -386,7 +386,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
// find smallest y value of spline:
|
// find smallest y value of spline:
|
||||||
Array<double> testt;
|
NgArray<double> testt;
|
||||||
|
|
||||||
if(!isfirst)
|
if(!isfirst)
|
||||||
testt.Append(0);
|
testt.Append(0);
|
||||||
@ -624,7 +624,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void RevolutionFace :: GetRawData(Array<double> & data) const
|
void RevolutionFace :: GetRawData(NgArray<double> & data) const
|
||||||
{
|
{
|
||||||
data.DeleteAll();
|
data.DeleteAll();
|
||||||
spline->GetRawData(data);
|
spline->GetRawData(data);
|
||||||
@ -718,7 +718,7 @@ namespace netgen
|
|||||||
return DOES_INTERSECT;
|
return DOES_INTERSECT;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Array < Point<3> > pext(2);
|
NgArray < Point<3> > pext(2);
|
||||||
Point<3> p;
|
Point<3> p;
|
||||||
|
|
||||||
pext[0] = box.PMin();
|
pext[0] = box.PMin();
|
||||||
@ -772,7 +772,7 @@ namespace netgen
|
|||||||
const double b = -randomx;
|
const double b = -randomx;
|
||||||
const double c = -a*p2d(0)-b*p2d(1);
|
const double c = -a*p2d(0)-b*p2d(1);
|
||||||
|
|
||||||
Array < Point<2> > points;
|
NgArray < Point<2> > points;
|
||||||
|
|
||||||
//(*testout) << "face intersections at: " << endl;
|
//(*testout) << "face intersections at: " << endl;
|
||||||
for(int i=0; i<faces.Size(); i++)
|
for(int i=0; i<faces.Size(); i++)
|
||||||
@ -803,7 +803,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Revolution :: GetTangentialSurfaceIndices (const Point<3> & p,
|
void Revolution :: GetTangentialSurfaceIndices (const Point<3> & p,
|
||||||
Array<int> & surfind, double eps) const
|
NgArray<int> & surfind, double eps) const
|
||||||
{
|
{
|
||||||
for (int j = 0; j < faces.Size(); j++)
|
for (int j = 0; j < faces.Size(); j++)
|
||||||
if (faces[j] -> PointInFace(p, eps))
|
if (faces[j] -> PointInFace(p, eps))
|
||||||
@ -823,7 +823,7 @@ namespace netgen
|
|||||||
return pInSolid;
|
return pInSolid;
|
||||||
}
|
}
|
||||||
|
|
||||||
Array<int> intersecting_faces;
|
NgArray<int> intersecting_faces;
|
||||||
|
|
||||||
for(int i=0; i<faces.Size(); i++)
|
for(int i=0; i<faces.Size(); i++)
|
||||||
if(faces[i]->PointInFace(p,eps)) // == DOES_INTERSECT)
|
if(faces[i]->PointInFace(p,eps)) // == DOES_INTERSECT)
|
||||||
|
@ -23,9 +23,9 @@ namespace netgen
|
|||||||
mutable Vector spline_coefficient_shifted;
|
mutable Vector spline_coefficient_shifted;
|
||||||
|
|
||||||
|
|
||||||
Array < Vec<2>* > checklines_vec;
|
NgArray < Vec<2>* > checklines_vec;
|
||||||
Array < Point<2>* > checklines_start;
|
NgArray < Point<2>* > checklines_start;
|
||||||
Array < Vec<2>* > checklines_normal;
|
NgArray < Vec<2>* > checklines_normal;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init (void);
|
void Init (void);
|
||||||
@ -44,7 +44,7 @@ namespace netgen
|
|||||||
bool last = false,
|
bool last = false,
|
||||||
const int id_in = 0);
|
const int id_in = 0);
|
||||||
|
|
||||||
RevolutionFace(const Array<double> & raw_data);
|
RevolutionFace(const NgArray<double> & raw_data);
|
||||||
// default constructor for archive
|
// default constructor for archive
|
||||||
RevolutionFace() {}
|
RevolutionFace() {}
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ namespace netgen
|
|||||||
|
|
||||||
/* INSOLID_TYPE */ bool PointInFace (const Point<3> & p, const double eps) const;
|
/* INSOLID_TYPE */ bool PointInFace (const Point<3> & p, const double eps) const;
|
||||||
|
|
||||||
void GetRawData(Array<double> & data) const;
|
void GetRawData(NgArray<double> & data) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ namespace netgen
|
|||||||
int type;
|
int type;
|
||||||
|
|
||||||
|
|
||||||
Array<RevolutionFace*> faces;
|
NgArray<RevolutionFace*> faces;
|
||||||
|
|
||||||
mutable int intersecting_face;
|
mutable int intersecting_face;
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ namespace netgen
|
|||||||
double eps) const;
|
double eps) const;
|
||||||
|
|
||||||
virtual void GetTangentialSurfaceIndices (const Point<3> & p,
|
virtual void GetTangentialSurfaceIndices (const Point<3> & p,
|
||||||
Array<int> & surfind, double eps) const;
|
NgArray<int> & surfind, double eps) const;
|
||||||
|
|
||||||
virtual INSOLID_TYPE VecInSolid (const Point<3> & p,
|
virtual INSOLID_TYPE VecInSolid (const Point<3> & p,
|
||||||
const Vec<3> & v,
|
const Vec<3> & v,
|
||||||
|
@ -41,7 +41,7 @@ void SingularEdge :: FindPointsOnEdge (class Mesh & mesh)
|
|||||||
segms.SetSize(0);
|
segms.SetSize(0);
|
||||||
|
|
||||||
|
|
||||||
Array<int> si1, si2;
|
NgArray<int> si1, si2;
|
||||||
sol1->GetSurfaceIndices (si1);
|
sol1->GetSurfaceIndices (si1);
|
||||||
sol2->GetSurfaceIndices (si2);
|
sol2->GetSurfaceIndices (si2);
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ SingularPoint :: SingularPoint (double abeta,
|
|||||||
void SingularPoint :: FindPoints (class Mesh & mesh)
|
void SingularPoint :: FindPoints (class Mesh & mesh)
|
||||||
{
|
{
|
||||||
points.SetSize(0);
|
points.SetSize(0);
|
||||||
Array<int> surfk, surf;
|
NgArray<int> surfk, surf;
|
||||||
|
|
||||||
|
|
||||||
for (PointIndex pi = PointIndex::BASE;
|
for (PointIndex pi = PointIndex::BASE;
|
||||||
|
@ -29,8 +29,8 @@ namespace netgen
|
|||||||
int domnr;
|
int domnr;
|
||||||
const Solid *sol;
|
const Solid *sol;
|
||||||
double factor;
|
double factor;
|
||||||
// Array<Point<3> > points;
|
// NgArray<Point<3> > points;
|
||||||
// Array<INDEX_2> segms;
|
// NgArray<INDEX_2> segms;
|
||||||
public:
|
public:
|
||||||
SingularFace (int adomnr, const Solid * asol, double sf)
|
SingularFace (int adomnr, const Solid * asol, double sf)
|
||||||
: domnr(adomnr), sol(asol), factor(sf) { ; }
|
: domnr(adomnr), sol(asol), factor(sf) { ; }
|
||||||
@ -47,8 +47,8 @@ namespace netgen
|
|||||||
int domnr;
|
int domnr;
|
||||||
const CSGeometry& geom;
|
const CSGeometry& geom;
|
||||||
const Solid *sol1, *sol2;
|
const Solid *sol1, *sol2;
|
||||||
Array<Point<3> > points;
|
NgArray<Point<3> > points;
|
||||||
Array<INDEX_2> segms;
|
NgArray<INDEX_2> segms;
|
||||||
double factor;
|
double factor;
|
||||||
|
|
||||||
double maxhinit;
|
double maxhinit;
|
||||||
@ -68,7 +68,7 @@ namespace netgen
|
|||||||
public:
|
public:
|
||||||
double beta;
|
double beta;
|
||||||
const Solid *sol1, *sol2, *sol3;
|
const Solid *sol1, *sol2, *sol3;
|
||||||
Array<Point<3> > points;
|
NgArray<Point<3> > points;
|
||||||
double factor;
|
double factor;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -557,14 +557,14 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Solid :: Boundaries (const Point<3> & p, Array<int> & bounds) const
|
void Solid :: Boundaries (const Point<3> & p, NgArray<int> & bounds) const
|
||||||
{
|
{
|
||||||
int in, strin;
|
int in, strin;
|
||||||
bounds.SetSize (0);
|
bounds.SetSize (0);
|
||||||
RecBoundaries (p, bounds, in, strin);
|
RecBoundaries (p, bounds, in, strin);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Solid :: RecBoundaries (const Point<3> & p, Array<int> & bounds,
|
void Solid :: RecBoundaries (const Point<3> & p, NgArray<int> & bounds,
|
||||||
int & in, int & strin) const
|
int & in, int & strin) const
|
||||||
{
|
{
|
||||||
switch (op)
|
switch (op)
|
||||||
@ -585,7 +585,7 @@ namespace netgen
|
|||||||
case SECTION:
|
case SECTION:
|
||||||
{
|
{
|
||||||
int i, in1, in2, strin1, strin2;
|
int i, in1, in2, strin1, strin2;
|
||||||
Array<int> bounds1, bounds2;
|
NgArray<int> bounds1, bounds2;
|
||||||
|
|
||||||
s1 -> RecBoundaries (p, bounds1, in1, strin1);
|
s1 -> RecBoundaries (p, bounds1, in1, strin1);
|
||||||
s2 -> RecBoundaries (p, bounds2, in2, strin2);
|
s2 -> RecBoundaries (p, bounds2, in2, strin2);
|
||||||
@ -604,7 +604,7 @@ namespace netgen
|
|||||||
case UNION:
|
case UNION:
|
||||||
{
|
{
|
||||||
int i, in1, in2, strin1, strin2;
|
int i, in1, in2, strin1, strin2;
|
||||||
Array<int> bounds1, bounds2;
|
NgArray<int> bounds1, bounds2;
|
||||||
|
|
||||||
s1 -> RecBoundaries (p, bounds1, in1, strin1);
|
s1 -> RecBoundaries (p, bounds1, in1, strin1);
|
||||||
s2 -> RecBoundaries (p, bounds2, in2, strin2);
|
s2 -> RecBoundaries (p, bounds2, in2, strin2);
|
||||||
@ -638,7 +638,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Solid :: TangentialSolid (const Point<3> & p, Solid *& tansol, Array<int> & surfids, double eps) const
|
void Solid :: TangentialSolid (const Point<3> & p, Solid *& tansol, NgArray<int> & surfids, double eps) const
|
||||||
{
|
{
|
||||||
int in, strin;
|
int in, strin;
|
||||||
RecTangentialSolid (p, tansol, surfids, in, strin, eps);
|
RecTangentialSolid (p, tansol, surfids, in, strin, eps);
|
||||||
@ -648,7 +648,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Solid :: RecTangentialSolid (const Point<3> & p, Solid *& tansol, Array<int> & surfids,
|
void Solid :: RecTangentialSolid (const Point<3> & p, Solid *& tansol, NgArray<int> & surfids,
|
||||||
int & in, int & strin, double eps) const
|
int & in, int & strin, double eps) const
|
||||||
{
|
{
|
||||||
tansol = NULL;
|
tansol = NULL;
|
||||||
@ -742,7 +742,7 @@ namespace netgen
|
|||||||
|
|
||||||
void Solid :: TangentialSolid2 (const Point<3> & p,
|
void Solid :: TangentialSolid2 (const Point<3> & p,
|
||||||
const Vec<3> & t,
|
const Vec<3> & t,
|
||||||
Solid *& tansol, Array<int> & surfids, double eps) const
|
Solid *& tansol, NgArray<int> & surfids, double eps) const
|
||||||
{
|
{
|
||||||
int in, strin;
|
int in, strin;
|
||||||
surfids.SetSize (0);
|
surfids.SetSize (0);
|
||||||
@ -752,7 +752,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Solid :: RecTangentialSolid2 (const Point<3> & p, const Vec<3> & t,
|
void Solid :: RecTangentialSolid2 (const Point<3> & p, const Vec<3> & t,
|
||||||
Solid *& tansol, Array<int> & surfids,
|
Solid *& tansol, NgArray<int> & surfids,
|
||||||
int & in, int & strin, double eps) const
|
int & in, int & strin, double eps) const
|
||||||
{
|
{
|
||||||
tansol = NULL;
|
tansol = NULL;
|
||||||
@ -856,7 +856,7 @@ namespace netgen
|
|||||||
|
|
||||||
void Solid :: TangentialSolid3 (const Point<3> & p,
|
void Solid :: TangentialSolid3 (const Point<3> & p,
|
||||||
const Vec<3> & t, const Vec<3> & t2,
|
const Vec<3> & t, const Vec<3> & t2,
|
||||||
Solid *& tansol, Array<int> & surfids,
|
Solid *& tansol, NgArray<int> & surfids,
|
||||||
double eps) const
|
double eps) const
|
||||||
{
|
{
|
||||||
int in, strin;
|
int in, strin;
|
||||||
@ -869,7 +869,7 @@ namespace netgen
|
|||||||
|
|
||||||
void Solid :: RecTangentialSolid3 (const Point<3> & p,
|
void Solid :: RecTangentialSolid3 (const Point<3> & p,
|
||||||
const Vec<3> & t, const Vec<3> & t2,
|
const Vec<3> & t, const Vec<3> & t2,
|
||||||
Solid *& tansol, Array<int> & surfids,
|
Solid *& tansol, NgArray<int> & surfids,
|
||||||
int & in, int & strin, double eps) const
|
int & in, int & strin, double eps) const
|
||||||
{
|
{
|
||||||
tansol = NULL;
|
tansol = NULL;
|
||||||
@ -967,7 +967,7 @@ namespace netgen
|
|||||||
|
|
||||||
void Solid :: TangentialEdgeSolid (const Point<3> & p,
|
void Solid :: TangentialEdgeSolid (const Point<3> & p,
|
||||||
const Vec<3> & t, const Vec<3> & t2, const Vec<3> & m,
|
const Vec<3> & t, const Vec<3> & t2, const Vec<3> & m,
|
||||||
Solid *& tansol, Array<int> & surfids,
|
Solid *& tansol, NgArray<int> & surfids,
|
||||||
double eps) const
|
double eps) const
|
||||||
{
|
{
|
||||||
int in, strin;
|
int in, strin;
|
||||||
@ -982,7 +982,7 @@ namespace netgen
|
|||||||
|
|
||||||
void Solid :: RecTangentialEdgeSolid (const Point<3> & p,
|
void Solid :: RecTangentialEdgeSolid (const Point<3> & p,
|
||||||
const Vec<3> & t, const Vec<3> & t2, const Vec<3> & m,
|
const Vec<3> & t, const Vec<3> & t2, const Vec<3> & m,
|
||||||
Solid *& tansol, Array<int> & surfids,
|
Solid *& tansol, NgArray<int> & surfids,
|
||||||
int & in, int & strin, double eps) const
|
int & in, int & strin, double eps) const
|
||||||
{
|
{
|
||||||
tansol = NULL;
|
tansol = NULL;
|
||||||
@ -1450,13 +1450,13 @@ namespace netgen
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Solid :: GetSurfaceIndices (Array<int> & surfind) const
|
void Solid :: GetSurfaceIndices (NgArray<int> & surfind) const
|
||||||
{
|
{
|
||||||
surfind.SetSize (0);
|
surfind.SetSize (0);
|
||||||
RecGetSurfaceIndices (surfind);
|
RecGetSurfaceIndices (surfind);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Solid :: RecGetSurfaceIndices (Array<int> & surfind) const
|
void Solid :: RecGetSurfaceIndices (NgArray<int> & surfind) const
|
||||||
{
|
{
|
||||||
switch (op)
|
switch (op)
|
||||||
{
|
{
|
||||||
@ -1533,13 +1533,13 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Solid :: GetTangentialSurfaceIndices (const Point<3> & p, Array<int> & surfind, double eps) const
|
void Solid :: GetTangentialSurfaceIndices (const Point<3> & p, NgArray<int> & surfind, double eps) const
|
||||||
{
|
{
|
||||||
surfind.SetSize (0);
|
surfind.SetSize (0);
|
||||||
RecGetTangentialSurfaceIndices (p, surfind, eps);
|
RecGetTangentialSurfaceIndices (p, surfind, eps);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Solid :: RecGetTangentialSurfaceIndices (const Point<3> & p, Array<int> & surfind, double eps) const
|
void Solid :: RecGetTangentialSurfaceIndices (const Point<3> & p, NgArray<int> & surfind, double eps) const
|
||||||
{
|
{
|
||||||
switch (op)
|
switch (op)
|
||||||
{
|
{
|
||||||
@ -1576,14 +1576,14 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
void Solid :: GetTangentialSurfaceIndices2 (const Point<3> & p, const Vec<3> & v,
|
void Solid :: GetTangentialSurfaceIndices2 (const Point<3> & p, const Vec<3> & v,
|
||||||
Array<int> & surfind, double eps) const
|
NgArray<int> & surfind, double eps) const
|
||||||
{
|
{
|
||||||
surfind.SetSize (0);
|
surfind.SetSize (0);
|
||||||
RecGetTangentialSurfaceIndices2 (p, v, surfind, eps);
|
RecGetTangentialSurfaceIndices2 (p, v, surfind, eps);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Solid :: RecGetTangentialSurfaceIndices2 (const Point<3> & p, const Vec<3> & v,
|
void Solid :: RecGetTangentialSurfaceIndices2 (const Point<3> & p, const Vec<3> & v,
|
||||||
Array<int> & surfind, double eps) const
|
NgArray<int> & surfind, double eps) const
|
||||||
{
|
{
|
||||||
switch (op)
|
switch (op)
|
||||||
{
|
{
|
||||||
@ -1628,14 +1628,14 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
void Solid :: GetTangentialSurfaceIndices3 (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2,
|
void Solid :: GetTangentialSurfaceIndices3 (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2,
|
||||||
Array<int> & surfind, double eps) const
|
NgArray<int> & surfind, double eps) const
|
||||||
{
|
{
|
||||||
surfind.SetSize (0);
|
surfind.SetSize (0);
|
||||||
RecGetTangentialSurfaceIndices3 (p, v, v2, surfind, eps);
|
RecGetTangentialSurfaceIndices3 (p, v, v2, surfind, eps);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Solid :: RecGetTangentialSurfaceIndices3 (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2,
|
void Solid :: RecGetTangentialSurfaceIndices3 (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2,
|
||||||
Array<int> & surfind, double eps) const
|
NgArray<int> & surfind, double eps) const
|
||||||
{
|
{
|
||||||
switch (op)
|
switch (op)
|
||||||
{
|
{
|
||||||
@ -1697,7 +1697,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
void Solid :: RecGetTangentialEdgeSurfaceIndices (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2, const Vec<3> & m,
|
void Solid :: RecGetTangentialEdgeSurfaceIndices (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2, const Vec<3> & m,
|
||||||
Array<int> & surfind, double eps) const
|
NgArray<int> & surfind, double eps) const
|
||||||
{
|
{
|
||||||
switch (op)
|
switch (op)
|
||||||
{
|
{
|
||||||
@ -1801,7 +1801,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Solid :: CalcOnePrimitiveSpecialPoints (const Box<3> & box, Array<Point<3> > & pts) const
|
void Solid :: CalcOnePrimitiveSpecialPoints (const Box<3> & box, NgArray<Point<3> > & pts) const
|
||||||
{
|
{
|
||||||
double eps = 1e-8 * box.Diam ();
|
double eps = 1e-8 * box.Diam ();
|
||||||
|
|
||||||
@ -1814,7 +1814,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Solid :: RecCalcOnePrimitiveSpecialPoints (Array<Point<3> > & pts) const
|
void Solid :: RecCalcOnePrimitiveSpecialPoints (NgArray<Point<3> > & pts) const
|
||||||
{
|
{
|
||||||
switch (op)
|
switch (op)
|
||||||
{
|
{
|
||||||
|
@ -81,14 +81,14 @@ namespace netgen
|
|||||||
void IterateSolid (SolidIterator & it, bool only_once = 0);
|
void IterateSolid (SolidIterator & it, bool only_once = 0);
|
||||||
|
|
||||||
|
|
||||||
void Boundaries (const Point<3> & p, Array<int> & bounds) const;
|
void Boundaries (const Point<3> & p, NgArray<int> & bounds) const;
|
||||||
int NumPrimitives () const;
|
int NumPrimitives () const;
|
||||||
void GetSurfaceIndices (Array<int> & surfind) const;
|
void GetSurfaceIndices (NgArray<int> & surfind) const;
|
||||||
void GetSurfaceIndices (IndexSet & iset) const;
|
void GetSurfaceIndices (IndexSet & iset) const;
|
||||||
|
|
||||||
void GetTangentialSurfaceIndices (const Point<3> & p, Array<int> & surfids, double eps) const;
|
void GetTangentialSurfaceIndices (const Point<3> & p, NgArray<int> & surfids, double eps) const;
|
||||||
void GetTangentialSurfaceIndices2 (const Point<3> & p, const Vec<3> & v, Array<int> & surfids, double eps) const;
|
void GetTangentialSurfaceIndices2 (const Point<3> & p, const Vec<3> & v, NgArray<int> & surfids, double eps) const;
|
||||||
void GetTangentialSurfaceIndices3 (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2, Array<int> & surfids, double eps) const;
|
void GetTangentialSurfaceIndices3 (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2, NgArray<int> & surfids, double eps) const;
|
||||||
|
|
||||||
void ForEachSurface (const std::function<void(Surface*,bool)> & lambda, bool inv = false) const;
|
void ForEachSurface (const std::function<void(Surface*,bool)> & lambda, bool inv = false) const;
|
||||||
|
|
||||||
@ -114,16 +114,16 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
/// compute localization in point p
|
/// compute localization in point p
|
||||||
void TangentialSolid (const Point<3> & p, Solid *& tansol, Array<int> & surfids, double eps) const;
|
void TangentialSolid (const Point<3> & p, Solid *& tansol, NgArray<int> & surfids, double eps) const;
|
||||||
|
|
||||||
/// compute localization in point p tangential to vector t
|
/// compute localization in point p tangential to vector t
|
||||||
void TangentialSolid2 (const Point<3> & p, const Vec<3> & t,
|
void TangentialSolid2 (const Point<3> & p, const Vec<3> & t,
|
||||||
Solid *& tansol, Array<int> & surfids, double eps) const;
|
Solid *& tansol, NgArray<int> & surfids, double eps) const;
|
||||||
|
|
||||||
/** compute localization in point p, with second order approximation to edge
|
/** compute localization in point p, with second order approximation to edge
|
||||||
p + s t + s*s/2 t2 **/
|
p + s t + s*s/2 t2 **/
|
||||||
void TangentialSolid3 (const Point<3> & p, const Vec<3> & t, const Vec<3> & t2,
|
void TangentialSolid3 (const Point<3> & p, const Vec<3> & t, const Vec<3> & t2,
|
||||||
Solid *& tansol, Array<int> & surfids, double eps) const;
|
Solid *& tansol, NgArray<int> & surfids, double eps) const;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -135,10 +135,10 @@ namespace netgen
|
|||||||
**/
|
**/
|
||||||
void TangentialEdgeSolid (const Point<3> & p, const Vec<3> & t, const Vec<3> & t2,
|
void TangentialEdgeSolid (const Point<3> & p, const Vec<3> & t, const Vec<3> & t2,
|
||||||
const Vec<3> & m,
|
const Vec<3> & m,
|
||||||
Solid *& tansol, Array<int> & surfids, double eps) const;
|
Solid *& tansol, NgArray<int> & surfids, double eps) const;
|
||||||
|
|
||||||
|
|
||||||
void CalcOnePrimitiveSpecialPoints (const Box<3> & box, Array<Point<3> > & pts) const;
|
void CalcOnePrimitiveSpecialPoints (const Box<3> & box, NgArray<Point<3> > & pts) const;
|
||||||
|
|
||||||
///
|
///
|
||||||
int Edge (const Point<3> & p, const Vec<3> & v, double eps) const;
|
int Edge (const Point<3> & p, const Vec<3> & v, double eps) const;
|
||||||
@ -176,23 +176,23 @@ namespace netgen
|
|||||||
protected:
|
protected:
|
||||||
///
|
///
|
||||||
|
|
||||||
void RecBoundaries (const Point<3> & p, Array<int> & bounds,
|
void RecBoundaries (const Point<3> & p, NgArray<int> & bounds,
|
||||||
int & in, int & strin) const;
|
int & in, int & strin) const;
|
||||||
///
|
///
|
||||||
void RecTangentialSolid (const Point<3> & p, Solid *& tansol, Array<int> & surfids,
|
void RecTangentialSolid (const Point<3> & p, Solid *& tansol, NgArray<int> & surfids,
|
||||||
int & in, int & strin, double eps) const;
|
int & in, int & strin, double eps) const;
|
||||||
|
|
||||||
void RecTangentialSolid2 (const Point<3> & p, const Vec<3> & vec,
|
void RecTangentialSolid2 (const Point<3> & p, const Vec<3> & vec,
|
||||||
Solid *& tansol, Array<int> & surfids,
|
Solid *& tansol, NgArray<int> & surfids,
|
||||||
int & in, int & strin, double eps) const;
|
int & in, int & strin, double eps) const;
|
||||||
///
|
///
|
||||||
void RecTangentialSolid3 (const Point<3> & p, const Vec<3> & vec,const Vec<3> & vec2,
|
void RecTangentialSolid3 (const Point<3> & p, const Vec<3> & vec,const Vec<3> & vec2,
|
||||||
Solid *& tansol, Array<int> & surfids,
|
Solid *& tansol, NgArray<int> & surfids,
|
||||||
int & in, int & strin, double eps) const;
|
int & in, int & strin, double eps) const;
|
||||||
///
|
///
|
||||||
void RecTangentialEdgeSolid (const Point<3> & p, const Vec<3> & t, const Vec<3> & t2,
|
void RecTangentialEdgeSolid (const Point<3> & p, const Vec<3> & t, const Vec<3> & t2,
|
||||||
const Vec<3> & m,
|
const Vec<3> & m,
|
||||||
Solid *& tansol, Array<int> & surfids,
|
Solid *& tansol, NgArray<int> & surfids,
|
||||||
int & in, int & strin, double eps) const;
|
int & in, int & strin, double eps) const;
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -203,16 +203,16 @@ namespace netgen
|
|||||||
///
|
///
|
||||||
Solid * RecGetReducedSolid (const BoxSphere<3> & box, INSOLID_TYPE & in) const;
|
Solid * RecGetReducedSolid (const BoxSphere<3> & box, INSOLID_TYPE & in) const;
|
||||||
///
|
///
|
||||||
void RecGetSurfaceIndices (Array<int> & surfind) const;
|
void RecGetSurfaceIndices (NgArray<int> & surfind) const;
|
||||||
void RecGetTangentialSurfaceIndices (const Point<3> & p, Array<int> & surfids, double eps) const;
|
void RecGetTangentialSurfaceIndices (const Point<3> & p, NgArray<int> & surfids, double eps) const;
|
||||||
void RecGetTangentialSurfaceIndices2 (const Point<3> & p, const Vec<3> & v, Array<int> & surfids, double eps) const;
|
void RecGetTangentialSurfaceIndices2 (const Point<3> & p, const Vec<3> & v, NgArray<int> & surfids, double eps) const;
|
||||||
void RecGetTangentialSurfaceIndices3 (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2,
|
void RecGetTangentialSurfaceIndices3 (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2,
|
||||||
Array<int> & surfids, double eps) const;
|
NgArray<int> & surfids, double eps) const;
|
||||||
void RecGetTangentialEdgeSurfaceIndices (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2, const Vec<3> & m,
|
void RecGetTangentialEdgeSurfaceIndices (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2, const Vec<3> & m,
|
||||||
Array<int> & surfids, double eps) const;
|
NgArray<int> & surfids, double eps) const;
|
||||||
void RecGetSurfaceIndices (IndexSet & iset) const;
|
void RecGetSurfaceIndices (IndexSet & iset) const;
|
||||||
|
|
||||||
void RecCalcOnePrimitiveSpecialPoints (Array<Point<3> > & pts) const;
|
void RecCalcOnePrimitiveSpecialPoints (NgArray<Point<3> > & pts) const;
|
||||||
|
|
||||||
friend class SolidIterator;
|
friend class SolidIterator;
|
||||||
friend class ClearVisitedIt;
|
friend class ClearVisitedIt;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
namespace netgen
|
namespace netgen
|
||||||
{
|
{
|
||||||
Array<Box<3> > boxes;
|
NgArray<Box<3> > boxes;
|
||||||
|
|
||||||
|
|
||||||
void ProjectToEdge (const Surface * f1, const Surface * f2, Point<3> & hp);
|
void ProjectToEdge (const Surface * f1, const Surface * f2, Point<3> & hp);
|
||||||
@ -64,7 +64,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static Array<int> numprim_hist;
|
static NgArray<int> numprim_hist;
|
||||||
|
|
||||||
SpecialPointCalculation :: SpecialPointCalculation ()
|
SpecialPointCalculation :: SpecialPointCalculation ()
|
||||||
{
|
{
|
||||||
@ -73,7 +73,7 @@ namespace netgen
|
|||||||
|
|
||||||
void SpecialPointCalculation ::
|
void SpecialPointCalculation ::
|
||||||
CalcSpecialPoints (const CSGeometry & ageometry,
|
CalcSpecialPoints (const CSGeometry & ageometry,
|
||||||
Array<MeshPoint> & apoints)
|
NgArray<MeshPoint> & apoints)
|
||||||
{
|
{
|
||||||
static int timer = NgProfiler::CreateTimer ("CSG: find special points");
|
static int timer = NgProfiler::CreateTimer ("CSG: find special points");
|
||||||
NgProfiler::RegionTimer reg (timer);
|
NgProfiler::RegionTimer reg (timer);
|
||||||
@ -112,7 +112,7 @@ namespace netgen
|
|||||||
|
|
||||||
if (tlo->GetSolid())
|
if (tlo->GetSolid())
|
||||||
{
|
{
|
||||||
Array<Point<3> > hpts;
|
NgArray<Point<3> > hpts;
|
||||||
tlo->GetSolid()->CalcOnePrimitiveSpecialPoints (box, hpts);
|
tlo->GetSolid()->CalcOnePrimitiveSpecialPoints (box, hpts);
|
||||||
// if (hpts.Size())
|
// if (hpts.Size())
|
||||||
// cout << "oneprimitivespecialpoints = " << hpts << endl;
|
// cout << "oneprimitivespecialpoints = " << hpts << endl;
|
||||||
@ -210,7 +210,7 @@ namespace netgen
|
|||||||
bool possiblecrossp, possibleexp; // possible cross or extremalpoint
|
bool possiblecrossp, possibleexp; // possible cross or extremalpoint
|
||||||
bool surecrossp = 0, sureexp = 0; // sure ...
|
bool surecrossp = 0, sureexp = 0; // sure ...
|
||||||
|
|
||||||
// static Array<int> locsurf; // attention: array is static
|
// static NgArray<int> locsurf; // attention: array is static
|
||||||
ArrayMem<int,100> locsurf;
|
ArrayMem<int,100> locsurf;
|
||||||
|
|
||||||
// static int cntbox = 0;
|
// static int cntbox = 0;
|
||||||
@ -273,8 +273,8 @@ namespace netgen
|
|||||||
|
|
||||||
if (nquad == numprim && nplane >= numprim-1)
|
if (nquad == numprim && nplane >= numprim-1)
|
||||||
{
|
{
|
||||||
Array<Point<3> > pts;
|
NgArray<Point<3> > pts;
|
||||||
Array<int> surfids;
|
NgArray<int> surfids;
|
||||||
|
|
||||||
for (int k1 = 0; k1 < numprim - 2; k1++)
|
for (int k1 = 0; k1 < numprim - 2; k1++)
|
||||||
for (int k2 = k1 + 1; k2 < numprim - 1; k2++)
|
for (int k2 = k1 + 1; k2 < numprim - 1; k2++)
|
||||||
@ -392,8 +392,8 @@ namespace netgen
|
|||||||
|
|
||||||
if (nsphere == numprim) // && calccp == false)
|
if (nsphere == numprim) // && calccp == false)
|
||||||
{
|
{
|
||||||
Array<Point<3> > pts;
|
NgArray<Point<3> > pts;
|
||||||
Array<int> surfids;
|
NgArray<int> surfids;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -541,7 +541,7 @@ namespace netgen
|
|||||||
BoxSphere<3> boxp (pp, pp);
|
BoxSphere<3> boxp (pp, pp);
|
||||||
boxp.Increase (1e-3*size);
|
boxp.Increase (1e-3*size);
|
||||||
boxp.CalcDiamCenter();
|
boxp.CalcDiamCenter();
|
||||||
Array<int> locsurf2;
|
NgArray<int> locsurf2;
|
||||||
|
|
||||||
geometry -> GetIndependentSurfaceIndices (sol, boxp, locsurf2);
|
geometry -> GetIndependentSurfaceIndices (sol, boxp, locsurf2);
|
||||||
|
|
||||||
@ -1132,7 +1132,7 @@ namespace netgen
|
|||||||
ComputeCrossPoints (const Plane * plane1,
|
ComputeCrossPoints (const Plane * plane1,
|
||||||
const Plane * plane2,
|
const Plane * plane2,
|
||||||
const Plane * plane3,
|
const Plane * plane3,
|
||||||
Array<Point<3> > & pts)
|
NgArray<Point<3> > & pts)
|
||||||
{
|
{
|
||||||
Mat<3> mat;
|
Mat<3> mat;
|
||||||
Vec<3> rhs, sol;
|
Vec<3> rhs, sol;
|
||||||
@ -1174,7 +1174,7 @@ namespace netgen
|
|||||||
ComputeCrossPoints (const Plane * plane1,
|
ComputeCrossPoints (const Plane * plane1,
|
||||||
const Plane * plane2,
|
const Plane * plane2,
|
||||||
const QuadraticSurface * quadric,
|
const QuadraticSurface * quadric,
|
||||||
Array<Point<3> > & pts)
|
NgArray<Point<3> > & pts)
|
||||||
{
|
{
|
||||||
Mat<2,3> mat;
|
Mat<2,3> mat;
|
||||||
Mat<3,2> inv;
|
Mat<3,2> inv;
|
||||||
@ -1244,7 +1244,7 @@ namespace netgen
|
|||||||
ComputeCrossPoints (const Sphere * sphere1,
|
ComputeCrossPoints (const Sphere * sphere1,
|
||||||
const Sphere * sphere2,
|
const Sphere * sphere2,
|
||||||
const Sphere * sphere3,
|
const Sphere * sphere3,
|
||||||
Array<Point<3> > & pts)
|
NgArray<Point<3> > & pts)
|
||||||
{
|
{
|
||||||
Mat<2,3> mat;
|
Mat<2,3> mat;
|
||||||
Mat<3,2> inv;
|
Mat<3,2> inv;
|
||||||
@ -1327,7 +1327,7 @@ namespace netgen
|
|||||||
void SpecialPointCalculation ::
|
void SpecialPointCalculation ::
|
||||||
ComputeExtremalPoints (const Plane * plane,
|
ComputeExtremalPoints (const Plane * plane,
|
||||||
const QuadraticSurface * quadric,
|
const QuadraticSurface * quadric,
|
||||||
Array<Point<3> > & pts)
|
NgArray<Point<3> > & pts)
|
||||||
{
|
{
|
||||||
// 3 equations:
|
// 3 equations:
|
||||||
// surf1 = 0 <===> plane_a + plane_b x = 0;
|
// surf1 = 0 <===> plane_a + plane_b x = 0;
|
||||||
@ -1416,7 +1416,7 @@ namespace netgen
|
|||||||
void SpecialPointCalculation ::
|
void SpecialPointCalculation ::
|
||||||
ComputeExtremalPoints (const Sphere * sphere1,
|
ComputeExtremalPoints (const Sphere * sphere1,
|
||||||
const Sphere * sphere2,
|
const Sphere * sphere2,
|
||||||
Array<Point<3> > & pts)
|
NgArray<Point<3> > & pts)
|
||||||
{
|
{
|
||||||
// 3 equations:
|
// 3 equations:
|
||||||
// surf1 = 0 <===> |x-c1|^2 - r1^2 = 0;
|
// surf1 = 0 <===> |x-c1|^2 - r1^2 = 0;
|
||||||
@ -1666,19 +1666,19 @@ namespace netgen
|
|||||||
|
|
||||||
void SpecialPointCalculation ::
|
void SpecialPointCalculation ::
|
||||||
AnalyzeSpecialPoints (const CSGeometry & ageometry,
|
AnalyzeSpecialPoints (const CSGeometry & ageometry,
|
||||||
Array<MeshPoint> & apoints,
|
NgArray<MeshPoint> & apoints,
|
||||||
Array<SpecialPoint> & specpoints)
|
NgArray<SpecialPoint> & specpoints)
|
||||||
{
|
{
|
||||||
static int timer = NgProfiler::CreateTimer ("CSG: analyze special points");
|
static int timer = NgProfiler::CreateTimer ("CSG: analyze special points");
|
||||||
NgProfiler::RegionTimer reg (timer);
|
NgProfiler::RegionTimer reg (timer);
|
||||||
|
|
||||||
|
|
||||||
Array<int> surfind, rep_surfind, surfind2, rep_surfind2, surfind3;
|
NgArray<int> surfind, rep_surfind, surfind2, rep_surfind2, surfind3;
|
||||||
|
|
||||||
Array<Vec<3> > normalvecs;
|
NgArray<Vec<3> > normalvecs;
|
||||||
Vec<3> nsurf = 0.0;
|
Vec<3> nsurf = 0.0;
|
||||||
|
|
||||||
Array<int> specpoint2point;
|
NgArray<int> specpoint2point;
|
||||||
specpoints.SetSize (0);
|
specpoints.SetSize (0);
|
||||||
|
|
||||||
geometry = &ageometry;
|
geometry = &ageometry;
|
||||||
@ -1698,7 +1698,7 @@ namespace netgen
|
|||||||
*/
|
*/
|
||||||
Vec<3> dir(1.2, 1.7, 0.9);
|
Vec<3> dir(1.2, 1.7, 0.9);
|
||||||
|
|
||||||
Array<double> coord(apoints.Size());
|
NgArray<double> coord(apoints.Size());
|
||||||
for (int i = 0; i < apoints.Size(); i++)
|
for (int i = 0; i < apoints.Size(); i++)
|
||||||
coord[i] = dir * Vec<3> (apoints[i]);
|
coord[i] = dir * Vec<3> (apoints[i]);
|
||||||
|
|
||||||
@ -1717,7 +1717,7 @@ namespace netgen
|
|||||||
(*testout) << "points = " << apoints << endl;
|
(*testout) << "points = " << apoints << endl;
|
||||||
|
|
||||||
Point3dTree searchtree (bbox.PMin(), bbox.PMax());
|
Point3dTree searchtree (bbox.PMin(), bbox.PMax());
|
||||||
Array<int> locsearch;
|
NgArray<int> locsearch;
|
||||||
|
|
||||||
for (int si = 0; si < ageometry.GetNTopLevelObjects(); si++)
|
for (int si = 0; si < ageometry.GetNTopLevelObjects(); si++)
|
||||||
{
|
{
|
||||||
@ -1882,7 +1882,7 @@ namespace netgen
|
|||||||
#ifdef DEVELOP
|
#ifdef DEVELOP
|
||||||
(*testout) << "surfind2 = " << endl << surfind2 << endl;
|
(*testout) << "surfind2 = " << endl << surfind2 << endl;
|
||||||
#endif
|
#endif
|
||||||
Array<int> surfind2_aux(surfind2);
|
NgArray<int> surfind2_aux(surfind2);
|
||||||
ageometry.GetIndependentSurfaceIndices (surfind2_aux);
|
ageometry.GetIndependentSurfaceIndices (surfind2_aux);
|
||||||
#ifdef DEVELOP
|
#ifdef DEVELOP
|
||||||
(*testout) << "surfind2,rep = " << endl << surfind2_aux << endl;
|
(*testout) << "surfind2,rep = " << endl << surfind2_aux << endl;
|
||||||
@ -2067,7 +2067,7 @@ namespace netgen
|
|||||||
if(testuncond.Test(i))
|
if(testuncond.Test(i))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Array<int> same;
|
NgArray<int> same;
|
||||||
same.Append(i);
|
same.Append(i);
|
||||||
|
|
||||||
for(int j = i+1; j<specpoints.Size(); j++)
|
for(int j = i+1; j<specpoints.Size(); j++)
|
||||||
|
@ -79,9 +79,9 @@ namespace netgen
|
|||||||
///
|
///
|
||||||
const CSGeometry * geometry;
|
const CSGeometry * geometry;
|
||||||
///
|
///
|
||||||
Array<MeshPoint> * points;
|
NgArray<MeshPoint> * points;
|
||||||
///
|
///
|
||||||
Array<long int> boxesinlevel;
|
NgArray<long int> boxesinlevel;
|
||||||
|
|
||||||
///
|
///
|
||||||
double size;
|
double size;
|
||||||
@ -102,11 +102,11 @@ namespace netgen
|
|||||||
|
|
||||||
///
|
///
|
||||||
void CalcSpecialPoints (const CSGeometry & ageometry,
|
void CalcSpecialPoints (const CSGeometry & ageometry,
|
||||||
Array<MeshPoint> & points);
|
NgArray<MeshPoint> & points);
|
||||||
///
|
///
|
||||||
void AnalyzeSpecialPoints (const CSGeometry & geometry,
|
void AnalyzeSpecialPoints (const CSGeometry & geometry,
|
||||||
Array<MeshPoint> & points,
|
NgArray<MeshPoint> & points,
|
||||||
Array<SpecialPoint> & specpoints);
|
NgArray<SpecialPoint> & specpoints);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
///
|
///
|
||||||
@ -161,27 +161,27 @@ namespace netgen
|
|||||||
|
|
||||||
void ComputeExtremalPoints (const Plane * plane,
|
void ComputeExtremalPoints (const Plane * plane,
|
||||||
const QuadraticSurface * quadric,
|
const QuadraticSurface * quadric,
|
||||||
Array<Point<3> > & pts);
|
NgArray<Point<3> > & pts);
|
||||||
|
|
||||||
void ComputeExtremalPoints (const Sphere * sphere1,
|
void ComputeExtremalPoints (const Sphere * sphere1,
|
||||||
const Sphere * sphere2,
|
const Sphere * sphere2,
|
||||||
Array<Point<3> > & pts);
|
NgArray<Point<3> > & pts);
|
||||||
|
|
||||||
|
|
||||||
void ComputeCrossPoints (const Plane * plane1,
|
void ComputeCrossPoints (const Plane * plane1,
|
||||||
const Plane * plane2,
|
const Plane * plane2,
|
||||||
const Plane * plane3,
|
const Plane * plane3,
|
||||||
Array<Point<3> > & pts);
|
NgArray<Point<3> > & pts);
|
||||||
|
|
||||||
void ComputeCrossPoints (const Plane * plane1,
|
void ComputeCrossPoints (const Plane * plane1,
|
||||||
const Plane * plane2,
|
const Plane * plane2,
|
||||||
const QuadraticSurface * quadratic,
|
const QuadraticSurface * quadratic,
|
||||||
Array<Point<3> > & pts);
|
NgArray<Point<3> > & pts);
|
||||||
|
|
||||||
void ComputeCrossPoints (const Sphere * sphere1,
|
void ComputeCrossPoints (const Sphere * sphere1,
|
||||||
const Sphere * sphere2,
|
const Sphere * sphere2,
|
||||||
const Sphere * sphere3,
|
const Sphere * sphere3,
|
||||||
Array<Point<3> > & pts);
|
NgArray<Point<3> > & pts);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ namespace netgen
|
|||||||
class spline3d
|
class spline3d
|
||||||
{
|
{
|
||||||
///
|
///
|
||||||
Array<splinesegment3d *> segments;
|
NgArray<splinesegment3d *> segments;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
|
@ -36,11 +36,11 @@ void SplineSurface :: AppendPoint(const Point<3> & p, const double reffac, const
|
|||||||
return "default";
|
return "default";
|
||||||
}
|
}
|
||||||
|
|
||||||
const shared_ptr<Array<shared_ptr<OneSurfacePrimitive>>> SplineSurface :: CreateCuttingSurfaces()
|
const shared_ptr<NgArray<shared_ptr<OneSurfacePrimitive>>> SplineSurface :: CreateCuttingSurfaces()
|
||||||
{
|
{
|
||||||
if(all_cuts)
|
if(all_cuts)
|
||||||
return all_cuts;
|
return all_cuts;
|
||||||
auto cuttings = make_shared<Array<shared_ptr<OneSurfacePrimitive>>>();
|
auto cuttings = make_shared<NgArray<shared_ptr<OneSurfacePrimitive>>>();
|
||||||
for (auto cut : *cuts)
|
for (auto cut : *cuts)
|
||||||
cuttings->Append(cut);
|
cuttings->Append(cut);
|
||||||
for(int i = 0; i<splines.Size(); i++)
|
for(int i = 0; i<splines.Size(); i++)
|
||||||
|
@ -7,16 +7,16 @@ namespace netgen
|
|||||||
class SplineSurface : public OneSurfacePrimitive
|
class SplineSurface : public OneSurfacePrimitive
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
Array<GeomPoint<3>> geompoints;
|
NgArray<GeomPoint<3>> geompoints;
|
||||||
Array<shared_ptr<SplineSeg<3>>> splines;
|
NgArray<shared_ptr<SplineSeg<3>>> splines;
|
||||||
Array<string> bcnames;
|
NgArray<string> bcnames;
|
||||||
Array<double> maxh;
|
NgArray<double> maxh;
|
||||||
shared_ptr<OneSurfacePrimitive> baseprimitive;
|
shared_ptr<OneSurfacePrimitive> baseprimitive;
|
||||||
shared_ptr<Array<shared_ptr<OneSurfacePrimitive>>> cuts;
|
shared_ptr<NgArray<shared_ptr<OneSurfacePrimitive>>> cuts;
|
||||||
shared_ptr<Array<shared_ptr<OneSurfacePrimitive>>> all_cuts;
|
shared_ptr<NgArray<shared_ptr<OneSurfacePrimitive>>> all_cuts;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SplineSurface(shared_ptr<OneSurfacePrimitive> abaseprimitive, shared_ptr<Array<shared_ptr<OneSurfacePrimitive>>> acuts) :
|
SplineSurface(shared_ptr<OneSurfacePrimitive> abaseprimitive, shared_ptr<NgArray<shared_ptr<OneSurfacePrimitive>>> acuts) :
|
||||||
OneSurfacePrimitive(), baseprimitive(abaseprimitive), cuts(acuts)
|
OneSurfacePrimitive(), baseprimitive(abaseprimitive), cuts(acuts)
|
||||||
{ ; }
|
{ ; }
|
||||||
// default constructor for archive
|
// default constructor for archive
|
||||||
@ -25,7 +25,7 @@ namespace netgen
|
|||||||
|
|
||||||
const auto & GetSplines() const { return splines; }
|
const auto & GetSplines() const { return splines; }
|
||||||
int GetNSplines() const { return splines.Size(); }
|
int GetNSplines() const { return splines.Size(); }
|
||||||
const Array<GeomPoint<3>>& GetPoints() const { return geompoints; }
|
const NgArray<GeomPoint<3>>& GetPoints() const { return geompoints; }
|
||||||
string GetSplineType(const int i) const { return splines[i]->GetType(); }
|
string GetSplineType(const int i) const { return splines[i]->GetType(); }
|
||||||
SplineSeg<3> & GetSpline(const int i) { return *splines[i]; }
|
SplineSeg<3> & GetSpline(const int i) { return *splines[i]; }
|
||||||
const SplineSeg<3> & GetSpline(const int i) const { return *splines[i]; }
|
const SplineSeg<3> & GetSpline(const int i) const { return *splines[i]; }
|
||||||
@ -37,8 +37,8 @@ namespace netgen
|
|||||||
DLL_HEADER void AppendPoint(const Point<3> & p, const double reffac = 1., const bool hpref=false);
|
DLL_HEADER void AppendPoint(const Point<3> & p, const double reffac = 1., const bool hpref=false);
|
||||||
void AppendSegment(shared_ptr<SplineSeg<3>> spline, string & bcname, double amaxh = -1);
|
void AppendSegment(shared_ptr<SplineSeg<3>> spline, string & bcname, double amaxh = -1);
|
||||||
|
|
||||||
const shared_ptr<Array<shared_ptr<OneSurfacePrimitive>>> CreateCuttingSurfaces();
|
const shared_ptr<NgArray<shared_ptr<OneSurfacePrimitive>>> CreateCuttingSurfaces();
|
||||||
const shared_ptr<Array<shared_ptr<OneSurfacePrimitive>>> GetCuts() const { return all_cuts; }
|
const shared_ptr<NgArray<shared_ptr<OneSurfacePrimitive>>> GetCuts() const { return all_cuts; }
|
||||||
const shared_ptr<OneSurfacePrimitive> GetBase() const { return baseprimitive; }
|
const shared_ptr<OneSurfacePrimitive> GetBase() const { return baseprimitive; }
|
||||||
|
|
||||||
virtual void Project (Point<3> & p3d) const { baseprimitive->Project(p3d); }
|
virtual void Project (Point<3> & p3d) const { baseprimitive->Project(p3d); }
|
||||||
@ -50,7 +50,7 @@ namespace netgen
|
|||||||
{ return baseprimitive->HesseNorm(); }
|
{ return baseprimitive->HesseNorm(); }
|
||||||
virtual Point<3> GetSurfacePoint () const
|
virtual Point<3> GetSurfacePoint () const
|
||||||
{ return baseprimitive->GetSurfacePoint(); }
|
{ return baseprimitive->GetSurfacePoint(); }
|
||||||
virtual void CalcSpecialPoints(Array<Point<3>> & pts) const
|
virtual void CalcSpecialPoints(NgArray<Point<3>> & pts) const
|
||||||
{ baseprimitive->CalcSpecialPoints(pts); }
|
{ baseprimitive->CalcSpecialPoints(pts); }
|
||||||
|
|
||||||
virtual INSOLID_TYPE BoxInSolid(const BoxSphere<3> & box) const
|
virtual INSOLID_TYPE BoxInSolid(const BoxSphere<3> & box) const
|
||||||
@ -67,7 +67,7 @@ namespace netgen
|
|||||||
virtual void CalcGradient (const Point<3> & point, Vec<3> & grad) const;
|
virtual void CalcGradient (const Point<3> & point, Vec<3> & grad) const;
|
||||||
virtual double HesseNorm () const;
|
virtual double HesseNorm () const;
|
||||||
virtual Point<3> GetSurfacePoint () const;
|
virtual Point<3> GetSurfacePoint () const;
|
||||||
virtual void CalcSpecialPoints(Array<Point<3>> & pts) const;
|
virtual void CalcSpecialPoints(NgArray<Point<3>> & pts) const;
|
||||||
|
|
||||||
virtual INSOLID_TYPE BoxInSolid(const BoxSphere<3> & box) const;
|
virtual INSOLID_TYPE BoxInSolid(const BoxSphere<3> & box) const;
|
||||||
|
|
||||||
|
@ -230,13 +230,13 @@ void Primitive :: SetSurfaceId (int i, int id)
|
|||||||
|
|
||||||
|
|
||||||
void Primitive :: GetPrimitiveData (const char *& classname,
|
void Primitive :: GetPrimitiveData (const char *& classname,
|
||||||
Array<double> & coeffs) const
|
NgArray<double> & coeffs) const
|
||||||
{
|
{
|
||||||
classname = "undef";
|
classname = "undef";
|
||||||
coeffs.SetSize (0);
|
coeffs.SetSize (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Primitive :: SetPrimitiveData (Array<double> & coeffs)
|
void Primitive :: SetPrimitiveData (NgArray<double> & coeffs)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@ -277,7 +277,7 @@ void Primitive :: Transform (Transformation<3> & trans)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Primitive :: GetTangentialSurfaceIndices (const Point<3> & p,
|
void Primitive :: GetTangentialSurfaceIndices (const Point<3> & p,
|
||||||
Array<int> & surfind, double eps) const
|
NgArray<int> & surfind, double eps) const
|
||||||
{
|
{
|
||||||
for (int j = 0; j < GetNSurfaces(); j++)
|
for (int j = 0; j < GetNSurfaces(); j++)
|
||||||
if (fabs (GetSurface(j).CalcFunctionValue (p)) < eps)
|
if (fabs (GetSurface(j).CalcFunctionValue (p)) < eps)
|
||||||
@ -288,7 +288,7 @@ void Primitive :: GetTangentialSurfaceIndices (const Point<3> & p,
|
|||||||
|
|
||||||
void Primitive ::
|
void Primitive ::
|
||||||
GetTangentialVecSurfaceIndices (const Point<3> & p, const Vec<3> & v,
|
GetTangentialVecSurfaceIndices (const Point<3> & p, const Vec<3> & v,
|
||||||
Array<int> & surfind, double eps) const
|
NgArray<int> & surfind, double eps) const
|
||||||
{
|
{
|
||||||
cout << "get tangvecsurfind not implemented" << endl;
|
cout << "get tangvecsurfind not implemented" << endl;
|
||||||
surfind.SetSize (0);
|
surfind.SetSize (0);
|
||||||
@ -296,7 +296,7 @@ GetTangentialVecSurfaceIndices (const Point<3> & p, const Vec<3> & v,
|
|||||||
|
|
||||||
void Primitive ::
|
void Primitive ::
|
||||||
GetTangentialVecSurfaceIndices2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2,
|
GetTangentialVecSurfaceIndices2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2,
|
||||||
Array<int> & surfind, double eps) const
|
NgArray<int> & surfind, double eps) const
|
||||||
{
|
{
|
||||||
for (int j = 0; j < GetNSurfaces(); j++)
|
for (int j = 0; j < GetNSurfaces(); j++)
|
||||||
{
|
{
|
||||||
|
@ -241,8 +241,8 @@ namespace netgen
|
|||||||
class Primitive
|
class Primitive
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
Array<int> surfaceids;
|
NgArray<int> surfaceids;
|
||||||
Array<int> surfaceactive;
|
NgArray<int> surfaceactive;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -268,7 +268,7 @@ namespace netgen
|
|||||||
double eps) const = 0;
|
double eps) const = 0;
|
||||||
|
|
||||||
virtual void GetTangentialSurfaceIndices (const Point<3> & p,
|
virtual void GetTangentialSurfaceIndices (const Point<3> & p,
|
||||||
Array<int> & surfind, double eps) const;
|
NgArray<int> & surfind, double eps) const;
|
||||||
|
|
||||||
virtual INSOLID_TYPE VecInSolid (const Point<3> & p,
|
virtual INSOLID_TYPE VecInSolid (const Point<3> & p,
|
||||||
const Vec<3> & v,
|
const Vec<3> & v,
|
||||||
@ -294,15 +294,15 @@ namespace netgen
|
|||||||
double eps) const;
|
double eps) const;
|
||||||
|
|
||||||
virtual void GetTangentialVecSurfaceIndices (const Point<3> & p, const Vec<3> & v,
|
virtual void GetTangentialVecSurfaceIndices (const Point<3> & p, const Vec<3> & v,
|
||||||
Array<int> & surfind, double eps) const;
|
NgArray<int> & surfind, double eps) const;
|
||||||
|
|
||||||
virtual void GetTangentialVecSurfaceIndices2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2,
|
virtual void GetTangentialVecSurfaceIndices2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2,
|
||||||
Array<int> & surfind, double eps) const;
|
NgArray<int> & surfind, double eps) const;
|
||||||
|
|
||||||
|
|
||||||
virtual void CalcSpecialPoints (Array<Point<3> > & /* pts */) const { ; }
|
virtual void CalcSpecialPoints (NgArray<Point<3> > & /* pts */) const { ; }
|
||||||
virtual void AnalyzeSpecialPoint (const Point<3> & /* pt */,
|
virtual void AnalyzeSpecialPoint (const Point<3> & /* pt */,
|
||||||
Array<Point<3> > & /* specpts */) const { ; }
|
NgArray<Point<3> > & /* specpts */) const { ; }
|
||||||
virtual Vec<3> SpecialPointTangentialVector (const Point<3> & /* p */,
|
virtual Vec<3> SpecialPointTangentialVector (const Point<3> & /* p */,
|
||||||
int /* s1 */, int /* s2 */) const
|
int /* s1 */, int /* s2 */) const
|
||||||
{ return Vec<3> (0,0,0); }
|
{ return Vec<3> (0,0,0); }
|
||||||
@ -318,8 +318,8 @@ namespace netgen
|
|||||||
virtual int SurfaceInverted (int /* i */ = 0) const { return 0; }
|
virtual int SurfaceInverted (int /* i */ = 0) const { return 0; }
|
||||||
|
|
||||||
virtual void GetPrimitiveData (const char *& classname,
|
virtual void GetPrimitiveData (const char *& classname,
|
||||||
Array<double> & coeffs) const;
|
NgArray<double> & coeffs) const;
|
||||||
virtual void SetPrimitiveData (Array<double> & coeffs);
|
virtual void SetPrimitiveData (NgArray<double> & coeffs);
|
||||||
static Primitive * CreatePrimitive (const char * classname);
|
static Primitive * CreatePrimitive (const char * classname);
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ namespace netgen
|
|||||||
void TriangleApproximation :: RemoveUnusedPoints ()
|
void TriangleApproximation :: RemoveUnusedPoints ()
|
||||||
{
|
{
|
||||||
BitArray used(GetNP());
|
BitArray used(GetNP());
|
||||||
Array<int> map (GetNP());
|
NgArray<int> map (GetNP());
|
||||||
int i, j;
|
int i, j;
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
|
|
||||||
|
@ -36,9 +36,9 @@ namespace netgen
|
|||||||
|
|
||||||
class TriangleApproximation
|
class TriangleApproximation
|
||||||
{
|
{
|
||||||
Array<Point<3> > points;
|
NgArray<Point<3> > points;
|
||||||
Array<Vec<3> > normals;
|
NgArray<Vec<3> > normals;
|
||||||
Array<TATriangle> trigs;
|
NgArray<TATriangle> trigs;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TriangleApproximation();
|
TriangleApproximation();
|
||||||
|
@ -18,8 +18,8 @@ namespace netgen
|
|||||||
/* *********************** Draw Geometry **************** */
|
/* *********************** Draw Geometry **************** */
|
||||||
|
|
||||||
extern shared_ptr<Mesh> mesh;
|
extern shared_ptr<Mesh> mesh;
|
||||||
extern Array<SpecialPoint> specpoints;
|
extern NgArray<SpecialPoint> specpoints;
|
||||||
extern Array<Box<3> > boxes;
|
extern NgArray<Box<3> > boxes;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ namespace netgen
|
|||||||
class DLL_HEADER VisualSceneGeometry : public VisualScene
|
class DLL_HEADER VisualSceneGeometry : public VisualScene
|
||||||
{
|
{
|
||||||
class CSGeometry * geometry;
|
class CSGeometry * geometry;
|
||||||
Array<int> trilists;
|
NgArray<int> trilists;
|
||||||
int selsurf;
|
int selsurf;
|
||||||
public:
|
public:
|
||||||
VisualSceneGeometry ();
|
VisualSceneGeometry ();
|
||||||
|
@ -211,7 +211,7 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
int nseg = mesh.GetNSeg();
|
int nseg = mesh.GetNSeg();
|
||||||
Array<int> edgesonpoint(mesh.GetNP());
|
NgArray<int> edgesonpoint(mesh.GetNP());
|
||||||
for (i = 1; i <= mesh.GetNP(); i++)
|
for (i = 1; i <= mesh.GetNP(); i++)
|
||||||
edgesonpoint.Elem(i) = 0;
|
edgesonpoint.Elem(i) = 0;
|
||||||
|
|
||||||
@ -251,9 +251,9 @@ namespace netgen
|
|||||||
|
|
||||||
// markers for z-refinement: p1, p2, levels
|
// markers for z-refinement: p1, p2, levels
|
||||||
// p1-p2 is an edge to be refined
|
// p1-p2 is an edge to be refined
|
||||||
Array<INDEX_3> ref_uniform;
|
NgArray<INDEX_3> ref_uniform;
|
||||||
Array<INDEX_3> ref_singular;
|
NgArray<INDEX_3> ref_singular;
|
||||||
Array<INDEX_4 > ref_slices;
|
NgArray<INDEX_4 > ref_slices;
|
||||||
|
|
||||||
BitArray first_id(geom->identifications.Size());
|
BitArray first_id(geom->identifications.Size());
|
||||||
first_id.Set();
|
first_id.Set();
|
||||||
@ -287,7 +287,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//const Array<double> & slices = csid->GetSlices();
|
//const NgArray<double> & slices = csid->GetSlices();
|
||||||
INDEX_4 i4;
|
INDEX_4 i4;
|
||||||
i4[0] = pair.I1();
|
i4[0] = pair.I1();
|
||||||
i4[1] = pair.I2();
|
i4[1] = pair.I2();
|
||||||
@ -301,7 +301,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Array<EdgePointGeomInfo> epgi;
|
NgArray<EdgePointGeomInfo> epgi;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
@ -389,7 +389,7 @@ namespace netgen
|
|||||||
edge.Sort();
|
edge.Sort();
|
||||||
if (!refedges.Used(edge))
|
if (!refedges.Used(edge))
|
||||||
{
|
{
|
||||||
const Array<double> & slices = csid->GetSlices();
|
const NgArray<double> & slices = csid->GetSlices();
|
||||||
//(*testout) << "idnr " << idnr << " i " << i << endl;
|
//(*testout) << "idnr " << idnr << " i " << i << endl;
|
||||||
//(*testout) << "slices " << slices << endl;
|
//(*testout) << "slices " << slices << endl;
|
||||||
double slicefac = slices.Get(slicenr);
|
double slicefac = slices.Get(slicenr);
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Abstract data type Array
|
Abstract data type NgArray
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <mystdlib.h>
|
#include <mystdlib.h>
|
||||||
@ -65,8 +65,8 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
if (!actsize)
|
if (!actsize)
|
||||||
{
|
{
|
||||||
throw Exception ("Array should not be empty");
|
throw Exception ("NgArray should not be empty");
|
||||||
// cerr << "Array souldn't be empty";
|
// cerr << "NgArray souldn't be empty";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -67,7 +67,7 @@ namespace netgen
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
A simple array container.
|
A simple array container.
|
||||||
Array represented by size and data-pointer.
|
NgArray represented by size and data-pointer.
|
||||||
No memory allocation and deallocation, must be provided by user.
|
No memory allocation and deallocation, must be provided by user.
|
||||||
Helper functions for printing.
|
Helper functions for printing.
|
||||||
Optional range check by macro RANGE_CHECK
|
Optional range check by macro RANGE_CHECK
|
||||||
@ -124,7 +124,7 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (i < 1 || i > size)
|
if (i < 1 || i > size)
|
||||||
cout << "Array<" << typeid(T).name()
|
cout << "NgArray<" << typeid(T).name()
|
||||||
<< ">::Elem out of range, i = " << i
|
<< ">::Elem out of range, i = " << i
|
||||||
<< ", s = " << size << endl;
|
<< ", s = " << size << endl;
|
||||||
#endif
|
#endif
|
||||||
@ -137,7 +137,7 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (i < 1 || i > size)
|
if (i < 1 || i > size)
|
||||||
cout << "Array<" << typeid(T).name() << ">::Get out of range, i = " << i
|
cout << "NgArray<" << typeid(T).name() << ">::Get out of range, i = " << i
|
||||||
<< ", s = " << size << endl;
|
<< ", s = " << size << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (i < 1 || i > size)
|
if (i < 1 || i > size)
|
||||||
cout << "Array<" << typeid(T).name() << ">::Set out of range, i = " << i
|
cout << "NgArray<" << typeid(T).name() << ">::Set out of range, i = " << i
|
||||||
<< ", s = " << size << endl;
|
<< ", s = " << size << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -215,13 +215,13 @@ namespace netgen
|
|||||||
/**
|
/**
|
||||||
Dynamic array container.
|
Dynamic array container.
|
||||||
|
|
||||||
Array<T> is an automatically increasing array container.
|
NgArray<T> is an automatically increasing array container.
|
||||||
The allocated memory doubles on overflow.
|
The allocated memory doubles on overflow.
|
||||||
Either the container takes care of memory allocation and deallocation,
|
Either the container takes care of memory allocation and deallocation,
|
||||||
or the user provides one block of data.
|
or the user provides one block of data.
|
||||||
*/
|
*/
|
||||||
template <class T, int BASE = 0, typename TIND = int>
|
template <class T, int BASE = 0, typename TIND = int>
|
||||||
class Array : public FlatArray<T, BASE, TIND>
|
class NgArray : public FlatArray<T, BASE, TIND>
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
using FlatArray<T,BASE,TIND>::size;
|
using FlatArray<T,BASE,TIND>::size;
|
||||||
@ -235,14 +235,14 @@ namespace netgen
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
/// Generate array of logical and physical size asize
|
/// Generate array of logical and physical size asize
|
||||||
explicit Array()
|
explicit NgArray()
|
||||||
: FlatArray<T, BASE, TIND> (0, NULL)
|
: FlatArray<T, BASE, TIND> (0, NULL)
|
||||||
{
|
{
|
||||||
allocsize = 0;
|
allocsize = 0;
|
||||||
ownmem = 1;
|
ownmem = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
explicit Array(size_t asize)
|
explicit NgArray(size_t asize)
|
||||||
: FlatArray<T, BASE, TIND> (asize, asize ? new T[asize] : nullptr)
|
: FlatArray<T, BASE, TIND> (asize, asize ? new T[asize] : nullptr)
|
||||||
{
|
{
|
||||||
allocsize = asize;
|
allocsize = asize;
|
||||||
@ -250,7 +250,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Generate array in user data
|
/// Generate array in user data
|
||||||
Array(TIND asize, T* adata)
|
NgArray(TIND asize, T* adata)
|
||||||
: FlatArray<T, BASE, TIND> (asize, adata)
|
: FlatArray<T, BASE, TIND> (asize, adata)
|
||||||
{
|
{
|
||||||
allocsize = asize;
|
allocsize = asize;
|
||||||
@ -258,7 +258,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// array copy
|
/// array copy
|
||||||
explicit Array (const Array<T,BASE,TIND> & a2)
|
explicit NgArray (const NgArray<T,BASE,TIND> & a2)
|
||||||
: FlatArray<T, BASE, TIND> (a2.Size(), a2.Size() ? new T[a2.Size()] : 0)
|
: FlatArray<T, BASE, TIND> (a2.Size(), a2.Size() ? new T[a2.Size()] : 0)
|
||||||
{
|
{
|
||||||
allocsize = size;
|
allocsize = size;
|
||||||
@ -268,7 +268,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// array move
|
/// array move
|
||||||
Array (Array && a2)
|
NgArray (NgArray && a2)
|
||||||
: FlatArray<T,BASE,TIND> (a2.size, a2.data), allocsize(a2.allocsize), ownmem(a2.ownmem)
|
: FlatArray<T,BASE,TIND> (a2.size, a2.data), allocsize(a2.allocsize), ownmem(a2.ownmem)
|
||||||
{
|
{
|
||||||
a2.size = 0;
|
a2.size = 0;
|
||||||
@ -279,7 +279,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
/// if responsible, deletes memory
|
/// if responsible, deletes memory
|
||||||
~Array()
|
~NgArray()
|
||||||
{
|
{
|
||||||
if (ownmem)
|
if (ownmem)
|
||||||
delete [] data;
|
delete [] data;
|
||||||
@ -362,14 +362,14 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Fill array with val
|
/// Fill array with val
|
||||||
Array & operator= (const T & val)
|
NgArray & operator= (const T & val)
|
||||||
{
|
{
|
||||||
FlatArray<T, BASE, TIND>::operator= (val);
|
FlatArray<T, BASE, TIND>::operator= (val);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// array copy
|
/// array copy
|
||||||
Array & operator= (const Array & a2)
|
NgArray & operator= (const NgArray & a2)
|
||||||
{
|
{
|
||||||
SetSize (a2.Size());
|
SetSize (a2.Size());
|
||||||
for (TIND i (BASE); i < size+BASE; i++)
|
for (TIND i (BASE); i < size+BASE; i++)
|
||||||
@ -378,7 +378,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// array copy
|
/// array copy
|
||||||
Array & operator= (const FlatArray<T> & a2)
|
NgArray & operator= (const FlatArray<T> & a2)
|
||||||
{
|
{
|
||||||
SetSize (a2.Size());
|
SetSize (a2.Size());
|
||||||
for (TIND i = BASE; i < size+BASE; i++)
|
for (TIND i = BASE; i < size+BASE; i++)
|
||||||
@ -386,7 +386,7 @@ namespace netgen
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
Array & operator= (Array && a2)
|
NgArray & operator= (NgArray && a2)
|
||||||
{
|
{
|
||||||
Swap (data, a2.data);
|
Swap (data, a2.data);
|
||||||
Swap (size, a2.size);
|
Swap (size, a2.size);
|
||||||
@ -458,11 +458,11 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
template <class T, int S>
|
template <class T, int S>
|
||||||
class ArrayMem : public Array<T>
|
class ArrayMem : public NgArray<T>
|
||||||
{
|
{
|
||||||
using Array<T>::size;
|
using NgArray<T>::size;
|
||||||
using Array<T>::data;
|
using NgArray<T>::data;
|
||||||
using Array<T>::ownmem;
|
using NgArray<T>::ownmem;
|
||||||
|
|
||||||
T mem[S]; // Intel C++ calls dummy constructor
|
T mem[S]; // Intel C++ calls dummy constructor
|
||||||
// char mem[S*sizeof(T)];
|
// char mem[S*sizeof(T)];
|
||||||
@ -470,7 +470,7 @@ namespace netgen
|
|||||||
public:
|
public:
|
||||||
/// Generate array of logical and physical size asize
|
/// Generate array of logical and physical size asize
|
||||||
explicit ArrayMem(size_t asize = 0)
|
explicit ArrayMem(size_t asize = 0)
|
||||||
: Array<T> (S, static_cast<T*> (static_cast<void*>(&mem[0])))
|
: NgArray<T> (S, static_cast<T*> (static_cast<void*>(&mem[0])))
|
||||||
{
|
{
|
||||||
size = asize;
|
size = asize;
|
||||||
if (asize > S)
|
if (asize > S)
|
||||||
@ -483,7 +483,7 @@ namespace netgen
|
|||||||
|
|
||||||
ArrayMem & operator= (const T & val)
|
ArrayMem & operator= (const T & val)
|
||||||
{
|
{
|
||||||
Array<T>::operator= (val);
|
NgArray<T>::operator= (val);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -777,7 +777,7 @@ namespace netgen
|
|||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
void Intersection (const FlatArray<T> & in1, const FlatArray<T> & in2,
|
void Intersection (const FlatArray<T> & in1, const FlatArray<T> & in2,
|
||||||
Array<T> & out)
|
NgArray<T> & out)
|
||||||
{
|
{
|
||||||
out.SetSize(0);
|
out.SetSize(0);
|
||||||
for(int i=0; i<in1.Size(); i++)
|
for(int i=0; i<in1.Size(); i++)
|
||||||
@ -786,7 +786,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
template <class T>
|
template <class T>
|
||||||
void Intersection (const FlatArray<T> & in1, const FlatArray<T> & in2, const FlatArray<T> & in3,
|
void Intersection (const FlatArray<T> & in1, const FlatArray<T> & in2, const FlatArray<T> & in3,
|
||||||
Array<T> & out)
|
NgArray<T> & out)
|
||||||
{
|
{
|
||||||
out.SetSize(0);
|
out.SetSize(0);
|
||||||
for(int i=0; i<in1.Size(); i++)
|
for(int i=0; i<in1.Size(); i++)
|
||||||
|
@ -159,7 +159,7 @@ template <int BASE = 1>
|
|||||||
class BitArrayChar
|
class BitArrayChar
|
||||||
{
|
{
|
||||||
///
|
///
|
||||||
Array<char,BASE> data;
|
NgArray<char,BASE> data;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
|
@ -56,9 +56,9 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Flags :: SetFlag (const char * name, const Array<char*> & val)
|
void Flags :: SetFlag (const char * name, const NgArray<char*> & val)
|
||||||
{
|
{
|
||||||
Array<char*> * strarray = new Array<char*>;
|
NgArray<char*> * strarray = new NgArray<char*>;
|
||||||
for (int i = 1; i <= val.Size(); i++)
|
for (int i = 1; i <= val.Size(); i++)
|
||||||
{
|
{
|
||||||
strarray->Append (new char[strlen(val.Get(i))+1]);
|
strarray->Append (new char[strlen(val.Get(i))+1]);
|
||||||
@ -67,9 +67,9 @@ namespace netgen
|
|||||||
strlistflags.Set (name, strarray);
|
strlistflags.Set (name, strarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Flags :: SetFlag (const char * name, const Array<double> & val)
|
void Flags :: SetFlag (const char * name, const NgArray<double> & val)
|
||||||
{
|
{
|
||||||
Array<double> * numarray = new Array<double>;
|
NgArray<double> * numarray = new NgArray<double>;
|
||||||
for (int i = 1; i <= val.Size(); i++)
|
for (int i = 1; i <= val.Size(); i++)
|
||||||
numarray->Append (val.Get(i));
|
numarray->Append (val.Get(i));
|
||||||
numlistflags.Set (name, numarray);
|
numlistflags.Set (name, numarray);
|
||||||
@ -118,26 +118,26 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Array<char*> &
|
const NgArray<char*> &
|
||||||
Flags :: GetStringListFlag (const char * name) const
|
Flags :: GetStringListFlag (const char * name) const
|
||||||
{
|
{
|
||||||
if (strlistflags.Used (name))
|
if (strlistflags.Used (name))
|
||||||
return *strlistflags[name];
|
return *strlistflags[name];
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
static Array<char*> dummy_array(0);
|
static NgArray<char*> dummy_array(0);
|
||||||
return dummy_array;
|
return dummy_array;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const Array<double> &
|
const NgArray<double> &
|
||||||
Flags ::GetNumListFlag (const char * name) const
|
Flags ::GetNumListFlag (const char * name) const
|
||||||
{
|
{
|
||||||
if (numlistflags.Used (name))
|
if (numlistflags.Used (name))
|
||||||
return *numlistflags[name];
|
return *numlistflags[name];
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
static Array<double> dummy_array(0);
|
static NgArray<double> dummy_array(0);
|
||||||
return dummy_array;
|
return dummy_array;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,9 +25,9 @@ class Flags
|
|||||||
///
|
///
|
||||||
SymbolTable<int> defflags;
|
SymbolTable<int> defflags;
|
||||||
///
|
///
|
||||||
SymbolTable<Array<char*>*> strlistflags;
|
SymbolTable<NgArray<char*>*> strlistflags;
|
||||||
///
|
///
|
||||||
SymbolTable<Array<double>*> numlistflags;
|
SymbolTable<NgArray<double>*> numlistflags;
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
DLL_HEADER Flags ();
|
DLL_HEADER Flags ();
|
||||||
@ -43,9 +43,9 @@ public:
|
|||||||
/// Sets boolean flag
|
/// Sets boolean flag
|
||||||
DLL_HEADER void SetFlag (const char * name);
|
DLL_HEADER void SetFlag (const char * name);
|
||||||
/// Sets string arary flag
|
/// Sets string arary flag
|
||||||
DLL_HEADER void SetFlag (const char * name, const Array<char*> & val);
|
DLL_HEADER void SetFlag (const char * name, const NgArray<char*> & val);
|
||||||
/// Sets double array flag
|
/// Sets double array flag
|
||||||
DLL_HEADER void SetFlag (const char * name, const Array<double> & val);
|
DLL_HEADER void SetFlag (const char * name, const NgArray<double> & val);
|
||||||
|
|
||||||
/// Save flags to file
|
/// Save flags to file
|
||||||
DLL_HEADER void SaveFlags (const char * filename) const;
|
DLL_HEADER void SaveFlags (const char * filename) const;
|
||||||
@ -67,9 +67,9 @@ public:
|
|||||||
/// Returns boolean flag
|
/// Returns boolean flag
|
||||||
DLL_HEADER bool GetDefineFlag (const char * name) const;
|
DLL_HEADER bool GetDefineFlag (const char * name) const;
|
||||||
/// Returns string list flag, empty array if not exist
|
/// Returns string list flag, empty array if not exist
|
||||||
DLL_HEADER const Array<char*> & GetStringListFlag (const char * name) const;
|
DLL_HEADER const NgArray<char*> & GetStringListFlag (const char * name) const;
|
||||||
/// Returns num list flag, empty array if not exist
|
/// Returns num list flag, empty array if not exist
|
||||||
DLL_HEADER const Array<double> & GetNumListFlag (const char * name) const;
|
DLL_HEADER const NgArray<double> & GetNumListFlag (const char * name) const;
|
||||||
|
|
||||||
|
|
||||||
/// Test, if string flag is defined
|
/// Test, if string flag is defined
|
||||||
|
@ -480,7 +480,7 @@ class BASE_INDEX_CLOSED_HASHTABLE
|
|||||||
protected:
|
protected:
|
||||||
///
|
///
|
||||||
// MoveableArray<INDEX> hash;
|
// MoveableArray<INDEX> hash;
|
||||||
Array<INDEX> hash;
|
NgArray<INDEX> hash;
|
||||||
///
|
///
|
||||||
int invalid;
|
int invalid;
|
||||||
public:
|
public:
|
||||||
@ -556,7 +556,7 @@ class INDEX_CLOSED_HASHTABLE : public BASE_INDEX_CLOSED_HASHTABLE
|
|||||||
{
|
{
|
||||||
///
|
///
|
||||||
// MoveableArray<T> cont;
|
// MoveableArray<T> cont;
|
||||||
Array<T> cont;
|
NgArray<T> cont;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
@ -653,7 +653,7 @@ class BASE_INDEX_2_CLOSED_HASHTABLE
|
|||||||
protected:
|
protected:
|
||||||
///
|
///
|
||||||
// MoveableArray<INDEX_2> hash;
|
// MoveableArray<INDEX_2> hash;
|
||||||
Array<INDEX_2> hash;
|
NgArray<INDEX_2> hash;
|
||||||
///
|
///
|
||||||
int invalid;
|
int invalid;
|
||||||
size_t mask;
|
size_t mask;
|
||||||
@ -718,7 +718,7 @@ protected:
|
|||||||
template <class T>
|
template <class T>
|
||||||
class INDEX_2_CLOSED_HASHTABLE : public BASE_INDEX_2_CLOSED_HASHTABLE
|
class INDEX_2_CLOSED_HASHTABLE : public BASE_INDEX_2_CLOSED_HASHTABLE
|
||||||
{
|
{
|
||||||
Array<T> cont;
|
NgArray<T> cont;
|
||||||
public:
|
public:
|
||||||
INDEX_2_CLOSED_HASHTABLE (size_t size)
|
INDEX_2_CLOSED_HASHTABLE (size_t size)
|
||||||
: BASE_INDEX_2_CLOSED_HASHTABLE(size), cont(RoundUp2(size))
|
: BASE_INDEX_2_CLOSED_HASHTABLE(size), cont(RoundUp2(size))
|
||||||
@ -813,7 +813,7 @@ inline ostream & operator<< (ostream & ost, const INDEX_2_CLOSED_HASHTABLE<T> &
|
|||||||
class BASE_INDEX_3_CLOSED_HASHTABLE
|
class BASE_INDEX_3_CLOSED_HASHTABLE
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
Array<INDEX_3> hash;
|
NgArray<INDEX_3> hash;
|
||||||
int invalid;
|
int invalid;
|
||||||
size_t mask;
|
size_t mask;
|
||||||
|
|
||||||
@ -922,7 +922,7 @@ template <class T>
|
|||||||
class INDEX_3_CLOSED_HASHTABLE : public BASE_INDEX_3_CLOSED_HASHTABLE
|
class INDEX_3_CLOSED_HASHTABLE : public BASE_INDEX_3_CLOSED_HASHTABLE
|
||||||
{
|
{
|
||||||
// MoveableArray<T,0> cont;
|
// MoveableArray<T,0> cont;
|
||||||
Array<T,0> cont;
|
NgArray<T,0> cont;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
INDEX_3_CLOSED_HASHTABLE (int size)
|
INDEX_3_CLOSED_HASHTABLE (int size)
|
||||||
@ -1376,9 +1376,9 @@ inline size_t HashValue (INDEX_2 i2, size_t size) { return (113*size_t(i2[0])+si
|
|||||||
///
|
///
|
||||||
size_t used;
|
size_t used;
|
||||||
///
|
///
|
||||||
Array<T_HASH> hash;
|
NgArray<T_HASH> hash;
|
||||||
///
|
///
|
||||||
Array<T> cont;
|
NgArray<T> cont;
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
ClosedHashTable (size_t asize = 128)
|
ClosedHashTable (size_t asize = 128)
|
||||||
|
@ -95,7 +95,7 @@ namespace netgen
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PARALLEL
|
#ifdef PARALLEL
|
||||||
inline MPI_Comm MyMPI_SubCommunicator(MPI_Comm comm, Array<int> & procs)
|
inline MPI_Comm MyMPI_SubCommunicator(MPI_Comm comm, NgArray<int> & procs)
|
||||||
{
|
{
|
||||||
MPI_Comm subcomm;
|
MPI_Comm subcomm;
|
||||||
MPI_Group gcomm, gsubcomm;
|
MPI_Group gcomm, gsubcomm;
|
||||||
@ -105,7 +105,7 @@ namespace netgen
|
|||||||
return subcomm;
|
return subcomm;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
inline MPI_Comm MyMPI_SubCommunicator(MPI_Comm comm, Array<int> & procs)
|
inline MPI_Comm MyMPI_SubCommunicator(MPI_Comm comm, NgArray<int> & procs)
|
||||||
{ return comm; }
|
{ return comm; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class T, int BASE>
|
template <class T, int BASE>
|
||||||
inline void MyMPI_Recv ( Array <T, BASE> & s, int src, int tag, MPI_Comm comm /* = ng_comm */)
|
inline void MyMPI_Recv ( NgArray <T, BASE> & s, int src, int tag, MPI_Comm comm /* = ng_comm */)
|
||||||
{
|
{
|
||||||
MPI_Status status;
|
MPI_Status status;
|
||||||
int len;
|
int len;
|
||||||
@ -172,7 +172,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class T, int BASE>
|
template <class T, int BASE>
|
||||||
inline int MyMPI_Recv ( Array <T, BASE> & s, int tag, MPI_Comm comm /* = ng_comm */)
|
inline int MyMPI_Recv ( NgArray <T, BASE> & s, int tag, MPI_Comm comm /* = ng_comm */)
|
||||||
{
|
{
|
||||||
MPI_Status status;
|
MPI_Status status;
|
||||||
int len;
|
int len;
|
||||||
@ -257,7 +257,7 @@ namespace netgen
|
|||||||
MPI_Comm_size(comm, &ntasks);
|
MPI_Comm_size(comm, &ntasks);
|
||||||
MPI_Comm_rank(comm, &rank);
|
MPI_Comm_rank(comm, &rank);
|
||||||
|
|
||||||
Array<MPI_Request> requests;
|
NgArray<MPI_Request> requests;
|
||||||
for (int dest = 0; dest < ntasks; dest++)
|
for (int dest = 0; dest < ntasks; dest++)
|
||||||
if (dest != rank)
|
if (dest != rank)
|
||||||
requests.Append (MyMPI_ISend (send_data[dest], dest, tag, comm));
|
requests.Append (MyMPI_ISend (send_data[dest], dest, tag, comm));
|
||||||
@ -288,8 +288,8 @@ namespace netgen
|
|||||||
int rank = comm.Rank();
|
int rank = comm.Rank();
|
||||||
int ntasks = comm.Size();
|
int ntasks = comm.Size();
|
||||||
|
|
||||||
Array<int> send_sizes(ntasks);
|
NgArray<int> send_sizes(ntasks);
|
||||||
Array<int> recv_sizes(ntasks);
|
NgArray<int> recv_sizes(ntasks);
|
||||||
for (int i = 0; i < ntasks; i++)
|
for (int i = 0; i < ntasks; i++)
|
||||||
send_sizes[i] = send_data[i].Size();
|
send_sizes[i] = send_data[i].Size();
|
||||||
|
|
||||||
@ -304,7 +304,7 @@ namespace netgen
|
|||||||
for (int i = 0; i < ntasks; i++)
|
for (int i = 0; i < ntasks; i++)
|
||||||
recv_data.SetEntrySize (i, recv_sizes[i], sizeof(T));
|
recv_data.SetEntrySize (i, recv_sizes[i], sizeof(T));
|
||||||
|
|
||||||
Array<MPI_Request> requests;
|
NgArray<MPI_Request> requests;
|
||||||
for (int dest = 0; dest < ntasks; dest++)
|
for (int dest = 0; dest < ntasks; dest++)
|
||||||
if (dest != rank && send_data[dest].Size())
|
if (dest != rank && send_data[dest].Size())
|
||||||
requests.Append (MyMPI_ISend (send_data[dest], dest, tag, comm));
|
requests.Append (MyMPI_ISend (send_data[dest], dest, tag, comm));
|
||||||
@ -336,7 +336,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
inline void MyMPI_Bcast (Array<T, 0> & s, NgMPI_Comm comm /* = ng_comm */)
|
inline void MyMPI_Bcast (NgArray<T, 0> & s, NgMPI_Comm comm /* = ng_comm */)
|
||||||
{
|
{
|
||||||
int size = s.Size();
|
int size = s.Size();
|
||||||
MyMPI_Bcast (size, comm);
|
MyMPI_Bcast (size, comm);
|
||||||
@ -346,7 +346,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
inline void MyMPI_Bcast (Array<T, 0> & s, int root, MPI_Comm comm /* = ng_comm */)
|
inline void MyMPI_Bcast (NgArray<T, 0> & s, int root, MPI_Comm comm /* = ng_comm */)
|
||||||
{
|
{
|
||||||
int id;
|
int id;
|
||||||
MPI_Comm_rank(comm, &id);
|
MPI_Comm_rank(comm, &id);
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Abstract data type Array
|
Abstract data type NgArray
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ private:
|
|||||||
///
|
///
|
||||||
void * freelist;
|
void * freelist;
|
||||||
///
|
///
|
||||||
Array<char*> bablocks;
|
NgArray<char*> bablocks;
|
||||||
mutex block_allocator_mutex;
|
mutex block_allocator_mutex;
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
|
@ -16,7 +16,7 @@ namespace netgen
|
|||||||
*/
|
*/
|
||||||
class IndexSet
|
class IndexSet
|
||||||
{
|
{
|
||||||
Array<int> set;
|
NgArray<int> set;
|
||||||
BitArray flags;
|
BitArray flags;
|
||||||
public:
|
public:
|
||||||
IndexSet (int maxind);
|
IndexSet (int maxind);
|
||||||
@ -41,7 +41,7 @@ public:
|
|||||||
void Del (int ind);
|
void Del (int ind);
|
||||||
void Clear ();
|
void Clear ();
|
||||||
|
|
||||||
const Array<int> & GetArray() { return set; }
|
const NgArray<int> & GetArray() { return set; }
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
namespace netgen
|
namespace netgen
|
||||||
{
|
{
|
||||||
|
|
||||||
void Sort (const Array<double> & values,
|
void Sort (const NgArray<double> & values,
|
||||||
Array<int> & order)
|
NgArray<int> & order)
|
||||||
{
|
{
|
||||||
int n = values.Size();
|
int n = values.Size();
|
||||||
int i, j;
|
int i, j;
|
||||||
@ -35,8 +35,8 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void QuickSortRec (const Array<double> & values,
|
void QuickSortRec (const NgArray<double> & values,
|
||||||
Array<int> & order,
|
NgArray<int> & order,
|
||||||
int left, int right)
|
int left, int right)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
@ -62,8 +62,8 @@ namespace netgen
|
|||||||
if (i < right) QuickSortRec (values, order, i, right);
|
if (i < right) QuickSortRec (values, order, i, right);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuickSort (const Array<double> & values,
|
void QuickSort (const NgArray<double> & values,
|
||||||
Array<int> & order)
|
NgArray<int> & order)
|
||||||
{
|
{
|
||||||
int i, n = values.Size();
|
int i, n = values.Size();
|
||||||
order.SetSize (n);
|
order.SetSize (n);
|
||||||
|
@ -11,11 +11,11 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
|
|
||||||
// order(i) is sorted index of element i
|
// order(i) is sorted index of element i
|
||||||
extern void Sort (const Array<double> & values,
|
extern void Sort (const NgArray<double> & values,
|
||||||
Array<int> & order);
|
NgArray<int> & order);
|
||||||
|
|
||||||
extern void QuickSort (const Array<double> & values,
|
extern void QuickSort (const NgArray<double> & values,
|
||||||
Array<int> & order);
|
NgArray<int> & order);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ inline void BubbleSort (int size, T * data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
inline void BubbleSort (Array<T> & data)
|
inline void BubbleSort (NgArray<T> & data)
|
||||||
{
|
{
|
||||||
if(data.Size() > 0)
|
if(data.Size() > 0)
|
||||||
BubbleSort (data.Size(), &data[data.Begin()]);
|
BubbleSort (data.Size(), &data[data.Begin()]);
|
||||||
|
@ -41,7 +41,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
///
|
///
|
||||||
Array<T> elems;
|
NgArray<T> elems;
|
||||||
///
|
///
|
||||||
INDEX size;
|
INDEX size;
|
||||||
};
|
};
|
||||||
|
@ -29,7 +29,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
///
|
///
|
||||||
Array<linestruct> data;
|
NgArray<linestruct> data;
|
||||||
char * oneblock;
|
char * oneblock;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -14,14 +14,14 @@ namespace netgen
|
|||||||
// double l,
|
// double l,
|
||||||
MeshingParameters & mp, Mesh & mesh,
|
MeshingParameters & mp, Mesh & mesh,
|
||||||
// double h, double h1, double h2, double hcurve,
|
// double h, double h1, double h2, double hcurve,
|
||||||
double elto0, Array<double> & points)
|
double elto0, NgArray<double> & points)
|
||||||
{
|
{
|
||||||
double fperel, oldf, f;
|
double fperel, oldf, f;
|
||||||
|
|
||||||
int n = 10000;
|
int n = 10000;
|
||||||
|
|
||||||
Array<Point<2> > xi(n);
|
NgArray<Point<2> > xi(n);
|
||||||
Array<double> hi(n);
|
NgArray<double> hi(n);
|
||||||
|
|
||||||
for (int i = 0; i < n; i++)
|
for (int i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
@ -98,7 +98,7 @@ namespace netgen
|
|||||||
int n = 100;
|
int n = 100;
|
||||||
|
|
||||||
Point<2> mark, oldmark;
|
Point<2> mark, oldmark;
|
||||||
Array<double> curvepoints;
|
NgArray<double> curvepoints;
|
||||||
double edgelength, edgelengthold;
|
double edgelength, edgelengthold;
|
||||||
|
|
||||||
CalcPartition (spline, mp, mesh, elto0, curvepoints);
|
CalcPartition (spline, mp, mesh, elto0, curvepoints);
|
||||||
@ -111,7 +111,7 @@ namespace netgen
|
|||||||
double lold = 0;
|
double lold = 0;
|
||||||
oldmark = pold;
|
oldmark = pold;
|
||||||
edgelengthold = 0;
|
edgelengthold = 0;
|
||||||
Array<int> locsearch;
|
NgArray<int> locsearch;
|
||||||
|
|
||||||
for (int i = 1; i <= n; i++)
|
for (int i = 1; i <= n; i++)
|
||||||
{
|
{
|
||||||
@ -310,8 +310,8 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
// const int D = 2;
|
// const int D = 2;
|
||||||
|
|
||||||
Array<int, PointIndex::BASE> mappoints (mesh.GetNP());
|
NgArray<int, PointIndex::BASE> mappoints (mesh.GetNP());
|
||||||
Array<double, PointIndex::BASE> param (mesh.GetNP());
|
NgArray<double, PointIndex::BASE> param (mesh.GetNP());
|
||||||
mappoints = -1;
|
mappoints = -1;
|
||||||
param = 0;
|
param = 0;
|
||||||
|
|
||||||
@ -452,7 +452,7 @@ namespace netgen
|
|||||||
for (int i = 1; i <= maxdomnr; i++)
|
for (int i = 1; i <= maxdomnr; i++)
|
||||||
mesh->AddFaceDescriptor (FaceDescriptor (i, 0, 0, i));
|
mesh->AddFaceDescriptor (FaceDescriptor (i, 0, 0, i));
|
||||||
|
|
||||||
// set Array<string*> bcnames...
|
// set NgArray<string*> bcnames...
|
||||||
// number of bcnames
|
// number of bcnames
|
||||||
int maxsegmentindex = 0;
|
int maxsegmentindex = 0;
|
||||||
for (SegmentIndex si = 0; si < mesh->GetNSeg(); si++)
|
for (SegmentIndex si = 0; si < mesh->GetNSeg(); si++)
|
||||||
@ -478,8 +478,8 @@ namespace netgen
|
|||||||
if (geometry.GetDomainTensorMeshing (domnr))
|
if (geometry.GetDomainTensorMeshing (domnr))
|
||||||
{ // tensor product mesh
|
{ // tensor product mesh
|
||||||
|
|
||||||
Array<PointIndex, PointIndex::BASE> nextpi(bnp);
|
NgArray<PointIndex, PointIndex::BASE> nextpi(bnp);
|
||||||
Array<int, PointIndex::BASE> si1(bnp), si2(bnp);
|
NgArray<int, PointIndex::BASE> si1(bnp), si2(bnp);
|
||||||
PointIndex firstpi;
|
PointIndex firstpi;
|
||||||
|
|
||||||
nextpi = -1;
|
nextpi = -1;
|
||||||
@ -518,7 +518,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Array<PointIndex> pts ( (nex+1) * (ney+1) ); // x ... inner loop
|
NgArray<PointIndex> pts ( (nex+1) * (ney+1) ); // x ... inner loop
|
||||||
pts = -1;
|
pts = -1;
|
||||||
|
|
||||||
for (PointIndex pi = c1, i = 0; pi != c2; pi = nextpi[pi], i++)
|
for (PointIndex pi = c1, i = 0; pi != c2; pi = nextpi[pi], i++)
|
||||||
@ -572,7 +572,7 @@ namespace netgen
|
|||||||
|
|
||||||
Meshing2 meshing (mp, Box<3> (pmin, pmax));
|
Meshing2 meshing (mp, Box<3> (pmin, pmax));
|
||||||
|
|
||||||
Array<int, PointIndex::BASE> compress(bnp);
|
NgArray<int, PointIndex::BASE> compress(bnp);
|
||||||
compress = -1;
|
compress = -1;
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
for (PointIndex pi : BndPntRange)
|
for (PointIndex pi : BndPntRange)
|
||||||
|
@ -187,7 +187,7 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
int npts;
|
int npts;
|
||||||
infile >> npts;
|
infile >> npts;
|
||||||
Array< Point<D> > pts(npts);
|
NgArray< Point<D> > pts(npts);
|
||||||
for (int j = 0; j < npts; j++)
|
for (int j = 0; j < npts; j++)
|
||||||
for(int k=0; k<D; k++)
|
for(int k=0; k<D; k++)
|
||||||
infile >> pts[j](k);
|
infile >> pts[j](k);
|
||||||
@ -358,7 +358,7 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
int npts;
|
int npts;
|
||||||
infile >> npts;
|
infile >> npts;
|
||||||
Array< Point<D> > pts(npts);
|
NgArray< Point<D> > pts(npts);
|
||||||
for (int j = 0; j < npts; j++)
|
for (int j = 0; j < npts; j++)
|
||||||
for(int k=0; k<D; k++)
|
for(int k=0; k<D; k++)
|
||||||
infile >> pts[j](k);
|
infile >> pts[j](k);
|
||||||
@ -489,8 +489,8 @@ namespace netgen
|
|||||||
|
|
||||||
string keyword;
|
string keyword;
|
||||||
|
|
||||||
Array < GeomPoint<D> > infilepoints (0);
|
NgArray < GeomPoint<D> > infilepoints (0);
|
||||||
Array <int> pointnrs (0);
|
NgArray <int> pointnrs (0);
|
||||||
nump = 0;
|
nump = 0;
|
||||||
int numdomains = 0;
|
int numdomains = 0;
|
||||||
|
|
||||||
@ -654,7 +654,7 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
int npts;
|
int npts;
|
||||||
infile >> npts;
|
infile >> npts;
|
||||||
Array< Point<D> > pts(npts);
|
NgArray< Point<D> > pts(npts);
|
||||||
for (int j = 0; j < npts; j++)
|
for (int j = 0; j < npts; j++)
|
||||||
for(int k=0; k<D; k++)
|
for(int k=0; k<D; k++)
|
||||||
infile >> pts[j](k);
|
infile >> pts[j](k);
|
||||||
@ -666,7 +666,7 @@ namespace netgen
|
|||||||
int npts,order;
|
int npts,order;
|
||||||
infile >> npts;
|
infile >> npts;
|
||||||
infile >> order;
|
infile >> order;
|
||||||
Array< Point<D> > pts(npts);
|
NgArray< Point<D> > pts(npts);
|
||||||
for (int j = 0; j < npts; j++)
|
for (int j = 0; j < npts; j++)
|
||||||
for(int k=0; k<D; k++)
|
for(int k=0; k<D; k++)
|
||||||
infile >> pts[j](k);
|
infile >> pts[j](k);
|
||||||
@ -830,7 +830,7 @@ namespace netgen
|
|||||||
/*
|
/*
|
||||||
void CalcPartition (const SplineSegExt & spline,
|
void CalcPartition (const SplineSegExt & spline,
|
||||||
double l, double h, double h1, double h2,
|
double l, double h, double h1, double h2,
|
||||||
double hcurve, double elto0, Array<double> & points)
|
double hcurve, double elto0, NgArray<double> & points)
|
||||||
{
|
{
|
||||||
double fperel, oldf, f;
|
double fperel, oldf, f;
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ namespace netgen
|
|||||||
seg->GetCoeff (coeffs);
|
seg->GetCoeff (coeffs);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void GetPoints (int n, Array<Point<2> > & points) const
|
virtual void GetPoints (int n, NgArray<Point<2> > & points) const
|
||||||
{
|
{
|
||||||
seg->GetPoints (n, points);
|
seg->GetPoints (n, points);
|
||||||
}
|
}
|
||||||
@ -131,12 +131,12 @@ namespace netgen
|
|||||||
class SplineGeometry2d : public SplineGeometry<2>, public NetgenGeometry
|
class SplineGeometry2d : public SplineGeometry<2>, public NetgenGeometry
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
Array<char*> materials;
|
NgArray<char*> materials;
|
||||||
Array<double> maxh;
|
NgArray<double> maxh;
|
||||||
Array<bool> quadmeshing;
|
NgArray<bool> quadmeshing;
|
||||||
Array<bool> tensormeshing;
|
NgArray<bool> tensormeshing;
|
||||||
Array<int> layer;
|
NgArray<int> layer;
|
||||||
Array<string*> bcnames;
|
NgArray<string*> bcnames;
|
||||||
double elto0 = 1.0;
|
double elto0 = 1.0;
|
||||||
|
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ DLL_HEADER void ExportGeom2d(py::module &m)
|
|||||||
int leftdomain, int rightdomain, py::object bc, double maxh)
|
int leftdomain, int rightdomain, py::object bc, double maxh)
|
||||||
{
|
{
|
||||||
int n = 1000;
|
int n = 1000;
|
||||||
Array<Point<2>> points;
|
NgArray<Point<2>> points;
|
||||||
for (int i = 0; i <= n; i++)
|
for (int i = 0; i <= n; i++)
|
||||||
{
|
{
|
||||||
double t = double(i)/n;
|
double t = double(i)/n;
|
||||||
|
@ -85,13 +85,13 @@ public:
|
|||||||
|
|
||||||
virtual void GetCoeff (Vector & coeffs) const = 0;
|
virtual void GetCoeff (Vector & coeffs) const = 0;
|
||||||
|
|
||||||
virtual void GetPoints (int n, Array<Point<2> > & points);
|
virtual void GetPoints (int n, NgArray<Point<2> > & points);
|
||||||
|
|
||||||
/** calculates lineintersections:
|
/** calculates lineintersections:
|
||||||
for lines $$ a x + b y + c = 0 $$ the interecting points are calculated
|
for lines $$ a x + b y + c = 0 $$ the interecting points are calculated
|
||||||
and stored in points */
|
and stored in points */
|
||||||
virtual void LineIntersections (const double a, const double b, const double c,
|
virtual void LineIntersections (const double a, const double b, const double c,
|
||||||
Array < Point<2> > & points, const double eps) const
|
NgArray < Point<2> > & points, const double eps) const
|
||||||
{points.SetSize(0);}
|
{points.SetSize(0);}
|
||||||
|
|
||||||
virtual double MaxCurvature(void) const = 0;
|
virtual double MaxCurvature(void) const = 0;
|
||||||
@ -123,7 +123,7 @@ public:
|
|||||||
virtual string GetType(void) const {return "line";}
|
virtual string GetType(void) const {return "line";}
|
||||||
|
|
||||||
virtual void LineIntersections (const double a, const double b, const double c,
|
virtual void LineIntersections (const double a, const double b, const double c,
|
||||||
Array < Point<2> > & points, const double eps) const;
|
NgArray < Point<2> > & points, const double eps) const;
|
||||||
|
|
||||||
virtual double MaxCurvature(void) const {return 0;}
|
virtual double MaxCurvature(void) const {return 0;}
|
||||||
};
|
};
|
||||||
@ -154,7 +154,7 @@ public:
|
|||||||
const GeomPoint2d & TangentPoint (void) const { return p2; }
|
const GeomPoint2d & TangentPoint (void) const { return p2; }
|
||||||
|
|
||||||
virtual void LineIntersections (const double a, const double b, const double c,
|
virtual void LineIntersections (const double a, const double b, const double c,
|
||||||
Array < Point<2> > & points, const double eps) const;
|
NgArray < Point<2> > & points, const double eps) const;
|
||||||
|
|
||||||
virtual double MaxCurvature(void) const;
|
virtual double MaxCurvature(void) const;
|
||||||
};
|
};
|
||||||
@ -195,7 +195,7 @@ public:
|
|||||||
virtual string GetType(void) const {return "circle";}
|
virtual string GetType(void) const {return "circle";}
|
||||||
|
|
||||||
virtual void LineIntersections (const double a, const double b, const double c,
|
virtual void LineIntersections (const double a, const double b, const double c,
|
||||||
Array < Point<2> > & points, const double eps) const;
|
NgArray < Point<2> > & points, const double eps) const;
|
||||||
|
|
||||||
virtual double MaxCurvature(void) const {return 1./radius;}
|
virtual double MaxCurvature(void) const {return 1./radius;}
|
||||||
};
|
};
|
||||||
@ -208,11 +208,11 @@ public:
|
|||||||
///
|
///
|
||||||
class DiscretePointsSegment : public SplineSegment
|
class DiscretePointsSegment : public SplineSegment
|
||||||
{
|
{
|
||||||
Array<Point<2> > pts;
|
NgArray<Point<2> > pts;
|
||||||
GeomPoint2d p1, p2;
|
GeomPoint2d p1, p2;
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
DiscretePointsSegment (const Array<Point<2> > & apts);
|
DiscretePointsSegment (const NgArray<Point<2> > & apts);
|
||||||
///
|
///
|
||||||
virtual ~DiscretePointsSegment ();
|
virtual ~DiscretePointsSegment ();
|
||||||
///
|
///
|
||||||
|
@ -52,7 +52,7 @@ namespace netgen
|
|||||||
glColor3f (0, 0, 1);
|
glColor3f (0, 0, 1);
|
||||||
|
|
||||||
|
|
||||||
Array<Point<2> > points, otherpoints;
|
NgArray<Point<2> > points, otherpoints;
|
||||||
|
|
||||||
for (int i = 1; i <= geometry2d->GetSplines().Size(); i++)
|
for (int i = 1; i <= geometry2d->GetSplines().Size(); i++)
|
||||||
{
|
{
|
||||||
|
@ -206,7 +206,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ADTree :: GetMatch (Array <int> & matches)
|
void ADTree :: GetMatch (NgArray <int> & matches)
|
||||||
{
|
{
|
||||||
int nodenr;
|
int nodenr;
|
||||||
|
|
||||||
@ -398,10 +398,10 @@ namespace netgen
|
|||||||
|
|
||||||
void ADTree3 :: GetIntersecting (const float * bmin,
|
void ADTree3 :: GetIntersecting (const float * bmin,
|
||||||
const float * bmax,
|
const float * bmax,
|
||||||
Array<int> & pis) const
|
NgArray<int> & pis) const
|
||||||
{
|
{
|
||||||
static Array<ADTreeNode3*> stack(1000);
|
static NgArray<ADTreeNode3*> stack(1000);
|
||||||
static Array<int> stackdir(1000);
|
static NgArray<int> stackdir(1000);
|
||||||
ADTreeNode3 * node;
|
ADTreeNode3 * node;
|
||||||
int dir, stacks;
|
int dir, stacks;
|
||||||
|
|
||||||
@ -658,10 +658,10 @@ namespace netgen
|
|||||||
|
|
||||||
void ADTree3Div :: GetIntersecting (const float * bmin,
|
void ADTree3Div :: GetIntersecting (const float * bmin,
|
||||||
const float * bmax,
|
const float * bmax,
|
||||||
Array<int> & pis) const
|
NgArray<int> & pis) const
|
||||||
{
|
{
|
||||||
static Array<ADTreeNode3Div*> stack(1000);
|
static NgArray<ADTreeNode3Div*> stack(1000);
|
||||||
static Array<int> stackdir(1000);
|
static NgArray<int> stackdir(1000);
|
||||||
ADTreeNode3Div * node;
|
ADTreeNode3Div * node;
|
||||||
int dir, i, stacks;
|
int dir, i, stacks;
|
||||||
|
|
||||||
@ -917,10 +917,10 @@ namespace netgen
|
|||||||
|
|
||||||
void ADTree3M :: GetIntersecting (const float * bmin,
|
void ADTree3M :: GetIntersecting (const float * bmin,
|
||||||
const float * bmax,
|
const float * bmax,
|
||||||
Array<int> & pis) const
|
NgArray<int> & pis) const
|
||||||
{
|
{
|
||||||
static Array<ADTreeNode3M*> stack(1000);
|
static NgArray<ADTreeNode3M*> stack(1000);
|
||||||
static Array<int> stackdir(1000);
|
static NgArray<int> stackdir(1000);
|
||||||
ADTreeNode3M * node;
|
ADTreeNode3M * node;
|
||||||
int dir, i, stacks;
|
int dir, i, stacks;
|
||||||
|
|
||||||
@ -1163,9 +1163,9 @@ namespace netgen
|
|||||||
|
|
||||||
void ADTree3F :: GetIntersecting (const float * bmin,
|
void ADTree3F :: GetIntersecting (const float * bmin,
|
||||||
const float * bmax,
|
const float * bmax,
|
||||||
Array<int> & pis) const
|
NgArray<int> & pis) const
|
||||||
{
|
{
|
||||||
static Array<ADTreeNode3F*> stack(1000);
|
static NgArray<ADTreeNode3F*> stack(1000);
|
||||||
ADTreeNode3F * node;
|
ADTreeNode3F * node;
|
||||||
int dir, i, stacks;
|
int dir, i, stacks;
|
||||||
|
|
||||||
@ -1427,9 +1427,9 @@ namespace netgen
|
|||||||
|
|
||||||
void ADTree3FM :: GetIntersecting (const float * bmin,
|
void ADTree3FM :: GetIntersecting (const float * bmin,
|
||||||
const float * bmax,
|
const float * bmax,
|
||||||
Array<int> & pis) const
|
NgArray<int> & pis) const
|
||||||
{
|
{
|
||||||
static Array<ADTreeNode3FM*> stack(1000);
|
static NgArray<ADTreeNode3FM*> stack(1000);
|
||||||
ADTreeNode3FM * node;
|
ADTreeNode3FM * node;
|
||||||
int dir, i, stacks;
|
int dir, i, stacks;
|
||||||
|
|
||||||
@ -1700,9 +1700,9 @@ namespace netgen
|
|||||||
|
|
||||||
void ADTree6 :: GetIntersecting (const float * bmin,
|
void ADTree6 :: GetIntersecting (const float * bmin,
|
||||||
const float * bmax,
|
const float * bmax,
|
||||||
Array<int> & pis) const
|
NgArray<int> & pis) const
|
||||||
{
|
{
|
||||||
// static Array<inttn6> stack(10000);
|
// static NgArray<inttn6> stack(10000);
|
||||||
// stack.SetSize (10000);
|
// stack.SetSize (10000);
|
||||||
ArrayMem<inttn6,10000> stack(10000);
|
ArrayMem<inttn6,10000> stack(10000);
|
||||||
pis.SetSize(0);
|
pis.SetSize(0);
|
||||||
@ -1920,9 +1920,9 @@ namespace netgen
|
|||||||
|
|
||||||
template <int dim, typename T>
|
template <int dim, typename T>
|
||||||
void T_ADTree<dim,T> :: GetIntersecting (Point<dim> bmin, Point<dim> bmax,
|
void T_ADTree<dim,T> :: GetIntersecting (Point<dim> bmin, Point<dim> bmax,
|
||||||
Array<T> & pis) const
|
NgArray<T> & pis) const
|
||||||
{
|
{
|
||||||
// static Array<inttn6> stack(10000);
|
// static NgArray<inttn6> stack(10000);
|
||||||
// stack.SetSize (10000);
|
// stack.SetSize (10000);
|
||||||
ArrayMem<inttn<dim,T>,10000> stack(10000);
|
ArrayMem<inttn<dim,T>,10000> stack(10000);
|
||||||
pis.SetSize(0);
|
pis.SetSize(0);
|
||||||
@ -2195,9 +2195,9 @@ namespace netgen
|
|||||||
|
|
||||||
void ADTree6F :: GetIntersecting (const float * bmin,
|
void ADTree6F :: GetIntersecting (const float * bmin,
|
||||||
const float * bmax,
|
const float * bmax,
|
||||||
Array<int> & pis) const
|
NgArray<int> & pis) const
|
||||||
{
|
{
|
||||||
static Array<ADTreeNode6F*> stack(1000);
|
static NgArray<ADTreeNode6F*> stack(1000);
|
||||||
ADTreeNode6F * node;
|
ADTreeNode6F * node;
|
||||||
int dir, i, stacks;
|
int dir, i, stacks;
|
||||||
|
|
||||||
@ -2329,7 +2329,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Point3dTree :: GetIntersecting (const Point<3> & pmin, const Point<3> & pmax,
|
void Point3dTree :: GetIntersecting (const Point<3> & pmin, const Point<3> & pmax,
|
||||||
Array<int> & pis) const
|
NgArray<int> & pis) const
|
||||||
{
|
{
|
||||||
float pmi[3], pma[3];
|
float pmi[3], pma[3];
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
@ -2397,7 +2397,7 @@ namespace netgen
|
|||||||
|
|
||||||
template <int dim, typename T>
|
template <int dim, typename T>
|
||||||
void BoxTree<dim,T> ::GetIntersecting (const Point<dim> & pmin, const Point<dim> & pmax,
|
void BoxTree<dim,T> ::GetIntersecting (const Point<dim> & pmin, const Point<dim> & pmax,
|
||||||
Array<T> & pis) const
|
NgArray<T> & pis) const
|
||||||
{
|
{
|
||||||
Point<2*dim> tpmin, tpmax;
|
Point<2*dim> tpmin, tpmax;
|
||||||
double tol = Tolerance();
|
double tol = Tolerance();
|
||||||
|
@ -51,11 +51,11 @@ class ADTree
|
|||||||
int dim;
|
int dim;
|
||||||
ADTreeNode * root;
|
ADTreeNode * root;
|
||||||
float *cmin, *cmax;
|
float *cmin, *cmax;
|
||||||
Array<ADTreeNode*> ela;
|
NgArray<ADTreeNode*> ela;
|
||||||
const ADTreeCriterion * criterion;
|
const ADTreeCriterion * criterion;
|
||||||
|
|
||||||
Array<ADTreeNode*> stack;
|
NgArray<ADTreeNode*> stack;
|
||||||
Array<int> stackdir;
|
NgArray<int> stackdir;
|
||||||
int stackindex;
|
int stackindex;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -65,11 +65,11 @@ public:
|
|||||||
|
|
||||||
void Insert (const float * p, int pi);
|
void Insert (const float * p, int pi);
|
||||||
// void GetIntersecting (const float * bmin, const float * bmax,
|
// void GetIntersecting (const float * bmin, const float * bmax,
|
||||||
// Array<int> & pis) const;
|
// NgArray<int> & pis) const;
|
||||||
void SetCriterion (ADTreeCriterion & acriterion);
|
void SetCriterion (ADTreeCriterion & acriterion);
|
||||||
void Reset ();
|
void Reset ();
|
||||||
int Next ();
|
int Next ();
|
||||||
void GetMatch (Array<int> & matches);
|
void GetMatch (NgArray<int> & matches);
|
||||||
|
|
||||||
void DeleteElement (int pi);
|
void DeleteElement (int pi);
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ class ADTree3
|
|||||||
{
|
{
|
||||||
ADTreeNode3 * root;
|
ADTreeNode3 * root;
|
||||||
float cmin[3], cmax[3];
|
float cmin[3], cmax[3];
|
||||||
Array<ADTreeNode3*> ela;
|
NgArray<ADTreeNode3*> ela;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ADTree3 (const float * acmin,
|
ADTree3 (const float * acmin,
|
||||||
@ -114,7 +114,7 @@ public:
|
|||||||
|
|
||||||
void Insert (const float * p, int pi);
|
void Insert (const float * p, int pi);
|
||||||
void GetIntersecting (const float * bmin, const float * bmax,
|
void GetIntersecting (const float * bmin, const float * bmax,
|
||||||
Array<int> & pis) const;
|
NgArray<int> & pis) const;
|
||||||
|
|
||||||
void DeleteElement (int pi);
|
void DeleteElement (int pi);
|
||||||
|
|
||||||
@ -155,7 +155,7 @@ class ADTree3Div
|
|||||||
{
|
{
|
||||||
ADTreeNode3Div * root;
|
ADTreeNode3Div * root;
|
||||||
float cmin[3], cmax[3];
|
float cmin[3], cmax[3];
|
||||||
Array<ADTreeNode3Div*> ela;
|
NgArray<ADTreeNode3Div*> ela;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ADTree3Div (const float * acmin,
|
ADTree3Div (const float * acmin,
|
||||||
@ -164,7 +164,7 @@ public:
|
|||||||
|
|
||||||
void Insert (const float * p, int pi);
|
void Insert (const float * p, int pi);
|
||||||
void GetIntersecting (const float * bmin, const float * bmax,
|
void GetIntersecting (const float * bmin, const float * bmax,
|
||||||
Array<int> & pis) const;
|
NgArray<int> & pis) const;
|
||||||
|
|
||||||
void DeleteElement (int pi);
|
void DeleteElement (int pi);
|
||||||
|
|
||||||
@ -204,7 +204,7 @@ class ADTree3M
|
|||||||
{
|
{
|
||||||
ADTreeNode3M * root;
|
ADTreeNode3M * root;
|
||||||
float cmin[3], cmax[3];
|
float cmin[3], cmax[3];
|
||||||
Array<ADTreeNode3M*> ela;
|
NgArray<ADTreeNode3M*> ela;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ADTree3M (const float * acmin,
|
ADTree3M (const float * acmin,
|
||||||
@ -213,7 +213,7 @@ public:
|
|||||||
|
|
||||||
void Insert (const float * p, int pi);
|
void Insert (const float * p, int pi);
|
||||||
void GetIntersecting (const float * bmin, const float * bmax,
|
void GetIntersecting (const float * bmin, const float * bmax,
|
||||||
Array<int> & pis) const;
|
NgArray<int> & pis) const;
|
||||||
|
|
||||||
void DeleteElement (int pi);
|
void DeleteElement (int pi);
|
||||||
|
|
||||||
@ -253,7 +253,7 @@ class ADTree3F
|
|||||||
{
|
{
|
||||||
ADTreeNode3F * root;
|
ADTreeNode3F * root;
|
||||||
float cmin[3], cmax[3];
|
float cmin[3], cmax[3];
|
||||||
Array<ADTreeNode3F*> ela;
|
NgArray<ADTreeNode3F*> ela;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ADTree3F (const float * acmin,
|
ADTree3F (const float * acmin,
|
||||||
@ -262,7 +262,7 @@ public:
|
|||||||
|
|
||||||
void Insert (const float * p, int pi);
|
void Insert (const float * p, int pi);
|
||||||
void GetIntersecting (const float * bmin, const float * bmax,
|
void GetIntersecting (const float * bmin, const float * bmax,
|
||||||
Array<int> & pis) const;
|
NgArray<int> & pis) const;
|
||||||
|
|
||||||
void DeleteElement (int pi);
|
void DeleteElement (int pi);
|
||||||
|
|
||||||
@ -300,7 +300,7 @@ class ADTree3FM
|
|||||||
{
|
{
|
||||||
ADTreeNode3FM * root;
|
ADTreeNode3FM * root;
|
||||||
float cmin[3], cmax[3];
|
float cmin[3], cmax[3];
|
||||||
Array<ADTreeNode3FM*> ela;
|
NgArray<ADTreeNode3FM*> ela;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ADTree3FM (const float * acmin,
|
ADTree3FM (const float * acmin,
|
||||||
@ -309,7 +309,7 @@ public:
|
|||||||
|
|
||||||
void Insert (const float * p, int pi);
|
void Insert (const float * p, int pi);
|
||||||
void GetIntersecting (const float * bmin, const float * bmax,
|
void GetIntersecting (const float * bmin, const float * bmax,
|
||||||
Array<int> & pis) const;
|
NgArray<int> & pis) const;
|
||||||
|
|
||||||
void DeleteElement (int pi);
|
void DeleteElement (int pi);
|
||||||
|
|
||||||
@ -351,7 +351,7 @@ class ADTree6
|
|||||||
{
|
{
|
||||||
ADTreeNode6 * root;
|
ADTreeNode6 * root;
|
||||||
float cmin[6], cmax[6];
|
float cmin[6], cmax[6];
|
||||||
Array<ADTreeNode6*> ela;
|
NgArray<ADTreeNode6*> ela;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ADTree6 (const float * acmin,
|
ADTree6 (const float * acmin,
|
||||||
@ -360,7 +360,7 @@ public:
|
|||||||
|
|
||||||
void Insert (const float * p, int pi);
|
void Insert (const float * p, int pi);
|
||||||
void GetIntersecting (const float * bmin, const float * bmax,
|
void GetIntersecting (const float * bmin, const float * bmax,
|
||||||
Array<int> & pis) const;
|
NgArray<int> & pis) const;
|
||||||
|
|
||||||
void DeleteElement (int pi);
|
void DeleteElement (int pi);
|
||||||
|
|
||||||
@ -443,7 +443,7 @@ public:
|
|||||||
T_ADTreeNode<dim,T> * root;
|
T_ADTreeNode<dim,T> * root;
|
||||||
// float cmin[dim], cmax[dim];
|
// float cmin[dim], cmax[dim];
|
||||||
Point<dim> cmin, cmax;
|
Point<dim> cmin, cmax;
|
||||||
// Array<T_ADTreeNode<dim>*> ela;
|
// NgArray<T_ADTreeNode<dim>*> ela;
|
||||||
ClosedHashTable<T, T_ADTreeNode<dim,T>*> ela;
|
ClosedHashTable<T, T_ADTreeNode<dim,T>*> ela;
|
||||||
public:
|
public:
|
||||||
T_ADTree (Point<dim> acmin, Point<dim> acmax);
|
T_ADTree (Point<dim> acmin, Point<dim> acmax);
|
||||||
@ -451,7 +451,7 @@ public:
|
|||||||
|
|
||||||
void Insert (Point<dim> p, T pi);
|
void Insert (Point<dim> p, T pi);
|
||||||
void GetIntersecting (Point<dim> bmin, Point<dim> bmax,
|
void GetIntersecting (Point<dim> bmin, Point<dim> bmax,
|
||||||
Array<T> & pis) const;
|
NgArray<T> & pis) const;
|
||||||
|
|
||||||
void DeleteElement (T pi);
|
void DeleteElement (T pi);
|
||||||
|
|
||||||
@ -501,7 +501,7 @@ class ADTree6F
|
|||||||
{
|
{
|
||||||
ADTreeNode6F * root;
|
ADTreeNode6F * root;
|
||||||
float cmin[6], cmax[6];
|
float cmin[6], cmax[6];
|
||||||
Array<ADTreeNode6F*> ela;
|
NgArray<ADTreeNode6F*> ela;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ADTree6F (const float * acmin,
|
ADTree6F (const float * acmin,
|
||||||
@ -510,7 +510,7 @@ public:
|
|||||||
|
|
||||||
void Insert (const float * p, int pi);
|
void Insert (const float * p, int pi);
|
||||||
void GetIntersecting (const float * bmin, const float * bmax,
|
void GetIntersecting (const float * bmin, const float * bmax,
|
||||||
Array<int> & pis) const;
|
NgArray<int> & pis) const;
|
||||||
|
|
||||||
void DeleteElement (int pi);
|
void DeleteElement (int pi);
|
||||||
|
|
||||||
@ -547,7 +547,7 @@ public:
|
|||||||
void DeleteElement (int pi)
|
void DeleteElement (int pi)
|
||||||
{ tree->DeleteElement(pi); }
|
{ tree->DeleteElement(pi); }
|
||||||
DLL_HEADER void GetIntersecting (const Point<3> & pmin, const Point<3> & pmax,
|
DLL_HEADER void GetIntersecting (const Point<3> & pmin, const Point<3> & pmax,
|
||||||
Array<int> & pis) const;
|
NgArray<int> & pis) const;
|
||||||
const ADTree3 & Tree() const { return *tree; };
|
const ADTree3 & Tree() const { return *tree; };
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -569,7 +569,7 @@ public:
|
|||||||
void DeleteElement (T pi)
|
void DeleteElement (T pi)
|
||||||
{ tree->DeleteElement(pi); }
|
{ tree->DeleteElement(pi); }
|
||||||
void GetIntersecting (const Point<dim> & pmin, const Point<dim> & pmax,
|
void GetIntersecting (const Point<dim> & pmin, const Point<dim> & pmax,
|
||||||
Array<T> & pis) const;
|
NgArray<T> & pis) const;
|
||||||
double Tolerance() const { return 1e-7 * Dist(boxpmax, boxpmin); } // single precision
|
double Tolerance() const { return 1e-7 * Dist(boxpmax, boxpmin); } // single precision
|
||||||
const auto & Tree() const { return *tree; };
|
const auto & Tree() const { return *tree; };
|
||||||
auto & Tree() { return *tree; };
|
auto & Tree() { return *tree; };
|
||||||
|
@ -613,7 +613,7 @@ namespace netgen
|
|||||||
class Polygon2d
|
class Polygon2d
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
Array<Point2d> points;
|
NgArray<Point2d> points;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Polygon2d ();
|
Polygon2d ();
|
||||||
|
@ -711,8 +711,8 @@ void referencetransform :: ToPlain (const Point3d & p, Point3d & pp) const
|
|||||||
pp.Z() = (ez_h * v);
|
pp.Z() = (ez_h * v);
|
||||||
}
|
}
|
||||||
|
|
||||||
void referencetransform :: ToPlain (const Array<Point3d> & p,
|
void referencetransform :: ToPlain (const NgArray<Point3d> & p,
|
||||||
Array<Point3d> & pp) const
|
NgArray<Point3d> & pp) const
|
||||||
{
|
{
|
||||||
Vec3d v;
|
Vec3d v;
|
||||||
int i;
|
int i;
|
||||||
|
@ -735,7 +735,7 @@ namespace netgen
|
|||||||
///
|
///
|
||||||
void ToPlain (const Point3d & p, Point3d & pp) const;
|
void ToPlain (const Point3d & p, Point3d & pp) const;
|
||||||
///
|
///
|
||||||
void ToPlain (const Array<Point3d> & p, Array<Point3d> & pp) const;
|
void ToPlain (const NgArray<Point3d> & p, NgArray<Point3d> & pp) const;
|
||||||
///
|
///
|
||||||
void FromPlain (const Point3d & pp, Point3d & p) const;
|
void FromPlain (const Point3d & pp, Point3d & p) const;
|
||||||
};
|
};
|
||||||
|
@ -35,14 +35,14 @@ namespace netgen
|
|||||||
|
|
||||||
template <>
|
template <>
|
||||||
void CircleSeg<3> :: LineIntersections (const double a, const double b, const double c,
|
void CircleSeg<3> :: LineIntersections (const double a, const double b, const double c,
|
||||||
Array < Point<3> > & points, const double eps) const
|
NgArray < Point<3> > & points, const double eps) const
|
||||||
{
|
{
|
||||||
cerr << "CircleSeg<3>::LineIntersections not implemented" << endl;
|
cerr << "CircleSeg<3>::LineIntersections not implemented" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void CircleSeg<2> :: LineIntersections (const double a, const double b, const double c,
|
void CircleSeg<2> :: LineIntersections (const double a, const double b, const double c,
|
||||||
Array < Point<2> > & points, const double eps) const
|
NgArray < Point<2> > & points, const double eps) const
|
||||||
{
|
{
|
||||||
points.SetSize(0);
|
points.SetSize(0);
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ namespace netgen
|
|||||||
if(discr < 0)
|
if(discr < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Array<double> t;
|
NgArray<double> t;
|
||||||
|
|
||||||
if(fabs(discr) < 1e-20)
|
if(fabs(discr) < 1e-20)
|
||||||
t.Append(-0.5*c2/c1);
|
t.Append(-0.5*c2/c1);
|
||||||
@ -488,7 +488,7 @@ namespace netgen
|
|||||||
|
|
||||||
template<int D>
|
template<int D>
|
||||||
void SplineSeg3<D> :: LineIntersections (const double a, const double b, const double c,
|
void SplineSeg3<D> :: LineIntersections (const double a, const double b, const double c,
|
||||||
Array < Point<D> > & points, const double eps) const
|
NgArray < Point<D> > & points, const double eps) const
|
||||||
{
|
{
|
||||||
points.SetSize(0);
|
points.SetSize(0);
|
||||||
|
|
||||||
@ -535,7 +535,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
template < int D >
|
template < int D >
|
||||||
void SplineSeg3<D> :: GetRawData (Array<double> & data) const
|
void SplineSeg3<D> :: GetRawData (NgArray<double> & data) const
|
||||||
{
|
{
|
||||||
data.Append(3);
|
data.Append(3);
|
||||||
for(int i=0; i<D; i++)
|
for(int i=0; i<D; i++)
|
||||||
|
@ -94,13 +94,13 @@ namespace netgen
|
|||||||
virtual void GetCoeff (Vector & coeffs) const = 0;
|
virtual void GetCoeff (Vector & coeffs) const = 0;
|
||||||
virtual void GetCoeff (Vector & coeffs, Point<D> p0) const { ; }
|
virtual void GetCoeff (Vector & coeffs, Point<D> p0) const { ; }
|
||||||
|
|
||||||
virtual void GetPoints (int n, Array<Point<D> > & points) const;
|
virtual void GetPoints (int n, NgArray<Point<D> > & points) const;
|
||||||
|
|
||||||
/** calculates (2D) lineintersections:
|
/** calculates (2D) lineintersections:
|
||||||
for lines $$ a x + b y + c = 0 $$ the interecting points are calculated
|
for lines $$ a x + b y + c = 0 $$ the interecting points are calculated
|
||||||
and stored in points */
|
and stored in points */
|
||||||
virtual void LineIntersections (const double a, const double b, const double c,
|
virtual void LineIntersections (const double a, const double b, const double c,
|
||||||
Array < Point<D> > & points, const double eps) const
|
NgArray < Point<D> > & points, const double eps) const
|
||||||
{points.SetSize(0);}
|
{points.SetSize(0);}
|
||||||
|
|
||||||
// is the point in the convex hull (increased by eps) of the spline ?
|
// is the point in the convex hull (increased by eps) of the spline ?
|
||||||
@ -113,7 +113,7 @@ namespace netgen
|
|||||||
virtual void Project (const Point<D> point, Point<D> & point_on_curve, double & t) const
|
virtual void Project (const Point<D> point, Point<D> & point_on_curve, double & t) const
|
||||||
{ cerr << "Project not implemented for spline base-class" << endl;}
|
{ cerr << "Project not implemented for spline base-class" << endl;}
|
||||||
|
|
||||||
virtual void GetRawData (Array<double> & data) const
|
virtual void GetRawData (NgArray<double> & data) const
|
||||||
{ cerr << "GetRawData not implemented for spline base-class" << endl;}
|
{ cerr << "GetRawData not implemented for spline base-class" << endl;}
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -157,7 +157,7 @@ namespace netgen
|
|||||||
virtual string GetType(void) const {return "line";}
|
virtual string GetType(void) const {return "line";}
|
||||||
|
|
||||||
virtual void LineIntersections (const double a, const double b, const double c,
|
virtual void LineIntersections (const double a, const double b, const double c,
|
||||||
Array < Point<D> > & points, const double eps) const;
|
NgArray < Point<D> > & points, const double eps) const;
|
||||||
|
|
||||||
virtual bool InConvexHull (Point<D> p, double eps) const
|
virtual bool InConvexHull (Point<D> p, double eps) const
|
||||||
{
|
{
|
||||||
@ -168,7 +168,7 @@ namespace netgen
|
|||||||
|
|
||||||
virtual void Project (const Point<D> point, Point<D> & point_on_curve, double & t) const;
|
virtual void Project (const Point<D> point, Point<D> & point_on_curve, double & t) const;
|
||||||
|
|
||||||
virtual void GetRawData (Array<double> & data) const;
|
virtual void GetRawData (NgArray<double> & data) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ namespace netgen
|
|||||||
const GeomPoint<D> & TangentPoint (void) const { return p2; }
|
const GeomPoint<D> & TangentPoint (void) const { return p2; }
|
||||||
|
|
||||||
DLL_HEADER virtual void LineIntersections (const double a, const double b, const double c,
|
DLL_HEADER virtual void LineIntersections (const double a, const double b, const double c,
|
||||||
Array < Point<D> > & points, const double eps) const;
|
NgArray < Point<D> > & points, const double eps) const;
|
||||||
|
|
||||||
virtual bool InConvexHull (Point<D> p, double eps) const
|
virtual bool InConvexHull (Point<D> p, double eps) const
|
||||||
{
|
{
|
||||||
@ -225,7 +225,7 @@ namespace netgen
|
|||||||
|
|
||||||
DLL_HEADER virtual void Project (const Point<D> point, Point<D> & point_on_curve, double & t) const;
|
DLL_HEADER virtual void Project (const Point<D> point, Point<D> & point_on_curve, double & t) const;
|
||||||
|
|
||||||
DLL_HEADER virtual void GetRawData (Array<double> & data) const;
|
DLL_HEADER virtual void GetRawData (NgArray<double> & data) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -271,7 +271,7 @@ namespace netgen
|
|||||||
virtual string GetType(void) const {return "circle";}
|
virtual string GetType(void) const {return "circle";}
|
||||||
|
|
||||||
virtual void LineIntersections (const double a, const double b, const double c,
|
virtual void LineIntersections (const double a, const double b, const double c,
|
||||||
Array < Point<D> > & points, const double eps) const;
|
NgArray < Point<D> > & points, const double eps) const;
|
||||||
|
|
||||||
virtual bool InConvexHull (Point<D> p, double eps) const
|
virtual bool InConvexHull (Point<D> p, double eps) const
|
||||||
{
|
{
|
||||||
@ -290,11 +290,11 @@ namespace netgen
|
|||||||
template<int D>
|
template<int D>
|
||||||
class DiscretePointsSeg : public SplineSeg<D>
|
class DiscretePointsSeg : public SplineSeg<D>
|
||||||
{
|
{
|
||||||
Array<Point<D> > pts;
|
NgArray<Point<D> > pts;
|
||||||
GeomPoint<D> p1n, p2n;
|
GeomPoint<D> p1n, p2n;
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
DiscretePointsSeg (const Array<Point<D> > & apts);
|
DiscretePointsSeg (const NgArray<Point<D> > & apts);
|
||||||
// default constructor for archive
|
// default constructor for archive
|
||||||
DiscretePointsSeg() {}
|
DiscretePointsSeg() {}
|
||||||
virtual void DoArchive(Archive& ar)
|
virtual void DoArchive(Archive& ar)
|
||||||
@ -346,7 +346,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
template<int D>
|
template<int D>
|
||||||
void SplineSeg<D> :: GetPoints (int n, Array<Point<D> > & points) const
|
void SplineSeg<D> :: GetPoints (int n, NgArray<Point<D> > & points) const
|
||||||
{
|
{
|
||||||
points.SetSize (n);
|
points.SetSize (n);
|
||||||
if (n >= 2)
|
if (n >= 2)
|
||||||
@ -445,7 +445,7 @@ namespace netgen
|
|||||||
|
|
||||||
template<int D>
|
template<int D>
|
||||||
void LineSeg<D> :: LineIntersections (const double a, const double b, const double c,
|
void LineSeg<D> :: LineIntersections (const double a, const double b, const double c,
|
||||||
Array < Point<D> > & points, const double eps) const
|
NgArray < Point<D> > & points, const double eps) const
|
||||||
{
|
{
|
||||||
points.SetSize(0);
|
points.SetSize(0);
|
||||||
|
|
||||||
@ -478,7 +478,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
template<int D>
|
template<int D>
|
||||||
void LineSeg<D> :: GetRawData (Array<double> & data) const
|
void LineSeg<D> :: GetRawData (NgArray<double> & data) const
|
||||||
{
|
{
|
||||||
data.Append(2);
|
data.Append(2);
|
||||||
for(int i=0; i<D; i++)
|
for(int i=0; i<D; i++)
|
||||||
@ -599,7 +599,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
template<int D>
|
template<int D>
|
||||||
DiscretePointsSeg<D> :: DiscretePointsSeg (const Array<Point<D> > & apts)
|
DiscretePointsSeg<D> :: DiscretePointsSeg (const NgArray<Point<D> > & apts)
|
||||||
: pts (apts)
|
: pts (apts)
|
||||||
{
|
{
|
||||||
for(int i=0; i<D; i++)
|
for(int i=0; i<D; i++)
|
||||||
@ -647,13 +647,13 @@ namespace netgen
|
|||||||
template<int D, int ORDER>
|
template<int D, int ORDER>
|
||||||
class BSplineSeg : public SplineSeg<D>
|
class BSplineSeg : public SplineSeg<D>
|
||||||
{
|
{
|
||||||
Array<Point<D> > pts;
|
NgArray<Point<D> > pts;
|
||||||
GeomPoint<D> p1n, p2n;
|
GeomPoint<D> p1n, p2n;
|
||||||
Array<int> ti;
|
NgArray<int> ti;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
BSplineSeg (const Array<Point<D> > & apts);
|
BSplineSeg (const NgArray<Point<D> > & apts);
|
||||||
///
|
///
|
||||||
//default constructor for archive
|
//default constructor for archive
|
||||||
BSplineSeg() {}
|
BSplineSeg() {}
|
||||||
@ -680,7 +680,7 @@ namespace netgen
|
|||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
template<int D,int ORDER>
|
template<int D,int ORDER>
|
||||||
BSplineSeg<D,ORDER> :: BSplineSeg (const Array<Point<D> > & apts)
|
BSplineSeg<D,ORDER> :: BSplineSeg (const NgArray<Point<D> > & apts)
|
||||||
: pts (apts)
|
: pts (apts)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -23,7 +23,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
template<int D>
|
template<int D>
|
||||||
void SplineGeometry<D> :: GetRawData (Array<double> & raw_data) const
|
void SplineGeometry<D> :: GetRawData (NgArray<double> & raw_data) const
|
||||||
{
|
{
|
||||||
raw_data.Append(D);
|
raw_data.Append(D);
|
||||||
// raw_data.Append(elto0);
|
// raw_data.Append(elto0);
|
||||||
@ -36,7 +36,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
template<int D>
|
template<int D>
|
||||||
int SplineGeometry<D> :: Load (const Array<double> & raw_data, const int startpos)
|
int SplineGeometry<D> :: Load (const NgArray<double> & raw_data, const int startpos)
|
||||||
{
|
{
|
||||||
int pos = startpos;
|
int pos = startpos;
|
||||||
if(raw_data[pos] != D)
|
if(raw_data[pos] != D)
|
||||||
@ -49,7 +49,7 @@ namespace netgen
|
|||||||
splines.SetSize(int(raw_data[pos]));
|
splines.SetSize(int(raw_data[pos]));
|
||||||
pos++;
|
pos++;
|
||||||
|
|
||||||
Array< Point<D> > pts(3);
|
NgArray< Point<D> > pts(3);
|
||||||
|
|
||||||
for(int i=0; i<splines.Size(); i++)
|
for(int i=0; i<splines.Size(); i++)
|
||||||
{
|
{
|
||||||
@ -99,7 +99,7 @@ namespace netgen
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Array<Point<D> > points;
|
NgArray<Point<D> > points;
|
||||||
for (int i = 0; i < splines.Size(); i++)
|
for (int i = 0; i < splines.Size(); i++)
|
||||||
{
|
{
|
||||||
splines[i]->GetPoints (20, points);
|
splines[i]->GetPoints (20, points);
|
||||||
|
@ -26,23 +26,23 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
// protected:
|
// protected:
|
||||||
public:
|
public:
|
||||||
Array < GeomPoint<D> > geompoints;
|
NgArray < GeomPoint<D> > geompoints;
|
||||||
Array < SplineSeg<D>* > splines;
|
NgArray < SplineSeg<D>* > splines;
|
||||||
|
|
||||||
SplineGeometry() : geompoints{}, splines{} { ; }
|
SplineGeometry() : geompoints{}, splines{} { ; }
|
||||||
DLL_HEADER ~SplineGeometry();
|
DLL_HEADER ~SplineGeometry();
|
||||||
|
|
||||||
DLL_HEADER int Load (const Array<double> & raw_data, const int startpos = 0);
|
DLL_HEADER int Load (const NgArray<double> & raw_data, const int startpos = 0);
|
||||||
|
|
||||||
virtual void DoArchive(Archive& ar)
|
virtual void DoArchive(Archive& ar)
|
||||||
{
|
{
|
||||||
ar & geompoints & splines;
|
ar & geompoints & splines;
|
||||||
}
|
}
|
||||||
|
|
||||||
DLL_HEADER void GetRawData (Array<double> & raw_data) const;
|
DLL_HEADER void GetRawData (NgArray<double> & raw_data) const;
|
||||||
|
|
||||||
|
|
||||||
const Array<SplineSeg<D>*> & GetSplines () const
|
const NgArray<SplineSeg<D>*> & GetSplines () const
|
||||||
{ return splines; }
|
{ return splines; }
|
||||||
|
|
||||||
int GetNSplines (void) const { return splines.Size(); }
|
int GetNSplines (void) const { return splines.Size(); }
|
||||||
|
@ -306,7 +306,7 @@ template <> NGX_INLINE DLL_HEADER const Ng_Node<2> Ngx_Mesh :: GetNode<2> (int n
|
|||||||
|
|
||||||
NGX_INLINE DLL_HEADER Ng_Buffer<int[2]> Ngx_Mesh :: GetPeriodicVertices(int idnr) const
|
NGX_INLINE DLL_HEADER Ng_Buffer<int[2]> Ngx_Mesh :: GetPeriodicVertices(int idnr) const
|
||||||
{
|
{
|
||||||
Array<INDEX_2> apairs;
|
NgArray<INDEX_2> apairs;
|
||||||
mesh->GetIdentifications().GetPairs (idnr+1, apairs);
|
mesh->GetIdentifications().GetPairs (idnr+1, apairs);
|
||||||
for(auto& ind : apairs)
|
for(auto& ind : apairs)
|
||||||
{
|
{
|
||||||
|
@ -58,8 +58,8 @@ namespace netgen
|
|||||||
|
|
||||||
#ifdef SOCKETS
|
#ifdef SOCKETS
|
||||||
extern AutoPtr<ClientSocket> clientsocket;
|
extern AutoPtr<ClientSocket> clientsocket;
|
||||||
//extern Array< AutoPtr < ServerInfo > > servers;
|
//extern NgArray< AutoPtr < ServerInfo > > servers;
|
||||||
extern Array< ServerInfo* > servers;
|
extern NgArray< ServerInfo* > servers;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -141,7 +141,7 @@ void Ng_LoadMesh (const char * filename, ngcore::NgMPI_Comm comm)
|
|||||||
}
|
}
|
||||||
|
|
||||||
istream * infile;
|
istream * infile;
|
||||||
Array<char> buf; // for distributing geometry!
|
NgArray<char> buf; // for distributing geometry!
|
||||||
int strs;
|
int strs;
|
||||||
|
|
||||||
if( id == 0) {
|
if( id == 0) {
|
||||||
@ -191,9 +191,9 @@ void Ng_LoadMesh (const char * filename, ngcore::NgMPI_Comm comm)
|
|||||||
bool endfile = false;
|
bool endfile = false;
|
||||||
int n, dummy;
|
int n, dummy;
|
||||||
|
|
||||||
Array<int> segment_weights;
|
NgArray<int> segment_weights;
|
||||||
Array<int> surface_weights;
|
NgArray<int> surface_weights;
|
||||||
Array<int> volume_weights;
|
NgArray<int> volume_weights;
|
||||||
|
|
||||||
while (weightsfile.good() && !endfile)
|
while (weightsfile.good() && !endfile)
|
||||||
{
|
{
|
||||||
@ -479,14 +479,14 @@ const char * Ng_GetDomainMaterial (int dom)
|
|||||||
|
|
||||||
int Ng_GetUserDataSize (char * id)
|
int Ng_GetUserDataSize (char * id)
|
||||||
{
|
{
|
||||||
Array<double> da;
|
NgArray<double> da;
|
||||||
mesh->GetUserData (id, da);
|
mesh->GetUserData (id, da);
|
||||||
return da.Size();
|
return da.Size();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Ng_GetUserData (char * id, double * data)
|
void Ng_GetUserData (char * id, double * data)
|
||||||
{
|
{
|
||||||
Array<double> da;
|
NgArray<double> da;
|
||||||
mesh->GetUserData (id, da);
|
mesh->GetUserData (id, da);
|
||||||
for (int i = 0; i < da.Size(); i++)
|
for (int i = 0; i < da.Size(); i++)
|
||||||
data[i] = da[i];
|
data[i] = da[i];
|
||||||
@ -640,12 +640,12 @@ int Ng_FindElementOfPoint (double * p, double * lami, int build_searchtree,
|
|||||||
const int * const indices, const int numind)
|
const int * const indices, const int numind)
|
||||||
|
|
||||||
{
|
{
|
||||||
Array<int> * dummy(NULL);
|
NgArray<int> * dummy(NULL);
|
||||||
int ind = -1;
|
int ind = -1;
|
||||||
|
|
||||||
if(indices != NULL)
|
if(indices != NULL)
|
||||||
{
|
{
|
||||||
dummy = new Array<int>(numind);
|
dummy = new NgArray<int>(numind);
|
||||||
for(int i=0; i<numind; i++) (*dummy)[i] = indices[i];
|
for(int i=0; i<numind; i++) (*dummy)[i] = indices[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -686,12 +686,12 @@ int Ng_FindSurfaceElementOfPoint (double * p, double * lami, int build_searchtre
|
|||||||
const int * const indices, const int numind)
|
const int * const indices, const int numind)
|
||||||
|
|
||||||
{
|
{
|
||||||
Array<int> * dummy(NULL);
|
NgArray<int> * dummy(NULL);
|
||||||
int ind = -1;
|
int ind = -1;
|
||||||
|
|
||||||
if(indices != NULL)
|
if(indices != NULL)
|
||||||
{
|
{
|
||||||
dummy = new Array<int>(numind);
|
dummy = new NgArray<int>(numind);
|
||||||
for(int i=0; i<numind; i++) (*dummy)[i] = indices[i];
|
for(int i=0; i<numind; i++) (*dummy)[i] = indices[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1550,7 +1550,7 @@ int Ng_GetSurfaceElement_Edges (int elnr, int * edges, int * orient)
|
|||||||
/*
|
/*
|
||||||
int i, ned;
|
int i, ned;
|
||||||
const MeshTopology & topology = mesh->GetTopology();
|
const MeshTopology & topology = mesh->GetTopology();
|
||||||
Array<int> ia;
|
NgArray<int> ia;
|
||||||
topology.GetSurfaceElementEdges (elnr, ia);
|
topology.GetSurfaceElementEdges (elnr, ia);
|
||||||
ned = ia.Size();
|
ned = ia.Size();
|
||||||
for (i = 1; i <= ned; i++)
|
for (i = 1; i <= ned; i++)
|
||||||
@ -1800,7 +1800,7 @@ int Ng_GetClusterRepElement (int pi)
|
|||||||
|
|
||||||
int Ng_GetNPeriodicVertices (int idnr)
|
int Ng_GetNPeriodicVertices (int idnr)
|
||||||
{
|
{
|
||||||
Array<INDEX_2> apairs;
|
NgArray<INDEX_2> apairs;
|
||||||
mesh->GetIdentifications().GetPairs (idnr, apairs);
|
mesh->GetIdentifications().GetPairs (idnr, apairs);
|
||||||
return apairs.Size();
|
return apairs.Size();
|
||||||
}
|
}
|
||||||
@ -1809,7 +1809,7 @@ int Ng_GetNPeriodicVertices (int idnr)
|
|||||||
// pairs should be an integer array of 2*npairs
|
// pairs should be an integer array of 2*npairs
|
||||||
void Ng_GetPeriodicVertices (int idnr, int * pairs)
|
void Ng_GetPeriodicVertices (int idnr, int * pairs)
|
||||||
{
|
{
|
||||||
Array<INDEX_2> apairs;
|
NgArray<INDEX_2> apairs;
|
||||||
mesh->GetIdentifications().GetPairs (idnr, apairs);
|
mesh->GetIdentifications().GetPairs (idnr, apairs);
|
||||||
for (int i = 0; i < apairs.Size(); i++)
|
for (int i = 0; i < apairs.Size(); i++)
|
||||||
{
|
{
|
||||||
@ -1823,7 +1823,7 @@ void Ng_GetPeriodicVertices (int idnr, int * pairs)
|
|||||||
|
|
||||||
int Ng_GetNPeriodicEdges (int idnr)
|
int Ng_GetNPeriodicEdges (int idnr)
|
||||||
{
|
{
|
||||||
Array<int,PointIndex::BASE> map;
|
NgArray<int,PointIndex::BASE> map;
|
||||||
//const MeshTopology & top = mesh->GetTopology();
|
//const MeshTopology & top = mesh->GetTopology();
|
||||||
int nse = mesh->GetNSeg();
|
int nse = mesh->GetNSeg();
|
||||||
|
|
||||||
@ -1850,7 +1850,7 @@ int Ng_GetNPeriodicEdges (int idnr)
|
|||||||
|
|
||||||
void Ng_GetPeriodicEdges (int idnr, int * pairs)
|
void Ng_GetPeriodicEdges (int idnr, int * pairs)
|
||||||
{
|
{
|
||||||
Array<int,PointIndex::BASE> map;
|
NgArray<int,PointIndex::BASE> map;
|
||||||
const MeshTopology & top = mesh->GetTopology();
|
const MeshTopology & top = mesh->GetTopology();
|
||||||
int nse = mesh->GetNSeg();
|
int nse = mesh->GetNSeg();
|
||||||
|
|
||||||
@ -2157,9 +2157,9 @@ int Ng_Bisect_WithInfo ( const char * refinementfile, double ** qualityloss, int
|
|||||||
|
|
||||||
mesh->LocalHFunction().SetGrading (mparam.grading);
|
mesh->LocalHFunction().SetGrading (mparam.grading);
|
||||||
|
|
||||||
Array<double> * qualityloss_arr = NULL;
|
NgArray<double> * qualityloss_arr = NULL;
|
||||||
if(qualityloss != NULL)
|
if(qualityloss != NULL)
|
||||||
qualityloss_arr = new Array<double>;
|
qualityloss_arr = new NgArray<double>;
|
||||||
|
|
||||||
ref -> Bisect (*mesh, biopt, qualityloss_arr);
|
ref -> Bisect (*mesh, biopt, qualityloss_arr);
|
||||||
|
|
||||||
|
@ -1070,7 +1070,7 @@ namespace netgen
|
|||||||
int * const indices, int numind) const
|
int * const indices, int numind) const
|
||||||
|
|
||||||
{
|
{
|
||||||
Array<int> dummy(numind);
|
NgArray<int> dummy(numind);
|
||||||
for (int i = 0; i < numind; i++) dummy[i] = indices[i]+1;
|
for (int i = 0; i < numind; i++) dummy[i] = indices[i]+1;
|
||||||
|
|
||||||
double lam3[3];
|
double lam3[3];
|
||||||
@ -1111,7 +1111,7 @@ namespace netgen
|
|||||||
int * const indices, int numind) const
|
int * const indices, int numind) const
|
||||||
|
|
||||||
{
|
{
|
||||||
Array<int> dummy(numind);
|
NgArray<int> dummy(numind);
|
||||||
for (int i = 0; i < numind; i++) dummy[i] = indices[i]+1;
|
for (int i = 0; i < numind; i++) dummy[i] = indices[i]+1;
|
||||||
|
|
||||||
Point<3> p3d(p[0], p[1], p[2]);
|
Point<3> p3d(p[0], p[1], p[2]);
|
||||||
|
@ -53,7 +53,7 @@ namespace netgen
|
|||||||
string name;
|
string name;
|
||||||
string placement;
|
string placement;
|
||||||
string valuetype;
|
string valuetype;
|
||||||
Array<double> places;
|
NgArray<double> places;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ namespace netgen
|
|||||||
else if (token == "MATERIALS")
|
else if (token == "MATERIALS")
|
||||||
{
|
{
|
||||||
*testout << "parse materials" << endl;
|
*testout << "parse materials" << endl;
|
||||||
Array<double> young_modulus, poisson_ratio, mass_density;
|
NgArray<double> young_modulus, poisson_ratio, mass_density;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
@ -264,7 +264,7 @@ namespace netgen
|
|||||||
string propid;
|
string propid;
|
||||||
sbuf >> elnr >> def >> ch;
|
sbuf >> elnr >> def >> ch;
|
||||||
sbuf >> typid >> matid >> propid;
|
sbuf >> typid >> matid >> propid;
|
||||||
Array<int> pnums;
|
NgArray<int> pnums;
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
int pn;
|
int pn;
|
||||||
@ -305,7 +305,7 @@ namespace netgen
|
|||||||
sbuf >> nr >> kw >> ch;
|
sbuf >> nr >> kw >> ch;
|
||||||
if (kw == "NODES")
|
if (kw == "NODES")
|
||||||
{
|
{
|
||||||
Array<int> enums;
|
NgArray<int> enums;
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
int en;
|
int en;
|
||||||
@ -329,7 +329,7 @@ namespace netgen
|
|||||||
sbuf >> nr >> kw >> ch;
|
sbuf >> nr >> kw >> ch;
|
||||||
if (kw == "FACES")
|
if (kw == "FACES")
|
||||||
{
|
{
|
||||||
Array<int> fnums;
|
NgArray<int> fnums;
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
int fn;
|
int fn;
|
||||||
@ -375,7 +375,7 @@ namespace netgen
|
|||||||
|
|
||||||
else if (token == "LOADS")
|
else if (token == "LOADS")
|
||||||
{
|
{
|
||||||
Array<LoadType*> loadtypes;
|
NgArray<LoadType*> loadtypes;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
@ -49,17 +49,17 @@ namespace netgen
|
|||||||
Point3d p;
|
Point3d p;
|
||||||
int numObj3D,numObj2D,numObj1D,numObj0D;
|
int numObj3D,numObj2D,numObj1D,numObj0D;
|
||||||
// bool nullstarted;
|
// bool nullstarted;
|
||||||
Array<int> eldom;
|
NgArray<int> eldom;
|
||||||
int minId3D = -1, minId2D = -1;
|
int minId3D = -1, minId2D = -1;
|
||||||
int maxId3D(-1), maxId2D(-1), maxId1D(-1), maxId0D(-1);
|
int maxId3D(-1), maxId2D(-1), maxId1D(-1), maxId0D(-1);
|
||||||
Array<Array<int> *> segmentdata;
|
NgArray<NgArray<int> *> segmentdata;
|
||||||
Array<Element2d* > tris;
|
NgArray<Element2d* > tris;
|
||||||
|
|
||||||
Array<int> userdata_int; // just save data for 1:1 output
|
NgArray<int> userdata_int; // just save data for 1:1 output
|
||||||
Array<double> userdata_double;
|
NgArray<double> userdata_double;
|
||||||
Array<int> point_pids;
|
NgArray<int> point_pids;
|
||||||
Array<int> tetfacedata;
|
NgArray<int> tetfacedata;
|
||||||
Array<int> uid_to_group_3D, uid_to_group_2D, uid_to_group_1D, uid_to_group_0D;
|
NgArray<int> uid_to_group_3D, uid_to_group_2D, uid_to_group_1D, uid_to_group_0D;
|
||||||
|
|
||||||
while(!done)
|
while(!done)
|
||||||
{
|
{
|
||||||
@ -226,7 +226,7 @@ namespace netgen
|
|||||||
segmentdata.SetSize(nedges);
|
segmentdata.SetSize(nedges);
|
||||||
for(int i=0; i<nedges; i++)
|
for(int i=0; i<nedges; i++)
|
||||||
{
|
{
|
||||||
segmentdata[i] = new Array<int>(7);
|
segmentdata[i] = new NgArray<int>(7);
|
||||||
*segmentdata[i] = -1;
|
*segmentdata[i] = -1;
|
||||||
in >> dummyint;
|
in >> dummyint;
|
||||||
in >> (*segmentdata[i])[0] >> (*segmentdata[i])[1];
|
in >> (*segmentdata[i])[0] >> (*segmentdata[i])[1];
|
||||||
@ -350,8 +350,8 @@ namespace netgen
|
|||||||
for(int i=0; i<nperiodicmasterfaces; i++)
|
for(int i=0; i<nperiodicmasterfaces; i++)
|
||||||
{
|
{
|
||||||
int tri1,tri2,transl;
|
int tri1,tri2,transl;
|
||||||
Array<PointIndex> nodes1(3),nodes2(3);
|
NgArray<PointIndex> nodes1(3),nodes2(3);
|
||||||
Array<double> sortval1(3),sortval2(3);
|
NgArray<double> sortval1(3),sortval2(3);
|
||||||
in >> tri1 >> tri2 >> transl;
|
in >> tri1 >> tri2 >> transl;
|
||||||
|
|
||||||
if(transl > maxtransl)
|
if(transl > maxtransl)
|
||||||
@ -455,7 +455,7 @@ namespace netgen
|
|||||||
cout << endl;
|
cout << endl;
|
||||||
|
|
||||||
|
|
||||||
// Array<int> indextodescriptor(maxId2D+1);
|
// NgArray<int> indextodescriptor(maxId2D+1);
|
||||||
|
|
||||||
// for(int i=1; i<=mesh.GetNFD(); i++)
|
// for(int i=1; i<=mesh.GetNFD(); i++)
|
||||||
// indextodescriptor[mesh.GetFaceDescriptor(i).SurfNr()] = i;
|
// indextodescriptor[mesh.GetFaceDescriptor(i).SurfNr()] = i;
|
||||||
@ -538,7 +538,7 @@ namespace netgen
|
|||||||
case 27:
|
case 27:
|
||||||
// Object2D GroupID, #Faces <immediately followed by> FaceID List
|
// Object2D GroupID, #Faces <immediately followed by> FaceID List
|
||||||
{
|
{
|
||||||
Array<int> ports;
|
NgArray<int> ports;
|
||||||
//int totnum = 0;
|
//int totnum = 0;
|
||||||
uid_to_group_2D.SetSize(maxId2D+1);
|
uid_to_group_2D.SetSize(maxId2D+1);
|
||||||
uid_to_group_2D = -1;
|
uid_to_group_2D = -1;
|
||||||
@ -665,7 +665,7 @@ namespace netgen
|
|||||||
mesh.SetUserData("TETmesh:uid_to_group_0D",uid_to_group_0D);
|
mesh.SetUserData("TETmesh:uid_to_group_0D",uid_to_group_0D);
|
||||||
|
|
||||||
|
|
||||||
Array<SurfaceElementIndex> surfindices(tris.Size());
|
NgArray<SurfaceElementIndex> surfindices(tris.Size());
|
||||||
surfindices = -1;
|
surfindices = -1;
|
||||||
|
|
||||||
for(int i=0; i<tris.Size(); i++)
|
for(int i=0; i<tris.Size(); i++)
|
||||||
@ -740,7 +740,7 @@ namespace netgen
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Array<int> indextodescriptor(maxId2D+1);
|
// NgArray<int> indextodescriptor(maxId2D+1);
|
||||||
|
|
||||||
// for(int i=1; i<=mesh.GetNFD(); i++)
|
// for(int i=1; i<=mesh.GetNFD(); i++)
|
||||||
// indextodescriptor[mesh.GetFaceDescriptor(i).SurfNr()] = i;
|
// indextodescriptor[mesh.GetFaceDescriptor(i).SurfNr()] = i;
|
||||||
|
@ -99,7 +99,7 @@ namespace netgen
|
|||||||
// map from unv element nr to our element number + an index if it is vol (0), bnd(1), ...
|
// map from unv element nr to our element number + an index if it is vol (0), bnd(1), ...
|
||||||
std::map<size_t, std::tuple<size_t, int>> element_map;
|
std::map<size_t, std::tuple<size_t, int>> element_map;
|
||||||
|
|
||||||
Array<Segment> tmp_segments;
|
NgArray<Segment> tmp_segments;
|
||||||
while (in.good())
|
while (in.good())
|
||||||
{
|
{
|
||||||
in >> reco;
|
in >> reco;
|
||||||
@ -449,7 +449,7 @@ namespace netgen
|
|||||||
int bcprop;
|
int bcprop;
|
||||||
ifstream inpkt (pktfile.c_str());
|
ifstream inpkt (pktfile.c_str());
|
||||||
inpkt >> np;
|
inpkt >> np;
|
||||||
Array<double> values(np);
|
NgArray<double> values(np);
|
||||||
for (i = 1; i <= np; i++)
|
for (i = 1; i <= np; i++)
|
||||||
{
|
{
|
||||||
Point3d p(0,0,0);
|
Point3d p(0,0,0);
|
||||||
|
@ -39,11 +39,11 @@ namespace netgen
|
|||||||
|
|
||||||
// Global arrays used to maintain the owner, neighbour and face lists
|
// Global arrays used to maintain the owner, neighbour and face lists
|
||||||
// so that they are accessible across functions
|
// so that they are accessible across functions
|
||||||
static Array<int> owner_facelist;
|
static NgArray<int> owner_facelist;
|
||||||
static Array<int> owner_celllist;
|
static NgArray<int> owner_celllist;
|
||||||
static Array<int> neighbour_celllist;
|
static NgArray<int> neighbour_celllist;
|
||||||
static Array<int> surfelem_bclist;
|
static NgArray<int> surfelem_bclist;
|
||||||
static Array<INDEX_2> surfelem_lists;
|
static NgArray<INDEX_2> surfelem_lists;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -118,17 +118,17 @@ namespace netgen
|
|||||||
// Initialise arrays to zero if required
|
// Initialise arrays to zero if required
|
||||||
neighbour_celllist = 0;
|
neighbour_celllist = 0;
|
||||||
|
|
||||||
// Array used to keep track of Faces which have already been
|
// NgArray used to keep track of Faces which have already been
|
||||||
// processed and added to the Owner list... In addition, also the
|
// processed and added to the Owner list... In addition, also the
|
||||||
// location where the face appears in the Owner list is also stored
|
// location where the face appears in the Owner list is also stored
|
||||||
// to speed up creation of the Neighbour list
|
// to speed up creation of the Neighbour list
|
||||||
Array<int> ownerfaces(totfaces);
|
NgArray<int> ownerfaces(totfaces);
|
||||||
ownerfaces = 0;
|
ownerfaces = 0;
|
||||||
|
|
||||||
// Array to hold the set of local faces of each volume element
|
// NgArray to hold the set of local faces of each volume element
|
||||||
// while running through the set of volume elements
|
// while running through the set of volume elements
|
||||||
// NOTE: The size is set automatically by the Netgen topology function
|
// NOTE: The size is set automatically by the Netgen topology function
|
||||||
Array<int> locfaces;
|
NgArray<int> locfaces;
|
||||||
|
|
||||||
// Secondary indices used to independently advance the owner
|
// Secondary indices used to independently advance the owner
|
||||||
// and boundary condition arrays within the main loop
|
// and boundary condition arrays within the main loop
|
||||||
@ -383,9 +383,9 @@ namespace netgen
|
|||||||
|
|
||||||
*outfile << "(\n";
|
*outfile << "(\n";
|
||||||
|
|
||||||
// Array to hold the indices of the points of each face to
|
// NgArray to hold the indices of the points of each face to
|
||||||
// flip if required
|
// flip if required
|
||||||
Array<int> facepnts;
|
NgArray<int> facepnts;
|
||||||
|
|
||||||
// Write the faces in the order specified in the owners lists of the
|
// Write the faces in the order specified in the owners lists of the
|
||||||
// internal cells and the boundary cells
|
// internal cells and the boundary cells
|
||||||
@ -545,7 +545,7 @@ namespace netgen
|
|||||||
*outfile << "\n";
|
*outfile << "\n";
|
||||||
|
|
||||||
|
|
||||||
Array<INDEX_3> bcarray;
|
NgArray<INDEX_3> bcarray;
|
||||||
int ind = 1;
|
int ind = 1;
|
||||||
|
|
||||||
// Since the boundary conditions are already sorted in ascending
|
// Since the boundary conditions are already sorted in ascending
|
||||||
|
@ -139,7 +139,7 @@ void WriteAbaqusFormat (const Mesh & mesh,
|
|||||||
|
|
||||||
int masternode(0);
|
int masternode(0);
|
||||||
|
|
||||||
Array<INDEX_2> pairs;
|
NgArray<INDEX_2> pairs;
|
||||||
BitArray master(np), help(np);
|
BitArray master(np), help(np);
|
||||||
master.Set();
|
master.Set();
|
||||||
for (i = 1; i <= 3; i++)
|
for (i = 1; i <= 3; i++)
|
||||||
@ -158,7 +158,7 @@ void WriteAbaqusFormat (const Mesh & mesh,
|
|||||||
|
|
||||||
cout << "masternode = " << masternode << " = "
|
cout << "masternode = " << masternode << " = "
|
||||||
<< mesh.Point(masternode) << endl;
|
<< mesh.Point(masternode) << endl;
|
||||||
Array<int> slaves(3);
|
NgArray<int> slaves(3);
|
||||||
for (i = 1; i <= 3; i++)
|
for (i = 1; i <= 3; i++)
|
||||||
{
|
{
|
||||||
mesh.GetIdentifications().GetPairs (i, pairs);
|
mesh.GetIdentifications().GetPairs (i, pairs);
|
||||||
|
@ -39,8 +39,8 @@ void WriteDiffPackFormat (const Mesh & mesh,
|
|||||||
int np = mesh.GetNP();
|
int np = mesh.GetNP();
|
||||||
int ne = mesh.GetNE();
|
int ne = mesh.GetNE();
|
||||||
int nse = mesh.GetNSE();
|
int nse = mesh.GetNSE();
|
||||||
Array <int> BIname;
|
NgArray <int> BIname;
|
||||||
Array <int> BCsinpoint;
|
NgArray <int> BCsinpoint;
|
||||||
int i, j, k, l;
|
int i, j, k, l;
|
||||||
|
|
||||||
|
|
||||||
@ -203,8 +203,8 @@ void WriteDiffPackFormat (const Mesh & mesh,
|
|||||||
int np = mesh.GetNP();
|
int np = mesh.GetNP();
|
||||||
//int ne = mesh.GetNE();
|
//int ne = mesh.GetNE();
|
||||||
int nse = mesh.GetNSE();
|
int nse = mesh.GetNSE();
|
||||||
Array <int> BIname;
|
NgArray <int> BIname;
|
||||||
Array <int> BCsinpoint;
|
NgArray <int> BCsinpoint;
|
||||||
int i, j, k, l;
|
int i, j, k, l;
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,9 +65,9 @@ void WriteFluentFormat (const Mesh & mesh,
|
|||||||
|
|
||||||
Element2d face, face2;
|
Element2d face, face2;
|
||||||
int i2, j2;
|
int i2, j2;
|
||||||
Array<INDEX_3> surfaceelp;
|
NgArray<INDEX_3> surfaceelp;
|
||||||
Array<int> surfaceeli;
|
NgArray<int> surfaceeli;
|
||||||
Array<int> locels;
|
NgArray<int> locels;
|
||||||
|
|
||||||
//no cells=no tets
|
//no cells=no tets
|
||||||
//no faces=2*tets
|
//no faces=2*tets
|
||||||
|
@ -33,7 +33,7 @@ void WriteJCMFormat (const Mesh & mesh,
|
|||||||
int np = mesh.GetNP();
|
int np = mesh.GetNP();
|
||||||
|
|
||||||
// Identic points
|
// Identic points
|
||||||
Array<int,PointIndex::BASE> identmap1, identmap2, identmap3;
|
NgArray<int,PointIndex::BASE> identmap1, identmap2, identmap3;
|
||||||
mesh.GetIdentifications().GetMap(1, identmap1);
|
mesh.GetIdentifications().GetMap(1, identmap1);
|
||||||
mesh.GetIdentifications().GetMap(2, identmap2);
|
mesh.GetIdentifications().GetMap(2, identmap2);
|
||||||
mesh.GetIdentifications().GetMap(3, identmap3);
|
mesh.GetIdentifications().GetMap(3, identmap3);
|
||||||
@ -95,7 +95,7 @@ void WriteJCMFormat (const Mesh & mesh,
|
|||||||
int nbquad = 0;
|
int nbquad = 0;
|
||||||
// array with 1 if point on any tetra, 0 else
|
// array with 1 if point on any tetra, 0 else
|
||||||
// this is needed in order to arrange the prism points in the right order
|
// this is needed in order to arrange the prism points in the right order
|
||||||
Array<int,1> pointsOnTetras;
|
NgArray<int,1> pointsOnTetras;
|
||||||
pointsOnTetras.SetSize (mesh.GetNP());
|
pointsOnTetras.SetSize (mesh.GetNP());
|
||||||
pointsOnTetras = 0;
|
pointsOnTetras = 0;
|
||||||
for (i = 1; i <= ne; i++)
|
for (i = 1; i <= ne; i++)
|
||||||
|
@ -27,7 +27,7 @@ void WriteTecPlotFormat (const Mesh & mesh,
|
|||||||
INDEX ne = mesh.GetNE();
|
INDEX ne = mesh.GetNE();
|
||||||
INDEX nse = mesh.GetNSE();
|
INDEX nse = mesh.GetNSE();
|
||||||
|
|
||||||
Array<int> sn(np);
|
NgArray<int> sn(np);
|
||||||
ofstream outfile(filename.c_str());
|
ofstream outfile(filename.c_str());
|
||||||
|
|
||||||
outfile << "TITLE=\" " << filename << "\"" << endl;
|
outfile << "TITLE=\" " << filename << "\"" << endl;
|
||||||
|
@ -23,16 +23,16 @@ namespace netgen
|
|||||||
cout << "starting .tet export to file " << filename << endl;
|
cout << "starting .tet export to file " << filename << endl;
|
||||||
|
|
||||||
|
|
||||||
Array<int> point_ids,edge_ids,face_ids;
|
NgArray<int> point_ids,edge_ids,face_ids;
|
||||||
Array<int> elnum(mesh.GetNE());
|
NgArray<int> elnum(mesh.GetNE());
|
||||||
elnum = -1;
|
elnum = -1;
|
||||||
|
|
||||||
|
|
||||||
Array<int> userdata_int;
|
NgArray<int> userdata_int;
|
||||||
Array<double> userdata_double;
|
NgArray<double> userdata_double;
|
||||||
Array<int> ports;
|
NgArray<int> ports;
|
||||||
|
|
||||||
Array<int> uid_to_group_3D, uid_to_group_2D, uid_to_group_1D, uid_to_group_0D;
|
NgArray<int> uid_to_group_3D, uid_to_group_2D, uid_to_group_1D, uid_to_group_0D;
|
||||||
|
|
||||||
int pos_int = 0;
|
int pos_int = 0;
|
||||||
int pos_double = 0;
|
int pos_double = 0;
|
||||||
@ -98,9 +98,9 @@ namespace netgen
|
|||||||
INDEX_2_CLOSED_HASHTABLE<int> edgenumbers(6*mesh.GetNE()+3*mesh.GetNSE());;
|
INDEX_2_CLOSED_HASHTABLE<int> edgenumbers(6*mesh.GetNE()+3*mesh.GetNSE());;
|
||||||
INDEX_3_CLOSED_HASHTABLE<int> facenumbers(4*mesh.GetNE()+mesh.GetNSE());
|
INDEX_3_CLOSED_HASHTABLE<int> facenumbers(4*mesh.GetNE()+mesh.GetNSE());
|
||||||
|
|
||||||
Array<INDEX_2> edge2node;
|
NgArray<INDEX_2> edge2node;
|
||||||
Array<INDEX_3> face2edge;
|
NgArray<INDEX_3> face2edge;
|
||||||
Array<INDEX_4> element2face;
|
NgArray<INDEX_4> element2face;
|
||||||
|
|
||||||
int numelems(0),numfaces(0),numedges(0),numnodes(0);
|
int numelems(0),numfaces(0),numedges(0),numnodes(0);
|
||||||
|
|
||||||
@ -285,7 +285,7 @@ namespace netgen
|
|||||||
int numObj0D,numObj1D,numObj2D,numObj3D;
|
int numObj0D,numObj1D,numObj2D,numObj3D;
|
||||||
int numports = ports.Size();
|
int numports = ports.Size();
|
||||||
|
|
||||||
Array<int> nodenum(point_ids.Size()+1);
|
NgArray<int> nodenum(point_ids.Size()+1);
|
||||||
|
|
||||||
nodenum = -1;
|
nodenum = -1;
|
||||||
|
|
||||||
@ -367,18 +367,18 @@ namespace netgen
|
|||||||
uidpid = "UID";
|
uidpid = "UID";
|
||||||
|
|
||||||
|
|
||||||
Array< Array<int,PointIndex::BASE>* > idmaps;
|
NgArray< NgArray<int,PointIndex::BASE>* > idmaps;
|
||||||
for(int i=1; i<=mesh.GetIdentifications().GetMaxNr(); i++)
|
for(int i=1; i<=mesh.GetIdentifications().GetMaxNr(); i++)
|
||||||
{
|
{
|
||||||
if(mesh.GetIdentifications().GetType(i) == Identifications::PERIODIC)
|
if(mesh.GetIdentifications().GetType(i) == Identifications::PERIODIC)
|
||||||
{
|
{
|
||||||
idmaps.Append(new Array<int,PointIndex::BASE>);
|
idmaps.Append(new NgArray<int,PointIndex::BASE>);
|
||||||
mesh.GetIdentifications().GetMap(i,*idmaps.Last(),true);
|
mesh.GetIdentifications().GetMap(i,*idmaps.Last(),true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Array<int> id_num,id_type;
|
NgArray<int> id_num,id_type;
|
||||||
Array< Array<int> *> id_groups;
|
NgArray< NgArray<int> *> id_groups;
|
||||||
|
|
||||||
|
|
||||||
// sst 2008-03-12: Write problem class...
|
// sst 2008-03-12: Write problem class...
|
||||||
@ -449,7 +449,7 @@ namespace netgen
|
|||||||
if(nodenum[i] == -1)
|
if(nodenum[i] == -1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Array<int> group;
|
NgArray<int> group;
|
||||||
group.Append(i);
|
group.Append(i);
|
||||||
for(int j=0; j<idmaps.Size(); j++)
|
for(int j=0; j<idmaps.Size(); j++)
|
||||||
{
|
{
|
||||||
@ -466,7 +466,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
if(group.Size() > 1)
|
if(group.Size() > 1)
|
||||||
{
|
{
|
||||||
id_groups.Append(new Array<int>(group));
|
id_groups.Append(new NgArray<int>(group));
|
||||||
if(group.Size() == 2)
|
if(group.Size() == 2)
|
||||||
{
|
{
|
||||||
id_type[i] = 1;
|
id_type[i] = 1;
|
||||||
@ -590,18 +590,18 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Array< Array<int>* > vertex_to_edge(mesh.GetNP()+1);
|
NgArray< NgArray<int>* > vertex_to_edge(mesh.GetNP()+1);
|
||||||
for(int i=0; i<=mesh.GetNP(); i++)
|
for(int i=0; i<=mesh.GetNP(); i++)
|
||||||
vertex_to_edge[i] = new Array<int>;
|
vertex_to_edge[i] = new NgArray<int>;
|
||||||
|
|
||||||
Array< Array<int,PointIndex::BASE>* > idmaps_edge(idmaps.Size());
|
NgArray< NgArray<int,PointIndex::BASE>* > idmaps_edge(idmaps.Size());
|
||||||
for(int i=0; i<idmaps_edge.Size(); i++)
|
for(int i=0; i<idmaps_edge.Size(); i++)
|
||||||
{
|
{
|
||||||
idmaps_edge[i] = new Array<int,PointIndex::BASE>(numedges);
|
idmaps_edge[i] = new NgArray<int,PointIndex::BASE>(numedges);
|
||||||
(*idmaps_edge[i]) = 0;
|
(*idmaps_edge[i]) = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Array<int> possible;
|
NgArray<int> possible;
|
||||||
for(int i=0; i<edge2node.Size(); i++)
|
for(int i=0; i<edge2node.Size(); i++)
|
||||||
{
|
{
|
||||||
const INDEX_2 & v = edge2node[i];
|
const INDEX_2 & v = edge2node[i];
|
||||||
@ -649,7 +649,7 @@ namespace netgen
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
||||||
Array<int> group;
|
NgArray<int> group;
|
||||||
group.Append(i);
|
group.Append(i);
|
||||||
for(int j=0; j<idmaps_edge.Size(); j++)
|
for(int j=0; j<idmaps_edge.Size(); j++)
|
||||||
{
|
{
|
||||||
@ -667,7 +667,7 @@ namespace netgen
|
|||||||
if(group.Size() > 1)
|
if(group.Size() > 1)
|
||||||
{
|
{
|
||||||
id_num[i] = 1;
|
id_num[i] = 1;
|
||||||
id_groups.Append(new Array<int>(group));
|
id_groups.Append(new NgArray<int>(group));
|
||||||
if(group.Size() == 2)
|
if(group.Size() == 2)
|
||||||
{
|
{
|
||||||
id_type[i] = 1;
|
id_type[i] = 1;
|
||||||
@ -701,7 +701,7 @@ namespace netgen
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
||||||
Array<int> group;
|
NgArray<int> group;
|
||||||
group.Append(i);
|
group.Append(i);
|
||||||
for(int j=0; j<idmaps_edge.Size(); j++)
|
for(int j=0; j<idmaps_edge.Size(); j++)
|
||||||
{
|
{
|
||||||
@ -719,7 +719,7 @@ namespace netgen
|
|||||||
if(group.Size() > 1)
|
if(group.Size() > 1)
|
||||||
{
|
{
|
||||||
id_num[i] = 1;
|
id_num[i] = 1;
|
||||||
id_groups.Append(new Array<int>(group));
|
id_groups.Append(new NgArray<int>(group));
|
||||||
if(group.Size() == 2)
|
if(group.Size() == 2)
|
||||||
{
|
{
|
||||||
id_type[i] = 1;
|
id_type[i] = 1;
|
||||||
@ -805,9 +805,9 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Array< Array<int>* > edge_to_face(numedges+1);
|
NgArray< NgArray<int>* > edge_to_face(numedges+1);
|
||||||
for(int i=0; i<edge_to_face.Size(); i++)
|
for(int i=0; i<edge_to_face.Size(); i++)
|
||||||
edge_to_face[i] = new Array<int>;
|
edge_to_face[i] = new NgArray<int>;
|
||||||
|
|
||||||
|
|
||||||
for(int i=0; i<idmaps.Size(); i++)
|
for(int i=0; i<idmaps.Size(); i++)
|
||||||
@ -864,7 +864,7 @@ namespace netgen
|
|||||||
if(id_num[i] != 0)
|
if(id_num[i] != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Array<int> group;
|
NgArray<int> group;
|
||||||
group.Append(i);
|
group.Append(i);
|
||||||
for(int j=0; j<idmaps.Size(); j++)
|
for(int j=0; j<idmaps.Size(); j++)
|
||||||
{
|
{
|
||||||
@ -882,7 +882,7 @@ namespace netgen
|
|||||||
if(group.Size() > 1)
|
if(group.Size() > 1)
|
||||||
{
|
{
|
||||||
id_num[i] = -1;
|
id_num[i] = -1;
|
||||||
id_groups.Append(new Array<int>(group));
|
id_groups.Append(new NgArray<int>(group));
|
||||||
if(group.Size() == 2)
|
if(group.Size() == 2)
|
||||||
n2++;
|
n2++;
|
||||||
else
|
else
|
||||||
@ -981,7 +981,7 @@ namespace netgen
|
|||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
|
|
||||||
Array< Array<int> * > groups;
|
NgArray< NgArray<int> * > groups;
|
||||||
|
|
||||||
int maxg = -1;
|
int maxg = -1;
|
||||||
for(int i = 0; i<uid_to_group_3D.Size(); i++)
|
for(int i = 0; i<uid_to_group_3D.Size(); i++)
|
||||||
@ -999,7 +999,7 @@ namespace netgen
|
|||||||
|
|
||||||
groups.SetSize(maxg+1);
|
groups.SetSize(maxg+1);
|
||||||
for(int i=0; i<groups.Size(); i++)
|
for(int i=0; i<groups.Size(); i++)
|
||||||
groups[i] = new Array<int>;
|
groups[i] = new NgArray<int>;
|
||||||
|
|
||||||
for(ElementIndex i=0; i<mesh.GetNE(); i++)
|
for(ElementIndex i=0; i<mesh.GetNE(); i++)
|
||||||
if(uid_to_group_3D[mesh[i].GetIndex()] >= 0)
|
if(uid_to_group_3D[mesh[i].GetIndex()] >= 0)
|
||||||
|
@ -18,8 +18,8 @@ namespace netgen
|
|||||||
extern MeshingParameters mparam;
|
extern MeshingParameters mparam;
|
||||||
|
|
||||||
|
|
||||||
void RegisterUserFormats (Array<const char*> & names,
|
void RegisterUserFormats (NgArray<const char*> & names,
|
||||||
Array<const char*> & extensions)
|
NgArray<const char*> & extensions)
|
||||||
|
|
||||||
{
|
{
|
||||||
const char *types[] =
|
const char *types[] =
|
||||||
@ -392,7 +392,7 @@ void WriteSTLExtFormat (const Mesh & mesh,
|
|||||||
|
|
||||||
int numBCs = 0;
|
int numBCs = 0;
|
||||||
|
|
||||||
Array<int> faceBCs;
|
NgArray<int> faceBCs;
|
||||||
TABLE<int> faceBCMapping;
|
TABLE<int> faceBCMapping;
|
||||||
|
|
||||||
faceBCs.SetSize(mesh.GetNFD());
|
faceBCs.SetSize(mesh.GetNFD());
|
||||||
@ -427,7 +427,7 @@ void WriteSTLExtFormat (const Mesh & mesh,
|
|||||||
|
|
||||||
for(int faceNr = 1;faceNr <= faceBCMapping.EntrySize(bcInd); faceNr++)
|
for(int faceNr = 1;faceNr <= faceBCMapping.EntrySize(bcInd); faceNr++)
|
||||||
{
|
{
|
||||||
Array<SurfaceElementIndex> faceSei;
|
NgArray<SurfaceElementIndex> faceSei;
|
||||||
mesh.GetSurfaceElementsOfFace(faceBCMapping.Get(bcInd,faceNr),faceSei);
|
mesh.GetSurfaceElementsOfFace(faceBCMapping.Get(bcInd,faceNr),faceSei);
|
||||||
|
|
||||||
for (int i = 0; i < faceSei.Size(); i++)
|
for (int i = 0; i < faceSei.Size(); i++)
|
||||||
@ -778,7 +778,7 @@ void WriteEdgeElementFormat (const Mesh & mesh,
|
|||||||
|
|
||||||
int inverttets = mparam.inverttets;
|
int inverttets = mparam.inverttets;
|
||||||
int invertsurf = mparam.inverttrigs;
|
int invertsurf = mparam.inverttrigs;
|
||||||
Array<int> edges;
|
NgArray<int> edges;
|
||||||
|
|
||||||
ofstream outfile (filename.c_str());
|
ofstream outfile (filename.c_str());
|
||||||
|
|
||||||
@ -935,7 +935,7 @@ void WriteFile (int typ,
|
|||||||
INDEX_2_HASHTABLE<int> edgeht(mesh.GetNP());
|
INDEX_2_HASHTABLE<int> edgeht(mesh.GetNP());
|
||||||
|
|
||||||
// list of edges
|
// list of edges
|
||||||
Array<INDEX_2> edgelist;
|
NgArray<INDEX_2> edgelist;
|
||||||
|
|
||||||
// edge (point) on boundary ?
|
// edge (point) on boundary ?
|
||||||
BitArray bedge, bpoint(mesh.GetNP());
|
BitArray bedge, bpoint(mesh.GetNP());
|
||||||
|
@ -154,8 +154,8 @@ void WriteDolfinFormat (const Mesh & mesh,
|
|||||||
const string & filename);
|
const string & filename);
|
||||||
|
|
||||||
|
|
||||||
extern void DLL_HEADER RegisterUserFormats (Array<const char*> & names,
|
extern void DLL_HEADER RegisterUserFormats (NgArray<const char*> & names,
|
||||||
Array<const char*> & extensions);
|
NgArray<const char*> & extensions);
|
||||||
|
|
||||||
|
|
||||||
extern bool DLL_HEADER WriteUserFormat (const string & format,
|
extern bool DLL_HEADER WriteUserFormat (const string & format,
|
||||||
|
@ -54,12 +54,12 @@ namespace netgen
|
|||||||
int p1, p2;
|
int p1, p2;
|
||||||
};
|
};
|
||||||
|
|
||||||
static Array<POINT3D> points;
|
static NgArray<POINT3D> points;
|
||||||
static Array<VOLELEMENT> volelements;
|
static NgArray<VOLELEMENT> volelements;
|
||||||
static Array<SURFELEMENT> surfelements;
|
static NgArray<SURFELEMENT> surfelements;
|
||||||
|
|
||||||
static Array<FACE> faces;
|
static NgArray<FACE> faces;
|
||||||
static Array<EDGE> edges;
|
static NgArray<EDGE> edges;
|
||||||
|
|
||||||
|
|
||||||
void ReadFile (char * filename)
|
void ReadFile (char * filename)
|
||||||
|
@ -427,7 +427,7 @@ namespace netgen
|
|||||||
double max, hr;
|
double max, hr;
|
||||||
|
|
||||||
|
|
||||||
Array<int> p(n); // pivot-permutation
|
NgArray<int> p(n); // pivot-permutation
|
||||||
Vector hv(n);
|
Vector hv(n);
|
||||||
|
|
||||||
|
|
||||||
@ -1154,7 +1154,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DenseMatrix :: MultElementMatrix (const Array<int> & pnum,
|
void DenseMatrix :: MultElementMatrix (const NgArray<int> & pnum,
|
||||||
const Vector & hx, Vector & hy)
|
const Vector & hx, Vector & hy)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
@ -1180,7 +1180,7 @@ namespace netgen
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DenseMatrix :: MultTransElementMatrix (const Array<int> & pnum,
|
void DenseMatrix :: MultTransElementMatrix (const NgArray<int> & pnum,
|
||||||
const Vector & hx, Vector & hy)
|
const Vector & hx, Vector & hy)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
@ -62,7 +62,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
void AdFront2 :: GetPoints (Array<Point<3> > & apoints) const
|
void AdFront2 :: GetPoints (NgArray<Point<3> > & apoints) const
|
||||||
{
|
{
|
||||||
apoints.Append (points);
|
apoints.Append (points);
|
||||||
// for (int i = 0; i < points.Size(); i++)
|
// for (int i = 0; i < points.Size(); i++)
|
||||||
@ -270,11 +270,11 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
int AdFront2 :: GetLocals (int baselineindex,
|
int AdFront2 :: GetLocals (int baselineindex,
|
||||||
Array<Point3d> & locpoints,
|
NgArray<Point3d> & locpoints,
|
||||||
Array<MultiPointGeomInfo> & pgeominfo,
|
NgArray<MultiPointGeomInfo> & pgeominfo,
|
||||||
Array<INDEX_2> & loclines, // local index
|
NgArray<INDEX_2> & loclines, // local index
|
||||||
Array<INDEX> & pindex,
|
NgArray<INDEX> & pindex,
|
||||||
Array<INDEX> & lindex,
|
NgArray<INDEX> & lindex,
|
||||||
double xh)
|
double xh)
|
||||||
{
|
{
|
||||||
static int timer = NgProfiler::CreateTimer ("adfront2::GetLocals");
|
static int timer = NgProfiler::CreateTimer ("adfront2::GetLocals");
|
||||||
@ -312,7 +312,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// static Array<int> invpindex;
|
// static NgArray<int> invpindex;
|
||||||
invpindex.SetSize (points.Size());
|
invpindex.SetSize (points.Size());
|
||||||
// invpindex = -1;
|
// invpindex = -1;
|
||||||
for (int i = 0; i < nearpoints.Size(); i++)
|
for (int i = 0; i < nearpoints.Size(); i++)
|
||||||
@ -498,7 +498,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool AdFront2 :: SameSide (const Point<2> & lp1, const Point<2> & lp2,
|
bool AdFront2 :: SameSide (const Point<2> & lp1, const Point<2> & lp2,
|
||||||
const Array<int> * testfaces) const
|
const NgArray<int> * testfaces) const
|
||||||
{
|
{
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
|
|
||||||
|
@ -165,21 +165,21 @@ class AdFront2
|
|||||||
{
|
{
|
||||||
|
|
||||||
///
|
///
|
||||||
Array<FrontPoint2> points; /// front points
|
NgArray<FrontPoint2> points; /// front points
|
||||||
Array<FrontLine> lines; /// front lines
|
NgArray<FrontLine> lines; /// front lines
|
||||||
|
|
||||||
Box3d boundingbox;
|
Box3d boundingbox;
|
||||||
BoxTree<3> linesearchtree; /// search tree for lines
|
BoxTree<3> linesearchtree; /// search tree for lines
|
||||||
Point3dTree pointsearchtree; /// search tree for points
|
Point3dTree pointsearchtree; /// search tree for points
|
||||||
Point3dTree cpointsearchtree; /// search tree for cone points (not used ???)
|
Point3dTree cpointsearchtree; /// search tree for cone points (not used ???)
|
||||||
|
|
||||||
Array<int> delpointl; /// list of deleted front points
|
NgArray<int> delpointl; /// list of deleted front points
|
||||||
Array<int> dellinel; /// list of deleted front lines
|
NgArray<int> dellinel; /// list of deleted front lines
|
||||||
|
|
||||||
int nfl; /// number of front lines;
|
int nfl; /// number of front lines;
|
||||||
INDEX_2_HASHTABLE<int> * allflines; /// all front lines ever have been
|
INDEX_2_HASHTABLE<int> * allflines; /// all front lines ever have been
|
||||||
|
|
||||||
Array<int> invpindex;
|
NgArray<int> invpindex;
|
||||||
|
|
||||||
int minval;
|
int minval;
|
||||||
int starti;
|
int starti;
|
||||||
@ -192,7 +192,7 @@ public:
|
|||||||
~AdFront2 ();
|
~AdFront2 ();
|
||||||
|
|
||||||
///
|
///
|
||||||
// void GetPoints (Array<Point<3> > & apoints) const;
|
// void GetPoints (NgArray<Point<3> > & apoints) const;
|
||||||
///
|
///
|
||||||
void Print (ostream & ost) const;
|
void Print (ostream & ost) const;
|
||||||
|
|
||||||
@ -216,11 +216,11 @@ public:
|
|||||||
|
|
||||||
///
|
///
|
||||||
int GetLocals (int baseline,
|
int GetLocals (int baseline,
|
||||||
Array<Point3d> & locpoints,
|
NgArray<Point3d> & locpoints,
|
||||||
Array<MultiPointGeomInfo> & pgeominfo,
|
NgArray<MultiPointGeomInfo> & pgeominfo,
|
||||||
Array<INDEX_2> & loclines, // local index
|
NgArray<INDEX_2> & loclines, // local index
|
||||||
Array<int> & pindex,
|
NgArray<int> & pindex,
|
||||||
Array<int> & lindex,
|
NgArray<int> & lindex,
|
||||||
double xh);
|
double xh);
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -262,7 +262,7 @@ public:
|
|||||||
bool Inside (const Point<2> & p) const;
|
bool Inside (const Point<2> & p) const;
|
||||||
|
|
||||||
bool SameSide (const Point<2> & lp1, const Point<2> & lp2,
|
bool SameSide (const Point<2> & lp1, const Point<2> & lp2,
|
||||||
const Array<int> * /* testfaces */ = NULL) const;
|
const NgArray<int> * /* testfaces */ = NULL) const;
|
||||||
/*
|
/*
|
||||||
{
|
{
|
||||||
return Inside (lp1) == Inside (lp2);
|
return Inside (lp1) == Inside (lp2);
|
||||||
|
@ -84,7 +84,7 @@ AdFront3 :: ~AdFront3 ()
|
|||||||
delete connectedpairs;
|
delete connectedpairs;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdFront3 :: GetPoints (Array<Point<3> > & apoints) const
|
void AdFront3 :: GetPoints (NgArray<Point<3> > & apoints) const
|
||||||
{
|
{
|
||||||
for (PointIndex pi = points.Begin(); pi < points.End(); pi++)
|
for (PointIndex pi = points.Begin(); pi < points.End(); pi++)
|
||||||
|
|
||||||
@ -267,7 +267,7 @@ void AdFront3 :: CreateTrees ()
|
|||||||
|
|
||||||
|
|
||||||
void AdFront3 :: GetIntersectingFaces (const Point<3> & pmin, const Point<3> & pmax,
|
void AdFront3 :: GetIntersectingFaces (const Point<3> & pmin, const Point<3> & pmax,
|
||||||
Array<int> & ifaces) const
|
NgArray<int> & ifaces) const
|
||||||
{
|
{
|
||||||
facetree -> GetIntersecting (pmin, pmax, ifaces);
|
facetree -> GetIntersecting (pmin, pmax, ifaces);
|
||||||
}
|
}
|
||||||
@ -357,7 +357,7 @@ void AdFront3 :: RebuildInternalTables ()
|
|||||||
if (usecl.Test(i))
|
if (usecl.Test(i))
|
||||||
cntcl++;
|
cntcl++;
|
||||||
|
|
||||||
Array<double, PointIndex::BASE> clvol (np);
|
NgArray<double, PointIndex::BASE> clvol (np);
|
||||||
clvol = 0.0;
|
clvol = 0.0;
|
||||||
|
|
||||||
for (int i = 1; i <= faces.Size(); i++)
|
for (int i = 1; i <= faces.Size(); i++)
|
||||||
@ -485,10 +485,10 @@ int AdFront3 :: SelectBaseElement ()
|
|||||||
|
|
||||||
|
|
||||||
int AdFront3 :: GetLocals (int fstind,
|
int AdFront3 :: GetLocals (int fstind,
|
||||||
Array<Point3d, PointIndex::BASE> & locpoints,
|
NgArray<Point3d, PointIndex::BASE> & locpoints,
|
||||||
Array<MiniElement2d> & locfaces, // local index
|
NgArray<MiniElement2d> & locfaces, // local index
|
||||||
Array<PointIndex, PointIndex::BASE> & pindex,
|
NgArray<PointIndex, PointIndex::BASE> & pindex,
|
||||||
Array<INDEX> & findex,
|
NgArray<INDEX> & findex,
|
||||||
INDEX_2_HASHTABLE<int> & getconnectedpairs,
|
INDEX_2_HASHTABLE<int> & getconnectedpairs,
|
||||||
float xh,
|
float xh,
|
||||||
float relh,
|
float relh,
|
||||||
@ -509,11 +509,11 @@ int AdFront3 :: GetLocals (int fstind,
|
|||||||
PointIndex pstind;
|
PointIndex pstind;
|
||||||
Point3d midp, p0;
|
Point3d midp, p0;
|
||||||
|
|
||||||
// static Array<int, PointIndex::BASE> invpindex;
|
// static NgArray<int, PointIndex::BASE> invpindex;
|
||||||
|
|
||||||
Array<MiniElement2d> locfaces2; //all local faces in radius xh
|
NgArray<MiniElement2d> locfaces2; //all local faces in radius xh
|
||||||
Array<int> locfaces3; // all faces in outer radius relh
|
NgArray<int> locfaces3; // all faces in outer radius relh
|
||||||
Array<INDEX> findex2;
|
NgArray<INDEX> findex2;
|
||||||
|
|
||||||
locfaces2.SetSize(0);
|
locfaces2.SetSize(0);
|
||||||
locfaces3.SetSize(0);
|
locfaces3.SetSize(0);
|
||||||
@ -657,12 +657,12 @@ int AdFront3 :: GetLocals (int fstind,
|
|||||||
|
|
||||||
// returns all points connected with fi
|
// returns all points connected with fi
|
||||||
void AdFront3 :: GetGroup (int fi,
|
void AdFront3 :: GetGroup (int fi,
|
||||||
Array<MeshPoint, PointIndex::BASE> & grouppoints,
|
NgArray<MeshPoint, PointIndex::BASE> & grouppoints,
|
||||||
Array<MiniElement2d> & groupelements,
|
NgArray<MiniElement2d> & groupelements,
|
||||||
Array<PointIndex, PointIndex::BASE> & pindex,
|
NgArray<PointIndex, PointIndex::BASE> & pindex,
|
||||||
Array<INDEX> & findex)
|
NgArray<INDEX> & findex)
|
||||||
{
|
{
|
||||||
// static Array<char> pingroup;
|
// static NgArray<char> pingroup;
|
||||||
int changed;
|
int changed;
|
||||||
|
|
||||||
pingroup.SetSize(points.Size());
|
pingroup.SetSize(points.Size());
|
||||||
@ -833,7 +833,7 @@ bool AdFront3 :: Inside (const Point<3> & p) const
|
|||||||
|
|
||||||
|
|
||||||
int AdFront3 :: SameSide (const Point<3> & lp1, const Point<3> & lp2,
|
int AdFront3 :: SameSide (const Point<3> & lp1, const Point<3> & lp2,
|
||||||
const Array<int> * testfaces) const
|
const NgArray<int> * testfaces) const
|
||||||
{
|
{
|
||||||
const Point<3> *line[2];
|
const Point<3> *line[2];
|
||||||
line[0] = &lp1;
|
line[0] = &lp1;
|
||||||
|
@ -176,11 +176,11 @@ public:
|
|||||||
class AdFront3
|
class AdFront3
|
||||||
{
|
{
|
||||||
///
|
///
|
||||||
Array<FrontPoint3, PointIndex::BASE, PointIndex> points;
|
NgArray<FrontPoint3, PointIndex::BASE, PointIndex> points;
|
||||||
///
|
///
|
||||||
Array<FrontFace> faces;
|
NgArray<FrontFace> faces;
|
||||||
///
|
///
|
||||||
Array<PointIndex> delpointl;
|
NgArray<PointIndex> delpointl;
|
||||||
|
|
||||||
/// which points are connected to pi ?
|
/// which points are connected to pi ?
|
||||||
TABLE<int, PointIndex::BASE> * connectedpairs;
|
TABLE<int, PointIndex::BASE> * connectedpairs;
|
||||||
@ -208,8 +208,8 @@ class AdFront3
|
|||||||
int lasti;
|
int lasti;
|
||||||
/// minimal selection-value of baseelements
|
/// minimal selection-value of baseelements
|
||||||
int minval;
|
int minval;
|
||||||
Array<PointIndex, PointIndex::BASE, PointIndex> invpindex;
|
NgArray<PointIndex, PointIndex::BASE, PointIndex> invpindex;
|
||||||
Array<char> pingroup;
|
NgArray<char> pingroup;
|
||||||
|
|
||||||
///
|
///
|
||||||
class BoxTree<3> * facetree;
|
class BoxTree<3> * facetree;
|
||||||
@ -220,7 +220,7 @@ public:
|
|||||||
///
|
///
|
||||||
~AdFront3 ();
|
~AdFront3 ();
|
||||||
///
|
///
|
||||||
void GetPoints (Array<Point<3> > & apoints) const;
|
void GetPoints (NgArray<Point<3> > & apoints) const;
|
||||||
///
|
///
|
||||||
int GetNP() const
|
int GetNP() const
|
||||||
{ return points.Size(); }
|
{ return points.Size(); }
|
||||||
@ -254,17 +254,17 @@ public:
|
|||||||
|
|
||||||
///
|
///
|
||||||
void GetIntersectingFaces (const Point<3> & pmin, const Point<3> & pmax,
|
void GetIntersectingFaces (const Point<3> & pmin, const Point<3> & pmax,
|
||||||
Array<int> & ifaces) const;
|
NgArray<int> & ifaces) const;
|
||||||
|
|
||||||
///
|
///
|
||||||
void GetFaceBoundingBox (int i, Box3d & box) const;
|
void GetFaceBoundingBox (int i, Box3d & box) const;
|
||||||
|
|
||||||
///
|
///
|
||||||
int GetLocals (int baseelement,
|
int GetLocals (int baseelement,
|
||||||
Array<Point3d, PointIndex::BASE> & locpoints,
|
NgArray<Point3d, PointIndex::BASE> & locpoints,
|
||||||
Array<MiniElement2d> & locfaces, // local index
|
NgArray<MiniElement2d> & locfaces, // local index
|
||||||
Array<PointIndex, PointIndex::BASE> & pindex,
|
NgArray<PointIndex, PointIndex::BASE> & pindex,
|
||||||
Array<INDEX> & findex,
|
NgArray<INDEX> & findex,
|
||||||
INDEX_2_HASHTABLE<int> & connectedpairs,
|
INDEX_2_HASHTABLE<int> & connectedpairs,
|
||||||
float xh,
|
float xh,
|
||||||
float relh,
|
float relh,
|
||||||
@ -272,10 +272,10 @@ public:
|
|||||||
|
|
||||||
///
|
///
|
||||||
void GetGroup (int fi,
|
void GetGroup (int fi,
|
||||||
Array<MeshPoint, PointIndex::BASE> & grouppoints,
|
NgArray<MeshPoint, PointIndex::BASE> & grouppoints,
|
||||||
Array<MiniElement2d> & groupelements,
|
NgArray<MiniElement2d> & groupelements,
|
||||||
Array<PointIndex, PointIndex::BASE> & pindex,
|
NgArray<PointIndex, PointIndex::BASE> & pindex,
|
||||||
Array<INDEX> & findex);
|
NgArray<INDEX> & findex);
|
||||||
|
|
||||||
///
|
///
|
||||||
void DeleteFace (INDEX fi);
|
void DeleteFace (INDEX fi);
|
||||||
@ -300,7 +300,7 @@ public:
|
|||||||
bool Inside (const Point<3> & p) const;
|
bool Inside (const Point<3> & p) const;
|
||||||
/// both points on same side ?
|
/// both points on same side ?
|
||||||
int SameSide (const Point<3> & lp1, const Point<3> & lp2,
|
int SameSide (const Point<3> & lp1, const Point<3> & lp2,
|
||||||
const Array<int> * testfaces = NULL) const;
|
const NgArray<int> * testfaces = NULL) const;
|
||||||
|
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -5,7 +5,7 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
|
|
||||||
DLL_HEADER GeometryRegisterArray geometryregister;
|
DLL_HEADER GeometryRegisterArray geometryregister;
|
||||||
//DLL_HEADER Array<GeometryRegister*> geometryregister;
|
//DLL_HEADER NgArray<GeometryRegister*> geometryregister;
|
||||||
|
|
||||||
GeometryRegister :: ~GeometryRegister()
|
GeometryRegister :: ~GeometryRegister()
|
||||||
{ ; }
|
{ ; }
|
||||||
|
@ -44,7 +44,7 @@ namespace netgen
|
|||||||
virtual void SetParameters (Tcl_Interp * /* interp */) { ; }
|
virtual void SetParameters (Tcl_Interp * /* interp */) { ; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class DLL_HEADER GeometryRegisterArray : public Array<GeometryRegister*>
|
class DLL_HEADER GeometryRegisterArray : public NgArray<GeometryRegister*>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~GeometryRegisterArray()
|
virtual ~GeometryRegisterArray()
|
||||||
@ -56,7 +56,7 @@ namespace netgen
|
|||||||
virtual shared_ptr<NetgenGeometry> LoadFromMeshFile (istream & ist) const;
|
virtual shared_ptr<NetgenGeometry> LoadFromMeshFile (istream & ist) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
// extern DLL_HEADER Array<GeometryRegister*> geometryregister;
|
// extern DLL_HEADER NgArray<GeometryRegister*> geometryregister;
|
||||||
extern DLL_HEADER GeometryRegisterArray geometryregister;
|
extern DLL_HEADER GeometryRegisterArray geometryregister;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ namespace netgen
|
|||||||
Function to create a list of all the unique colours
|
Function to create a list of all the unique colours
|
||||||
available in a given mesh
|
available in a given mesh
|
||||||
*/
|
*/
|
||||||
void GetFaceColours(Mesh & mesh, Array<Vec3d> & face_colours)
|
void GetFaceColours(Mesh & mesh, NgArray<Vec3d> & face_colours)
|
||||||
{
|
{
|
||||||
face_colours.SetSize(1);
|
face_colours.SetSize(1);
|
||||||
face_colours.Elem(1) = mesh.GetFaceDescriptor(1).SurfColour();
|
face_colours.Elem(1) = mesh.GetFaceDescriptor(1).SurfColour();
|
||||||
@ -143,9 +143,9 @@ namespace netgen
|
|||||||
|
|
||||||
// Arrays to hold the specified RGB colour triplets as well
|
// Arrays to hold the specified RGB colour triplets as well
|
||||||
// as the associated boundary condition number
|
// as the associated boundary condition number
|
||||||
Array<Vec3d> bc_colours(numentries);
|
NgArray<Vec3d> bc_colours(numentries);
|
||||||
Array<int> bc_num(numentries);
|
NgArray<int> bc_num(numentries);
|
||||||
Array<bool> bc_used(numentries);
|
NgArray<bool> bc_used(numentries);
|
||||||
|
|
||||||
// Actually read in the data from the file
|
// Actually read in the data from the file
|
||||||
for(int i = 1; i <= numentries; i++)
|
for(int i = 1; i <= numentries; i++)
|
||||||
@ -198,7 +198,7 @@ namespace netgen
|
|||||||
|
|
||||||
PrintMessage(3, "Highest boundary number in list = ",max_bcnum);
|
PrintMessage(3, "Highest boundary number in list = ",max_bcnum);
|
||||||
|
|
||||||
Array<Vec3d> all_colours;
|
NgArray<Vec3d> all_colours;
|
||||||
|
|
||||||
// Extract all the colours to see how many there are
|
// Extract all the colours to see how many there are
|
||||||
GetFaceColours(mesh,all_colours);
|
GetFaceColours(mesh,all_colours);
|
||||||
@ -290,9 +290,9 @@ namespace netgen
|
|||||||
*/
|
*/
|
||||||
void AutoColourAlg_Sorted(Mesh & mesh)
|
void AutoColourAlg_Sorted(Mesh & mesh)
|
||||||
{
|
{
|
||||||
Array<Vec3d> all_colours;
|
NgArray<Vec3d> all_colours;
|
||||||
Array<int> faces_sorted;
|
NgArray<int> faces_sorted;
|
||||||
Array<int> colours_sorted;
|
NgArray<int> colours_sorted;
|
||||||
|
|
||||||
// Extract all the colours to see how many there are
|
// Extract all the colours to see how many there are
|
||||||
GetFaceColours(mesh,all_colours);
|
GetFaceColours(mesh,all_colours);
|
||||||
@ -322,7 +322,7 @@ namespace netgen
|
|||||||
colours_sorted.SetSize(all_colours.Size()+1);
|
colours_sorted.SetSize(all_colours.Size()+1);
|
||||||
faces_sorted = 0;
|
faces_sorted = 0;
|
||||||
|
|
||||||
// Slave Array to identify the colours the faces were assigned to,
|
// Slave NgArray to identify the colours the faces were assigned to,
|
||||||
// after the bubble sort routine to sort the automatic boundary
|
// after the bubble sort routine to sort the automatic boundary
|
||||||
// identifiers according to the number of surface mesh elements
|
// identifiers according to the number of surface mesh elements
|
||||||
// of a given colour
|
// of a given colour
|
||||||
@ -342,7 +342,7 @@ namespace netgen
|
|||||||
// And save this number into an array for later sorting
|
// And save this number into an array for later sorting
|
||||||
for(int face_index = 1; face_index <= nfd; face_index++)
|
for(int face_index = 1; face_index <= nfd; face_index++)
|
||||||
{
|
{
|
||||||
Array<SurfaceElementIndex> se_face;
|
NgArray<SurfaceElementIndex> se_face;
|
||||||
|
|
||||||
mesh.GetSurfaceElementsOfFace(face_index, se_face);
|
mesh.GetSurfaceElementsOfFace(face_index, se_face);
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ namespace netgen
|
|||||||
//extern void OCCAutoColourBcProps(Mesh & mesh, OCCGeometry & occgeometry, const char *occcolourfile);
|
//extern void OCCAutoColourBcProps(Mesh & mesh, OCCGeometry & occgeometry, const char *occcolourfile);
|
||||||
extern DLL_HEADER void AutoColourBcProps(Mesh & mesh, const char *bccolourfile);
|
extern DLL_HEADER void AutoColourBcProps(Mesh & mesh, const char *bccolourfile);
|
||||||
|
|
||||||
extern DLL_HEADER void GetFaceColours(Mesh & mesh, Array<Vec3d> & face_colours);
|
extern DLL_HEADER void GetFaceColours(Mesh & mesh, NgArray<Vec3d> & face_colours);
|
||||||
|
|
||||||
extern DLL_HEADER bool ColourMatch(Vec3d col1, Vec3d col2, double eps = 2.5e-05);
|
extern DLL_HEADER bool ColourMatch(Vec3d col1, Vec3d col2, double eps = 2.5e-05);
|
||||||
}
|
}
|
||||||
|
@ -12,11 +12,11 @@ namespace netgen
|
|||||||
class MarkedTri;
|
class MarkedTri;
|
||||||
class MarkedQuad;
|
class MarkedQuad;
|
||||||
|
|
||||||
typedef Array<MarkedTet> T_MTETS;
|
typedef NgArray<MarkedTet> T_MTETS;
|
||||||
typedef Array<MarkedPrism> T_MPRISMS;
|
typedef NgArray<MarkedPrism> T_MPRISMS;
|
||||||
typedef Array<MarkedIdentification> T_MIDS;
|
typedef NgArray<MarkedIdentification> T_MIDS;
|
||||||
typedef Array<MarkedTri> T_MTRIS;
|
typedef NgArray<MarkedTri> T_MTRIS;
|
||||||
typedef Array<MarkedQuad> T_MQUADS;
|
typedef NgArray<MarkedQuad> T_MQUADS;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -303,7 +303,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
int BTSortEdges (const Mesh & mesh,
|
int BTSortEdges (const Mesh & mesh,
|
||||||
const Array< Array<int,PointIndex::BASE>* > & idmaps,
|
const NgArray< NgArray<int,PointIndex::BASE>* > & idmaps,
|
||||||
INDEX_2_CLOSED_HASHTABLE<int> & edgenumber)
|
INDEX_2_CLOSED_HASHTABLE<int> & edgenumber)
|
||||||
{
|
{
|
||||||
PrintMessage(4,"sorting ... ");
|
PrintMessage(4,"sorting ... ");
|
||||||
@ -313,8 +313,8 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
// new, fast version
|
// new, fast version
|
||||||
|
|
||||||
Array<INDEX_2> edges;
|
NgArray<INDEX_2> edges;
|
||||||
Array<int> eclasses;
|
NgArray<int> eclasses;
|
||||||
|
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
int cntedges = 0;
|
int cntedges = 0;
|
||||||
@ -585,7 +585,7 @@ namespace netgen
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// compute classlength:
|
// compute classlength:
|
||||||
Array<double> edgelength(cntedges);
|
NgArray<double> edgelength(cntedges);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
for (i = 1; i <= cntedges; i++)
|
for (i = 1; i <= cntedges; i++)
|
||||||
@ -676,7 +676,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
// sort edges:
|
// sort edges:
|
||||||
Array<int> sorted(cntedges);
|
NgArray<int> sorted(cntedges);
|
||||||
|
|
||||||
QuickSort (edgelength, sorted);
|
QuickSort (edgelength, sorted);
|
||||||
|
|
||||||
@ -974,7 +974,7 @@ namespace netgen
|
|||||||
|
|
||||||
bool BTDefineMarkedId(const Element2d & el,
|
bool BTDefineMarkedId(const Element2d & el,
|
||||||
INDEX_2_CLOSED_HASHTABLE<int> & edgenumber,
|
INDEX_2_CLOSED_HASHTABLE<int> & edgenumber,
|
||||||
const Array<int,PointIndex::BASE> & idmap,
|
const NgArray<int,PointIndex::BASE> & idmap,
|
||||||
MarkedIdentification & mi)
|
MarkedIdentification & mi)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1392,7 +1392,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
void BTBisectIdentification (const MarkedIdentification & oldid,
|
void BTBisectIdentification (const MarkedIdentification & oldid,
|
||||||
Array<PointIndex> & newp,
|
NgArray<PointIndex> & newp,
|
||||||
MarkedIdentification & newid1,
|
MarkedIdentification & newid1,
|
||||||
MarkedIdentification & newid2)
|
MarkedIdentification & newid2)
|
||||||
{
|
{
|
||||||
@ -1626,10 +1626,10 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
int i,j,k;
|
int i,j,k;
|
||||||
|
|
||||||
Array< Array<int,PointIndex::BASE>* > idmaps;
|
NgArray< NgArray<int,PointIndex::BASE>* > idmaps;
|
||||||
for(i=1; i<=mesh.GetIdentifications().GetMaxNr(); i++)
|
for(i=1; i<=mesh.GetIdentifications().GetMaxNr(); i++)
|
||||||
{
|
{
|
||||||
idmaps.Append(new Array<int,PointIndex::BASE>);
|
idmaps.Append(new NgArray<int,PointIndex::BASE>);
|
||||||
mesh.GetIdentifications().GetMap(i,*idmaps.Last());
|
mesh.GetIdentifications().GetMap(i,*idmaps.Last());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1847,7 +1847,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
void ConnectToNodeRec (int node, int tonode,
|
void ConnectToNodeRec (int node, int tonode,
|
||||||
const TABLE<int> & conto, Array<int> & connecttonode)
|
const TABLE<int> & conto, NgArray<int> & connecttonode)
|
||||||
{
|
{
|
||||||
// (*testout) << "connect " << node << " to " << tonode << endl;
|
// (*testout) << "connect " << node << " to " << tonode << endl;
|
||||||
for (int i = 1; i <= conto.EntrySize(node); i++)
|
for (int i = 1; i <= conto.EntrySize(node); i++)
|
||||||
@ -1955,7 +1955,7 @@ namespace netgen
|
|||||||
|
|
||||||
void BisectTetsCopyMesh (Mesh & mesh, const NetgenGeometry *,
|
void BisectTetsCopyMesh (Mesh & mesh, const NetgenGeometry *,
|
||||||
BisectionOptions & opt,
|
BisectionOptions & opt,
|
||||||
const Array< Array<int,PointIndex::BASE>* > & idmaps,
|
const NgArray< NgArray<int,PointIndex::BASE>* > & idmaps,
|
||||||
const string & refinfofile)
|
const string & refinfofile)
|
||||||
{
|
{
|
||||||
// mtets.SetName ("bisection, tets");
|
// mtets.SetName ("bisection, tets");
|
||||||
@ -2201,24 +2201,24 @@ namespace netgen
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
void UpdateEdgeMarks2(Mesh & mesh,
|
void UpdateEdgeMarks2(Mesh & mesh,
|
||||||
const Array< Array<int,PointIndex::BASE>* > & idmaps)
|
const NgArray< NgArray<int,PointIndex::BASE>* > & idmaps)
|
||||||
{
|
{
|
||||||
Array< Array<MarkedTet>*,PointIndex::BASE > mtets_old(mesh.GetNP());
|
NgArray< NgArray<MarkedTet>*,PointIndex::BASE > mtets_old(mesh.GetNP());
|
||||||
Array< Array<MarkedPrism>*,PointIndex::BASE > mprisms_old(mesh.GetNP());
|
NgArray< NgArray<MarkedPrism>*,PointIndex::BASE > mprisms_old(mesh.GetNP());
|
||||||
Array< Array<MarkedIdentification>*,PointIndex::BASE > mids_old(mesh.GetNP());
|
NgArray< NgArray<MarkedIdentification>*,PointIndex::BASE > mids_old(mesh.GetNP());
|
||||||
Array< Array<MarkedTri>*,PointIndex::BASE > mtris_old(mesh.GetNP());
|
NgArray< NgArray<MarkedTri>*,PointIndex::BASE > mtris_old(mesh.GetNP());
|
||||||
Array< Array<MarkedQuad>*,PointIndex::BASE > mquads_old(mesh.GetNP());
|
NgArray< NgArray<MarkedQuad>*,PointIndex::BASE > mquads_old(mesh.GetNP());
|
||||||
|
|
||||||
for(int i=PointIndex::BASE; i<mesh.GetNP()+PointIndex::BASE; i++)
|
for(int i=PointIndex::BASE; i<mesh.GetNP()+PointIndex::BASE; i++)
|
||||||
mtets_old[i] = new Array<MarkedTet>;
|
mtets_old[i] = new NgArray<MarkedTet>;
|
||||||
for(int i=PointIndex::BASE; i<mesh.GetNP()+PointIndex::BASE; i++)
|
for(int i=PointIndex::BASE; i<mesh.GetNP()+PointIndex::BASE; i++)
|
||||||
mprisms_old[i] = new Array<MarkedPrism>;
|
mprisms_old[i] = new NgArray<MarkedPrism>;
|
||||||
for(int i=PointIndex::BASE; i<mesh.GetNP()+PointIndex::BASE; i++)
|
for(int i=PointIndex::BASE; i<mesh.GetNP()+PointIndex::BASE; i++)
|
||||||
mids_old[i] = new Array<MarkedIdentification>;
|
mids_old[i] = new NgArray<MarkedIdentification>;
|
||||||
for(int i=PointIndex::BASE; i<mesh.GetNP()+PointIndex::BASE; i++)
|
for(int i=PointIndex::BASE; i<mesh.GetNP()+PointIndex::BASE; i++)
|
||||||
mtris_old[i] = new Array<MarkedTri>;
|
mtris_old[i] = new NgArray<MarkedTri>;
|
||||||
for(int i=PointIndex::BASE; i<mesh.GetNP()+PointIndex::BASE; i++)
|
for(int i=PointIndex::BASE; i<mesh.GetNP()+PointIndex::BASE; i++)
|
||||||
mquads_old[i] = new Array<MarkedQuad>;
|
mquads_old[i] = new NgArray<MarkedQuad>;
|
||||||
|
|
||||||
for(int i=0; i<mtets.Size(); i++)
|
for(int i=0; i<mtets.Size(); i++)
|
||||||
mtets_old[mtets[i].pnums[0]]->Append(mtets[i]);
|
mtets_old[mtets[i].pnums[0]]->Append(mtets[i]);
|
||||||
@ -2454,11 +2454,11 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
void UpdateEdgeMarks (Mesh & mesh,
|
void UpdateEdgeMarks (Mesh & mesh,
|
||||||
const Array< Array<int,PointIndex::BASE>* > & idmaps)
|
const NgArray< NgArray<int,PointIndex::BASE>* > & idmaps)
|
||||||
//const Array < Array<Element>* > & elements_before,
|
//const NgArray < NgArray<Element>* > & elements_before,
|
||||||
//const Array < Array<int>* > & markedelts_num,
|
//const NgArray < NgArray<int>* > & markedelts_num,
|
||||||
// const Array < Array<Element2d>* > & surfelements_before,
|
// const NgArray < NgArray<Element2d>* > & surfelements_before,
|
||||||
// const Array < Array<int>* > & markedsurfelts_num)
|
// const NgArray < NgArray<int>* > & markedsurfelts_num)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
T_MTETS mtets_old; mtets_old.Copy(mtets);
|
T_MTETS mtets_old; mtets_old.Copy(mtets);
|
||||||
@ -2687,7 +2687,7 @@ namespace netgen
|
|||||||
|
|
||||||
void Refinement :: Bisect (Mesh & mesh,
|
void Refinement :: Bisect (Mesh & mesh,
|
||||||
BisectionOptions & opt,
|
BisectionOptions & opt,
|
||||||
Array<double> * quality_loss) const
|
NgArray<double> * quality_loss) const
|
||||||
{
|
{
|
||||||
PrintMessage(1,"Mesh bisection");
|
PrintMessage(1,"Mesh bisection");
|
||||||
PushStatus("Mesh bisection");
|
PushStatus("Mesh bisection");
|
||||||
@ -2717,12 +2717,12 @@ namespace netgen
|
|||||||
LocalizeEdgePoints(mesh);
|
LocalizeEdgePoints(mesh);
|
||||||
delete loct;
|
delete loct;
|
||||||
|
|
||||||
Array< Array<int,PointIndex::BASE>* > idmaps;
|
NgArray< NgArray<int,PointIndex::BASE>* > idmaps;
|
||||||
for(int i=1; i<=mesh.GetIdentifications().GetMaxNr(); i++)
|
for(int i=1; i<=mesh.GetIdentifications().GetMaxNr(); i++)
|
||||||
{
|
{
|
||||||
if(mesh.GetIdentifications().GetType(i) == Identifications::PERIODIC)
|
if(mesh.GetIdentifications().GetType(i) == Identifications::PERIODIC)
|
||||||
{
|
{
|
||||||
idmaps.Append(new Array<int,PointIndex::BASE>);
|
idmaps.Append(new NgArray<int,PointIndex::BASE>);
|
||||||
mesh.GetIdentifications().GetMap(i,*idmaps.Last(),true);
|
mesh.GetIdentifications().GetMap(i,*idmaps.Last(),true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2805,7 +2805,7 @@ namespace netgen
|
|||||||
|
|
||||||
#ifndef SABINE //Nachbarelemente mit ordx,ordy,ordz
|
#ifndef SABINE //Nachbarelemente mit ordx,ordy,ordz
|
||||||
|
|
||||||
Array<int,PointIndex::BASE> v_order (mesh.GetNP());
|
NgArray<int,PointIndex::BASE> v_order (mesh.GetNP());
|
||||||
v_order = 0;
|
v_order = 0;
|
||||||
|
|
||||||
for (ElementIndex ei = 0; ei < ne; ei++)
|
for (ElementIndex ei = 0; ei < ne; ei++)
|
||||||
@ -3181,7 +3181,7 @@ namespace netgen
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// vertices with 2 different bnds
|
// vertices with 2 different bnds
|
||||||
Array<int> bndind(np);
|
NgArray<int> bndind(np);
|
||||||
bndind = 0;
|
bndind = 0;
|
||||||
for (int i = 1; i <= mesh.GetNSeg(); i++)
|
for (int i = 1; i <= mesh.GetNSeg(); i++)
|
||||||
{
|
{
|
||||||
@ -3347,11 +3347,11 @@ namespace netgen
|
|||||||
if (mids.Elem(i).marked)
|
if (mids.Elem(i).marked)
|
||||||
{
|
{
|
||||||
MarkedIdentification oldid,newid1,newid2;
|
MarkedIdentification oldid,newid1,newid2;
|
||||||
Array<PointIndex> newp;
|
NgArray<PointIndex> newp;
|
||||||
|
|
||||||
oldid = mids.Get(i);
|
oldid = mids.Get(i);
|
||||||
|
|
||||||
Array<INDEX_2> edges;
|
NgArray<INDEX_2> edges;
|
||||||
edges.Append(INDEX_2(oldid.pnums[oldid.markededge],
|
edges.Append(INDEX_2(oldid.pnums[oldid.markededge],
|
||||||
oldid.pnums[(oldid.markededge+1)%oldid.np]));
|
oldid.pnums[(oldid.markededge+1)%oldid.np]));
|
||||||
edges.Append(INDEX_2(oldid.pnums[oldid.markededge + oldid.np],
|
edges.Append(INDEX_2(oldid.pnums[oldid.markededge + oldid.np],
|
||||||
@ -3617,7 +3617,7 @@ namespace netgen
|
|||||||
if (opt.refine_hp)
|
if (opt.refine_hp)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
Array<int> v_order (mesh.GetNP());
|
NgArray<int> v_order (mesh.GetNP());
|
||||||
v_order = 0;
|
v_order = 0;
|
||||||
if (mesh.GetDimension() == 3)
|
if (mesh.GetDimension() == 3)
|
||||||
{
|
{
|
||||||
@ -3917,7 +3917,7 @@ namespace netgen
|
|||||||
// update identification tables
|
// update identification tables
|
||||||
for (int i = 1; i <= mesh.GetIdentifications().GetMaxNr(); i++)
|
for (int i = 1; i <= mesh.GetIdentifications().GetMaxNr(); i++)
|
||||||
{
|
{
|
||||||
Array<int,PointIndex::BASE> identmap;
|
NgArray<int,PointIndex::BASE> identmap;
|
||||||
|
|
||||||
mesh.GetIdentifications().GetMap (i, identmap);
|
mesh.GetIdentifications().GetMap (i, identmap);
|
||||||
|
|
||||||
@ -3995,8 +3995,8 @@ namespace netgen
|
|||||||
NgProfiler::RegionTimer * regt(NULL);
|
NgProfiler::RegionTimer * regt(NULL);
|
||||||
regt = new NgProfiler::RegionTimer(reptimer);
|
regt = new NgProfiler::RegionTimer(reptimer);
|
||||||
|
|
||||||
Array<ElementIndex> bad_elts;
|
NgArray<ElementIndex> bad_elts;
|
||||||
Array<double> pure_badness;
|
NgArray<double> pure_badness;
|
||||||
|
|
||||||
if(do_repair || quality_loss != NULL)
|
if(do_repair || quality_loss != NULL)
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ public:
|
|||||||
|
|
||||||
void Refine (Mesh & mesh) const;
|
void Refine (Mesh & mesh) const;
|
||||||
void Refine (Mesh & mesh);
|
void Refine (Mesh & mesh);
|
||||||
void Bisect (Mesh & mesh, class BisectionOptions & opt, Array<double> * quality_loss = NULL) const;
|
void Bisect (Mesh & mesh, class BisectionOptions & opt, NgArray<double> * quality_loss = NULL) const;
|
||||||
|
|
||||||
void MakeSecondOrder (Mesh & mesh) const;
|
void MakeSecondOrder (Mesh & mesh) const;
|
||||||
void MakeSecondOrder (Mesh & mesh);
|
void MakeSecondOrder (Mesh & mesh);
|
||||||
@ -82,7 +82,7 @@ public:
|
|||||||
|
|
||||||
void ValidateSecondOrder (Mesh & mesh);
|
void ValidateSecondOrder (Mesh & mesh);
|
||||||
void ValidateRefinedMesh (Mesh & mesh,
|
void ValidateRefinedMesh (Mesh & mesh,
|
||||||
Array<INDEX_2> & parents);
|
NgArray<INDEX_2> & parents);
|
||||||
|
|
||||||
MeshOptimize2d * Get2dOptimizer(void) const
|
MeshOptimize2d * Get2dOptimizer(void) const
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,7 @@ namespace netgen
|
|||||||
cout << "Trigs: " << mesh.GetNSE() << endl;
|
cout << "Trigs: " << mesh.GetNSE() << endl;
|
||||||
|
|
||||||
BitArray bndnodes(np);
|
BitArray bndnodes(np);
|
||||||
Array<int> mapto(np);
|
NgArray<int> mapto(np);
|
||||||
|
|
||||||
bndnodes.Clear();
|
bndnodes.Clear();
|
||||||
for (i = 1; i <= mesh.GetNSeg(); i++)
|
for (i = 1; i <= mesh.GetNSeg(); i++)
|
||||||
@ -151,11 +151,11 @@ namespace netgen
|
|||||||
double angleThreshold = 5.0;
|
double angleThreshold = 5.0;
|
||||||
|
|
||||||
|
|
||||||
Array<int> surfid (blp.surfid);
|
NgArray<int> surfid (blp.surfid);
|
||||||
int prismlayers = blp.prismlayers;
|
int prismlayers = blp.prismlayers;
|
||||||
double hfirst = blp.hfirst;
|
double hfirst = blp.hfirst;
|
||||||
double growthfactor = blp.growthfactor;
|
double growthfactor = blp.growthfactor;
|
||||||
Array<double> heights (blp.heights);
|
NgArray<double> heights (blp.heights);
|
||||||
|
|
||||||
bool grow_edges = false; // grow layer at edges
|
bool grow_edges = false; // grow layer at edges
|
||||||
|
|
||||||
@ -213,11 +213,11 @@ namespace netgen
|
|||||||
BitArray bndnodes(np+1); // big enough for 1-based array
|
BitArray bndnodes(np+1); // big enough for 1-based array
|
||||||
|
|
||||||
// Map of the old points to the new points
|
// Map of the old points to the new points
|
||||||
Array<PointIndex, PointIndex::BASE> mapto(np);
|
NgArray<PointIndex, PointIndex::BASE> mapto(np);
|
||||||
|
|
||||||
// Growth vectors for the prismatic layer based on
|
// Growth vectors for the prismatic layer based on
|
||||||
// the effective surface normal at a given point
|
// the effective surface normal at a given point
|
||||||
Array<Vec3d, PointIndex::BASE> growthvectors(np);
|
NgArray<Vec3d, PointIndex::BASE> growthvectors(np);
|
||||||
|
|
||||||
// Bit array to identify all the points belonging
|
// Bit array to identify all the points belonging
|
||||||
// to the surface of interest
|
// to the surface of interest
|
||||||
@ -324,8 +324,8 @@ namespace netgen
|
|||||||
if(!surfid.Contains(mesh[sej].si))
|
if(!surfid.Contains(mesh[sej].si))
|
||||||
{
|
{
|
||||||
SurfaceElementIndex pnt_commelem = 0;
|
SurfaceElementIndex pnt_commelem = 0;
|
||||||
Array<SurfaceElementIndex> pnt1_elems;
|
NgArray<SurfaceElementIndex> pnt1_elems;
|
||||||
Array<SurfaceElementIndex> pnt2_elems;
|
NgArray<SurfaceElementIndex> pnt2_elems;
|
||||||
|
|
||||||
|
|
||||||
meshtopo.GetVertexSurfaceElements(segpair_p1,pnt1_elems);
|
meshtopo.GetVertexSurfaceElements(segpair_p1,pnt1_elems);
|
||||||
@ -583,7 +583,7 @@ namespace netgen
|
|||||||
|
|
||||||
for (int i = 1; i <= np; i++)
|
for (int i = 1; i <= np; i++)
|
||||||
{
|
{
|
||||||
Array<ElementIndex> vertelems;
|
NgArray<ElementIndex> vertelems;
|
||||||
|
|
||||||
if(bndnodes.Test(i))
|
if(bndnodes.Test(i))
|
||||||
{
|
{
|
||||||
|
@ -12,9 +12,9 @@ class BoundaryLayerParameters
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// parameters by Philippose ..
|
// parameters by Philippose ..
|
||||||
Array<int> surfid;
|
NgArray<int> surfid;
|
||||||
Array<double> heights;
|
NgArray<double> heights;
|
||||||
Array<double> new_matnrs;
|
NgArray<double> new_matnrs;
|
||||||
int prismlayers = 1;
|
int prismlayers = 1;
|
||||||
int bulk_matnr = 1;
|
int bulk_matnr = 1;
|
||||||
int new_matnr = 1;
|
int new_matnr = 1;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
HPREF_ELEMENT_TYPE ClassifyTet(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
HPREF_ELEMENT_TYPE ClassifyTet(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
||||||
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
||||||
INDEX_2_HASHTABLE<int> & surf_edges, Array<int, PointIndex::BASE> & facepoint)
|
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint)
|
||||||
{
|
{
|
||||||
int ep1(0), ep2(0), ep3(0), ep4(0), cp1(0), cp2(0), cp3(0), cp4(0), fp1, fp2, fp3, fp4;
|
int ep1(0), ep2(0), ep3(0), ep4(0), cp1(0), cp2(0), cp3(0), cp4(0), fp1, fp2, fp3, fp4;
|
||||||
int isedge1(0), isedge2(0), isedge3(0), isedge4(0), isedge5(0), isedge6(0);
|
int isedge1(0), isedge2(0), isedge3(0), isedge4(0), isedge5(0), isedge6(0);
|
||||||
@ -424,7 +424,7 @@ HPREF_ELEMENT_TYPE ClassifyTet(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges
|
|||||||
|
|
||||||
HPREF_ELEMENT_TYPE ClassifyPrism(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
HPREF_ELEMENT_TYPE ClassifyPrism(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
||||||
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
||||||
INDEX_2_HASHTABLE<int> & surf_edges, Array<int, PointIndex::BASE> & facepoint)
|
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint)
|
||||||
{
|
{
|
||||||
|
|
||||||
HPREF_ELEMENT_TYPE type = HP_NONE;
|
HPREF_ELEMENT_TYPE type = HP_NONE;
|
||||||
@ -661,7 +661,7 @@ HPREF_ELEMENT_TYPE ClassifyPrism(HPRefElement & el, INDEX_2_HASHTABLE<int> & edg
|
|||||||
// #ifdef SABINE
|
// #ifdef SABINE
|
||||||
HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
||||||
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
||||||
INDEX_2_HASHTABLE<int> & surf_edges, Array<int, PointIndex::BASE> & facepoint, int dim, const FaceDescriptor & fd)
|
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint, int dim, const FaceDescriptor & fd)
|
||||||
|
|
||||||
{
|
{
|
||||||
HPREF_ELEMENT_TYPE type = HP_NONE;
|
HPREF_ELEMENT_TYPE type = HP_NONE;
|
||||||
@ -876,7 +876,7 @@ HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE<int> & edge
|
|||||||
#ifdef HPREF_OLD
|
#ifdef HPREF_OLD
|
||||||
HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
||||||
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
||||||
INDEX_2_HASHTABLE<int> & surf_edges, Array<int, PointIndex::BASE> & facepoint, int dim, const FaceDescriptor & fd)
|
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint, int dim, const FaceDescriptor & fd)
|
||||||
{
|
{
|
||||||
HPREF_ELEMENT_TYPE type = HP_NONE;
|
HPREF_ELEMENT_TYPE type = HP_NONE;
|
||||||
|
|
||||||
@ -1137,7 +1137,7 @@ HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE<int> & edge
|
|||||||
#endif
|
#endif
|
||||||
HPREF_ELEMENT_TYPE ClassifyQuad(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
HPREF_ELEMENT_TYPE ClassifyQuad(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
||||||
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
||||||
INDEX_2_HASHTABLE<int> & surf_edges, Array<int, PointIndex::BASE> & facepoint, int dim, const FaceDescriptor & fd)
|
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint, int dim, const FaceDescriptor & fd)
|
||||||
{
|
{
|
||||||
HPREF_ELEMENT_TYPE type = HP_NONE;
|
HPREF_ELEMENT_TYPE type = HP_NONE;
|
||||||
|
|
||||||
@ -1487,7 +1487,7 @@ HPREF_ELEMENT_TYPE ClassifyQuad(HPRefElement & el, INDEX_2_HASHTABLE<int> & edge
|
|||||||
|
|
||||||
HPREF_ELEMENT_TYPE ClassifyHex(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
HPREF_ELEMENT_TYPE ClassifyHex(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
||||||
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
||||||
INDEX_2_HASHTABLE<int> & surf_edges, Array<int, PointIndex::BASE> & facepoint)
|
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint)
|
||||||
{
|
{
|
||||||
HPREF_ELEMENT_TYPE type = HP_NONE;
|
HPREF_ELEMENT_TYPE type = HP_NONE;
|
||||||
|
|
||||||
@ -1587,7 +1587,7 @@ HPREF_ELEMENT_TYPE ClassifyHex(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges
|
|||||||
|
|
||||||
HPREF_ELEMENT_TYPE ClassifySegm(HPRefElement & hpel, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
HPREF_ELEMENT_TYPE ClassifySegm(HPRefElement & hpel, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
||||||
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
||||||
INDEX_2_HASHTABLE<int> & surf_edges, Array<int, PointIndex::BASE> & facepoint)
|
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint)
|
||||||
{
|
{
|
||||||
|
|
||||||
int cp1 = cornerpoint.Test (hpel[0]);
|
int cp1 = cornerpoint.Test (hpel[0]);
|
||||||
@ -1630,7 +1630,7 @@ HPREF_ELEMENT_TYPE ClassifySegm(HPRefElement & hpel, INDEX_2_HASHTABLE<int> & ed
|
|||||||
|
|
||||||
HPREF_ELEMENT_TYPE ClassifyPyramid(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
HPREF_ELEMENT_TYPE ClassifyPyramid(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
||||||
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
||||||
INDEX_2_HASHTABLE<int> & surf_edges, Array<int, PointIndex::BASE> & facepoint)
|
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint)
|
||||||
{
|
{
|
||||||
HPREF_ELEMENT_TYPE type = HP_NONE;
|
HPREF_ELEMENT_TYPE type = HP_NONE;
|
||||||
|
|
||||||
|
@ -46,10 +46,10 @@ namespace netgen
|
|||||||
cluster_reps.SetSize (nv+ned+nfa+ne);
|
cluster_reps.SetSize (nv+ned+nfa+ne);
|
||||||
cluster_reps = -1;
|
cluster_reps = -1;
|
||||||
|
|
||||||
Array<int> llist (nv+ned+nfa+ne);
|
NgArray<int> llist (nv+ned+nfa+ne);
|
||||||
llist = 0;
|
llist = 0;
|
||||||
|
|
||||||
Array<int> nnums, ednums, fanums;
|
NgArray<int> nnums, ednums, fanums;
|
||||||
int changed;
|
int changed;
|
||||||
|
|
||||||
// NgProfiler::StartTimer(timer1);
|
// NgProfiler::StartTimer(timer1);
|
||||||
@ -85,7 +85,7 @@ namespace netgen
|
|||||||
(tm, ne,
|
(tm, ne,
|
||||||
[&] (size_t begin, size_t end)
|
[&] (size_t begin, size_t end)
|
||||||
{
|
{
|
||||||
Array<int> nnums, ednums, fanums;
|
NgArray<int> nnums, ednums, fanums;
|
||||||
for (int i = begin+1; i <= end; i++)
|
for (int i = begin+1; i <= end; i++)
|
||||||
{
|
{
|
||||||
const Element & el = mesh.VolumeElement(i);
|
const Element & el = mesh.VolumeElement(i);
|
||||||
|
@ -21,7 +21,7 @@ class AnisotropicClusters
|
|||||||
int nv, ned, nfa, ne;
|
int nv, ned, nfa, ne;
|
||||||
|
|
||||||
// connected nodes, nodes = vertices, edges, faces, elements
|
// connected nodes, nodes = vertices, edges, faces, elements
|
||||||
Array<int> cluster_reps;
|
NgArray<int> cluster_reps;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AnisotropicClusters (const Mesh & amesh);
|
AnisotropicClusters (const Mesh & amesh);
|
||||||
|
@ -11,7 +11,7 @@ namespace netgen
|
|||||||
// bool rational = true;
|
// bool rational = true;
|
||||||
|
|
||||||
|
|
||||||
static void ComputeGaussRule (int n, Array<double> & xi, Array<double> & wi)
|
static void ComputeGaussRule (int n, NgArray<double> & xi, NgArray<double> & wi)
|
||||||
{
|
{
|
||||||
xi.SetSize (n);
|
xi.SetSize (n);
|
||||||
wi.SetSize (n);
|
wi.SetSize (n);
|
||||||
@ -407,7 +407,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static Array<shared_ptr<RecPol>> jacpols2;
|
static NgArray<shared_ptr<RecPol>> jacpols2;
|
||||||
|
|
||||||
void CurvedElements::buildJacPols()
|
void CurvedElements::buildJacPols()
|
||||||
{
|
{
|
||||||
@ -566,7 +566,7 @@ namespace netgen
|
|||||||
|
|
||||||
const ParallelMeshTopology & partop = mesh.GetParallelTopology ();
|
const ParallelMeshTopology & partop = mesh.GetParallelTopology ();
|
||||||
// MPI_Comm_dup (mesh.GetCommunicator(), &curve_comm);
|
// MPI_Comm_dup (mesh.GetCommunicator(), &curve_comm);
|
||||||
Array<int> procs;
|
NgArray<int> procs;
|
||||||
#else
|
#else
|
||||||
// curve_comm = mesh.GetCommunicator();
|
// curve_comm = mesh.GetCommunicator();
|
||||||
#endif
|
#endif
|
||||||
@ -597,7 +597,7 @@ namespace netgen
|
|||||||
|
|
||||||
rational = arational;
|
rational = arational;
|
||||||
|
|
||||||
Array<int> edgenrs;
|
NgArray<int> edgenrs;
|
||||||
int nedges = top.GetNEdges();
|
int nedges = top.GetNEdges();
|
||||||
int nfaces = top.GetNFaces();
|
int nfaces = top.GetNFaces();
|
||||||
|
|
||||||
@ -670,7 +670,7 @@ namespace netgen
|
|||||||
|
|
||||||
if (ntasks > 1 && working)
|
if (ntasks > 1 && working)
|
||||||
{
|
{
|
||||||
Array<int> cnt(ntasks);
|
NgArray<int> cnt(ntasks);
|
||||||
cnt = 0;
|
cnt = 0;
|
||||||
for (int e = 0; e < edgeorder.Size(); e++)
|
for (int e = 0; e < edgeorder.Size(); e++)
|
||||||
{
|
{
|
||||||
@ -723,7 +723,7 @@ namespace netgen
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Array<double> xi, weight;
|
NgArray<double> xi, weight;
|
||||||
|
|
||||||
ComputeGaussRule (aorder+4, xi, weight); // on (0,1)
|
ComputeGaussRule (aorder+4, xi, weight); // on (0,1)
|
||||||
|
|
||||||
@ -733,9 +733,9 @@ namespace netgen
|
|||||||
if (mesh.GetDimension() == 3 || rational)
|
if (mesh.GetDimension() == 3 || rational)
|
||||||
{
|
{
|
||||||
static Timer tce("curve edges"); RegionTimer reg(tce);
|
static Timer tce("curve edges"); RegionTimer reg(tce);
|
||||||
Array<int> surfnr(nedges);
|
NgArray<int> surfnr(nedges);
|
||||||
Array<PointGeomInfo> gi0(nedges);
|
NgArray<PointGeomInfo> gi0(nedges);
|
||||||
Array<PointGeomInfo> gi1(nedges);
|
NgArray<PointGeomInfo> gi1(nedges);
|
||||||
surfnr = -1;
|
surfnr = -1;
|
||||||
|
|
||||||
if (working)
|
if (working)
|
||||||
@ -792,7 +792,7 @@ namespace netgen
|
|||||||
MyMPI_ExchangeTable (senddata, recvdata, MPI_TAG_CURVE, curve_comm);
|
MyMPI_ExchangeTable (senddata, recvdata, MPI_TAG_CURVE, curve_comm);
|
||||||
|
|
||||||
|
|
||||||
Array<int> cnt(ntasks);
|
NgArray<int> cnt(ntasks);
|
||||||
cnt = 0;
|
cnt = 0;
|
||||||
if (working)
|
if (working)
|
||||||
for (int e = 0; e < nedges; e++)
|
for (int e = 0; e < nedges; e++)
|
||||||
@ -947,12 +947,12 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Array<int> use_edge(nedges);
|
NgArray<int> use_edge(nedges);
|
||||||
Array<int> edge_surfnr1(nedges);
|
NgArray<int> edge_surfnr1(nedges);
|
||||||
Array<int> edge_surfnr2(nedges);
|
NgArray<int> edge_surfnr2(nedges);
|
||||||
Array<int> swap_edge(nedges);
|
NgArray<int> swap_edge(nedges);
|
||||||
Array<EdgePointGeomInfo> edge_gi0(nedges);
|
NgArray<EdgePointGeomInfo> edge_gi0(nedges);
|
||||||
Array<EdgePointGeomInfo> edge_gi1(nedges);
|
NgArray<EdgePointGeomInfo> edge_gi1(nedges);
|
||||||
use_edge = 0;
|
use_edge = 0;
|
||||||
|
|
||||||
if (working)
|
if (working)
|
||||||
@ -999,7 +999,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
MyMPI_ExchangeTable (senddata, recvdata, MPI_TAG_CURVE, curve_comm);
|
MyMPI_ExchangeTable (senddata, recvdata, MPI_TAG_CURVE, curve_comm);
|
||||||
Array<int> cnt(ntasks);
|
NgArray<int> cnt(ntasks);
|
||||||
cnt = 0;
|
cnt = 0;
|
||||||
if (working)
|
if (working)
|
||||||
for (int e = 0; e < edge_surfnr1.Size(); e++)
|
for (int e = 0; e < edge_surfnr1.Size(); e++)
|
||||||
@ -1169,7 +1169,7 @@ namespace netgen
|
|||||||
|
|
||||||
PrintMessage (3, "Curving faces");
|
PrintMessage (3, "Curving faces");
|
||||||
|
|
||||||
Array<int> surfnr(nfaces);
|
NgArray<int> surfnr(nfaces);
|
||||||
surfnr = -1;
|
surfnr = -1;
|
||||||
|
|
||||||
if (working)
|
if (working)
|
||||||
@ -1195,7 +1195,7 @@ namespace netgen
|
|||||||
|
|
||||||
if (ntasks > 1 && working)
|
if (ntasks > 1 && working)
|
||||||
{
|
{
|
||||||
Array<int> cnt(ntasks);
|
NgArray<int> cnt(ntasks);
|
||||||
cnt = 0;
|
cnt = 0;
|
||||||
for (int f = 0; f < nfaces; f++)
|
for (int f = 0; f < nfaces; f++)
|
||||||
{
|
{
|
||||||
@ -1239,8 +1239,8 @@ namespace netgen
|
|||||||
dmat = 0.0;
|
dmat = 0.0;
|
||||||
|
|
||||||
int np = sqr(xi.Size());
|
int np = sqr(xi.Size());
|
||||||
Array<Point<2> > xia(np);
|
NgArray<Point<2> > xia(np);
|
||||||
Array<Point<3> > xa(np);
|
NgArray<Point<3> > xa(np);
|
||||||
|
|
||||||
for (int jx = 0, jj = 0; jx < xi.Size(); jx++)
|
for (int jx = 0, jj = 0; jx < xi.Size(); jx++)
|
||||||
for (int jy = 0; jy < xi.Size(); jy++, jj++)
|
for (int jy = 0; jy < xi.Size(); jy++, jj++)
|
||||||
@ -1248,7 +1248,7 @@ namespace netgen
|
|||||||
|
|
||||||
// CalcMultiPointSurfaceTransformation (&xia, i, &xa, NULL);
|
// CalcMultiPointSurfaceTransformation (&xia, i, &xa, NULL);
|
||||||
|
|
||||||
Array<int> edgenrs;
|
NgArray<int> edgenrs;
|
||||||
top.GetFaceEdges (facenr+1, edgenrs);
|
top.GetFaceEdges (facenr+1, edgenrs);
|
||||||
for (int k = 0; k < edgenrs.Size(); k++) edgenrs[k]--;
|
for (int k = 0; k < edgenrs.Size(); k++) edgenrs[k]--;
|
||||||
|
|
||||||
@ -1453,7 +1453,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
// TVector<T> shapes, dshapes;
|
// TVector<T> shapes, dshapes;
|
||||||
// Array<Vec<3> > coefs;
|
// NgArray<Vec<3> > coefs;
|
||||||
|
|
||||||
SegmentInfo info;
|
SegmentInfo info;
|
||||||
info.elnr = elnr;
|
info.elnr = elnr;
|
||||||
@ -1582,7 +1582,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CurvedElements ::
|
void CurvedElements ::
|
||||||
GetCoefficients (SegmentInfo & info, Array<Vec<3> > & coefs) const
|
GetCoefficients (SegmentInfo & info, NgArray<Vec<3> > & coefs) const
|
||||||
{
|
{
|
||||||
const Segment & el = mesh[info.elnr];
|
const Segment & el = mesh[info.elnr];
|
||||||
|
|
||||||
@ -2366,7 +2366,7 @@ namespace netgen
|
|||||||
|
|
||||||
template <int DIM_SPACE>
|
template <int DIM_SPACE>
|
||||||
void CurvedElements ::
|
void CurvedElements ::
|
||||||
GetCoefficients (SurfaceElementInfo & info, Array<Vec<DIM_SPACE> > & coefs) const
|
GetCoefficients (SurfaceElementInfo & info, NgArray<Vec<DIM_SPACE> > & coefs) const
|
||||||
{
|
{
|
||||||
const Element2d & el = mesh[info.elnr];
|
const Element2d & el = mesh[info.elnr];
|
||||||
coefs.SetSize (info.ndof);
|
coefs.SetSize (info.ndof);
|
||||||
@ -2400,10 +2400,10 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
template void CurvedElements ::
|
template void CurvedElements ::
|
||||||
GetCoefficients<2> (SurfaceElementInfo & info, Array<Vec<2> > & coefs) const;
|
GetCoefficients<2> (SurfaceElementInfo & info, NgArray<Vec<2> > & coefs) const;
|
||||||
|
|
||||||
template void CurvedElements ::
|
template void CurvedElements ::
|
||||||
GetCoefficients<3> (SurfaceElementInfo & info, Array<Vec<3> > & coefs) const;
|
GetCoefficients<3> (SurfaceElementInfo & info, NgArray<Vec<3> > & coefs) const;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -3966,9 +3966,9 @@ namespace netgen
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
void CurvedElements ::
|
void CurvedElements ::
|
||||||
CalcMultiPointSegmentTransformation (Array<double> * xi, SegmentIndex segnr,
|
CalcMultiPointSegmentTransformation (NgArray<double> * xi, SegmentIndex segnr,
|
||||||
Array<Point<3> > * x,
|
NgArray<Point<3> > * x,
|
||||||
Array<Vec<3> > * dxdxi)
|
NgArray<Vec<3> > * dxdxi)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@ -4030,9 +4030,9 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
void CurvedElements ::
|
void CurvedElements ::
|
||||||
CalcMultiPointSurfaceTransformation (Array< Point<2> > * xi, SurfaceElementIndex elnr,
|
CalcMultiPointSurfaceTransformation (NgArray< Point<2> > * xi, SurfaceElementIndex elnr,
|
||||||
Array< Point<3> > * x,
|
NgArray< Point<3> > * x,
|
||||||
Array< Mat<3,2> > * dxdxi)
|
NgArray< Mat<3,2> > * dxdxi)
|
||||||
{
|
{
|
||||||
double * px = (x) ? &(*x)[0](0) : NULL;
|
double * px = (x) ? &(*x)[0](0) : NULL;
|
||||||
double * pdxdxi = (dxdxi) ? &(*dxdxi)[0](0) : NULL;
|
double * pdxdxi = (dxdxi) ? &(*dxdxi)[0](0) : NULL;
|
||||||
@ -4343,9 +4343,9 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
void CurvedElements ::
|
void CurvedElements ::
|
||||||
CalcMultiPointElementTransformation (Array< Point<3> > * xi, ElementIndex elnr,
|
CalcMultiPointElementTransformation (NgArray< Point<3> > * xi, ElementIndex elnr,
|
||||||
Array< Point<3> > * x,
|
NgArray< Point<3> > * x,
|
||||||
Array< Mat<3,3> > * dxdxi)
|
NgArray< Mat<3,3> > * dxdxi)
|
||||||
{
|
{
|
||||||
double * px = (x) ? &(*x)[0](0) : NULL;
|
double * px = (x) ? &(*x)[0](0) : NULL;
|
||||||
double * pdxdxi = (dxdxi) ? &(*dxdxi)[0](0) : NULL;
|
double * pdxdxi = (dxdxi) ? &(*dxdxi)[0](0) : NULL;
|
||||||
@ -4448,7 +4448,7 @@ namespace netgen
|
|||||||
// info.ndof += facecoeffsindex[info.facenr+1] - facecoeffsindex[info.facenr];
|
// info.ndof += facecoeffsindex[info.facenr+1] - facecoeffsindex[info.facenr];
|
||||||
}
|
}
|
||||||
|
|
||||||
Array<Vec<3> > coefs(info.ndof);
|
NgArray<Vec<3> > coefs(info.ndof);
|
||||||
GetCoefficients (info, &coefs[0]);
|
GetCoefficients (info, &coefs[0]);
|
||||||
if (x)
|
if (x)
|
||||||
{
|
{
|
||||||
|
@ -18,16 +18,16 @@ class CurvedElements
|
|||||||
{
|
{
|
||||||
const Mesh & mesh;
|
const Mesh & mesh;
|
||||||
|
|
||||||
Array<int> edgeorder;
|
NgArray<int> edgeorder;
|
||||||
Array<int> faceorder;
|
NgArray<int> faceorder;
|
||||||
|
|
||||||
Array<int> edgecoeffsindex;
|
NgArray<int> edgecoeffsindex;
|
||||||
Array<int> facecoeffsindex;
|
NgArray<int> facecoeffsindex;
|
||||||
|
|
||||||
Array< Vec<3> > edgecoeffs;
|
NgArray< Vec<3> > edgecoeffs;
|
||||||
Array< Vec<3> > facecoeffs;
|
NgArray< Vec<3> > facecoeffs;
|
||||||
|
|
||||||
Array< double > edgeweight; // for rational 2nd order splines
|
NgArray< double > edgeweight; // for rational 2nd order splines
|
||||||
|
|
||||||
int order;
|
int order;
|
||||||
bool rational;
|
bool rational;
|
||||||
@ -124,9 +124,9 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
void CalcMultiPointSegmentTransformation (Array<double> * xi, SegmentIndex segnr,
|
void CalcMultiPointSegmentTransformation (NgArray<double> * xi, SegmentIndex segnr,
|
||||||
Array<Point<3> > * x,
|
NgArray<Point<3> > * x,
|
||||||
Array<Vec<3> > * dxdxi);
|
NgArray<Vec<3> > * dxdxi);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template <int DIM_SPACE, typename T>
|
template <int DIM_SPACE, typename T>
|
||||||
@ -135,9 +135,9 @@ public:
|
|||||||
T * x, size_t sx,
|
T * x, size_t sx,
|
||||||
T * dxdxi, size_t sdxdxi);
|
T * dxdxi, size_t sdxdxi);
|
||||||
|
|
||||||
void CalcMultiPointSurfaceTransformation (Array< Point<2> > * xi, SurfaceElementIndex elnr,
|
void CalcMultiPointSurfaceTransformation (NgArray< Point<2> > * xi, SurfaceElementIndex elnr,
|
||||||
Array< Point<3> > * x,
|
NgArray< Point<3> > * x,
|
||||||
Array< Mat<3,2> > * dxdxi);
|
NgArray< Mat<3,2> > * dxdxi);
|
||||||
|
|
||||||
template <int DIM_SPACE, typename T>
|
template <int DIM_SPACE, typename T>
|
||||||
void CalcMultiPointSurfaceTransformation (SurfaceElementIndex elnr, int n,
|
void CalcMultiPointSurfaceTransformation (SurfaceElementIndex elnr, int n,
|
||||||
@ -145,9 +145,9 @@ public:
|
|||||||
T * x, size_t sx,
|
T * x, size_t sx,
|
||||||
T * dxdxi, size_t sdxdxi);
|
T * dxdxi, size_t sdxdxi);
|
||||||
|
|
||||||
void CalcMultiPointElementTransformation (Array< Point<3> > * xi, ElementIndex elnr,
|
void CalcMultiPointElementTransformation (NgArray< Point<3> > * xi, ElementIndex elnr,
|
||||||
Array< Point<3> > * x,
|
NgArray< Point<3> > * x,
|
||||||
Array< Mat<3,3> > * dxdxi);
|
NgArray< Mat<3,3> > * dxdxi);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void CalcMultiPointElementTransformation (ElementIndex elnr, int n,
|
void CalcMultiPointElementTransformation (ElementIndex elnr, int n,
|
||||||
@ -188,7 +188,7 @@ private:
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void CalcElementShapes (SegmentInfo & elnr, T xi, TFlatVector<T> shapes) const;
|
void CalcElementShapes (SegmentInfo & elnr, T xi, TFlatVector<T> shapes) const;
|
||||||
void GetCoefficients (SegmentInfo & elnr, Array<Vec<3> > & coefs) const;
|
void GetCoefficients (SegmentInfo & elnr, NgArray<Vec<3> > & coefs) const;
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void CalcElementDShapes (SegmentInfo & elnr, T xi, TFlatVector<T> dshapes) const;
|
void CalcElementDShapes (SegmentInfo & elnr, T xi, TFlatVector<T> dshapes) const;
|
||||||
|
|
||||||
@ -231,7 +231,7 @@ private:
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
void CalcElementShapes (SurfaceElementInfo & elinfo, const Point<2,T> xi, TFlatVector<T> shapes) const;
|
void CalcElementShapes (SurfaceElementInfo & elinfo, const Point<2,T> xi, TFlatVector<T> shapes) const;
|
||||||
template <int DIM_SPACE>
|
template <int DIM_SPACE>
|
||||||
void GetCoefficients (SurfaceElementInfo & elinfo, Array<Vec<DIM_SPACE> > & coefs) const;
|
void GetCoefficients (SurfaceElementInfo & elinfo, NgArray<Vec<DIM_SPACE> > & coefs) const;
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void CalcElementDShapes (SurfaceElementInfo & elinfo, const Point<2,T> xi, MatrixFixWidth<2,T> dshapes) const;
|
void CalcElementDShapes (SurfaceElementInfo & elinfo, const Point<2,T> xi, MatrixFixWidth<2,T> dshapes) const;
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user