Rename Array to NgArray

This commit is contained in:
Matthias Hochsteger 2019-07-09 10:39:16 +02:00
parent 2c14dd6350
commit cb87362f64
182 changed files with 1893 additions and 1893 deletions

View File

@ -116,7 +116,7 @@ namespace netgen
void Plane :: GetPrimitiveData (const char *& classname,
Array<double> & coeffs) const
NgArray<double> & coeffs) const
{
classname = "plane";
coeffs.SetSize (6);
@ -128,7 +128,7 @@ namespace netgen
coeffs.Elem(6) = n(2);
}
void Plane :: SetPrimitiveData (Array<double> & coeffs)
void Plane :: SetPrimitiveData (NgArray<double> & coeffs)
{
p(0) = coeffs.Elem(1);
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;
}
void Sphere :: GetPrimitiveData (const char *& classname, Array<double> & coeffs) const
void Sphere :: GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const
{
classname = "sphere";
coeffs.SetSize (4);
@ -377,7 +377,7 @@ namespace netgen
coeffs.Elem(4) = r;
}
void Sphere :: SetPrimitiveData (Array<double> & coeffs)
void Sphere :: SetPrimitiveData (NgArray<double> & coeffs)
{
c(0) = coeffs.Elem(1);
c(1) = coeffs.Elem(2);
@ -731,7 +731,7 @@ namespace netgen
Cylinder :: Cylinder (Array<double> & coeffs)
Cylinder :: Cylinder (NgArray<double> & 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";
coeffs.SetSize (7);
@ -786,7 +786,7 @@ namespace netgen
coeffs.Elem(7) = r;
}
void Cylinder :: SetPrimitiveData (Array<double> & coeffs)
void Cylinder :: SetPrimitiveData (NgArray<double> & coeffs)
{
a(0) = coeffs.Elem(1);
a(1) = coeffs.Elem(2);
@ -1127,14 +1127,14 @@ namespace netgen
CalcData();
}
EllipticCylinder :: EllipticCylinder (Array<double> & coeffs)
EllipticCylinder :: EllipticCylinder (NgArray<double> & 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";
coeffs.SetSize (9);
@ -1149,7 +1149,7 @@ namespace netgen
coeffs[8] = vs(2);
}
void EllipticCylinder :: SetPrimitiveData (Array<double> & coeffs)
void EllipticCylinder :: SetPrimitiveData (NgArray<double> & coeffs)
{
a(0) = coeffs[0];
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";
coeffs.SetSize (8);
@ -1326,7 +1326,7 @@ namespace netgen
coeffs.Elem(8) = rb;
}
void Cone :: SetPrimitiveData (Array<double> & coeffs)
void Cone :: SetPrimitiveData (NgArray<double> & coeffs)
{
a(0) = coeffs.Elem(1);
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";
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);
@ -1727,7 +1727,7 @@ void EllipticCone :: GetTriangleApproximation
r = ar;
}
void Torus :: GetPrimitiveData (const char *& classname, Array<double> & coeffs) const
void Torus :: GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const
{
classname = "torus";
coeffs.SetSize (8);
@ -1741,7 +1741,7 @@ void EllipticCone :: GetTriangleApproximation
coeffs.Elem(8) = r;
}
void Torus :: SetPrimitiveData (Array<double> & coeffs)
void Torus :: SetPrimitiveData (NgArray<double> & coeffs)
{
c(0) = coeffs.Elem(1);
c(1) = coeffs.Elem(2);

View File

@ -80,8 +80,8 @@ namespace netgen
Point<3> P() const { return p; }
Vec<3> N() const { return n; }
virtual void GetPrimitiveData (const char *& classname,
Array<double> & coeffs) const;
virtual void SetPrimitiveData (Array<double> & coeffs);
NgArray<double> & coeffs) const;
virtual void SetPrimitiveData (NgArray<double> & coeffs);
static Primitive * CreateDefault ();
virtual Primitive * Copy () const;
@ -153,8 +153,8 @@ namespace netgen
}
virtual void GetPrimitiveData (const char *& classname,
Array<double> & coeffs) const;
virtual void SetPrimitiveData (Array<double> & coeffs);
NgArray<double> & coeffs) const;
virtual void SetPrimitiveData (NgArray<double> & coeffs);
static Primitive * CreateDefault ();
virtual Primitive * Copy () const;
@ -208,7 +208,7 @@ namespace netgen
public:
Cylinder (const Point<3> & aa, const Point<3> & ab, double ar);
Cylinder (Array<double> & coeffs);
Cylinder (NgArray<double> & coeffs);
// default constructor for archive
Cylinder() {}
@ -220,8 +220,8 @@ namespace netgen
Point<3> A() const { return a; }
Point<3> B() const { return b; }
double R() const { return r; }
virtual void GetPrimitiveData (const char *& classname, Array<double> & coeffs) const;
virtual void SetPrimitiveData (Array<double> & coeffs);
virtual void GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const;
virtual void SetPrimitiveData (NgArray<double> & coeffs);
static Primitive * CreateDefault ();
virtual Primitive * Copy () const;
@ -278,7 +278,7 @@ namespace netgen
///
EllipticCylinder (const Point<3> & aa,
const Vec<3> & avl, const Vec<3> & avs);
EllipticCylinder (Array<double> & coeffs);
EllipticCylinder (NgArray<double> & coeffs);
// default constructor for archive
EllipticCylinder() {}
@ -289,8 +289,8 @@ namespace netgen
}
// static Primitive * CreateDefault ();
virtual void GetPrimitiveData (const char *& classname, Array<double> & coeffs) const;
virtual void SetPrimitiveData (Array<double> & coeffs);
virtual void GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const;
virtual void SetPrimitiveData (NgArray<double> & coeffs);
///
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;
}
static Primitive * CreateDefault ();
virtual void GetPrimitiveData (const char *& classname, Array<double> & coeffs) const;
virtual void SetPrimitiveData (Array<double> & coeffs);
virtual void GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const;
virtual void SetPrimitiveData (NgArray<double> & coeffs);
///
virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const;
@ -445,8 +445,8 @@ namespace netgen
ar & a & vl & vs & h & vlr;
}
static Primitive * CreateDefault ();
virtual void GetPrimitiveData (const char *& classname, Array<double> & coeffs) const;
virtual void SetPrimitiveData (Array<double> & coeffs);
virtual void GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const;
virtual void SetPrimitiveData (NgArray<double> & coeffs);
///
virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const;
@ -513,9 +513,9 @@ namespace netgen
virtual Point<3> GetSurfacePoint () const;
/// OK
virtual void GetPrimitiveData (const char *& classname,
Array<double> & coeffs) const;
NgArray<double> & coeffs) const;
/// OK
virtual void SetPrimitiveData (Array<double> & coeffs);
virtual void SetPrimitiveData (NgArray<double> & coeffs);
/// OK
static Primitive * CreateDefault ();
/// OK

View File

@ -343,7 +343,7 @@ INSOLID_TYPE Brick :: VecInSolid4 (const Point<3> & p,
void Brick ::
GetPrimitiveData (const char *& classname, Array<double> & coeffs) const
GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const
{
classname = "brick";
coeffs.SetSize(12);
@ -364,7 +364,7 @@ GetPrimitiveData (const char *& classname, Array<double> & coeffs) const
coeffs.Elem(12) = p4(2);
}
void Brick :: SetPrimitiveData (Array<double> & coeffs)
void Brick :: SetPrimitiveData (NgArray<double> & coeffs)
{
p1(0) = coeffs.Elem(1);
p1(1) = coeffs.Elem(2);
@ -414,7 +414,7 @@ void Brick :: CalcData()
{ 1, 5, 3, 7 },
{ 2, 4, 6, 8 } };
Array<double> data(6);
NgArray<double> data(6);
for (i = 0; i < 6; i++)
{
const Point<3> lp1 = pi[lface[i][0]-1];

View File

@ -63,8 +63,8 @@ namespace netgen
{
Point<3> p1, p2, p3, p4;
Vec<3> v12, v13, v14;
// Array<OneSurfacePrimitive*> faces;
Array<Plane*> faces;
// NgArray<OneSurfacePrimitive*> faces;
NgArray<Plane*> faces;
public:
Brick (Point<3> ap1, Point<3> ap2, Point<3> ap3, Point<3> ap4);
@ -115,8 +115,8 @@ namespace netgen
{ return *faces[i]; }
virtual void GetPrimitiveData (const char *& classname, Array<double> & coeffs) const;
virtual void SetPrimitiveData (Array<double> & coeffs);
virtual void GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const;
virtual void SetPrimitiveData (NgArray<double> & coeffs);
virtual void Reduce (const BoxSphere<3> & box);
virtual void UnReduce ();

View File

@ -75,7 +75,7 @@ namespace netgen
void CSGeometry :: Clean ()
{
Array< Solid* > to_delete;
NgArray< Solid* > to_delete;
for (int i = 0; i < solids.Size(); i++)
if(!to_delete.Contains(solids[i]->S1()))
@ -162,7 +162,7 @@ namespace netgen
if (prim)
{
const char * classname;
Array<double> coeffs;
NgArray<double> coeffs;
prim -> GetPrimitiveData (classname, coeffs);
@ -237,7 +237,7 @@ namespace netgen
char key[100], name[100], classname[100], sname[100];
int ncoeff, i, j;
Array<double> coeff;
NgArray<double> coeff;
while (ist.good())
{
@ -343,7 +343,7 @@ namespace netgen
Array<double> coeffs;
NgArray<double> coeffs;
const char * classname;
out << "csgsurfaces " << GetNSurf() << "\n";
@ -408,7 +408,7 @@ namespace netgen
void CSGeometry :: LoadSurfaces (istream & in)
{
Array<double> coeffs;
NgArray<double> coeffs;
string classname;
int nsurfaces,size;
@ -722,7 +722,7 @@ namespace netgen
void CSGeometry :: SetFlags (const char * solidname, const Flags & flags)
{
Solid * solid = solids[solidname];
Array<int> surfind;
NgArray<int> surfind;
int i;
double maxh = flags.GetNumFlag ("maxh", -1);
@ -752,7 +752,7 @@ namespace netgen
if (flags.StringListFlagDefined ("bcname"))
{
const Array<char*> & bcname = flags.GetStringListFlag("bcname");
const NgArray<char*> & bcname = flags.GetStringListFlag("bcname");
Polyhedra * polyh;
if(solid->S1())
@ -762,7 +762,7 @@ namespace netgen
if(polyh)
{
Array < Array<int> * > polysurfs;
NgArray < NgArray<int> * > polysurfs;
polyh->GetPolySurfs(polysurfs);
if(bcname.Size() != polysurfs.Size())
cerr << "WARNING: solid \"" << solidname << "\" has " << polysurfs.Size()
@ -806,7 +806,7 @@ namespace netgen
if (flags.NumListFlagDefined ("bc"))
{
const Array<double> & bcnum = flags.GetNumListFlag("bc");
const NgArray<double> & bcnum = flags.GetNumListFlag("bc");
Polyhedra * polyh;
if(solid->S1())
@ -816,7 +816,7 @@ namespace netgen
if(polyh)
{
Array < Array<int> * > polysurfs;
NgArray < NgArray<int> * > polysurfs;
polyh->GetPolySurfs(polysurfs);
if(bcnum.Size() != polysurfs.Size())
cerr << "WARNING: solid \"" << solidname << "\" has " << polysurfs.Size()
@ -880,7 +880,7 @@ namespace netgen
void CSGeometry ::
GetSurfaceIndices (const Solid * sol,
const BoxSphere<3> & box,
Array<int> & locsurf) const
NgArray<int> & locsurf) const
{
ReducePrimitiveIterator rpi(box);
UnReducePrimitiveIterator urpi;
@ -909,7 +909,7 @@ namespace netgen
void CSGeometry ::
GetIndependentSurfaceIndices (const Solid * sol,
const BoxSphere<3> & box,
Array<int> & locsurf) const
NgArray<int> & locsurf) const
{
ReducePrimitiveIterator rpi(box);
UnReducePrimitiveIterator urpi;
@ -968,7 +968,7 @@ namespace netgen
void CSGeometry ::
GetIndependentSurfaceIndices (const Solid * sol,
const Point<3> & p, Vec<3> & v,
Array<int> & locsurf) const
NgArray<int> & locsurf) const
{
cout << "very dangerous" << endl;
Point<3> p2 = p + 1e-2 * v;
@ -980,7 +980,7 @@ namespace netgen
*/
void CSGeometry ::
GetIndependentSurfaceIndices (Array<int> & locsurf) const
GetIndependentSurfaceIndices (NgArray<int> & locsurf) const
{
for (int i = 0; i < locsurf.Size(); i++)
locsurf[i] = isidenticto[locsurf[i]];
@ -1022,7 +1022,7 @@ namespace netgen
delete triapprox[i];
triapprox.SetSize (ntlo);
Array<int> surfind;
NgArray<int> surfind;
IndexSet iset(GetNSurf());
for (int i = 0; i < ntlo; i++)
@ -1159,7 +1159,7 @@ namespace netgen
// IndexSet iset(GetNSurf());
locsol -> GetSurfaceIndices (iset);
const Array<int> & lsurfi = iset.GetArray();
const NgArray<int> & lsurfi = iset.GetArray();
locsol -> IterateSolid (urpi);

View File

@ -106,10 +106,10 @@ namespace netgen
public:
/// primitive of surface
Array<const Primitive*> surf2prim;
NgArray<const Primitive*> surf2prim;
private:
Array<Surface*> delete_them;
NgArray<Surface*> delete_them;
/// all named solids
SymbolTable<Solid*> solids;
@ -120,7 +120,7 @@ namespace netgen
SymbolTable< SplineGeometry<3>* > splinecurves3d;
/// all top level objects: solids and surfaces
Array<TopLevelObject*> toplevelobjects;
NgArray<TopLevelObject*> toplevelobjects;
public:
/// additional points specified by user
@ -139,14 +139,14 @@ namespace netgen
};
private:
// Array<Point<3> > userpoints;
Array<UserPoint> userpoints;
Array<double> userpoints_ref_factor;
// NgArray<Point<3> > userpoints;
NgArray<UserPoint> userpoints;
NgArray<double> userpoints_ref_factor;
mutable Array<Point<3> > identpoints;
mutable NgArray<Point<3> > identpoints;
/// triangular approximation of top level objects
Array<TriangleApproximation*> triapprox;
NgArray<TriangleApproximation*> triapprox;
/// increment, if geometry is changed
static int changeval;
@ -159,7 +159,7 @@ namespace netgen
/// identic surfaces are stored by pair of indizes, val = inverse
INDEX_2_HASHTABLE<int> identicsurfaces;
Array<int> isidenticto;
NgArray<int> isidenticto;
/// identification of boundaries (periodic, thin domains, ...)
double ideps;
@ -168,7 +168,7 @@ namespace netgen
string filename;
/// 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;
@ -263,10 +263,10 @@ namespace netgen
// quick implementations:
Array<SingularFace*> singfaces;
Array<SingularEdge*> singedges;
Array<SingularPoint*> singpoints;
Array<Identification*> identifications;
NgArray<SingularFace*> singfaces;
NgArray<SingularEdge*> singedges;
NgArray<SingularPoint*> singpoints;
NgArray<Identification*> identifications;
int GetNIdentifications (void) const { return identifications.Size(); }
void AddIdentification (Identification * ident);
@ -280,19 +280,19 @@ namespace netgen
///
void GetSurfaceIndices (const Solid * sol,
const BoxSphere<3> & box,
Array<int> & locsurf) const;
NgArray<int> & locsurf) const;
///
void GetIndependentSurfaceIndices (const Solid * sol,
const BoxSphere<3> & box,
Array<int> & locsurf) const;
NgArray<int> & locsurf) const;
///
/*
void GetIndependentSurfaceIndices (const Solid * sol,
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
@ -344,7 +344,7 @@ namespace netgen
string * bcname;
};
Array<BCModification> bcmodifications;
NgArray<BCModification> bcmodifications;
virtual int GenerateMesh (shared_ptr<Mesh> & mesh, MeshingParameters & mparam) override;

View File

@ -399,7 +399,7 @@ namespace netgen
int inputface = 0;
while (1)
{
Array<int> pnums,cleaned_pnums;
NgArray<int> pnums,cleaned_pnums;
for(int i=0; i<3; i++)
{
pnums.Append((int) (ParseNumber (scan)));
@ -786,7 +786,7 @@ namespace netgen
if(scan.GetToken() == '-' || scan.GetToken() == TOK_NUM)
{
Array<double> vals;
NgArray<double> vals;
vals.Append (ParseNumber(scan));
while (scan.GetToken() == ',')
{
@ -798,7 +798,7 @@ namespace netgen
}
else
{ // string list
Array<char*> vals;
NgArray<char*> vals;
string val = scan.GetStringValue();
vals.Append(new char[val.size()+1]);
strcpy(vals.Last(),val.c_str());
@ -908,7 +908,7 @@ namespace netgen
if (flags.NumListFlagDefined ("col"))
{
const Array<double> & col =
const NgArray<double> & col =
flags.GetNumListFlag ("col");
tlo->SetRGB (col[0], col[1], col[2]);
}
@ -934,7 +934,7 @@ namespace netgen
ParseChar (scan, ';');
Array<int> si;
NgArray<int> si;
geom->GetSolid(surfname)->GetSurfaceIndices(si);
int tlonr =
geom->SetTopLevelObject ((Solid*)geom->GetSolid(name),
@ -942,7 +942,7 @@ namespace netgen
TopLevelObject * tlo = geom->GetTopLevelObject (tlonr);
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));
}
if (flags.GetDefineFlag ("transparent"))
@ -980,7 +980,7 @@ namespace netgen
ParseChar (scan, ';');
Array<int> si1, si2;
NgArray<int> si1, si2;
geom->GetSolid(name1)->GetSurfaceIndices(si1);
geom->GetSolid(name2)->GetSurfaceIndices(si2);
@ -1016,7 +1016,7 @@ namespace netgen
ParseChar (scan, ';');
Array<int> si1, si2;
NgArray<int> si1, si2;
geom->GetSolid(name1)->GetSurfaceIndices(si1);
geom->GetSolid(name2)->GetSurfaceIndices(si2);
@ -1246,7 +1246,7 @@ namespace netgen
CSGeometry::BCModification bcm;
bcm.bcname = NULL;
Array<int> si;
NgArray<int> si;
geom->GetSolid(name1)->GetSurfaceIndices(si);
if(si.Size() == 0)
@ -1298,7 +1298,7 @@ namespace netgen
bcm.bcname = NULL;
Array<int> si;
NgArray<int> si;
geom->GetSolid(name1)->GetSurfaceIndices(si);
if(si.Size() == 0)

View File

@ -154,7 +154,7 @@ namespace netgen
tcl_const char * name = argv[1];
tcl_const char * value = argv[2];
Array<double> coeffs;
NgArray<double> coeffs;
cout << "Set primitive data, name = " << name
@ -222,7 +222,7 @@ namespace netgen
const char * classname;
Array<double> coeffs;
NgArray<double> coeffs;
geometry->GetSolid (name)->GetPrimitive()->GetPrimitiveData (classname, coeffs);

View File

@ -10,7 +10,7 @@ namespace netgen
EdgeCalculation ::
EdgeCalculation (const CSGeometry & ageometry,
Array<SpecialPoint> & aspecpoints,
NgArray<SpecialPoint> & aspecpoints,
MeshingParameters & amparam)
: geometry(ageometry), specpoints(aspecpoints), mparam(amparam)
{
@ -48,7 +48,7 @@ namespace netgen
// add all special points before edge points (important for periodic identification)
// JS, Jan 2007
const double di=1e-7*geometry.MaxSize();
Array<int> locsearch;
NgArray<int> locsearch;
for (int i = 0; i < specpoints.Size(); i++)
if (specpoints[i].unconditional)
@ -96,9 +96,9 @@ namespace netgen
void EdgeCalculation :: CalcEdges1 (double h, Mesh & mesh)
{
Array<int> hsp(specpoints.Size());
Array<int> glob2hsp(specpoints.Size());
Array<int> startpoints, endpoints;
NgArray<int> hsp(specpoints.Size());
NgArray<int> glob2hsp(specpoints.Size());
NgArray<int> startpoints, endpoints;
int pos, ep;
@ -107,11 +107,11 @@ namespace netgen
Point<3> p, np;
int pi1, s1, s2, s1_orig, s2_orig;
Array<Point<3> > edgepoints;
Array<double> curvelength;
NgArray<Point<3> > edgepoints;
NgArray<double> curvelength;
int copyedge = 0, copyfromedge = -1, copyedgeidentification = -1;
Array<int> locsurfind, locind;
NgArray<int> locsurfind, locind;
int checkedcopy = 0;
@ -406,8 +406,8 @@ namespace netgen
}
Array<Segment> refedges;
Array<bool> refedgesinv;
NgArray<Segment> refedges;
NgArray<bool> refedgesinv;
AnalyzeEdge (s1_orig, s2_orig, s1, s2, pos, layer,
@ -546,7 +546,7 @@ namespace netgen
SegmentIndex si;
PointIndex pi;
Array<int> osedges(cntedge);
NgArray<int> osedges(cntedge);
INDEX_2_HASHTABLE<int> osedgesht (cntedge+1);
osedges = 2;
@ -678,17 +678,17 @@ namespace netgen
void EdgeCalculation ::
FollowEdge (int pi1, int & ep, int & pos,
const Array<int> & hsp,
const NgArray<int> & hsp,
double h, const Mesh & mesh,
Array<Point<3> > & edgepoints,
Array<double> & curvelength)
NgArray<Point<3> > & edgepoints,
NgArray<double> & curvelength)
{
int s1, s2, s1_rep, s2_rep;
double len, steplen, cursteplen, loch;
Point<3> p, np, pnp;
Vec<3> a1, a2, t;
Array<int> locind;
NgArray<int> locind;
double size = geometry.MaxSize();
double epspointdist2 = size * 1e-6;
@ -904,14 +904,14 @@ namespace netgen
void EdgeCalculation ::
AnalyzeEdge (int s1, int s2, int s1_rep, int s2_rep, int pos, int layer,
const Array<Point<3> > & edgepoints,
Array<Segment> & refedges,
Array<bool> & refedgesinv)
const NgArray<Point<3> > & edgepoints,
NgArray<Segment> & refedges,
NgArray<bool> & refedgesinv)
{
Segment seg;
Array<int> locsurfind, locsurfind2;
NgArray<int> locsurfind, locsurfind2;
Array<int> edges_priority;
NgArray<int> edges_priority;
double size = geometry.MaxSize();
bool debug = 0;
@ -1062,7 +1062,7 @@ namespace netgen
//int k;
double eps = 1e-8*size;
Array<bool> pre_ok(2);
NgArray<bool> pre_ok(2);
do
{
@ -1291,10 +1291,10 @@ namespace netgen
void EdgeCalculation ::
StoreEdge (const Array<Segment> & refedges,
const Array<bool> & refedgesinv,
const Array<Point<3> > & edgepoints,
const Array<double> & curvelength,
StoreEdge (const NgArray<Segment> & refedges,
const NgArray<bool> & refedgesinv,
const NgArray<Point<3> > & edgepoints,
const NgArray<double> & curvelength,
int layer,
Mesh & mesh)
{
@ -1340,7 +1340,7 @@ namespace netgen
const double di=1e-7*geometry.MaxSize();
Array<int> locsearch;
NgArray<int> locsearch;
meshpoint_tree -> GetIntersecting (p-Vec<3> (di,di,di),
p+Vec<3> (di,di,di), locsearch);
if (locsearch.Size())
@ -1463,10 +1463,10 @@ namespace netgen
void EdgeCalculation ::
StoreShortEdge (const Array<Segment> & refedges,
const Array<bool> & refedgesinv,
const Array<Point<3> > & edgepoints,
const Array<double> & curvelength,
StoreShortEdge (const NgArray<Segment> & refedges,
const NgArray<bool> & refedgesinv,
const NgArray<Point<3> > & edgepoints,
const NgArray<double> & curvelength,
int layer,
Mesh & mesh)
{
@ -1594,8 +1594,8 @@ namespace netgen
void EdgeCalculation ::
CopyEdge (const Array<Segment> & refedges,
const Array<bool> & refedgesinv,
CopyEdge (const NgArray<Segment> & refedges,
const NgArray<bool> & refedgesinv,
int copyfromedge,
const Point<3> & fromstart, const Point<3> & fromend,
const Point<3> & tostart, const Point<3> & toend,
@ -1742,7 +1742,7 @@ namespace netgen
int layer = 0;
Solid * tansol;
Array<int> tansurfind;
NgArray<int> tansurfind;
double size = geometry.MaxSize();
int nsol = geometry.GetNTopLevelObjects();

View File

@ -26,7 +26,7 @@ namespace netgen
points have to be given.
*/
extern void CalcEdges (const CSGeometry & geometry,
const Array<SpecialPoint> & specpoints,
const NgArray<SpecialPoint> & specpoints,
double h, Mesh & mesh);
@ -36,7 +36,7 @@ namespace netgen
class EdgeCalculation
{
const CSGeometry & geometry;
Array<SpecialPoint> & specpoints;
NgArray<SpecialPoint> & specpoints;
Point3dTree * searchtree;
Point3dTree * meshpoint_tree;
int cntedge;
@ -46,7 +46,7 @@ namespace netgen
public:
EdgeCalculation (const CSGeometry & ageometry,
Array<SpecialPoint> & aspecpoints,
NgArray<SpecialPoint> & aspecpoints,
MeshingParameters & amparam);
~EdgeCalculation();
@ -61,34 +61,34 @@ namespace netgen
void FollowEdge (int pi1, int & ep, int & pos,
// const Array<SpecialPoint> & hsp,
const Array<int> & hsp,
// const NgArray<SpecialPoint> & hsp,
const NgArray<int> & hsp,
double h, const Mesh & mesh,
Array<Point<3> > & edgepoints,
Array<double> & curvelength);
NgArray<Point<3> > & edgepoints,
NgArray<double> & curvelength);
void AnalyzeEdge (int s1, int s2, int s1_rep, int s2_rep, int pos, int layer,
const Array<Point<3> > & edgepoints,
Array<Segment> & refedges,
Array<bool> & refedgesinv);
const NgArray<Point<3> > & edgepoints,
NgArray<Segment> & refedges,
NgArray<bool> & refedgesinv);
void StoreEdge (const Array<Segment> & refedges,
const Array<bool> & refedgesinv,
const Array<Point<3> > & edgepoints,
const Array<double> & curvelength,
void StoreEdge (const NgArray<Segment> & refedges,
const NgArray<bool> & refedgesinv,
const NgArray<Point<3> > & edgepoints,
const NgArray<double> & curvelength,
int layer,
Mesh & mesh);
void StoreShortEdge (const Array<Segment> & refedges,
const Array<bool> & refedgesinv,
const Array<Point<3> > & edgepoints,
const Array<double> & curvelength,
void StoreShortEdge (const NgArray<Segment> & refedges,
const NgArray<bool> & refedgesinv,
const NgArray<Point<3> > & edgepoints,
const NgArray<double> & curvelength,
int layer,
Mesh & mesh);
void CopyEdge (const Array<Segment> & refedges,
const Array<bool> & refedgesinv,
void CopyEdge (const NgArray<Segment> & refedges,
const NgArray<bool> & refedgesinv,
int copyfromedge,
const Point<3> & fromstart, const Point<3> & fromend,
const Point<3> & tostart, const Point<3> & toend,

View File

@ -70,9 +70,9 @@ namespace netgen
class BSplineCurve2d : public ExplicitCurve2d
{
///
Array<Point<2> > points;
NgArray<Point<2> > points;
///
Array<int> intervallused;
NgArray<int> intervallused;
///
int redlevel;

View File

@ -7,7 +7,7 @@
namespace netgen
{
Array<Point<3> > project1, project2;
NgArray<Point<3> > project1, project2;
@ -57,13 +57,13 @@ namespace netgen
Init();
}
ExtrusionFace :: ExtrusionFace(const Array<double> & raw_data)
ExtrusionFace :: ExtrusionFace(const NgArray<double> & raw_data)
{
deletable = true;
int pos=0;
Array< Point<2> > p(3);
NgArray< Point<2> > p(3);
int ptype = int(raw_data[pos]); pos++;
@ -142,7 +142,7 @@ namespace netgen
double cutdist = -1;
Array<double> mindist(path->GetNSplines());
NgArray<double> mindist(path->GetNSplines());
for(int i = 0; i < path->GetNSplines(); i++)
{
@ -453,7 +453,7 @@ namespace netgen
v2d(1) = v * loc_z_dir[seg];
Vec<2> n(v2d(1),-v2d(0));
Array < Point<2> > ips;
NgArray < Point<2> > ips;
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();
profile->GetRawData(data);
@ -695,7 +695,7 @@ namespace netgen
INSOLID_TYPE Extrusion :: PointInSolid (const Point<3> & p,
const double eps,
Array<int> * const facenums) const
NgArray<int> * const facenums) const
{
Vec<3> random_vec(-0.4561,0.7382,0.4970247);
@ -741,7 +741,7 @@ namespace netgen
const Vec<3> & v,
double eps) const
{
Array<int> facenums;
NgArray<int> facenums;
INSOLID_TYPE pInSolid = PointInSolid(p,eps,&facenums);
if(pInSolid != DOES_INTERSECT)

View File

@ -15,11 +15,11 @@ namespace netgen
bool deletable;
Array< const SplineSeg3<3> * > spline3_path;
Array< const LineSeg<3> * > line_path;
NgArray< const SplineSeg3<3> * > spline3_path;
NgArray< const LineSeg<3> * > line_path;
mutable Array < Vec<3> > x_dir, y_dir, z_dir, loc_z_dir;
mutable Array < Point<3> > p0;
mutable NgArray < Vec<3> > x_dir, y_dir, z_dir, loc_z_dir;
mutable NgArray < Point<3> > p0;
mutable Vec<3> profile_tangent;
mutable double profile_par;
@ -48,7 +48,7 @@ namespace netgen
const SplineGeometry<3> * path_in,
const Vec<3> & z_direction);
ExtrusionFace(const Array<double> & raw_data);
ExtrusionFace(const NgArray<double> & raw_data);
// default constructor for archive
ExtrusionFace() {}
@ -102,7 +102,7 @@ namespace netgen
const Vec<3> & GetProfileTangent (void) const {return profile_tangent;}
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,
Vec<3> & ex, Vec<3> & ey, Vec<3> & ez) const;
@ -123,7 +123,7 @@ namespace netgen
Vec<3> z_direction;
Array<ExtrusionFace*> faces;
NgArray<ExtrusionFace*> faces;
mutable int latestfacenum;
@ -145,7 +145,7 @@ namespace netgen
double eps) const;
INSOLID_TYPE PointInSolid (const Point<3> & p,
double eps,
Array<int> * const facenums) const;
NgArray<int> * const facenums) const;
virtual INSOLID_TYPE VecInSolid (const Point<3> & p,
const Vec<3> & v,
double eps) const;

View File

@ -10,8 +10,8 @@
namespace netgen
{
Array<SpecialPoint> specpoints;
static Array<MeshPoint> spoints;
NgArray<SpecialPoint> specpoints;
static NgArray<MeshPoint> spoints;
#define TCL_OK 0
#define TCL_ERROR 1
@ -140,7 +140,7 @@ namespace netgen
}
}
Array<int> loc;
NgArray<int> loc;
if (!ec.point_on_edge_problem)
for (SegmentIndex si = 0; si < mesh.GetNSeg(); si++)
{
@ -234,17 +234,17 @@ namespace netgen
const char * savetask = multithread.task;
multithread.task = "Surface meshing";
Array<Segment> segments;
NgArray<Segment> segments;
int noldp = mesh.GetNP();
double starttime = GetTime();
// find master faces from identified
Array<int> masterface(mesh.GetNFD());
NgArray<int> masterface(mesh.GetNFD());
for (int i = 1; i <= mesh.GetNFD(); i++)
masterface.Elem(i) = i;
Array<INDEX_2> fpairs;
NgArray<INDEX_2> fpairs;
bool changed;
do
{
@ -382,7 +382,7 @@ namespace netgen
for (int j = 0; j < geom.singfaces.Size(); j++)
{
Array<int> surfs;
NgArray<int> surfs;
geom.GetIndependentSurfaceIndices (geom.singfaces[j]->GetSolid(),
geom.BoundingBox(), surfs);
for (int k = 1; k <= mesh.GetNFD(); k++)
@ -680,7 +680,7 @@ namespace netgen
mesh->SetGlobalH (mparam.maxh);
mesh->SetMinimalH (mparam.minh);
Array<double> maxhdom(geom.GetNTopLevelObjects());
NgArray<double> maxhdom(geom.GetNTopLevelObjects());
for (int i = 0; i < maxhdom.Size(); i++)
maxhdom[i] = geom.GetTopLevelObject(i)->GetMaxH();

View File

@ -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 ::
BuildSurfaceElements (Array<Segment> & segs,
BuildSurfaceElements (NgArray<Segment> & segs,
Mesh & mesh, const Surface * surf)
{
cout << "Identification::BuildSurfaceElements called for base-class" << endl;
@ -93,14 +93,14 @@ BuildSurfaceElements (Array<Segment> & segs,
void Identification ::
BuildVolumeElements (Array<class Element2d> & surfels,
BuildVolumeElements (NgArray<class Element2d> & surfels,
class Mesh & mesh)
{
;
}
void Identification ::
GetIdentifiedFaces (Array<INDEX_2> & idfaces) const
GetIdentifiedFaces (NgArray<INDEX_2> & idfaces) const
{
idfaces.SetSize(0);
for (int i = 1; i <= identfaces.GetNBags(); i++)
@ -136,7 +136,7 @@ PeriodicIdentification :: ~PeriodicIdentification ()
/*
void PeriodicIdentification :: IdentifySpecialPoints
(Array<class SpecialPoint> & points)
(NgArray<class SpecialPoint> & points)
{
int i, j;
int bestj;
@ -446,7 +446,7 @@ void PeriodicIdentification :: IdentifyFaces (class Mesh & mesh)
void PeriodicIdentification ::
BuildSurfaceElements (Array<Segment> & segs,
BuildSurfaceElements (NgArray<Segment> & segs,
Mesh & mesh, const Surface * surf)
{
int found = 0;
@ -458,7 +458,7 @@ BuildSurfaceElements (Array<Segment> & segs,
if (geom.GetSurface(surfnr) == s1 ||
geom.GetSurface(surfnr) == s2)
{
Array<int> copy_points;
NgArray<int> copy_points;
for (SurfaceElementIndex sei = 0; sei < mesh.GetNSE(); sei++)
{
@ -609,7 +609,7 @@ void CloseSurfaceIdentification :: GetData (ostream & ost) const
/*
void CloseSurfaceIdentification :: IdentifySpecialPoints
(Array<class SpecialPoint> & points)
(NgArray<class SpecialPoint> & points)
{
int i, j;
int bestj;
@ -677,7 +677,7 @@ Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2,
if (!dom_surf_valid)
{
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)
{
@ -887,7 +887,7 @@ GetIdentifiedPoint (class Mesh & mesh, int pi)
const Surface *snew;
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);
if (identmap.Get(pi))
return identmap.Get(pi);
@ -958,13 +958,13 @@ void CloseSurfaceIdentification :: IdentifyPoints (Mesh & mesh)
{
int np = mesh.GetNP();
Array<int> points_on_surf2;
NgArray<int> points_on_surf2;
for (int i2 = 1; i2 <= np; i2++)
if (s2->PointOnSurface (mesh.Point(i2)))
points_on_surf2.Append (i2);
Array<int> surfs_of_p1;
NgArray<int> surfs_of_p1;
for (int i1 = 1; i1 <= np; i1++)
{
@ -1080,7 +1080,7 @@ void CloseSurfaceIdentification :: IdentifyFaces (class Mesh & mesh)
s2rep = geom.GetSurfaceClassRepresentant(i);
}
Array<int> segs_on_face1, segs_on_face2;
NgArray<int> segs_on_face1, segs_on_face2;
identfaces.DeleteData();
@ -1219,13 +1219,13 @@ void CloseSurfaceIdentification :: IdentifyFaces (class Mesh & mesh)
void CloseSurfaceIdentification ::
BuildSurfaceElements (Array<Segment> & segs,
BuildSurfaceElements (NgArray<Segment> & segs,
Mesh & mesh, const Surface * surf)
{
bool found = 0;
int cntquads = 0;
Array<int,PointIndex::BASE> identmap;
NgArray<int,PointIndex::BASE> identmap;
identmap = 0;
mesh.GetIdentifications().GetMap (nr, identmap);
@ -1240,7 +1240,7 @@ BuildSurfaceElements (Array<Segment> & segs,
//(*testout) << "segs = " << endl << segs << endl;
//(*testout) << "identmap = " << endl << identmap << endl;
//Array<bool> foundseg(segs.Size());
//NgArray<bool> foundseg(segs.Size());
//foundseg = false;
// insert quad layer:
@ -1301,7 +1301,7 @@ BuildSurfaceElements (Array<Segment> & segs,
{
PrintMessage(3, "insert quad layer of ", cntquads,
" elements at face ", segs.Get(1).si);
//Array<Segment> aux;
//NgArray<Segment> aux;
//for(int i=0; i<segs.Size();i++)
// if(!foundseg[i])
// aux.Append(segs[i]);
@ -1319,7 +1319,7 @@ BuildSurfaceElements (Array<Segment> & segs,
void CloseSurfaceIdentification ::
BuildSurfaceElements2 (Array<Segment> & segs,
BuildSurfaceElements2 (NgArray<Segment> & segs,
Mesh & mesh, const Surface * surf)
{
// copy mesh
@ -1420,7 +1420,7 @@ BuildSurfaceElements2 (Array<Segment> & segs,
void CloseSurfaceIdentification ::
BuildVolumeElements (Array<class Element2d> & surfels,
BuildVolumeElements (NgArray<class Element2d> & surfels,
class Mesh & mesh)
{
;
@ -1481,7 +1481,7 @@ void CloseEdgesIdentification :: GetData (ostream & ost) const
/*
void CloseEdgesIdentification :: IdentifySpecialPoints
(Array<class SpecialPoint> & points)
(NgArray<class SpecialPoint> & points)
{
int i, j;
int bestj;
@ -1633,7 +1633,7 @@ void CloseEdgesIdentification :: IdentifyPoints (Mesh & mesh)
}
void CloseEdgesIdentification ::
BuildSurfaceElements (Array<Segment> & segs,
BuildSurfaceElements (NgArray<Segment> & segs,
Mesh & mesh, const Surface * surf)
{
int found = 0;

View File

@ -34,7 +34,7 @@ namespace netgen
DLL_HEADER virtual void GetData (ostream & ost) const = 0;
/// obsolete
// virtual void IdentifySpecialPoints (Array<class SpecialPoint> & points);
// virtual void IdentifySpecialPoints (NgArray<class SpecialPoint> & points);
/// can identify both special points (fixed direction)
/// (identified points, same tangent)
@ -59,16 +59,16 @@ namespace netgen
virtual int GetIdentifiedPoint (class Mesh & mesh, int pi1);
/// copy surfaces, or fill rectangles
virtual void BuildSurfaceElements (Array<class Segment> & segs,
virtual void BuildSurfaceElements (NgArray<class Segment> & segs,
class Mesh & mesh,
const Surface * surf);
/// insert volume elements in thin layers
virtual void BuildVolumeElements (Array<class Element2d> & surfels,
virtual void BuildVolumeElements (NgArray<class Element2d> & surfels,
class Mesh & mesh);
/// 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);
};
@ -91,7 +91,7 @@ namespace netgen
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,
const TABLE<int> & specpoint2solid,
const TABLE<int> & specpoint2surface) const override;
@ -100,7 +100,7 @@ namespace netgen
virtual int GetIdentifiedPoint (class Mesh & mesh, int pi1) override;
virtual void IdentifyPoints (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,
const Surface * surf) override;
};
@ -123,9 +123,9 @@ namespace netgen
int ref_levels_s2;
///
double eps_n;
Array<double> slices;
NgArray<double> slices;
/// used only for domain-local identification:
Array<int> domain_surfaces;
NgArray<int> domain_surfaces;
///
bool dom_surf_valid;
@ -146,7 +146,7 @@ namespace netgen
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,
const TABLE<int> & specpoint2solid,
const TABLE<int> & specpoint2surface) const;
@ -154,17 +154,17 @@ namespace netgen
virtual int IdentifyableCandidate (const SpecialPoint & sp1) const;
virtual int ShortEdge (const SpecialPoint & sp1, const SpecialPoint & sp2) const;
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 IdentifyFaces (class Mesh & mesh);
virtual void BuildSurfaceElements (Array<class Segment> & segs,
virtual void BuildSurfaceElements (NgArray<class Segment> & segs,
class Mesh & mesh,
const Surface * surf);
void BuildSurfaceElements2 (Array<class Segment> & segs,
void BuildSurfaceElements2 (NgArray<class Segment> & segs,
class Mesh & mesh,
const Surface * surf);
virtual void BuildVolumeElements (Array<class Element2d> & surfels,
virtual void BuildVolumeElements (NgArray<class Element2d> & surfels,
class Mesh & mesh);
int RefLevels () const { return ref_levels; }
@ -196,14 +196,14 @@ namespace netgen
virtual void Print (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,
const TABLE<int> & specpoint2solid,
const TABLE<int> & specpoint2surface) const;
virtual void IdentifyPoints (class Mesh & mesh);
virtual void BuildSurfaceElements (Array<class Segment> & segs,
virtual void BuildSurfaceElements (NgArray<class Segment> & segs,
class Mesh & mesh,
const Surface * surf);
};

View File

@ -7,7 +7,7 @@ namespace netgen
{
Polyhedra::Face::Face (int pi1, int pi2, int pi3,
const Array<Point<3> > & points,
const NgArray<Point<3> > & points,
int ainputnr)
{
inputnr = ainputnr;
@ -165,7 +165,7 @@ INSOLID_TYPE Polyhedra :: PointInSolid (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++)
{
@ -192,7 +192,7 @@ INSOLID_TYPE Polyhedra :: VecInSolid (const Point<3> & p,
const Vec<3> & v,
double eps) const
{
Array<int> point_on_faces;
NgArray<int> point_on_faces;
INSOLID_TYPE res(DOES_INTERSECT);
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,
Array<int> & surfind, double eps) const
NgArray<int> & surfind, double eps) const
{
Vec<3> v1n = v1;
v1n.Normalize();
@ -447,7 +447,7 @@ void Polyhedra :: GetTangentialVecSurfaceIndices2 (const Point<3> & p, const Vec
void Polyhedra :: GetPrimitiveData (const char *& classname,
Array<double> & coeffs) const
NgArray<double> & coeffs) const
{
classname = "Polyhedra";
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;
@ -602,14 +602,14 @@ void Polyhedra :: GetPolySurfs(Array < Array<int> * > & polysurfs)
polysurfs.SetSize(maxnum+1);
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++)
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++)
pts.Append (points[i]);
@ -617,7 +617,7 @@ void Polyhedra::CalcSpecialPoints (Array<Point<3> > & pts) const
void Polyhedra :: AnalyzeSpecialPoint (const Point<3> & /* pt */,
Array<Point<3> > & /* specpts */) const
NgArray<Point<3> > & /* specpts */) const
{
;
}

View File

@ -35,13 +35,13 @@ namespace netgen
Face () { ; }
Face (int pi1, int pi2, int pi3,
const Array<Point<3> > & points,
const NgArray<Point<3> > & points,
int ainputnr);
};
Array<Point<3> > points;
Array<Face> faces;
Array<Plane*> planes;
NgArray<Point<3> > points;
NgArray<Face> faces;
NgArray<Plane*> planes;
Box<3> poly_bbox;
double eps_base1;
@ -65,15 +65,15 @@ namespace netgen
double eps) const;
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,
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,
Array<Point<3> > & specpts) const;
NgArray<Point<3> > & specpts) const;
virtual Vec<3> SpecialPointTangentialVector (const Point<3> & p, int s1, int s2) const;
virtual int GetNSurfaces() const
@ -83,8 +83,8 @@ namespace netgen
virtual const Surface & GetSurface (int i) const
{ return *planes[i]; }
virtual void GetPrimitiveData (const char *& classname, Array<double> & coeffs) const;
virtual void SetPrimitiveData (Array<double> & coeffs);
virtual void GetPrimitiveData (const char *& classname, NgArray<double> & coeffs) const;
virtual void SetPrimitiveData (NgArray<double> & coeffs);
virtual void Reduce (const BoxSphere<3> & box);
virtual void UnReduce ();
@ -92,7 +92,7 @@ namespace netgen
int AddPoint (const Point<3> & p);
int AddFace (int pi1, int pi2, int pi3, int inputnum);
void GetPolySurfs(Array < Array<int> * > & polysurfs);
void GetPolySurfs(NgArray < NgArray<int> * > & polysurfs);
protected:
int FaceBoxIntersection (int fnr, const BoxSphere<3> & box) const;

View File

@ -211,7 +211,7 @@ DLL_HEADER void ExportCSG(py::module &m)
.def("__init__", FunctionPointer ([](SplineSurface* instance, shared_ptr<SPSolid> base, py::list cuts)
{
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++)
{
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<string>(val).check()) bcname = new string ( py::extract<string> (val)());
Array<int> si;
NgArray<int> si;
mod_solid -> GetSolid() -> GetSurfaceIndices (si);
// 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) -> SetBCName(surf->GetBase()->GetBCName());
self.GetTopLevelObject(tlonr) -> SetMaxH(surf->GetBase()->GetMaxH());
Array<Point<3>> non_midpoints;
NgArray<Point<3>> non_midpoints;
for(auto spline : surf->GetSplines())
{
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
([] (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);
s2->GetSolid()->GetSurfaceIndices (si2);
cout << "surface ids1 = " << si1 << endl;
@ -505,7 +505,7 @@ However, when r = 0, the top part becomes a point(tip) and meshing fails!
try
{
int n = py::len(aslices);
Array<double> slices(n);
NgArray<double> slices(n);
for(int i=0; i<n; 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,
int reflevels, shared_ptr<SPSolid> domain_solid)
{
Array<int> si1, si2;
NgArray<int> si1, si2;
s1->GetSolid()->GetSurfaceIndices (si1);
s2->GetSolid()->GetSurfaceIndices (si2);
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,
Transformation<3> trafo)
{
Array<int> si1, si2;
NgArray<int> si1, si2;
s1->GetSolid()->GetSurfaceIndices (si1);
s2->GetSolid()->GetSurfaceIndices (si2);
cout << "identify surfaces " << si1[0] << " and " << si2[0] << endl;

View File

@ -52,13 +52,13 @@ namespace netgen
}
RevolutionFace :: RevolutionFace(const Array<double> & raw_data)
RevolutionFace :: RevolutionFace(const NgArray<double> & raw_data)
{
deletable = true;
int pos = 0;
Array< Point<2> > p(3);
NgArray< Point<2> > p(3);
int stype = int(raw_data[pos]); pos++;
@ -333,7 +333,7 @@ namespace netgen
{
double retval = spline->MaxCurvature();
Array < Point<2> > checkpoints;
NgArray < Point<2> > checkpoints;
const SplineSeg3<2> * ss3 = dynamic_cast<const SplineSeg3<2> *>(spline);
const LineSeg<2> * ls = dynamic_cast<const LineSeg<2> *>(spline);
@ -386,7 +386,7 @@ namespace netgen
// find smallest y value of spline:
Array<double> testt;
NgArray<double> testt;
if(!isfirst)
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();
spline->GetRawData(data);
@ -718,7 +718,7 @@ namespace netgen
return DOES_INTERSECT;
else
{
Array < Point<3> > pext(2);
NgArray < Point<3> > pext(2);
Point<3> p;
pext[0] = box.PMin();
@ -772,7 +772,7 @@ namespace netgen
const double b = -randomx;
const double c = -a*p2d(0)-b*p2d(1);
Array < Point<2> > points;
NgArray < Point<2> > points;
//(*testout) << "face intersections at: " << endl;
for(int i=0; i<faces.Size(); i++)
@ -803,7 +803,7 @@ namespace netgen
}
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++)
if (faces[j] -> PointInFace(p, eps))
@ -823,7 +823,7 @@ namespace netgen
return pInSolid;
}
Array<int> intersecting_faces;
NgArray<int> intersecting_faces;
for(int i=0; i<faces.Size(); i++)
if(faces[i]->PointInFace(p,eps)) // == DOES_INTERSECT)

View File

@ -23,9 +23,9 @@ namespace netgen
mutable Vector spline_coefficient_shifted;
Array < Vec<2>* > checklines_vec;
Array < Point<2>* > checklines_start;
Array < Vec<2>* > checklines_normal;
NgArray < Vec<2>* > checklines_vec;
NgArray < Point<2>* > checklines_start;
NgArray < Vec<2>* > checklines_normal;
private:
void Init (void);
@ -44,7 +44,7 @@ namespace netgen
bool last = false,
const int id_in = 0);
RevolutionFace(const Array<double> & raw_data);
RevolutionFace(const NgArray<double> & raw_data);
// default constructor for archive
RevolutionFace() {}
@ -87,7 +87,7 @@ namespace netgen
/* 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;
Array<RevolutionFace*> faces;
NgArray<RevolutionFace*> faces;
mutable int intersecting_face;
@ -143,7 +143,7 @@ namespace netgen
double eps) const;
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,
const Vec<3> & v,

View File

@ -41,7 +41,7 @@ void SingularEdge :: FindPointsOnEdge (class Mesh & mesh)
segms.SetSize(0);
Array<int> si1, si2;
NgArray<int> si1, si2;
sol1->GetSurfaceIndices (si1);
sol2->GetSurfaceIndices (si2);
@ -150,7 +150,7 @@ SingularPoint :: SingularPoint (double abeta,
void SingularPoint :: FindPoints (class Mesh & mesh)
{
points.SetSize(0);
Array<int> surfk, surf;
NgArray<int> surfk, surf;
for (PointIndex pi = PointIndex::BASE;

View File

@ -29,8 +29,8 @@ namespace netgen
int domnr;
const Solid *sol;
double factor;
// Array<Point<3> > points;
// Array<INDEX_2> segms;
// NgArray<Point<3> > points;
// NgArray<INDEX_2> segms;
public:
SingularFace (int adomnr, const Solid * asol, double sf)
: domnr(adomnr), sol(asol), factor(sf) { ; }
@ -47,8 +47,8 @@ namespace netgen
int domnr;
const CSGeometry& geom;
const Solid *sol1, *sol2;
Array<Point<3> > points;
Array<INDEX_2> segms;
NgArray<Point<3> > points;
NgArray<INDEX_2> segms;
double factor;
double maxhinit;
@ -68,7 +68,7 @@ namespace netgen
public:
double beta;
const Solid *sol1, *sol2, *sol3;
Array<Point<3> > points;
NgArray<Point<3> > points;
double factor;
public:

View File

@ -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;
bounds.SetSize (0);
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
{
switch (op)
@ -585,7 +585,7 @@ namespace netgen
case SECTION:
{
int i, in1, in2, strin1, strin2;
Array<int> bounds1, bounds2;
NgArray<int> bounds1, bounds2;
s1 -> RecBoundaries (p, bounds1, in1, strin1);
s2 -> RecBoundaries (p, bounds2, in2, strin2);
@ -604,7 +604,7 @@ namespace netgen
case UNION:
{
int i, in1, in2, strin1, strin2;
Array<int> bounds1, bounds2;
NgArray<int> bounds1, bounds2;
s1 -> RecBoundaries (p, bounds1, in1, strin1);
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;
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
{
tansol = NULL;
@ -742,7 +742,7 @@ namespace netgen
void Solid :: 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
{
int in, strin;
surfids.SetSize (0);
@ -752,7 +752,7 @@ namespace netgen
}
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
{
tansol = NULL;
@ -856,7 +856,7 @@ namespace netgen
void Solid :: TangentialSolid3 (const Point<3> & p,
const Vec<3> & t, const Vec<3> & t2,
Solid *& tansol, Array<int> & surfids,
Solid *& tansol, NgArray<int> & surfids,
double eps) const
{
int in, strin;
@ -869,7 +869,7 @@ namespace netgen
void Solid :: RecTangentialSolid3 (const Point<3> & p,
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
{
tansol = NULL;
@ -967,7 +967,7 @@ namespace netgen
void Solid :: TangentialEdgeSolid (const Point<3> & p,
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
{
int in, strin;
@ -982,7 +982,7 @@ namespace netgen
void Solid :: RecTangentialEdgeSolid (const Point<3> & p,
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
{
tansol = NULL;
@ -1450,13 +1450,13 @@ namespace netgen
return 0;
}
void Solid :: GetSurfaceIndices (Array<int> & surfind) const
void Solid :: GetSurfaceIndices (NgArray<int> & surfind) const
{
surfind.SetSize (0);
RecGetSurfaceIndices (surfind);
}
void Solid :: RecGetSurfaceIndices (Array<int> & surfind) const
void Solid :: RecGetSurfaceIndices (NgArray<int> & surfind) const
{
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);
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)
{
@ -1576,14 +1576,14 @@ namespace netgen
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);
RecGetTangentialSurfaceIndices2 (p, v, surfind, eps);
}
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)
{
@ -1628,14 +1628,14 @@ namespace netgen
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);
RecGetTangentialSurfaceIndices3 (p, v, v2, surfind, eps);
}
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)
{
@ -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,
Array<int> & surfind, double eps) const
NgArray<int> & surfind, double eps) const
{
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 ();
@ -1814,7 +1814,7 @@ namespace netgen
}
}
void Solid :: RecCalcOnePrimitiveSpecialPoints (Array<Point<3> > & pts) const
void Solid :: RecCalcOnePrimitiveSpecialPoints (NgArray<Point<3> > & pts) const
{
switch (op)
{

View File

@ -81,14 +81,14 @@ namespace netgen
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;
void GetSurfaceIndices (Array<int> & surfind) const;
void GetSurfaceIndices (NgArray<int> & surfind) const;
void GetSurfaceIndices (IndexSet & iset) const;
void GetTangentialSurfaceIndices (const Point<3> & p, Array<int> & surfids, double eps) const;
void GetTangentialSurfaceIndices2 (const Point<3> & p, const Vec<3> & v, Array<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 GetTangentialSurfaceIndices (const Point<3> & p, NgArray<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, NgArray<int> & surfids, double eps) 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
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
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
p + s t + s*s/2 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,
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;
@ -176,23 +176,23 @@ namespace netgen
protected:
///
void RecBoundaries (const Point<3> & p, Array<int> & bounds,
void RecBoundaries (const Point<3> & p, NgArray<int> & bounds,
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;
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;
///
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;
///
void RecTangentialEdgeSolid (const Point<3> & p, 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;
///
@ -203,16 +203,16 @@ namespace netgen
///
Solid * RecGetReducedSolid (const BoxSphere<3> & box, INSOLID_TYPE & in) const;
///
void RecGetSurfaceIndices (Array<int> & surfind) const;
void RecGetTangentialSurfaceIndices (const Point<3> & p, Array<int> & surfids, double eps) const;
void RecGetTangentialSurfaceIndices2 (const Point<3> & p, const Vec<3> & v, Array<int> & surfids, double eps) const;
void RecGetSurfaceIndices (NgArray<int> & surfind) const;
void RecGetTangentialSurfaceIndices (const Point<3> & p, NgArray<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,
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,
Array<int> & surfids, double eps) const;
NgArray<int> & surfids, double eps) 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 ClearVisitedIt;

View File

@ -21,7 +21,7 @@
namespace netgen
{
Array<Box<3> > boxes;
NgArray<Box<3> > boxes;
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 ()
{
@ -73,7 +73,7 @@ namespace netgen
void SpecialPointCalculation ::
CalcSpecialPoints (const CSGeometry & ageometry,
Array<MeshPoint> & apoints)
NgArray<MeshPoint> & apoints)
{
static int timer = NgProfiler::CreateTimer ("CSG: find special points");
NgProfiler::RegionTimer reg (timer);
@ -112,7 +112,7 @@ namespace netgen
if (tlo->GetSolid())
{
Array<Point<3> > hpts;
NgArray<Point<3> > hpts;
tlo->GetSolid()->CalcOnePrimitiveSpecialPoints (box, hpts);
// if (hpts.Size())
// cout << "oneprimitivespecialpoints = " << hpts << endl;
@ -210,7 +210,7 @@ namespace netgen
bool possiblecrossp, possibleexp; // possible cross or extremalpoint
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;
// static int cntbox = 0;
@ -273,8 +273,8 @@ namespace netgen
if (nquad == numprim && nplane >= numprim-1)
{
Array<Point<3> > pts;
Array<int> surfids;
NgArray<Point<3> > pts;
NgArray<int> surfids;
for (int k1 = 0; k1 < numprim - 2; k1++)
for (int k2 = k1 + 1; k2 < numprim - 1; k2++)
@ -392,8 +392,8 @@ namespace netgen
if (nsphere == numprim) // && calccp == false)
{
Array<Point<3> > pts;
Array<int> surfids;
NgArray<Point<3> > pts;
NgArray<int> surfids;
@ -541,7 +541,7 @@ namespace netgen
BoxSphere<3> boxp (pp, pp);
boxp.Increase (1e-3*size);
boxp.CalcDiamCenter();
Array<int> locsurf2;
NgArray<int> locsurf2;
geometry -> GetIndependentSurfaceIndices (sol, boxp, locsurf2);
@ -1132,7 +1132,7 @@ namespace netgen
ComputeCrossPoints (const Plane * plane1,
const Plane * plane2,
const Plane * plane3,
Array<Point<3> > & pts)
NgArray<Point<3> > & pts)
{
Mat<3> mat;
Vec<3> rhs, sol;
@ -1174,7 +1174,7 @@ namespace netgen
ComputeCrossPoints (const Plane * plane1,
const Plane * plane2,
const QuadraticSurface * quadric,
Array<Point<3> > & pts)
NgArray<Point<3> > & pts)
{
Mat<2,3> mat;
Mat<3,2> inv;
@ -1244,7 +1244,7 @@ namespace netgen
ComputeCrossPoints (const Sphere * sphere1,
const Sphere * sphere2,
const Sphere * sphere3,
Array<Point<3> > & pts)
NgArray<Point<3> > & pts)
{
Mat<2,3> mat;
Mat<3,2> inv;
@ -1327,7 +1327,7 @@ namespace netgen
void SpecialPointCalculation ::
ComputeExtremalPoints (const Plane * plane,
const QuadraticSurface * quadric,
Array<Point<3> > & pts)
NgArray<Point<3> > & pts)
{
// 3 equations:
// surf1 = 0 <===> plane_a + plane_b x = 0;
@ -1416,7 +1416,7 @@ namespace netgen
void SpecialPointCalculation ::
ComputeExtremalPoints (const Sphere * sphere1,
const Sphere * sphere2,
Array<Point<3> > & pts)
NgArray<Point<3> > & pts)
{
// 3 equations:
// surf1 = 0 <===> |x-c1|^2 - r1^2 = 0;
@ -1666,19 +1666,19 @@ namespace netgen
void SpecialPointCalculation ::
AnalyzeSpecialPoints (const CSGeometry & ageometry,
Array<MeshPoint> & apoints,
Array<SpecialPoint> & specpoints)
NgArray<MeshPoint> & apoints,
NgArray<SpecialPoint> & specpoints)
{
static int timer = NgProfiler::CreateTimer ("CSG: analyze special points");
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;
Array<int> specpoint2point;
NgArray<int> specpoint2point;
specpoints.SetSize (0);
geometry = &ageometry;
@ -1698,7 +1698,7 @@ namespace netgen
*/
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++)
coord[i] = dir * Vec<3> (apoints[i]);
@ -1717,7 +1717,7 @@ namespace netgen
(*testout) << "points = " << apoints << endl;
Point3dTree searchtree (bbox.PMin(), bbox.PMax());
Array<int> locsearch;
NgArray<int> locsearch;
for (int si = 0; si < ageometry.GetNTopLevelObjects(); si++)
{
@ -1882,7 +1882,7 @@ namespace netgen
#ifdef DEVELOP
(*testout) << "surfind2 = " << endl << surfind2 << endl;
#endif
Array<int> surfind2_aux(surfind2);
NgArray<int> surfind2_aux(surfind2);
ageometry.GetIndependentSurfaceIndices (surfind2_aux);
#ifdef DEVELOP
(*testout) << "surfind2,rep = " << endl << surfind2_aux << endl;
@ -2067,7 +2067,7 @@ namespace netgen
if(testuncond.Test(i))
continue;
Array<int> same;
NgArray<int> same;
same.Append(i);
for(int j = i+1; j<specpoints.Size(); j++)

View File

@ -79,9 +79,9 @@ namespace netgen
///
const CSGeometry * geometry;
///
Array<MeshPoint> * points;
NgArray<MeshPoint> * points;
///
Array<long int> boxesinlevel;
NgArray<long int> boxesinlevel;
///
double size;
@ -102,11 +102,11 @@ namespace netgen
///
void CalcSpecialPoints (const CSGeometry & ageometry,
Array<MeshPoint> & points);
NgArray<MeshPoint> & points);
///
void AnalyzeSpecialPoints (const CSGeometry & geometry,
Array<MeshPoint> & points,
Array<SpecialPoint> & specpoints);
NgArray<MeshPoint> & points,
NgArray<SpecialPoint> & specpoints);
protected:
///
@ -161,27 +161,27 @@ namespace netgen
void ComputeExtremalPoints (const Plane * plane,
const QuadraticSurface * quadric,
Array<Point<3> > & pts);
NgArray<Point<3> > & pts);
void ComputeExtremalPoints (const Sphere * sphere1,
const Sphere * sphere2,
Array<Point<3> > & pts);
NgArray<Point<3> > & pts);
void ComputeCrossPoints (const Plane * plane1,
const Plane * plane2,
const Plane * plane3,
Array<Point<3> > & pts);
NgArray<Point<3> > & pts);
void ComputeCrossPoints (const Plane * plane1,
const Plane * plane2,
const QuadraticSurface * quadratic,
Array<Point<3> > & pts);
NgArray<Point<3> > & pts);
void ComputeCrossPoints (const Sphere * sphere1,
const Sphere * sphere2,
const Sphere * sphere3,
Array<Point<3> > & pts);
NgArray<Point<3> > & pts);
};
}

View File

@ -27,7 +27,7 @@ namespace netgen
class spline3d
{
///
Array<splinesegment3d *> segments;
NgArray<splinesegment3d *> segments;
public:
///

View File

@ -36,11 +36,11 @@ void SplineSurface :: AppendPoint(const Point<3> & p, const double reffac, const
return "default";
}
const shared_ptr<Array<shared_ptr<OneSurfacePrimitive>>> SplineSurface :: CreateCuttingSurfaces()
const shared_ptr<NgArray<shared_ptr<OneSurfacePrimitive>>> SplineSurface :: CreateCuttingSurfaces()
{
if(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)
cuttings->Append(cut);
for(int i = 0; i<splines.Size(); i++)

View File

@ -7,16 +7,16 @@ namespace netgen
class SplineSurface : public OneSurfacePrimitive
{
protected:
Array<GeomPoint<3>> geompoints;
Array<shared_ptr<SplineSeg<3>>> splines;
Array<string> bcnames;
Array<double> maxh;
NgArray<GeomPoint<3>> geompoints;
NgArray<shared_ptr<SplineSeg<3>>> splines;
NgArray<string> bcnames;
NgArray<double> maxh;
shared_ptr<OneSurfacePrimitive> baseprimitive;
shared_ptr<Array<shared_ptr<OneSurfacePrimitive>>> cuts;
shared_ptr<Array<shared_ptr<OneSurfacePrimitive>>> all_cuts;
shared_ptr<NgArray<shared_ptr<OneSurfacePrimitive>>> cuts;
shared_ptr<NgArray<shared_ptr<OneSurfacePrimitive>>> all_cuts;
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)
{ ; }
// default constructor for archive
@ -25,7 +25,7 @@ namespace netgen
const auto & GetSplines() const { return splines; }
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(); }
SplineSeg<3> & GetSpline(const int i) { 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);
void AppendSegment(shared_ptr<SplineSeg<3>> spline, string & bcname, double amaxh = -1);
const shared_ptr<Array<shared_ptr<OneSurfacePrimitive>>> CreateCuttingSurfaces();
const shared_ptr<Array<shared_ptr<OneSurfacePrimitive>>> GetCuts() const { return all_cuts; }
const shared_ptr<NgArray<shared_ptr<OneSurfacePrimitive>>> CreateCuttingSurfaces();
const shared_ptr<NgArray<shared_ptr<OneSurfacePrimitive>>> GetCuts() const { return all_cuts; }
const shared_ptr<OneSurfacePrimitive> GetBase() const { return baseprimitive; }
virtual void Project (Point<3> & p3d) const { baseprimitive->Project(p3d); }
@ -50,7 +50,7 @@ namespace netgen
{ return baseprimitive->HesseNorm(); }
virtual Point<3> GetSurfacePoint () const
{ return baseprimitive->GetSurfacePoint(); }
virtual void CalcSpecialPoints(Array<Point<3>> & pts) const
virtual void CalcSpecialPoints(NgArray<Point<3>> & pts) const
{ baseprimitive->CalcSpecialPoints(pts); }
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 double HesseNorm () 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;

View File

@ -230,13 +230,13 @@ void Primitive :: SetSurfaceId (int i, int id)
void Primitive :: GetPrimitiveData (const char *& classname,
Array<double> & coeffs) const
NgArray<double> & coeffs) const
{
classname = "undef";
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,
Array<int> & surfind, double eps) const
NgArray<int> & surfind, double eps) const
{
for (int j = 0; j < GetNSurfaces(); j++)
if (fabs (GetSurface(j).CalcFunctionValue (p)) < eps)
@ -288,7 +288,7 @@ void Primitive :: GetTangentialSurfaceIndices (const Point<3> & p,
void Primitive ::
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;
surfind.SetSize (0);
@ -296,7 +296,7 @@ GetTangentialVecSurfaceIndices (const Point<3> & p, const Vec<3> & v,
void Primitive ::
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++)
{

View File

@ -241,8 +241,8 @@ namespace netgen
class Primitive
{
protected:
Array<int> surfaceids;
Array<int> surfaceactive;
NgArray<int> surfaceids;
NgArray<int> surfaceactive;
public:
@ -268,7 +268,7 @@ namespace netgen
double eps) const = 0;
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,
const Vec<3> & v,
@ -294,15 +294,15 @@ namespace netgen
double eps) const;
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,
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 */,
Array<Point<3> > & /* specpts */) const { ; }
NgArray<Point<3> > & /* specpts */) const { ; }
virtual Vec<3> SpecialPointTangentialVector (const Point<3> & /* p */,
int /* s1 */, int /* s2 */) const
{ return Vec<3> (0,0,0); }
@ -318,8 +318,8 @@ namespace netgen
virtual int SurfaceInverted (int /* i */ = 0) const { return 0; }
virtual void GetPrimitiveData (const char *& classname,
Array<double> & coeffs) const;
virtual void SetPrimitiveData (Array<double> & coeffs);
NgArray<double> & coeffs) const;
virtual void SetPrimitiveData (NgArray<double> & coeffs);
static Primitive * CreatePrimitive (const char * classname);

View File

@ -29,7 +29,7 @@ namespace netgen
void TriangleApproximation :: RemoveUnusedPoints ()
{
BitArray used(GetNP());
Array<int> map (GetNP());
NgArray<int> map (GetNP());
int i, j;
int cnt = 0;

View File

@ -36,9 +36,9 @@ namespace netgen
class TriangleApproximation
{
Array<Point<3> > points;
Array<Vec<3> > normals;
Array<TATriangle> trigs;
NgArray<Point<3> > points;
NgArray<Vec<3> > normals;
NgArray<TATriangle> trigs;
public:
TriangleApproximation();

View File

@ -18,8 +18,8 @@ namespace netgen
/* *********************** Draw Geometry **************** */
extern shared_ptr<Mesh> mesh;
extern Array<SpecialPoint> specpoints;
extern Array<Box<3> > boxes;
extern NgArray<SpecialPoint> specpoints;
extern NgArray<Box<3> > boxes;

View File

@ -13,7 +13,7 @@ namespace netgen
class DLL_HEADER VisualSceneGeometry : public VisualScene
{
class CSGeometry * geometry;
Array<int> trilists;
NgArray<int> trilists;
int selsurf;
public:
VisualSceneGeometry ();

View File

@ -211,7 +211,7 @@ namespace netgen
{
int i, j;
int nseg = mesh.GetNSeg();
Array<int> edgesonpoint(mesh.GetNP());
NgArray<int> edgesonpoint(mesh.GetNP());
for (i = 1; i <= mesh.GetNP(); i++)
edgesonpoint.Elem(i) = 0;
@ -251,9 +251,9 @@ namespace netgen
// markers for z-refinement: p1, p2, levels
// p1-p2 is an edge to be refined
Array<INDEX_3> ref_uniform;
Array<INDEX_3> ref_singular;
Array<INDEX_4 > ref_slices;
NgArray<INDEX_3> ref_uniform;
NgArray<INDEX_3> ref_singular;
NgArray<INDEX_4 > ref_slices;
BitArray first_id(geom->identifications.Size());
first_id.Set();
@ -287,7 +287,7 @@ namespace netgen
}
else
{
//const Array<double> & slices = csid->GetSlices();
//const NgArray<double> & slices = csid->GetSlices();
INDEX_4 i4;
i4[0] = pair.I1();
i4[1] = pair.I2();
@ -301,7 +301,7 @@ namespace netgen
Array<EdgePointGeomInfo> epgi;
NgArray<EdgePointGeomInfo> epgi;
while (1)
{
@ -389,7 +389,7 @@ namespace netgen
edge.Sort();
if (!refedges.Used(edge))
{
const Array<double> & slices = csid->GetSlices();
const NgArray<double> & slices = csid->GetSlices();
//(*testout) << "idnr " << idnr << " i " << i << endl;
//(*testout) << "slices " << slices << endl;
double slicefac = slices.Get(slicenr);

View File

@ -9,7 +9,7 @@
/**************************************************************************/
/*
Abstract data type Array
Abstract data type NgArray
*/
#include <mystdlib.h>
@ -65,8 +65,8 @@ namespace netgen
{
if (!actsize)
{
throw Exception ("Array should not be empty");
// cerr << "Array souldn't be empty";
throw Exception ("NgArray should not be empty");
// cerr << "NgArray souldn't be empty";
}
}
#endif

View File

@ -67,7 +67,7 @@ namespace netgen
/**
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.
Helper functions for printing.
Optional range check by macro RANGE_CHECK
@ -124,7 +124,7 @@ namespace netgen
{
#ifdef DEBUG
if (i < 1 || i > size)
cout << "Array<" << typeid(T).name()
cout << "NgArray<" << typeid(T).name()
<< ">::Elem out of range, i = " << i
<< ", s = " << size << endl;
#endif
@ -137,7 +137,7 @@ namespace netgen
{
#ifdef DEBUG
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;
#endif
@ -149,7 +149,7 @@ namespace netgen
{
#ifdef DEBUG
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;
#endif
@ -215,13 +215,13 @@ namespace netgen
/**
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.
Either the container takes care of memory allocation and deallocation,
or the user provides one block of data.
*/
template <class T, int BASE = 0, typename TIND = int>
class Array : public FlatArray<T, BASE, TIND>
class NgArray : public FlatArray<T, BASE, TIND>
{
protected:
using FlatArray<T,BASE,TIND>::size;
@ -235,14 +235,14 @@ namespace netgen
public:
/// Generate array of logical and physical size asize
explicit Array()
explicit NgArray()
: FlatArray<T, BASE, TIND> (0, NULL)
{
allocsize = 0;
ownmem = 1;
}
explicit Array(size_t asize)
explicit NgArray(size_t asize)
: FlatArray<T, BASE, TIND> (asize, asize ? new T[asize] : nullptr)
{
allocsize = asize;
@ -250,7 +250,7 @@ namespace netgen
}
/// Generate array in user data
Array(TIND asize, T* adata)
NgArray(TIND asize, T* adata)
: FlatArray<T, BASE, TIND> (asize, adata)
{
allocsize = asize;
@ -258,7 +258,7 @@ namespace netgen
}
/// 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)
{
allocsize = size;
@ -268,7 +268,7 @@ namespace netgen
}
/// array move
Array (Array && a2)
NgArray (NgArray && a2)
: FlatArray<T,BASE,TIND> (a2.size, a2.data), allocsize(a2.allocsize), ownmem(a2.ownmem)
{
a2.size = 0;
@ -279,7 +279,7 @@ namespace netgen
/// if responsible, deletes memory
~Array()
~NgArray()
{
if (ownmem)
delete [] data;
@ -362,14 +362,14 @@ namespace netgen
}
/// Fill array with val
Array & operator= (const T & val)
NgArray & operator= (const T & val)
{
FlatArray<T, BASE, TIND>::operator= (val);
return *this;
}
/// array copy
Array & operator= (const Array & a2)
NgArray & operator= (const NgArray & a2)
{
SetSize (a2.Size());
for (TIND i (BASE); i < size+BASE; i++)
@ -378,7 +378,7 @@ namespace netgen
}
/// array copy
Array & operator= (const FlatArray<T> & a2)
NgArray & operator= (const FlatArray<T> & a2)
{
SetSize (a2.Size());
for (TIND i = BASE; i < size+BASE; i++)
@ -386,7 +386,7 @@ namespace netgen
return *this;
}
Array & operator= (Array && a2)
NgArray & operator= (NgArray && a2)
{
Swap (data, a2.data);
Swap (size, a2.size);
@ -458,11 +458,11 @@ namespace netgen
template <class T, int S>
class ArrayMem : public Array<T>
class ArrayMem : public NgArray<T>
{
using Array<T>::size;
using Array<T>::data;
using Array<T>::ownmem;
using NgArray<T>::size;
using NgArray<T>::data;
using NgArray<T>::ownmem;
T mem[S]; // Intel C++ calls dummy constructor
// char mem[S*sizeof(T)];
@ -470,7 +470,7 @@ namespace netgen
public:
/// Generate array of logical and physical size asize
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;
if (asize > S)
@ -483,7 +483,7 @@ namespace netgen
ArrayMem & operator= (const T & val)
{
Array<T>::operator= (val);
NgArray<T>::operator= (val);
return *this;
}
@ -777,7 +777,7 @@ namespace netgen
template <class T>
void Intersection (const FlatArray<T> & in1, const FlatArray<T> & in2,
Array<T> & out)
NgArray<T> & out)
{
out.SetSize(0);
for(int i=0; i<in1.Size(); i++)
@ -786,7 +786,7 @@ namespace netgen
}
template <class T>
void Intersection (const FlatArray<T> & in1, const FlatArray<T> & in2, const FlatArray<T> & in3,
Array<T> & out)
NgArray<T> & out)
{
out.SetSize(0);
for(int i=0; i<in1.Size(); i++)

View File

@ -159,7 +159,7 @@ template <int BASE = 1>
class BitArrayChar
{
///
Array<char,BASE> data;
NgArray<char,BASE> data;
public:
///

View File

@ -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++)
{
strarray->Append (new char[strlen(val.Get(i))+1]);
@ -67,9 +67,9 @@ namespace netgen
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++)
numarray->Append (val.Get(i));
numlistflags.Set (name, numarray);
@ -118,26 +118,26 @@ namespace netgen
}
const Array<char*> &
const NgArray<char*> &
Flags :: GetStringListFlag (const char * name) const
{
if (strlistflags.Used (name))
return *strlistflags[name];
else
{
static Array<char*> dummy_array(0);
static NgArray<char*> dummy_array(0);
return dummy_array;
}
}
const Array<double> &
const NgArray<double> &
Flags ::GetNumListFlag (const char * name) const
{
if (numlistflags.Used (name))
return *numlistflags[name];
else
{
static Array<double> dummy_array(0);
static NgArray<double> dummy_array(0);
return dummy_array;
}
}

View File

@ -25,9 +25,9 @@ class Flags
///
SymbolTable<int> defflags;
///
SymbolTable<Array<char*>*> strlistflags;
SymbolTable<NgArray<char*>*> strlistflags;
///
SymbolTable<Array<double>*> numlistflags;
SymbolTable<NgArray<double>*> numlistflags;
public:
///
DLL_HEADER Flags ();
@ -43,9 +43,9 @@ public:
/// Sets boolean flag
DLL_HEADER void SetFlag (const char * name);
/// 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
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
DLL_HEADER void SaveFlags (const char * filename) const;
@ -67,9 +67,9 @@ public:
/// Returns boolean flag
DLL_HEADER bool GetDefineFlag (const char * name) const;
/// 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
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

View File

@ -480,7 +480,7 @@ class BASE_INDEX_CLOSED_HASHTABLE
protected:
///
// MoveableArray<INDEX> hash;
Array<INDEX> hash;
NgArray<INDEX> hash;
///
int invalid;
public:
@ -556,7 +556,7 @@ class INDEX_CLOSED_HASHTABLE : public BASE_INDEX_CLOSED_HASHTABLE
{
///
// MoveableArray<T> cont;
Array<T> cont;
NgArray<T> cont;
public:
///
@ -653,7 +653,7 @@ class BASE_INDEX_2_CLOSED_HASHTABLE
protected:
///
// MoveableArray<INDEX_2> hash;
Array<INDEX_2> hash;
NgArray<INDEX_2> hash;
///
int invalid;
size_t mask;
@ -718,7 +718,7 @@ protected:
template <class T>
class INDEX_2_CLOSED_HASHTABLE : public BASE_INDEX_2_CLOSED_HASHTABLE
{
Array<T> cont;
NgArray<T> cont;
public:
INDEX_2_CLOSED_HASHTABLE (size_t 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
{
protected:
Array<INDEX_3> hash;
NgArray<INDEX_3> hash;
int invalid;
size_t mask;
@ -922,7 +922,7 @@ template <class T>
class INDEX_3_CLOSED_HASHTABLE : public BASE_INDEX_3_CLOSED_HASHTABLE
{
// MoveableArray<T,0> cont;
Array<T,0> cont;
NgArray<T,0> cont;
public:
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;
///
Array<T_HASH> hash;
NgArray<T_HASH> hash;
///
Array<T> cont;
NgArray<T> cont;
public:
///
ClosedHashTable (size_t asize = 128)

View File

@ -95,7 +95,7 @@ namespace netgen
#endif
#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_Group gcomm, gsubcomm;
@ -105,7 +105,7 @@ namespace netgen
return subcomm;
}
#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; }
#endif
@ -160,7 +160,7 @@ namespace netgen
}
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;
int len;
@ -172,7 +172,7 @@ namespace netgen
}
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;
int len;
@ -257,7 +257,7 @@ namespace netgen
MPI_Comm_size(comm, &ntasks);
MPI_Comm_rank(comm, &rank);
Array<MPI_Request> requests;
NgArray<MPI_Request> requests;
for (int dest = 0; dest < ntasks; dest++)
if (dest != rank)
requests.Append (MyMPI_ISend (send_data[dest], dest, tag, comm));
@ -288,8 +288,8 @@ namespace netgen
int rank = comm.Rank();
int ntasks = comm.Size();
Array<int> send_sizes(ntasks);
Array<int> recv_sizes(ntasks);
NgArray<int> send_sizes(ntasks);
NgArray<int> recv_sizes(ntasks);
for (int i = 0; i < ntasks; i++)
send_sizes[i] = send_data[i].Size();
@ -304,7 +304,7 @@ namespace netgen
for (int i = 0; i < ntasks; i++)
recv_data.SetEntrySize (i, recv_sizes[i], sizeof(T));
Array<MPI_Request> requests;
NgArray<MPI_Request> requests;
for (int dest = 0; dest < ntasks; dest++)
if (dest != rank && send_data[dest].Size())
requests.Append (MyMPI_ISend (send_data[dest], dest, tag, comm));
@ -336,7 +336,7 @@ namespace netgen
}
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();
MyMPI_Bcast (size, comm);
@ -346,7 +346,7 @@ namespace netgen
}
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;
MPI_Comm_rank(comm, &id);

View File

@ -5,7 +5,7 @@
/**************************************************************************/
/*
Abstract data type Array
Abstract data type NgArray
*/

View File

@ -22,7 +22,7 @@ private:
///
void * freelist;
///
Array<char*> bablocks;
NgArray<char*> bablocks;
mutex block_allocator_mutex;
public:
///

View File

@ -16,7 +16,7 @@ namespace netgen
*/
class IndexSet
{
Array<int> set;
NgArray<int> set;
BitArray flags;
public:
IndexSet (int maxind);
@ -41,7 +41,7 @@ public:
void Del (int ind);
void Clear ();
const Array<int> & GetArray() { return set; }
const NgArray<int> & GetArray() { return set; }
};
}

View File

@ -16,8 +16,8 @@
namespace netgen
{
void Sort (const Array<double> & values,
Array<int> & order)
void Sort (const NgArray<double> & values,
NgArray<int> & order)
{
int n = values.Size();
int i, j;
@ -35,8 +35,8 @@ namespace netgen
}
void QuickSortRec (const Array<double> & values,
Array<int> & order,
void QuickSortRec (const NgArray<double> & values,
NgArray<int> & order,
int left, int right)
{
int i, j;
@ -62,8 +62,8 @@ namespace netgen
if (i < right) QuickSortRec (values, order, i, right);
}
void QuickSort (const Array<double> & values,
Array<int> & order)
void QuickSort (const NgArray<double> & values,
NgArray<int> & order)
{
int i, n = values.Size();
order.SetSize (n);

View File

@ -11,11 +11,11 @@ namespace netgen
{
// order(i) is sorted index of element i
extern void Sort (const Array<double> & values,
Array<int> & order);
extern void Sort (const NgArray<double> & values,
NgArray<int> & order);
extern void QuickSort (const Array<double> & values,
Array<int> & order);
extern void QuickSort (const NgArray<double> & values,
NgArray<int> & order);
@ -35,7 +35,7 @@ inline void BubbleSort (int size, T * data)
}
template <class T>
inline void BubbleSort (Array<T> & data)
inline void BubbleSort (NgArray<T> & data)
{
if(data.Size() > 0)
BubbleSort (data.Size(), &data[data.Begin()]);

View File

@ -41,7 +41,7 @@ public:
private:
///
Array<T> elems;
NgArray<T> elems;
///
INDEX size;
};

View File

@ -29,7 +29,7 @@ protected:
};
///
Array<linestruct> data;
NgArray<linestruct> data;
char * oneblock;
public:

View File

@ -14,14 +14,14 @@ namespace netgen
// double l,
MeshingParameters & mp, Mesh & mesh,
// double h, double h1, double h2, double hcurve,
double elto0, Array<double> & points)
double elto0, NgArray<double> & points)
{
double fperel, oldf, f;
int n = 10000;
Array<Point<2> > xi(n);
Array<double> hi(n);
NgArray<Point<2> > xi(n);
NgArray<double> hi(n);
for (int i = 0; i < n; i++)
{
@ -98,7 +98,7 @@ namespace netgen
int n = 100;
Point<2> mark, oldmark;
Array<double> curvepoints;
NgArray<double> curvepoints;
double edgelength, edgelengthold;
CalcPartition (spline, mp, mesh, elto0, curvepoints);
@ -111,7 +111,7 @@ namespace netgen
double lold = 0;
oldmark = pold;
edgelengthold = 0;
Array<int> locsearch;
NgArray<int> locsearch;
for (int i = 1; i <= n; i++)
{
@ -310,8 +310,8 @@ namespace netgen
{
// const int D = 2;
Array<int, PointIndex::BASE> mappoints (mesh.GetNP());
Array<double, PointIndex::BASE> param (mesh.GetNP());
NgArray<int, PointIndex::BASE> mappoints (mesh.GetNP());
NgArray<double, PointIndex::BASE> param (mesh.GetNP());
mappoints = -1;
param = 0;
@ -452,7 +452,7 @@ namespace netgen
for (int i = 1; i <= maxdomnr; i++)
mesh->AddFaceDescriptor (FaceDescriptor (i, 0, 0, i));
// set Array<string*> bcnames...
// set NgArray<string*> bcnames...
// number of bcnames
int maxsegmentindex = 0;
for (SegmentIndex si = 0; si < mesh->GetNSeg(); si++)
@ -478,8 +478,8 @@ namespace netgen
if (geometry.GetDomainTensorMeshing (domnr))
{ // tensor product mesh
Array<PointIndex, PointIndex::BASE> nextpi(bnp);
Array<int, PointIndex::BASE> si1(bnp), si2(bnp);
NgArray<PointIndex, PointIndex::BASE> nextpi(bnp);
NgArray<int, PointIndex::BASE> si1(bnp), si2(bnp);
PointIndex firstpi;
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;
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));
Array<int, PointIndex::BASE> compress(bnp);
NgArray<int, PointIndex::BASE> compress(bnp);
compress = -1;
int cnt = 0;
for (PointIndex pi : BndPntRange)

View File

@ -187,7 +187,7 @@ namespace netgen
{
int npts;
infile >> npts;
Array< Point<D> > pts(npts);
NgArray< Point<D> > pts(npts);
for (int j = 0; j < npts; j++)
for(int k=0; k<D; k++)
infile >> pts[j](k);
@ -358,7 +358,7 @@ namespace netgen
{
int npts;
infile >> npts;
Array< Point<D> > pts(npts);
NgArray< Point<D> > pts(npts);
for (int j = 0; j < npts; j++)
for(int k=0; k<D; k++)
infile >> pts[j](k);
@ -489,8 +489,8 @@ namespace netgen
string keyword;
Array < GeomPoint<D> > infilepoints (0);
Array <int> pointnrs (0);
NgArray < GeomPoint<D> > infilepoints (0);
NgArray <int> pointnrs (0);
nump = 0;
int numdomains = 0;
@ -654,7 +654,7 @@ namespace netgen
{
int npts;
infile >> npts;
Array< Point<D> > pts(npts);
NgArray< Point<D> > pts(npts);
for (int j = 0; j < npts; j++)
for(int k=0; k<D; k++)
infile >> pts[j](k);
@ -666,7 +666,7 @@ namespace netgen
int npts,order;
infile >> npts;
infile >> order;
Array< Point<D> > pts(npts);
NgArray< Point<D> > pts(npts);
for (int j = 0; j < npts; j++)
for(int k=0; k<D; k++)
infile >> pts[j](k);
@ -830,7 +830,7 @@ namespace netgen
/*
void CalcPartition (const SplineSegExt & spline,
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;

View File

@ -94,7 +94,7 @@ namespace netgen
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);
}
@ -131,12 +131,12 @@ namespace netgen
class SplineGeometry2d : public SplineGeometry<2>, public NetgenGeometry
{
protected:
Array<char*> materials;
Array<double> maxh;
Array<bool> quadmeshing;
Array<bool> tensormeshing;
Array<int> layer;
Array<string*> bcnames;
NgArray<char*> materials;
NgArray<double> maxh;
NgArray<bool> quadmeshing;
NgArray<bool> tensormeshing;
NgArray<int> layer;
NgArray<string*> bcnames;
double elto0 = 1.0;

View File

@ -144,7 +144,7 @@ DLL_HEADER void ExportGeom2d(py::module &m)
int leftdomain, int rightdomain, py::object bc, double maxh)
{
int n = 1000;
Array<Point<2>> points;
NgArray<Point<2>> points;
for (int i = 0; i <= n; i++)
{
double t = double(i)/n;

View File

@ -85,13 +85,13 @@ public:
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:
for lines $$ a x + b y + c = 0 $$ the interecting points are calculated
and stored in points */
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);}
virtual double MaxCurvature(void) const = 0;
@ -123,7 +123,7 @@ public:
virtual string GetType(void) const {return "line";}
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;}
};
@ -154,7 +154,7 @@ public:
const GeomPoint2d & TangentPoint (void) const { return p2; }
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;
};
@ -195,7 +195,7 @@ public:
virtual string GetType(void) const {return "circle";}
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;}
};
@ -208,11 +208,11 @@ public:
///
class DiscretePointsSegment : public SplineSegment
{
Array<Point<2> > pts;
NgArray<Point<2> > pts;
GeomPoint2d p1, p2;
public:
///
DiscretePointsSegment (const Array<Point<2> > & apts);
DiscretePointsSegment (const NgArray<Point<2> > & apts);
///
virtual ~DiscretePointsSegment ();
///

View File

@ -52,7 +52,7 @@ namespace netgen
glColor3f (0, 0, 1);
Array<Point<2> > points, otherpoints;
NgArray<Point<2> > points, otherpoints;
for (int i = 1; i <= geometry2d->GetSplines().Size(); i++)
{

View File

@ -206,7 +206,7 @@ namespace netgen
}
void ADTree :: GetMatch (Array <int> & matches)
void ADTree :: GetMatch (NgArray <int> & matches)
{
int nodenr;
@ -398,10 +398,10 @@ namespace netgen
void ADTree3 :: GetIntersecting (const float * bmin,
const float * bmax,
Array<int> & pis) const
NgArray<int> & pis) const
{
static Array<ADTreeNode3*> stack(1000);
static Array<int> stackdir(1000);
static NgArray<ADTreeNode3*> stack(1000);
static NgArray<int> stackdir(1000);
ADTreeNode3 * node;
int dir, stacks;
@ -658,10 +658,10 @@ namespace netgen
void ADTree3Div :: GetIntersecting (const float * bmin,
const float * bmax,
Array<int> & pis) const
NgArray<int> & pis) const
{
static Array<ADTreeNode3Div*> stack(1000);
static Array<int> stackdir(1000);
static NgArray<ADTreeNode3Div*> stack(1000);
static NgArray<int> stackdir(1000);
ADTreeNode3Div * node;
int dir, i, stacks;
@ -917,10 +917,10 @@ namespace netgen
void ADTree3M :: GetIntersecting (const float * bmin,
const float * bmax,
Array<int> & pis) const
NgArray<int> & pis) const
{
static Array<ADTreeNode3M*> stack(1000);
static Array<int> stackdir(1000);
static NgArray<ADTreeNode3M*> stack(1000);
static NgArray<int> stackdir(1000);
ADTreeNode3M * node;
int dir, i, stacks;
@ -1163,9 +1163,9 @@ namespace netgen
void ADTree3F :: GetIntersecting (const float * bmin,
const float * bmax,
Array<int> & pis) const
NgArray<int> & pis) const
{
static Array<ADTreeNode3F*> stack(1000);
static NgArray<ADTreeNode3F*> stack(1000);
ADTreeNode3F * node;
int dir, i, stacks;
@ -1427,9 +1427,9 @@ namespace netgen
void ADTree3FM :: GetIntersecting (const float * bmin,
const float * bmax,
Array<int> & pis) const
NgArray<int> & pis) const
{
static Array<ADTreeNode3FM*> stack(1000);
static NgArray<ADTreeNode3FM*> stack(1000);
ADTreeNode3FM * node;
int dir, i, stacks;
@ -1700,9 +1700,9 @@ namespace netgen
void ADTree6 :: GetIntersecting (const float * bmin,
const float * bmax,
Array<int> & pis) const
NgArray<int> & pis) const
{
// static Array<inttn6> stack(10000);
// static NgArray<inttn6> stack(10000);
// stack.SetSize (10000);
ArrayMem<inttn6,10000> stack(10000);
pis.SetSize(0);
@ -1920,9 +1920,9 @@ namespace netgen
template <int dim, typename T>
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);
ArrayMem<inttn<dim,T>,10000> stack(10000);
pis.SetSize(0);
@ -2195,9 +2195,9 @@ namespace netgen
void ADTree6F :: GetIntersecting (const float * bmin,
const float * bmax,
Array<int> & pis) const
NgArray<int> & pis) const
{
static Array<ADTreeNode6F*> stack(1000);
static NgArray<ADTreeNode6F*> stack(1000);
ADTreeNode6F * node;
int dir, i, stacks;
@ -2329,7 +2329,7 @@ namespace netgen
}
void Point3dTree :: GetIntersecting (const Point<3> & pmin, const Point<3> & pmax,
Array<int> & pis) const
NgArray<int> & pis) const
{
float pmi[3], pma[3];
for (int i = 0; i < 3; i++)
@ -2397,7 +2397,7 @@ namespace netgen
template <int dim, typename T>
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;
double tol = Tolerance();

View File

@ -51,11 +51,11 @@ class ADTree
int dim;
ADTreeNode * root;
float *cmin, *cmax;
Array<ADTreeNode*> ela;
NgArray<ADTreeNode*> ela;
const ADTreeCriterion * criterion;
Array<ADTreeNode*> stack;
Array<int> stackdir;
NgArray<ADTreeNode*> stack;
NgArray<int> stackdir;
int stackindex;
public:
@ -65,11 +65,11 @@ public:
void Insert (const float * p, int pi);
// void GetIntersecting (const float * bmin, const float * bmax,
// Array<int> & pis) const;
// NgArray<int> & pis) const;
void SetCriterion (ADTreeCriterion & acriterion);
void Reset ();
int Next ();
void GetMatch (Array<int> & matches);
void GetMatch (NgArray<int> & matches);
void DeleteElement (int pi);
@ -105,7 +105,7 @@ class ADTree3
{
ADTreeNode3 * root;
float cmin[3], cmax[3];
Array<ADTreeNode3*> ela;
NgArray<ADTreeNode3*> ela;
public:
ADTree3 (const float * acmin,
@ -114,7 +114,7 @@ public:
void Insert (const float * p, int pi);
void GetIntersecting (const float * bmin, const float * bmax,
Array<int> & pis) const;
NgArray<int> & pis) const;
void DeleteElement (int pi);
@ -155,7 +155,7 @@ class ADTree3Div
{
ADTreeNode3Div * root;
float cmin[3], cmax[3];
Array<ADTreeNode3Div*> ela;
NgArray<ADTreeNode3Div*> ela;
public:
ADTree3Div (const float * acmin,
@ -164,7 +164,7 @@ public:
void Insert (const float * p, int pi);
void GetIntersecting (const float * bmin, const float * bmax,
Array<int> & pis) const;
NgArray<int> & pis) const;
void DeleteElement (int pi);
@ -204,7 +204,7 @@ class ADTree3M
{
ADTreeNode3M * root;
float cmin[3], cmax[3];
Array<ADTreeNode3M*> ela;
NgArray<ADTreeNode3M*> ela;
public:
ADTree3M (const float * acmin,
@ -213,7 +213,7 @@ public:
void Insert (const float * p, int pi);
void GetIntersecting (const float * bmin, const float * bmax,
Array<int> & pis) const;
NgArray<int> & pis) const;
void DeleteElement (int pi);
@ -253,7 +253,7 @@ class ADTree3F
{
ADTreeNode3F * root;
float cmin[3], cmax[3];
Array<ADTreeNode3F*> ela;
NgArray<ADTreeNode3F*> ela;
public:
ADTree3F (const float * acmin,
@ -262,7 +262,7 @@ public:
void Insert (const float * p, int pi);
void GetIntersecting (const float * bmin, const float * bmax,
Array<int> & pis) const;
NgArray<int> & pis) const;
void DeleteElement (int pi);
@ -300,7 +300,7 @@ class ADTree3FM
{
ADTreeNode3FM * root;
float cmin[3], cmax[3];
Array<ADTreeNode3FM*> ela;
NgArray<ADTreeNode3FM*> ela;
public:
ADTree3FM (const float * acmin,
@ -309,7 +309,7 @@ public:
void Insert (const float * p, int pi);
void GetIntersecting (const float * bmin, const float * bmax,
Array<int> & pis) const;
NgArray<int> & pis) const;
void DeleteElement (int pi);
@ -351,7 +351,7 @@ class ADTree6
{
ADTreeNode6 * root;
float cmin[6], cmax[6];
Array<ADTreeNode6*> ela;
NgArray<ADTreeNode6*> ela;
public:
ADTree6 (const float * acmin,
@ -360,7 +360,7 @@ public:
void Insert (const float * p, int pi);
void GetIntersecting (const float * bmin, const float * bmax,
Array<int> & pis) const;
NgArray<int> & pis) const;
void DeleteElement (int pi);
@ -443,7 +443,7 @@ public:
T_ADTreeNode<dim,T> * root;
// float cmin[dim], cmax[dim];
Point<dim> cmin, cmax;
// Array<T_ADTreeNode<dim>*> ela;
// NgArray<T_ADTreeNode<dim>*> ela;
ClosedHashTable<T, T_ADTreeNode<dim,T>*> ela;
public:
T_ADTree (Point<dim> acmin, Point<dim> acmax);
@ -451,7 +451,7 @@ public:
void Insert (Point<dim> p, T pi);
void GetIntersecting (Point<dim> bmin, Point<dim> bmax,
Array<T> & pis) const;
NgArray<T> & pis) const;
void DeleteElement (T pi);
@ -501,7 +501,7 @@ class ADTree6F
{
ADTreeNode6F * root;
float cmin[6], cmax[6];
Array<ADTreeNode6F*> ela;
NgArray<ADTreeNode6F*> ela;
public:
ADTree6F (const float * acmin,
@ -510,7 +510,7 @@ public:
void Insert (const float * p, int pi);
void GetIntersecting (const float * bmin, const float * bmax,
Array<int> & pis) const;
NgArray<int> & pis) const;
void DeleteElement (int pi);
@ -547,7 +547,7 @@ public:
void DeleteElement (int pi)
{ tree->DeleteElement(pi); }
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; };
};
@ -569,7 +569,7 @@ public:
void DeleteElement (T pi)
{ tree->DeleteElement(pi); }
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
const auto & Tree() const { return *tree; };
auto & Tree() { return *tree; };

View File

@ -613,7 +613,7 @@ namespace netgen
class Polygon2d
{
protected:
Array<Point2d> points;
NgArray<Point2d> points;
public:
Polygon2d ();

View File

@ -711,8 +711,8 @@ void referencetransform :: ToPlain (const Point3d & p, Point3d & pp) const
pp.Z() = (ez_h * v);
}
void referencetransform :: ToPlain (const Array<Point3d> & p,
Array<Point3d> & pp) const
void referencetransform :: ToPlain (const NgArray<Point3d> & p,
NgArray<Point3d> & pp) const
{
Vec3d v;
int i;

View File

@ -735,7 +735,7 @@ namespace netgen
///
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;
};

View File

@ -35,14 +35,14 @@ namespace netgen
template <>
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;
}
template <>
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);
@ -62,7 +62,7 @@ namespace netgen
if(discr < 0)
return;
Array<double> t;
NgArray<double> t;
if(fabs(discr) < 1e-20)
t.Append(-0.5*c2/c1);
@ -488,7 +488,7 @@ namespace netgen
template<int D>
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);
@ -535,7 +535,7 @@ namespace netgen
template < int D >
void SplineSeg3<D> :: GetRawData (Array<double> & data) const
void SplineSeg3<D> :: GetRawData (NgArray<double> & data) const
{
data.Append(3);
for(int i=0; i<D; i++)

View File

@ -94,13 +94,13 @@ namespace netgen
virtual void GetCoeff (Vector & coeffs) const = 0;
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:
for lines $$ a x + b y + c = 0 $$ the interecting points are calculated
and stored in points */
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);}
// 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
{ 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;}
};
@ -157,7 +157,7 @@ namespace netgen
virtual string GetType(void) const {return "line";}
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
{
@ -168,7 +168,7 @@ namespace netgen
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; }
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
{
@ -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 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 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
{
@ -290,11 +290,11 @@ namespace netgen
template<int D>
class DiscretePointsSeg : public SplineSeg<D>
{
Array<Point<D> > pts;
NgArray<Point<D> > pts;
GeomPoint<D> p1n, p2n;
public:
///
DiscretePointsSeg (const Array<Point<D> > & apts);
DiscretePointsSeg (const NgArray<Point<D> > & apts);
// default constructor for archive
DiscretePointsSeg() {}
virtual void DoArchive(Archive& ar)
@ -346,7 +346,7 @@ namespace netgen
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);
if (n >= 2)
@ -445,7 +445,7 @@ namespace netgen
template<int D>
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);
@ -478,7 +478,7 @@ namespace netgen
template<int D>
void LineSeg<D> :: GetRawData (Array<double> & data) const
void LineSeg<D> :: GetRawData (NgArray<double> & data) const
{
data.Append(2);
for(int i=0; i<D; i++)
@ -599,7 +599,7 @@ namespace netgen
template<int D>
DiscretePointsSeg<D> :: DiscretePointsSeg (const Array<Point<D> > & apts)
DiscretePointsSeg<D> :: DiscretePointsSeg (const NgArray<Point<D> > & apts)
: pts (apts)
{
for(int i=0; i<D; i++)
@ -647,13 +647,13 @@ namespace netgen
template<int D, int ORDER>
class BSplineSeg : public SplineSeg<D>
{
Array<Point<D> > pts;
NgArray<Point<D> > pts;
GeomPoint<D> p1n, p2n;
Array<int> ti;
NgArray<int> ti;
public:
///
BSplineSeg (const Array<Point<D> > & apts);
BSplineSeg (const NgArray<Point<D> > & apts);
///
//default constructor for archive
BSplineSeg() {}
@ -680,7 +680,7 @@ namespace netgen
// Constructor
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)
{
/*

View File

@ -23,7 +23,7 @@ namespace netgen
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(elto0);
@ -36,7 +36,7 @@ namespace netgen
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;
if(raw_data[pos] != D)
@ -49,7 +49,7 @@ namespace netgen
splines.SetSize(int(raw_data[pos]));
pos++;
Array< Point<D> > pts(3);
NgArray< Point<D> > pts(3);
for(int i=0; i<splines.Size(); i++)
{
@ -99,7 +99,7 @@ namespace netgen
return;
}
Array<Point<D> > points;
NgArray<Point<D> > points;
for (int i = 0; i < splines.Size(); i++)
{
splines[i]->GetPoints (20, points);

View File

@ -26,23 +26,23 @@ namespace netgen
{
// protected:
public:
Array < GeomPoint<D> > geompoints;
Array < SplineSeg<D>* > splines;
NgArray < GeomPoint<D> > geompoints;
NgArray < SplineSeg<D>* > splines;
SplineGeometry() : geompoints{}, splines{} { ; }
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)
{
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; }
int GetNSplines (void) const { return splines.Size(); }

View File

@ -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
{
Array<INDEX_2> apairs;
NgArray<INDEX_2> apairs;
mesh->GetIdentifications().GetPairs (idnr+1, apairs);
for(auto& ind : apairs)
{

View File

@ -58,8 +58,8 @@ namespace netgen
#ifdef SOCKETS
extern AutoPtr<ClientSocket> clientsocket;
//extern Array< AutoPtr < ServerInfo > > servers;
extern Array< ServerInfo* > servers;
//extern NgArray< AutoPtr < ServerInfo > > servers;
extern NgArray< ServerInfo* > servers;
#endif
@ -141,7 +141,7 @@ void Ng_LoadMesh (const char * filename, ngcore::NgMPI_Comm comm)
}
istream * infile;
Array<char> buf; // for distributing geometry!
NgArray<char> buf; // for distributing geometry!
int strs;
if( id == 0) {
@ -191,9 +191,9 @@ void Ng_LoadMesh (const char * filename, ngcore::NgMPI_Comm comm)
bool endfile = false;
int n, dummy;
Array<int> segment_weights;
Array<int> surface_weights;
Array<int> volume_weights;
NgArray<int> segment_weights;
NgArray<int> surface_weights;
NgArray<int> volume_weights;
while (weightsfile.good() && !endfile)
{
@ -479,14 +479,14 @@ const char * Ng_GetDomainMaterial (int dom)
int Ng_GetUserDataSize (char * id)
{
Array<double> da;
NgArray<double> da;
mesh->GetUserData (id, da);
return da.Size();
}
void Ng_GetUserData (char * id, double * data)
{
Array<double> da;
NgArray<double> da;
mesh->GetUserData (id, da);
for (int i = 0; i < da.Size(); 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)
{
Array<int> * dummy(NULL);
NgArray<int> * dummy(NULL);
int ind = -1;
if(indices != NULL)
{
dummy = new Array<int>(numind);
dummy = new NgArray<int>(numind);
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)
{
Array<int> * dummy(NULL);
NgArray<int> * dummy(NULL);
int ind = -1;
if(indices != NULL)
{
dummy = new Array<int>(numind);
dummy = new NgArray<int>(numind);
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;
const MeshTopology & topology = mesh->GetTopology();
Array<int> ia;
NgArray<int> ia;
topology.GetSurfaceElementEdges (elnr, ia);
ned = ia.Size();
for (i = 1; i <= ned; i++)
@ -1800,7 +1800,7 @@ int Ng_GetClusterRepElement (int pi)
int Ng_GetNPeriodicVertices (int idnr)
{
Array<INDEX_2> apairs;
NgArray<INDEX_2> apairs;
mesh->GetIdentifications().GetPairs (idnr, apairs);
return apairs.Size();
}
@ -1809,7 +1809,7 @@ int Ng_GetNPeriodicVertices (int idnr)
// pairs should be an integer array of 2*npairs
void Ng_GetPeriodicVertices (int idnr, int * pairs)
{
Array<INDEX_2> apairs;
NgArray<INDEX_2> apairs;
mesh->GetIdentifications().GetPairs (idnr, apairs);
for (int i = 0; i < apairs.Size(); i++)
{
@ -1823,7 +1823,7 @@ void Ng_GetPeriodicVertices (int idnr, int * pairs)
int Ng_GetNPeriodicEdges (int idnr)
{
Array<int,PointIndex::BASE> map;
NgArray<int,PointIndex::BASE> map;
//const MeshTopology & top = mesh->GetTopology();
int nse = mesh->GetNSeg();
@ -1850,7 +1850,7 @@ int Ng_GetNPeriodicEdges (int idnr)
void Ng_GetPeriodicEdges (int idnr, int * pairs)
{
Array<int,PointIndex::BASE> map;
NgArray<int,PointIndex::BASE> map;
const MeshTopology & top = mesh->GetTopology();
int nse = mesh->GetNSeg();
@ -2157,9 +2157,9 @@ int Ng_Bisect_WithInfo ( const char * refinementfile, double ** qualityloss, int
mesh->LocalHFunction().SetGrading (mparam.grading);
Array<double> * qualityloss_arr = NULL;
NgArray<double> * qualityloss_arr = NULL;
if(qualityloss != NULL)
qualityloss_arr = new Array<double>;
qualityloss_arr = new NgArray<double>;
ref -> Bisect (*mesh, biopt, qualityloss_arr);

View File

@ -1070,7 +1070,7 @@ namespace netgen
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;
double lam3[3];
@ -1111,7 +1111,7 @@ namespace netgen
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;
Point<3> p3d(p[0], p[1], p[2]);

View File

@ -53,7 +53,7 @@ namespace netgen
string name;
string placement;
string valuetype;
Array<double> places;
NgArray<double> places;
};
@ -188,7 +188,7 @@ namespace netgen
else if (token == "MATERIALS")
{
*testout << "parse materials" << endl;
Array<double> young_modulus, poisson_ratio, mass_density;
NgArray<double> young_modulus, poisson_ratio, mass_density;
while (1)
{
@ -264,7 +264,7 @@ namespace netgen
string propid;
sbuf >> elnr >> def >> ch;
sbuf >> typid >> matid >> propid;
Array<int> pnums;
NgArray<int> pnums;
while (1)
{
int pn;
@ -305,7 +305,7 @@ namespace netgen
sbuf >> nr >> kw >> ch;
if (kw == "NODES")
{
Array<int> enums;
NgArray<int> enums;
while (1)
{
int en;
@ -329,7 +329,7 @@ namespace netgen
sbuf >> nr >> kw >> ch;
if (kw == "FACES")
{
Array<int> fnums;
NgArray<int> fnums;
while (1)
{
int fn;
@ -375,7 +375,7 @@ namespace netgen
else if (token == "LOADS")
{
Array<LoadType*> loadtypes;
NgArray<LoadType*> loadtypes;
while (1)
{

View File

@ -49,17 +49,17 @@ namespace netgen
Point3d p;
int numObj3D,numObj2D,numObj1D,numObj0D;
// bool nullstarted;
Array<int> eldom;
NgArray<int> eldom;
int minId3D = -1, minId2D = -1;
int maxId3D(-1), maxId2D(-1), maxId1D(-1), maxId0D(-1);
Array<Array<int> *> segmentdata;
Array<Element2d* > tris;
NgArray<NgArray<int> *> segmentdata;
NgArray<Element2d* > tris;
Array<int> userdata_int; // just save data for 1:1 output
Array<double> userdata_double;
Array<int> point_pids;
Array<int> tetfacedata;
Array<int> uid_to_group_3D, uid_to_group_2D, uid_to_group_1D, uid_to_group_0D;
NgArray<int> userdata_int; // just save data for 1:1 output
NgArray<double> userdata_double;
NgArray<int> point_pids;
NgArray<int> tetfacedata;
NgArray<int> uid_to_group_3D, uid_to_group_2D, uid_to_group_1D, uid_to_group_0D;
while(!done)
{
@ -226,7 +226,7 @@ namespace netgen
segmentdata.SetSize(nedges);
for(int i=0; i<nedges; i++)
{
segmentdata[i] = new Array<int>(7);
segmentdata[i] = new NgArray<int>(7);
*segmentdata[i] = -1;
in >> dummyint;
in >> (*segmentdata[i])[0] >> (*segmentdata[i])[1];
@ -350,8 +350,8 @@ namespace netgen
for(int i=0; i<nperiodicmasterfaces; i++)
{
int tri1,tri2,transl;
Array<PointIndex> nodes1(3),nodes2(3);
Array<double> sortval1(3),sortval2(3);
NgArray<PointIndex> nodes1(3),nodes2(3);
NgArray<double> sortval1(3),sortval2(3);
in >> tri1 >> tri2 >> transl;
if(transl > maxtransl)
@ -455,7 +455,7 @@ namespace netgen
cout << endl;
// Array<int> indextodescriptor(maxId2D+1);
// NgArray<int> indextodescriptor(maxId2D+1);
// for(int i=1; i<=mesh.GetNFD(); i++)
// indextodescriptor[mesh.GetFaceDescriptor(i).SurfNr()] = i;
@ -538,7 +538,7 @@ namespace netgen
case 27:
// Object2D GroupID, #Faces <immediately followed by> FaceID List
{
Array<int> ports;
NgArray<int> ports;
//int totnum = 0;
uid_to_group_2D.SetSize(maxId2D+1);
uid_to_group_2D = -1;
@ -665,7 +665,7 @@ namespace netgen
mesh.SetUserData("TETmesh:uid_to_group_0D",uid_to_group_0D);
Array<SurfaceElementIndex> surfindices(tris.Size());
NgArray<SurfaceElementIndex> surfindices(tris.Size());
surfindices = -1;
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++)
// indextodescriptor[mesh.GetFaceDescriptor(i).SurfNr()] = i;

View File

@ -99,7 +99,7 @@ namespace netgen
// 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;
Array<Segment> tmp_segments;
NgArray<Segment> tmp_segments;
while (in.good())
{
in >> reco;
@ -449,7 +449,7 @@ namespace netgen
int bcprop;
ifstream inpkt (pktfile.c_str());
inpkt >> np;
Array<double> values(np);
NgArray<double> values(np);
for (i = 1; i <= np; i++)
{
Point3d p(0,0,0);

View File

@ -39,11 +39,11 @@ namespace netgen
// Global arrays used to maintain the owner, neighbour and face lists
// so that they are accessible across functions
static Array<int> owner_facelist;
static Array<int> owner_celllist;
static Array<int> neighbour_celllist;
static Array<int> surfelem_bclist;
static Array<INDEX_2> surfelem_lists;
static NgArray<int> owner_facelist;
static NgArray<int> owner_celllist;
static NgArray<int> neighbour_celllist;
static NgArray<int> surfelem_bclist;
static NgArray<INDEX_2> surfelem_lists;
@ -118,17 +118,17 @@ namespace netgen
// Initialise arrays to zero if required
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
// location where the face appears in the Owner list is also stored
// to speed up creation of the Neighbour list
Array<int> ownerfaces(totfaces);
NgArray<int> ownerfaces(totfaces);
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
// 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
// and boundary condition arrays within the main loop
@ -383,9 +383,9 @@ namespace netgen
*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
Array<int> facepnts;
NgArray<int> facepnts;
// Write the faces in the order specified in the owners lists of the
// internal cells and the boundary cells
@ -545,7 +545,7 @@ namespace netgen
*outfile << "\n";
Array<INDEX_3> bcarray;
NgArray<INDEX_3> bcarray;
int ind = 1;
// Since the boundary conditions are already sorted in ascending

View File

@ -139,7 +139,7 @@ void WriteAbaqusFormat (const Mesh & mesh,
int masternode(0);
Array<INDEX_2> pairs;
NgArray<INDEX_2> pairs;
BitArray master(np), help(np);
master.Set();
for (i = 1; i <= 3; i++)
@ -158,7 +158,7 @@ void WriteAbaqusFormat (const Mesh & mesh,
cout << "masternode = " << masternode << " = "
<< mesh.Point(masternode) << endl;
Array<int> slaves(3);
NgArray<int> slaves(3);
for (i = 1; i <= 3; i++)
{
mesh.GetIdentifications().GetPairs (i, pairs);

View File

@ -39,8 +39,8 @@ void WriteDiffPackFormat (const Mesh & mesh,
int np = mesh.GetNP();
int ne = mesh.GetNE();
int nse = mesh.GetNSE();
Array <int> BIname;
Array <int> BCsinpoint;
NgArray <int> BIname;
NgArray <int> BCsinpoint;
int i, j, k, l;
@ -203,8 +203,8 @@ void WriteDiffPackFormat (const Mesh & mesh,
int np = mesh.GetNP();
//int ne = mesh.GetNE();
int nse = mesh.GetNSE();
Array <int> BIname;
Array <int> BCsinpoint;
NgArray <int> BIname;
NgArray <int> BCsinpoint;
int i, j, k, l;

View File

@ -65,9 +65,9 @@ void WriteFluentFormat (const Mesh & mesh,
Element2d face, face2;
int i2, j2;
Array<INDEX_3> surfaceelp;
Array<int> surfaceeli;
Array<int> locels;
NgArray<INDEX_3> surfaceelp;
NgArray<int> surfaceeli;
NgArray<int> locels;
//no cells=no tets
//no faces=2*tets

View File

@ -33,7 +33,7 @@ void WriteJCMFormat (const Mesh & mesh,
int np = mesh.GetNP();
// Identic points
Array<int,PointIndex::BASE> identmap1, identmap2, identmap3;
NgArray<int,PointIndex::BASE> identmap1, identmap2, identmap3;
mesh.GetIdentifications().GetMap(1, identmap1);
mesh.GetIdentifications().GetMap(2, identmap2);
mesh.GetIdentifications().GetMap(3, identmap3);
@ -95,7 +95,7 @@ void WriteJCMFormat (const Mesh & mesh,
int nbquad = 0;
// array with 1 if point on any tetra, 0 else
// 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 = 0;
for (i = 1; i <= ne; i++)

View File

@ -27,7 +27,7 @@ void WriteTecPlotFormat (const Mesh & mesh,
INDEX ne = mesh.GetNE();
INDEX nse = mesh.GetNSE();
Array<int> sn(np);
NgArray<int> sn(np);
ofstream outfile(filename.c_str());
outfile << "TITLE=\" " << filename << "\"" << endl;

View File

@ -23,16 +23,16 @@ namespace netgen
cout << "starting .tet export to file " << filename << endl;
Array<int> point_ids,edge_ids,face_ids;
Array<int> elnum(mesh.GetNE());
NgArray<int> point_ids,edge_ids,face_ids;
NgArray<int> elnum(mesh.GetNE());
elnum = -1;
Array<int> userdata_int;
Array<double> userdata_double;
Array<int> ports;
NgArray<int> userdata_int;
NgArray<double> userdata_double;
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_double = 0;
@ -98,9 +98,9 @@ namespace netgen
INDEX_2_CLOSED_HASHTABLE<int> edgenumbers(6*mesh.GetNE()+3*mesh.GetNSE());;
INDEX_3_CLOSED_HASHTABLE<int> facenumbers(4*mesh.GetNE()+mesh.GetNSE());
Array<INDEX_2> edge2node;
Array<INDEX_3> face2edge;
Array<INDEX_4> element2face;
NgArray<INDEX_2> edge2node;
NgArray<INDEX_3> face2edge;
NgArray<INDEX_4> element2face;
int numelems(0),numfaces(0),numedges(0),numnodes(0);
@ -285,7 +285,7 @@ namespace netgen
int numObj0D,numObj1D,numObj2D,numObj3D;
int numports = ports.Size();
Array<int> nodenum(point_ids.Size()+1);
NgArray<int> nodenum(point_ids.Size()+1);
nodenum = -1;
@ -367,18 +367,18 @@ namespace netgen
uidpid = "UID";
Array< Array<int,PointIndex::BASE>* > idmaps;
NgArray< NgArray<int,PointIndex::BASE>* > idmaps;
for(int i=1; i<=mesh.GetIdentifications().GetMaxNr(); i++)
{
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);
}
}
Array<int> id_num,id_type;
Array< Array<int> *> id_groups;
NgArray<int> id_num,id_type;
NgArray< NgArray<int> *> id_groups;
// sst 2008-03-12: Write problem class...
@ -449,7 +449,7 @@ namespace netgen
if(nodenum[i] == -1)
continue;
Array<int> group;
NgArray<int> group;
group.Append(i);
for(int j=0; j<idmaps.Size(); j++)
{
@ -466,7 +466,7 @@ namespace netgen
}
if(group.Size() > 1)
{
id_groups.Append(new Array<int>(group));
id_groups.Append(new NgArray<int>(group));
if(group.Size() == 2)
{
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++)
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++)
{
idmaps_edge[i] = new Array<int,PointIndex::BASE>(numedges);
idmaps_edge[i] = new NgArray<int,PointIndex::BASE>(numedges);
(*idmaps_edge[i]) = 0;
}
Array<int> possible;
NgArray<int> possible;
for(int i=0; i<edge2node.Size(); i++)
{
const INDEX_2 & v = edge2node[i];
@ -649,7 +649,7 @@ namespace netgen
continue;
Array<int> group;
NgArray<int> group;
group.Append(i);
for(int j=0; j<idmaps_edge.Size(); j++)
{
@ -667,7 +667,7 @@ namespace netgen
if(group.Size() > 1)
{
id_num[i] = 1;
id_groups.Append(new Array<int>(group));
id_groups.Append(new NgArray<int>(group));
if(group.Size() == 2)
{
id_type[i] = 1;
@ -701,7 +701,7 @@ namespace netgen
continue;
Array<int> group;
NgArray<int> group;
group.Append(i);
for(int j=0; j<idmaps_edge.Size(); j++)
{
@ -719,7 +719,7 @@ namespace netgen
if(group.Size() > 1)
{
id_num[i] = 1;
id_groups.Append(new Array<int>(group));
id_groups.Append(new NgArray<int>(group));
if(group.Size() == 2)
{
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++)
edge_to_face[i] = new Array<int>;
edge_to_face[i] = new NgArray<int>;
for(int i=0; i<idmaps.Size(); i++)
@ -864,7 +864,7 @@ namespace netgen
if(id_num[i] != 0)
continue;
Array<int> group;
NgArray<int> group;
group.Append(i);
for(int j=0; j<idmaps.Size(); j++)
{
@ -882,7 +882,7 @@ namespace netgen
if(group.Size() > 1)
{
id_num[i] = -1;
id_groups.Append(new Array<int>(group));
id_groups.Append(new NgArray<int>(group));
if(group.Size() == 2)
n2++;
else
@ -981,7 +981,7 @@ namespace netgen
<< endl;
Array< Array<int> * > groups;
NgArray< NgArray<int> * > groups;
int maxg = -1;
for(int i = 0; i<uid_to_group_3D.Size(); i++)
@ -999,7 +999,7 @@ namespace netgen
groups.SetSize(maxg+1);
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++)
if(uid_to_group_3D[mesh[i].GetIndex()] >= 0)

View File

@ -18,8 +18,8 @@ namespace netgen
extern MeshingParameters mparam;
void RegisterUserFormats (Array<const char*> & names,
Array<const char*> & extensions)
void RegisterUserFormats (NgArray<const char*> & names,
NgArray<const char*> & extensions)
{
const char *types[] =
@ -392,7 +392,7 @@ void WriteSTLExtFormat (const Mesh & mesh,
int numBCs = 0;
Array<int> faceBCs;
NgArray<int> faceBCs;
TABLE<int> faceBCMapping;
faceBCs.SetSize(mesh.GetNFD());
@ -427,7 +427,7 @@ void WriteSTLExtFormat (const Mesh & mesh,
for(int faceNr = 1;faceNr <= faceBCMapping.EntrySize(bcInd); faceNr++)
{
Array<SurfaceElementIndex> faceSei;
NgArray<SurfaceElementIndex> faceSei;
mesh.GetSurfaceElementsOfFace(faceBCMapping.Get(bcInd,faceNr),faceSei);
for (int i = 0; i < faceSei.Size(); i++)
@ -778,7 +778,7 @@ void WriteEdgeElementFormat (const Mesh & mesh,
int inverttets = mparam.inverttets;
int invertsurf = mparam.inverttrigs;
Array<int> edges;
NgArray<int> edges;
ofstream outfile (filename.c_str());
@ -935,7 +935,7 @@ void WriteFile (int typ,
INDEX_2_HASHTABLE<int> edgeht(mesh.GetNP());
// list of edges
Array<INDEX_2> edgelist;
NgArray<INDEX_2> edgelist;
// edge (point) on boundary ?
BitArray bedge, bpoint(mesh.GetNP());

View File

@ -154,8 +154,8 @@ void WriteDolfinFormat (const Mesh & mesh,
const string & filename);
extern void DLL_HEADER RegisterUserFormats (Array<const char*> & names,
Array<const char*> & extensions);
extern void DLL_HEADER RegisterUserFormats (NgArray<const char*> & names,
NgArray<const char*> & extensions);
extern bool DLL_HEADER WriteUserFormat (const string & format,

View File

@ -54,12 +54,12 @@ namespace netgen
int p1, p2;
};
static Array<POINT3D> points;
static Array<VOLELEMENT> volelements;
static Array<SURFELEMENT> surfelements;
static NgArray<POINT3D> points;
static NgArray<VOLELEMENT> volelements;
static NgArray<SURFELEMENT> surfelements;
static Array<FACE> faces;
static Array<EDGE> edges;
static NgArray<FACE> faces;
static NgArray<EDGE> edges;
void ReadFile (char * filename)

View File

@ -427,7 +427,7 @@ namespace netgen
double max, hr;
Array<int> p(n); // pivot-permutation
NgArray<int> p(n); // pivot-permutation
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)
{
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)
{
int i, j;

View File

@ -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);
// for (int i = 0; i < points.Size(); i++)
@ -270,11 +270,11 @@ namespace netgen
int AdFront2 :: GetLocals (int baselineindex,
Array<Point3d> & locpoints,
Array<MultiPointGeomInfo> & pgeominfo,
Array<INDEX_2> & loclines, // local index
Array<INDEX> & pindex,
Array<INDEX> & lindex,
NgArray<Point3d> & locpoints,
NgArray<MultiPointGeomInfo> & pgeominfo,
NgArray<INDEX_2> & loclines, // local index
NgArray<INDEX> & pindex,
NgArray<INDEX> & lindex,
double xh)
{
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 = -1;
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,
const Array<int> * testfaces) const
const NgArray<int> * testfaces) const
{
int cnt = 0;

View File

@ -165,21 +165,21 @@ class AdFront2
{
///
Array<FrontPoint2> points; /// front points
Array<FrontLine> lines; /// front lines
NgArray<FrontPoint2> points; /// front points
NgArray<FrontLine> lines; /// front lines
Box3d boundingbox;
BoxTree<3> linesearchtree; /// search tree for lines
Point3dTree pointsearchtree; /// search tree for points
Point3dTree cpointsearchtree; /// search tree for cone points (not used ???)
Array<int> delpointl; /// list of deleted front points
Array<int> dellinel; /// list of deleted front lines
NgArray<int> delpointl; /// list of deleted front points
NgArray<int> dellinel; /// list of deleted front lines
int nfl; /// number of front lines;
INDEX_2_HASHTABLE<int> * allflines; /// all front lines ever have been
Array<int> invpindex;
NgArray<int> invpindex;
int minval;
int starti;
@ -192,7 +192,7 @@ public:
~AdFront2 ();
///
// void GetPoints (Array<Point<3> > & apoints) const;
// void GetPoints (NgArray<Point<3> > & apoints) const;
///
void Print (ostream & ost) const;
@ -216,11 +216,11 @@ public:
///
int GetLocals (int baseline,
Array<Point3d> & locpoints,
Array<MultiPointGeomInfo> & pgeominfo,
Array<INDEX_2> & loclines, // local index
Array<int> & pindex,
Array<int> & lindex,
NgArray<Point3d> & locpoints,
NgArray<MultiPointGeomInfo> & pgeominfo,
NgArray<INDEX_2> & loclines, // local index
NgArray<int> & pindex,
NgArray<int> & lindex,
double xh);
///
@ -262,7 +262,7 @@ public:
bool Inside (const Point<2> & p) const;
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);

View File

@ -84,7 +84,7 @@ AdFront3 :: ~AdFront3 ()
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++)
@ -267,7 +267,7 @@ void AdFront3 :: CreateTrees ()
void AdFront3 :: GetIntersectingFaces (const Point<3> & pmin, const Point<3> & pmax,
Array<int> & ifaces) const
NgArray<int> & ifaces) const
{
facetree -> GetIntersecting (pmin, pmax, ifaces);
}
@ -357,7 +357,7 @@ void AdFront3 :: RebuildInternalTables ()
if (usecl.Test(i))
cntcl++;
Array<double, PointIndex::BASE> clvol (np);
NgArray<double, PointIndex::BASE> clvol (np);
clvol = 0.0;
for (int i = 1; i <= faces.Size(); i++)
@ -485,10 +485,10 @@ int AdFront3 :: SelectBaseElement ()
int AdFront3 :: GetLocals (int fstind,
Array<Point3d, PointIndex::BASE> & locpoints,
Array<MiniElement2d> & locfaces, // local index
Array<PointIndex, PointIndex::BASE> & pindex,
Array<INDEX> & findex,
NgArray<Point3d, PointIndex::BASE> & locpoints,
NgArray<MiniElement2d> & locfaces, // local index
NgArray<PointIndex, PointIndex::BASE> & pindex,
NgArray<INDEX> & findex,
INDEX_2_HASHTABLE<int> & getconnectedpairs,
float xh,
float relh,
@ -509,11 +509,11 @@ int AdFront3 :: GetLocals (int fstind,
PointIndex pstind;
Point3d midp, p0;
// static Array<int, PointIndex::BASE> invpindex;
// static NgArray<int, PointIndex::BASE> invpindex;
Array<MiniElement2d> locfaces2; //all local faces in radius xh
Array<int> locfaces3; // all faces in outer radius relh
Array<INDEX> findex2;
NgArray<MiniElement2d> locfaces2; //all local faces in radius xh
NgArray<int> locfaces3; // all faces in outer radius relh
NgArray<INDEX> findex2;
locfaces2.SetSize(0);
locfaces3.SetSize(0);
@ -657,12 +657,12 @@ int AdFront3 :: GetLocals (int fstind,
// returns all points connected with fi
void AdFront3 :: GetGroup (int fi,
Array<MeshPoint, PointIndex::BASE> & grouppoints,
Array<MiniElement2d> & groupelements,
Array<PointIndex, PointIndex::BASE> & pindex,
Array<INDEX> & findex)
NgArray<MeshPoint, PointIndex::BASE> & grouppoints,
NgArray<MiniElement2d> & groupelements,
NgArray<PointIndex, PointIndex::BASE> & pindex,
NgArray<INDEX> & findex)
{
// static Array<char> pingroup;
// static NgArray<char> pingroup;
int changed;
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,
const Array<int> * testfaces) const
const NgArray<int> * testfaces) const
{
const Point<3> *line[2];
line[0] = &lp1;

View File

@ -176,11 +176,11 @@ public:
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 ?
TABLE<int, PointIndex::BASE> * connectedpairs;
@ -208,8 +208,8 @@ class AdFront3
int lasti;
/// minimal selection-value of baseelements
int minval;
Array<PointIndex, PointIndex::BASE, PointIndex> invpindex;
Array<char> pingroup;
NgArray<PointIndex, PointIndex::BASE, PointIndex> invpindex;
NgArray<char> pingroup;
///
class BoxTree<3> * facetree;
@ -220,7 +220,7 @@ public:
///
~AdFront3 ();
///
void GetPoints (Array<Point<3> > & apoints) const;
void GetPoints (NgArray<Point<3> > & apoints) const;
///
int GetNP() const
{ return points.Size(); }
@ -254,17 +254,17 @@ public:
///
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;
///
int GetLocals (int baseelement,
Array<Point3d, PointIndex::BASE> & locpoints,
Array<MiniElement2d> & locfaces, // local index
Array<PointIndex, PointIndex::BASE> & pindex,
Array<INDEX> & findex,
NgArray<Point3d, PointIndex::BASE> & locpoints,
NgArray<MiniElement2d> & locfaces, // local index
NgArray<PointIndex, PointIndex::BASE> & pindex,
NgArray<INDEX> & findex,
INDEX_2_HASHTABLE<int> & connectedpairs,
float xh,
float relh,
@ -272,10 +272,10 @@ public:
///
void GetGroup (int fi,
Array<MeshPoint, PointIndex::BASE> & grouppoints,
Array<MiniElement2d> & groupelements,
Array<PointIndex, PointIndex::BASE> & pindex,
Array<INDEX> & findex);
NgArray<MeshPoint, PointIndex::BASE> & grouppoints,
NgArray<MiniElement2d> & groupelements,
NgArray<PointIndex, PointIndex::BASE> & pindex,
NgArray<INDEX> & findex);
///
void DeleteFace (INDEX fi);
@ -300,7 +300,7 @@ public:
bool Inside (const Point<3> & p) const;
/// both points on same side ?
int SameSide (const Point<3> & lp1, const Point<3> & lp2,
const Array<int> * testfaces = NULL) const;
const NgArray<int> * testfaces = NULL) const;
///

View File

@ -5,7 +5,7 @@ namespace netgen
{
DLL_HEADER GeometryRegisterArray geometryregister;
//DLL_HEADER Array<GeometryRegister*> geometryregister;
//DLL_HEADER NgArray<GeometryRegister*> geometryregister;
GeometryRegister :: ~GeometryRegister()
{ ; }

View File

@ -44,7 +44,7 @@ namespace netgen
virtual void SetParameters (Tcl_Interp * /* interp */) { ; }
};
class DLL_HEADER GeometryRegisterArray : public Array<GeometryRegister*>
class DLL_HEADER GeometryRegisterArray : public NgArray<GeometryRegister*>
{
public:
virtual ~GeometryRegisterArray()
@ -56,7 +56,7 @@ namespace netgen
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;
}

View File

@ -51,7 +51,7 @@ namespace netgen
Function to create a list of all the unique colours
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.Elem(1) = mesh.GetFaceDescriptor(1).SurfColour();
@ -143,9 +143,9 @@ namespace netgen
// Arrays to hold the specified RGB colour triplets as well
// as the associated boundary condition number
Array<Vec3d> bc_colours(numentries);
Array<int> bc_num(numentries);
Array<bool> bc_used(numentries);
NgArray<Vec3d> bc_colours(numentries);
NgArray<int> bc_num(numentries);
NgArray<bool> bc_used(numentries);
// Actually read in the data from the file
for(int i = 1; i <= numentries; i++)
@ -198,7 +198,7 @@ namespace netgen
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
GetFaceColours(mesh,all_colours);
@ -290,9 +290,9 @@ namespace netgen
*/
void AutoColourAlg_Sorted(Mesh & mesh)
{
Array<Vec3d> all_colours;
Array<int> faces_sorted;
Array<int> colours_sorted;
NgArray<Vec3d> all_colours;
NgArray<int> faces_sorted;
NgArray<int> colours_sorted;
// Extract all the colours to see how many there are
GetFaceColours(mesh,all_colours);
@ -322,7 +322,7 @@ namespace netgen
colours_sorted.SetSize(all_colours.Size()+1);
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
// identifiers according to the number of surface mesh elements
// of a given colour
@ -342,7 +342,7 @@ namespace netgen
// And save this number into an array for later sorting
for(int face_index = 1; face_index <= nfd; face_index++)
{
Array<SurfaceElementIndex> se_face;
NgArray<SurfaceElementIndex> se_face;
mesh.GetSurfaceElementsOfFace(face_index, se_face);

View File

@ -45,7 +45,7 @@ namespace netgen
//extern void OCCAutoColourBcProps(Mesh & mesh, OCCGeometry & occgeometry, const char *occcolourfile);
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);
}

View File

@ -12,11 +12,11 @@ namespace netgen
class MarkedTri;
class MarkedQuad;
typedef Array<MarkedTet> T_MTETS;
typedef Array<MarkedPrism> T_MPRISMS;
typedef Array<MarkedIdentification> T_MIDS;
typedef Array<MarkedTri> T_MTRIS;
typedef Array<MarkedQuad> T_MQUADS;
typedef NgArray<MarkedTet> T_MTETS;
typedef NgArray<MarkedPrism> T_MPRISMS;
typedef NgArray<MarkedIdentification> T_MIDS;
typedef NgArray<MarkedTri> T_MTRIS;
typedef NgArray<MarkedQuad> T_MQUADS;
@ -303,7 +303,7 @@ namespace netgen
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)
{
PrintMessage(4,"sorting ... ");
@ -313,8 +313,8 @@ namespace netgen
{
// new, fast version
Array<INDEX_2> edges;
Array<int> eclasses;
NgArray<INDEX_2> edges;
NgArray<int> eclasses;
int i, j, k;
int cntedges = 0;
@ -585,7 +585,7 @@ namespace netgen
// }
// compute classlength:
Array<double> edgelength(cntedges);
NgArray<double> edgelength(cntedges);
/*
for (i = 1; i <= cntedges; i++)
@ -676,7 +676,7 @@ namespace netgen
// sort edges:
Array<int> sorted(cntedges);
NgArray<int> sorted(cntedges);
QuickSort (edgelength, sorted);
@ -974,7 +974,7 @@ namespace netgen
bool BTDefineMarkedId(const Element2d & el,
INDEX_2_CLOSED_HASHTABLE<int> & edgenumber,
const Array<int,PointIndex::BASE> & idmap,
const NgArray<int,PointIndex::BASE> & idmap,
MarkedIdentification & mi)
{
@ -1392,7 +1392,7 @@ namespace netgen
void BTBisectIdentification (const MarkedIdentification & oldid,
Array<PointIndex> & newp,
NgArray<PointIndex> & newp,
MarkedIdentification & newid1,
MarkedIdentification & newid2)
{
@ -1626,10 +1626,10 @@ namespace netgen
{
int i,j,k;
Array< Array<int,PointIndex::BASE>* > idmaps;
NgArray< NgArray<int,PointIndex::BASE>* > idmaps;
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());
}
@ -1847,7 +1847,7 @@ namespace netgen
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;
for (int i = 1; i <= conto.EntrySize(node); i++)
@ -1955,7 +1955,7 @@ namespace netgen
void BisectTetsCopyMesh (Mesh & mesh, const NetgenGeometry *,
BisectionOptions & opt,
const Array< Array<int,PointIndex::BASE>* > & idmaps,
const NgArray< NgArray<int,PointIndex::BASE>* > & idmaps,
const string & refinfofile)
{
// mtets.SetName ("bisection, tets");
@ -2201,24 +2201,24 @@ namespace netgen
/*
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());
Array< Array<MarkedPrism>*,PointIndex::BASE > mprisms_old(mesh.GetNP());
Array< Array<MarkedIdentification>*,PointIndex::BASE > mids_old(mesh.GetNP());
Array< Array<MarkedTri>*,PointIndex::BASE > mtris_old(mesh.GetNP());
Array< Array<MarkedQuad>*,PointIndex::BASE > mquads_old(mesh.GetNP());
NgArray< NgArray<MarkedTet>*,PointIndex::BASE > mtets_old(mesh.GetNP());
NgArray< NgArray<MarkedPrism>*,PointIndex::BASE > mprisms_old(mesh.GetNP());
NgArray< NgArray<MarkedIdentification>*,PointIndex::BASE > mids_old(mesh.GetNP());
NgArray< NgArray<MarkedTri>*,PointIndex::BASE > mtris_old(mesh.GetNP());
NgArray< NgArray<MarkedQuad>*,PointIndex::BASE > mquads_old(mesh.GetNP());
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++)
mprisms_old[i] = new Array<MarkedPrism>;
mprisms_old[i] = new NgArray<MarkedPrism>;
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++)
mtris_old[i] = new Array<MarkedTri>;
mtris_old[i] = new NgArray<MarkedTri>;
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++)
mtets_old[mtets[i].pnums[0]]->Append(mtets[i]);
@ -2454,11 +2454,11 @@ namespace netgen
void UpdateEdgeMarks (Mesh & mesh,
const Array< Array<int,PointIndex::BASE>* > & idmaps)
//const Array < Array<Element>* > & elements_before,
//const Array < Array<int>* > & markedelts_num,
// const Array < Array<Element2d>* > & surfelements_before,
// const Array < Array<int>* > & markedsurfelts_num)
const NgArray< NgArray<int,PointIndex::BASE>* > & idmaps)
//const NgArray < NgArray<Element>* > & elements_before,
//const NgArray < NgArray<int>* > & markedelts_num,
// const NgArray < NgArray<Element2d>* > & surfelements_before,
// const NgArray < NgArray<int>* > & markedsurfelts_num)
{
/*
T_MTETS mtets_old; mtets_old.Copy(mtets);
@ -2687,7 +2687,7 @@ namespace netgen
void Refinement :: Bisect (Mesh & mesh,
BisectionOptions & opt,
Array<double> * quality_loss) const
NgArray<double> * quality_loss) const
{
PrintMessage(1,"Mesh bisection");
PushStatus("Mesh bisection");
@ -2717,12 +2717,12 @@ namespace netgen
LocalizeEdgePoints(mesh);
delete loct;
Array< Array<int,PointIndex::BASE>* > idmaps;
NgArray< NgArray<int,PointIndex::BASE>* > idmaps;
for(int i=1; i<=mesh.GetIdentifications().GetMaxNr(); i++)
{
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);
}
}
@ -2805,7 +2805,7 @@ namespace netgen
#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;
for (ElementIndex ei = 0; ei < ne; ei++)
@ -3181,7 +3181,7 @@ namespace netgen
else
{
// vertices with 2 different bnds
Array<int> bndind(np);
NgArray<int> bndind(np);
bndind = 0;
for (int i = 1; i <= mesh.GetNSeg(); i++)
{
@ -3347,11 +3347,11 @@ namespace netgen
if (mids.Elem(i).marked)
{
MarkedIdentification oldid,newid1,newid2;
Array<PointIndex> newp;
NgArray<PointIndex> newp;
oldid = mids.Get(i);
Array<INDEX_2> edges;
NgArray<INDEX_2> edges;
edges.Append(INDEX_2(oldid.pnums[oldid.markededge],
oldid.pnums[(oldid.markededge+1)%oldid.np]));
edges.Append(INDEX_2(oldid.pnums[oldid.markededge + oldid.np],
@ -3617,7 +3617,7 @@ namespace netgen
if (opt.refine_hp)
{
//
Array<int> v_order (mesh.GetNP());
NgArray<int> v_order (mesh.GetNP());
v_order = 0;
if (mesh.GetDimension() == 3)
{
@ -3917,7 +3917,7 @@ namespace netgen
// update identification tables
for (int i = 1; i <= mesh.GetIdentifications().GetMaxNr(); i++)
{
Array<int,PointIndex::BASE> identmap;
NgArray<int,PointIndex::BASE> identmap;
mesh.GetIdentifications().GetMap (i, identmap);
@ -3995,8 +3995,8 @@ namespace netgen
NgProfiler::RegionTimer * regt(NULL);
regt = new NgProfiler::RegionTimer(reptimer);
Array<ElementIndex> bad_elts;
Array<double> pure_badness;
NgArray<ElementIndex> bad_elts;
NgArray<double> pure_badness;
if(do_repair || quality_loss != NULL)
{

View File

@ -46,7 +46,7 @@ public:
void Refine (Mesh & mesh) const;
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);
@ -82,7 +82,7 @@ public:
void ValidateSecondOrder (Mesh & mesh);
void ValidateRefinedMesh (Mesh & mesh,
Array<INDEX_2> & parents);
NgArray<INDEX_2> & parents);
MeshOptimize2d * Get2dOptimizer(void) const
{

View File

@ -20,7 +20,7 @@ namespace netgen
cout << "Trigs: " << mesh.GetNSE() << endl;
BitArray bndnodes(np);
Array<int> mapto(np);
NgArray<int> mapto(np);
bndnodes.Clear();
for (i = 1; i <= mesh.GetNSeg(); i++)
@ -151,11 +151,11 @@ namespace netgen
double angleThreshold = 5.0;
Array<int> surfid (blp.surfid);
NgArray<int> surfid (blp.surfid);
int prismlayers = blp.prismlayers;
double hfirst = blp.hfirst;
double growthfactor = blp.growthfactor;
Array<double> heights (blp.heights);
NgArray<double> heights (blp.heights);
bool grow_edges = false; // grow layer at edges
@ -213,11 +213,11 @@ namespace netgen
BitArray bndnodes(np+1); // big enough for 1-based array
// 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
// 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
// to the surface of interest
@ -324,8 +324,8 @@ namespace netgen
if(!surfid.Contains(mesh[sej].si))
{
SurfaceElementIndex pnt_commelem = 0;
Array<SurfaceElementIndex> pnt1_elems;
Array<SurfaceElementIndex> pnt2_elems;
NgArray<SurfaceElementIndex> pnt1_elems;
NgArray<SurfaceElementIndex> pnt2_elems;
meshtopo.GetVertexSurfaceElements(segpair_p1,pnt1_elems);
@ -583,7 +583,7 @@ namespace netgen
for (int i = 1; i <= np; i++)
{
Array<ElementIndex> vertelems;
NgArray<ElementIndex> vertelems;
if(bndnodes.Test(i))
{

View File

@ -12,9 +12,9 @@ class BoundaryLayerParameters
{
public:
// parameters by Philippose ..
Array<int> surfid;
Array<double> heights;
Array<double> new_matnrs;
NgArray<int> surfid;
NgArray<double> heights;
NgArray<double> new_matnrs;
int prismlayers = 1;
int bulk_matnr = 1;
int new_matnr = 1;

View File

@ -1,6 +1,6 @@
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,
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 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,
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;
@ -661,7 +661,7 @@ HPREF_ELEMENT_TYPE ClassifyPrism(HPRefElement & el, INDEX_2_HASHTABLE<int> & edg
// #ifdef SABINE
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,
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;
@ -876,7 +876,7 @@ HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE<int> & edge
#ifdef HPREF_OLD
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,
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;
@ -1137,7 +1137,7 @@ HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE<int> & edge
#endif
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,
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;
@ -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,
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;
@ -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,
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]);
@ -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,
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;

View File

@ -46,10 +46,10 @@ namespace netgen
cluster_reps.SetSize (nv+ned+nfa+ne);
cluster_reps = -1;
Array<int> llist (nv+ned+nfa+ne);
NgArray<int> llist (nv+ned+nfa+ne);
llist = 0;
Array<int> nnums, ednums, fanums;
NgArray<int> nnums, ednums, fanums;
int changed;
// NgProfiler::StartTimer(timer1);
@ -85,7 +85,7 @@ namespace netgen
(tm, ne,
[&] (size_t begin, size_t end)
{
Array<int> nnums, ednums, fanums;
NgArray<int> nnums, ednums, fanums;
for (int i = begin+1; i <= end; i++)
{
const Element & el = mesh.VolumeElement(i);

View File

@ -21,7 +21,7 @@ class AnisotropicClusters
int nv, ned, nfa, ne;
// connected nodes, nodes = vertices, edges, faces, elements
Array<int> cluster_reps;
NgArray<int> cluster_reps;
public:
AnisotropicClusters (const Mesh & amesh);

View File

@ -11,7 +11,7 @@ namespace netgen
// 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);
wi.SetSize (n);
@ -407,7 +407,7 @@ namespace netgen
}
static Array<shared_ptr<RecPol>> jacpols2;
static NgArray<shared_ptr<RecPol>> jacpols2;
void CurvedElements::buildJacPols()
{
@ -566,7 +566,7 @@ namespace netgen
const ParallelMeshTopology & partop = mesh.GetParallelTopology ();
// MPI_Comm_dup (mesh.GetCommunicator(), &curve_comm);
Array<int> procs;
NgArray<int> procs;
#else
// curve_comm = mesh.GetCommunicator();
#endif
@ -597,7 +597,7 @@ namespace netgen
rational = arational;
Array<int> edgenrs;
NgArray<int> edgenrs;
int nedges = top.GetNEdges();
int nfaces = top.GetNFaces();
@ -670,7 +670,7 @@ namespace netgen
if (ntasks > 1 && working)
{
Array<int> cnt(ntasks);
NgArray<int> cnt(ntasks);
cnt = 0;
for (int e = 0; e < edgeorder.Size(); e++)
{
@ -723,7 +723,7 @@ namespace netgen
return;
}
Array<double> xi, weight;
NgArray<double> xi, weight;
ComputeGaussRule (aorder+4, xi, weight); // on (0,1)
@ -733,9 +733,9 @@ namespace netgen
if (mesh.GetDimension() == 3 || rational)
{
static Timer tce("curve edges"); RegionTimer reg(tce);
Array<int> surfnr(nedges);
Array<PointGeomInfo> gi0(nedges);
Array<PointGeomInfo> gi1(nedges);
NgArray<int> surfnr(nedges);
NgArray<PointGeomInfo> gi0(nedges);
NgArray<PointGeomInfo> gi1(nedges);
surfnr = -1;
if (working)
@ -792,7 +792,7 @@ namespace netgen
MyMPI_ExchangeTable (senddata, recvdata, MPI_TAG_CURVE, curve_comm);
Array<int> cnt(ntasks);
NgArray<int> cnt(ntasks);
cnt = 0;
if (working)
for (int e = 0; e < nedges; e++)
@ -947,12 +947,12 @@ namespace netgen
}
Array<int> use_edge(nedges);
Array<int> edge_surfnr1(nedges);
Array<int> edge_surfnr2(nedges);
Array<int> swap_edge(nedges);
Array<EdgePointGeomInfo> edge_gi0(nedges);
Array<EdgePointGeomInfo> edge_gi1(nedges);
NgArray<int> use_edge(nedges);
NgArray<int> edge_surfnr1(nedges);
NgArray<int> edge_surfnr2(nedges);
NgArray<int> swap_edge(nedges);
NgArray<EdgePointGeomInfo> edge_gi0(nedges);
NgArray<EdgePointGeomInfo> edge_gi1(nedges);
use_edge = 0;
if (working)
@ -999,7 +999,7 @@ namespace netgen
}
}
MyMPI_ExchangeTable (senddata, recvdata, MPI_TAG_CURVE, curve_comm);
Array<int> cnt(ntasks);
NgArray<int> cnt(ntasks);
cnt = 0;
if (working)
for (int e = 0; e < edge_surfnr1.Size(); e++)
@ -1169,7 +1169,7 @@ namespace netgen
PrintMessage (3, "Curving faces");
Array<int> surfnr(nfaces);
NgArray<int> surfnr(nfaces);
surfnr = -1;
if (working)
@ -1195,7 +1195,7 @@ namespace netgen
if (ntasks > 1 && working)
{
Array<int> cnt(ntasks);
NgArray<int> cnt(ntasks);
cnt = 0;
for (int f = 0; f < nfaces; f++)
{
@ -1239,8 +1239,8 @@ namespace netgen
dmat = 0.0;
int np = sqr(xi.Size());
Array<Point<2> > xia(np);
Array<Point<3> > xa(np);
NgArray<Point<2> > xia(np);
NgArray<Point<3> > xa(np);
for (int jx = 0, jj = 0; jx < xi.Size(); jx++)
for (int jy = 0; jy < xi.Size(); jy++, jj++)
@ -1248,7 +1248,7 @@ namespace netgen
// CalcMultiPointSurfaceTransformation (&xia, i, &xa, NULL);
Array<int> edgenrs;
NgArray<int> edgenrs;
top.GetFaceEdges (facenr+1, edgenrs);
for (int k = 0; k < edgenrs.Size(); k++) edgenrs[k]--;
@ -1453,7 +1453,7 @@ namespace netgen
// TVector<T> shapes, dshapes;
// Array<Vec<3> > coefs;
// NgArray<Vec<3> > coefs;
SegmentInfo info;
info.elnr = elnr;
@ -1582,7 +1582,7 @@ namespace netgen
}
void CurvedElements ::
GetCoefficients (SegmentInfo & info, Array<Vec<3> > & coefs) const
GetCoefficients (SegmentInfo & info, NgArray<Vec<3> > & coefs) const
{
const Segment & el = mesh[info.elnr];
@ -2366,7 +2366,7 @@ namespace netgen
template <int DIM_SPACE>
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];
coefs.SetSize (info.ndof);
@ -2400,10 +2400,10 @@ namespace netgen
template void CurvedElements ::
GetCoefficients<2> (SurfaceElementInfo & info, Array<Vec<2> > & coefs) const;
GetCoefficients<2> (SurfaceElementInfo & info, NgArray<Vec<2> > & coefs) const;
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 ::
CalcMultiPointSegmentTransformation (Array<double> * xi, SegmentIndex segnr,
Array<Point<3> > * x,
Array<Vec<3> > * dxdxi)
CalcMultiPointSegmentTransformation (NgArray<double> * xi, SegmentIndex segnr,
NgArray<Point<3> > * x,
NgArray<Vec<3> > * dxdxi)
{
;
}
@ -4030,9 +4030,9 @@ namespace netgen
void CurvedElements ::
CalcMultiPointSurfaceTransformation (Array< Point<2> > * xi, SurfaceElementIndex elnr,
Array< Point<3> > * x,
Array< Mat<3,2> > * dxdxi)
CalcMultiPointSurfaceTransformation (NgArray< Point<2> > * xi, SurfaceElementIndex elnr,
NgArray< Point<3> > * x,
NgArray< Mat<3,2> > * dxdxi)
{
double * px = (x) ? &(*x)[0](0) : NULL;
double * pdxdxi = (dxdxi) ? &(*dxdxi)[0](0) : NULL;
@ -4343,9 +4343,9 @@ namespace netgen
void CurvedElements ::
CalcMultiPointElementTransformation (Array< Point<3> > * xi, ElementIndex elnr,
Array< Point<3> > * x,
Array< Mat<3,3> > * dxdxi)
CalcMultiPointElementTransformation (NgArray< Point<3> > * xi, ElementIndex elnr,
NgArray< Point<3> > * x,
NgArray< Mat<3,3> > * dxdxi)
{
double * px = (x) ? &(*x)[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];
}
Array<Vec<3> > coefs(info.ndof);
NgArray<Vec<3> > coefs(info.ndof);
GetCoefficients (info, &coefs[0]);
if (x)
{

View File

@ -18,16 +18,16 @@ class CurvedElements
{
const Mesh & mesh;
Array<int> edgeorder;
Array<int> faceorder;
NgArray<int> edgeorder;
NgArray<int> faceorder;
Array<int> edgecoeffsindex;
Array<int> facecoeffsindex;
NgArray<int> edgecoeffsindex;
NgArray<int> facecoeffsindex;
Array< Vec<3> > edgecoeffs;
Array< Vec<3> > facecoeffs;
NgArray< Vec<3> > edgecoeffs;
NgArray< Vec<3> > facecoeffs;
Array< double > edgeweight; // for rational 2nd order splines
NgArray< double > edgeweight; // for rational 2nd order splines
int order;
bool rational;
@ -124,9 +124,9 @@ public:
/*
void CalcMultiPointSegmentTransformation (Array<double> * xi, SegmentIndex segnr,
Array<Point<3> > * x,
Array<Vec<3> > * dxdxi);
void CalcMultiPointSegmentTransformation (NgArray<double> * xi, SegmentIndex segnr,
NgArray<Point<3> > * x,
NgArray<Vec<3> > * dxdxi);
*/
template <int DIM_SPACE, typename T>
@ -135,9 +135,9 @@ public:
T * x, size_t sx,
T * dxdxi, size_t sdxdxi);
void CalcMultiPointSurfaceTransformation (Array< Point<2> > * xi, SurfaceElementIndex elnr,
Array< Point<3> > * x,
Array< Mat<3,2> > * dxdxi);
void CalcMultiPointSurfaceTransformation (NgArray< Point<2> > * xi, SurfaceElementIndex elnr,
NgArray< Point<3> > * x,
NgArray< Mat<3,2> > * dxdxi);
template <int DIM_SPACE, typename T>
void CalcMultiPointSurfaceTransformation (SurfaceElementIndex elnr, int n,
@ -145,9 +145,9 @@ public:
T * x, size_t sx,
T * dxdxi, size_t sdxdxi);
void CalcMultiPointElementTransformation (Array< Point<3> > * xi, ElementIndex elnr,
Array< Point<3> > * x,
Array< Mat<3,3> > * dxdxi);
void CalcMultiPointElementTransformation (NgArray< Point<3> > * xi, ElementIndex elnr,
NgArray< Point<3> > * x,
NgArray< Mat<3,3> > * dxdxi);
template <typename T>
void CalcMultiPointElementTransformation (ElementIndex elnr, int n,
@ -188,7 +188,7 @@ private:
template <typename T>
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>
void CalcElementDShapes (SegmentInfo & elnr, T xi, TFlatVector<T> dshapes) const;
@ -231,7 +231,7 @@ private:
template <typename T>
void CalcElementShapes (SurfaceElementInfo & elinfo, const Point<2,T> xi, TFlatVector<T> shapes) const;
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>
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