Rename BitArray to NgBitArray

This commit is contained in:
Matthias Hochsteger 2019-08-28 14:00:49 +02:00
parent 579e5d3874
commit 1584da69ae
28 changed files with 98 additions and 98 deletions

View File

@ -1233,7 +1233,7 @@ namespace netgen
*testout << "inv: " << endl << refedgesinv << endl;
}
BitArray todelete(refedges.Size());
NgBitArray todelete(refedges.Size());
todelete.Clear();
@ -1748,7 +1748,7 @@ namespace netgen
int nsol = geometry.GetNTopLevelObjects();
BitArray pointatsurface (nsurf);
NgBitArray pointatsurface (nsurf);
pointatsurface.Clear();
for (int i = 1; i <= mesh.GetNSeg(); i++)

View File

@ -2060,7 +2060,7 @@ namespace netgen
}
/*
BitArray testuncond (specpoints.Size());
NgBitArray testuncond (specpoints.Size());
testuncond.Clear();
for(int i = 0; i<specpoints.Size(); i++)
{
@ -2093,7 +2093,7 @@ namespace netgen
// if special point is unconditional on some solid,
// it must be unconditional everywhere:
BitArray uncond (apoints.Size());
NgBitArray uncond (apoints.Size());
uncond.Clear();
for (int i = 0; i < specpoints.Size(); i++)

View File

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

View File

@ -255,7 +255,7 @@ namespace netgen
NgArray<INDEX_3> ref_singular;
NgArray<INDEX_4 > ref_slices;
BitArray first_id(geom->identifications.Size());
NgBitArray first_id(geom->identifications.Size());
first_id.Set();

View File

@ -2,14 +2,14 @@ add_definitions(-DNGINTERFACE_EXPORTS)
add_library(gen INTERFACE)
set(sdir ${CMAKE_CURRENT_SOURCE_DIR})
target_sources(gen INTERFACE
${sdir}/ngarray.cpp ${sdir}/bitarray.cpp ${sdir}/dynamicmem.cpp
${sdir}/ngarray.cpp ${sdir}/ngbitarray.cpp ${sdir}/dynamicmem.cpp
${sdir}/hashtabl.cpp ${sdir}/mystring.cpp ${sdir}/optmem.cpp ${sdir}/parthreads.cpp
${sdir}/seti.cpp ${sdir}/sort.cpp ${sdir}/spbita2d.cpp ${sdir}/table.cpp
${sdir}/mpi_interface.cpp ${sdir}/gzstream.cpp
)
install(FILES
ngarray.hpp autodiff.hpp autoptr.hpp bitarray.hpp
ngarray.hpp autodiff.hpp autoptr.hpp ngbitarray.hpp
dynamicmem.hpp hashtabl.hpp mpi_interface.hpp myadt.hpp
ngsimd.hpp mystring.hpp netgenout.hpp ngpython.hpp
optmem.hpp parthreads.hpp seti.hpp sort.hpp

View File

@ -33,7 +33,7 @@ namespace netgen
#include "hashtabl.hpp"
#include "bitarray.hpp"
#include "ngbitarray.hpp"
#include "spbita2d.hpp"
#include "seti.hpp"

View File

@ -5,7 +5,7 @@
/**************************************************************************/
/*
data type BitArray
data type NgBitArray
*/
#include <mystdlib.h>
@ -16,25 +16,25 @@ namespace netgen
{
//using namespace netgen;
BitArray :: BitArray ()
NgBitArray :: NgBitArray ()
{
size = 0;
data = NULL;
}
BitArray :: BitArray (int asize)
NgBitArray :: NgBitArray (int asize)
{
size = 0;
data = NULL;
SetSize (asize);
}
BitArray :: ~BitArray ()
NgBitArray :: ~NgBitArray ()
{
delete [] data;
}
void BitArray :: SetSize (int asize)
void NgBitArray :: SetSize (int asize)
{
if (size == asize) return;
delete [] data;
@ -43,14 +43,14 @@ namespace netgen
data = new unsigned char [Addr (size)+1];
}
void BitArray :: Set ()
void NgBitArray :: Set ()
{
if (!size) return;
for (int i = 0; i <= Addr (size); i++)
data[i] = UCHAR_MAX;
}
void BitArray :: Clear ()
void NgBitArray :: Clear ()
{
if (!size) return;
for (int i = 0; i <= Addr (size); i++)
@ -59,14 +59,14 @@ namespace netgen
void BitArray :: Invert ()
void NgBitArray :: Invert ()
{
if (!size) return;
for (int i = 0; i <= Addr (size); i++)
data[i] ^= 255;
}
void BitArray :: And (const BitArray & ba2)
void NgBitArray :: And (const NgBitArray & ba2)
{
if (!size) return;
for (int i = 0; i <= Addr (size); i++)
@ -74,7 +74,7 @@ namespace netgen
}
void BitArray :: Or (const BitArray & ba2)
void NgBitArray :: Or (const NgBitArray & ba2)
{
if (!size) return;
for (int i = 0; i <= Addr (size); i++)

View File

@ -14,26 +14,26 @@ namespace netgen
/**
data type BitArray
data type NgBitArray
BitArray is a compressed array of Boolean information. By Set and Clear
NgBitArray is a compressed array of Boolean information. By Set and Clear
the whole array or one bit can be set or reset, respectively.
Test returns the state of the occurring bit.
No range checking is done.
index ranges from 0 to size-1
*/
class BitArray
class NgBitArray
{
INDEX size;
unsigned char * data;
public:
BitArray ();
NgBitArray ();
///
BitArray (INDEX asize);
NgBitArray (INDEX asize);
///
~BitArray ();
~NgBitArray ();
///
void SetSize (INDEX asize);
@ -67,9 +67,9 @@ public:
///
void Invert ();
///
void And (const BitArray & ba2);
void And (const NgBitArray & ba2);
///
void Or (const BitArray & ba2);
void Or (const NgBitArray & ba2);
private:
///
inline unsigned char Mask (INDEX i) const
@ -83,15 +83,15 @@ private:
}
///
BitArray & operator= (BitArray &);
NgBitArray & operator= (NgBitArray &);
///
BitArray (const BitArray &);
NgBitArray (const NgBitArray &);
};
// print bitarray
inline ostream & operator<< (ostream & s, const BitArray & a)
inline ostream & operator<< (ostream & s, const NgBitArray & a)
{
for (int i = 1; i <= a.Size(); i++)
{
@ -105,37 +105,37 @@ inline ostream & operator<< (ostream & s, const BitArray & a)
/*
inline
INDEX BitArray :: Size () const
INDEX NgBitArray :: Size () const
{
return size;
}
inline
unsigned char BitArray :: Mask (INDEX i) const
unsigned char NgBitArray :: Mask (INDEX i) const
{
return char(1) << (i % CHAR_BIT);
}
inline
INDEX BitArray :: Addr (INDEX i) const
INDEX NgBitArray :: Addr (INDEX i) const
{
return (i / CHAR_BIT);
}
inline
void BitArray :: Set (INDEX i)
void NgBitArray :: Set (INDEX i)
{
data[Addr(i)] |= Mask(i);
}
inline
void BitArray :: Clear (INDEX i)
void NgBitArray :: Clear (INDEX i)
{
data[Addr(i)] &= ~Mask(i);
}
inline
int BitArray :: Test (INDEX i) const
int NgBitArray :: Test (INDEX i) const
{
return (data[i / CHAR_BIT] & (char(1) << (i % CHAR_BIT) ) ) ? 1 : 0;
}

View File

@ -17,7 +17,7 @@ namespace netgen
class IndexSet
{
NgArray<int> set;
BitArray flags;
NgBitArray flags;
public:
IndexSet (int maxind);

View File

@ -140,7 +140,7 @@ void WriteAbaqusFormat (const Mesh & mesh,
int masternode(0);
NgArray<INDEX_2> pairs;
BitArray master(np), help(np);
NgBitArray master(np), help(np);
master.Set();
for (i = 1; i <= 3; i++)
{
@ -205,7 +205,7 @@ void WriteAbaqusFormat (const Mesh & mesh,
<< "*EQUATION, INPUT=" << mpcfilename << endl;
BitArray eliminated(np);
NgBitArray eliminated(np);
eliminated.Clear();
for (i = 1; i <= mesh.GetIdentifications().GetMaxNr(); i++)
{

View File

@ -938,7 +938,7 @@ void WriteFile (int typ,
NgArray<INDEX_2> edgelist;
// edge (point) on boundary ?
BitArray bedge, bpoint(mesh.GetNP());
NgBitArray bedge, bpoint(mesh.GetNP());
static int eledges[6][2] = { { 1, 2 } , { 1, 3 } , { 1, 4 },
{ 2, 3 } , { 2, 4 } , { 3, 4 } };

View File

@ -3159,7 +3159,7 @@ namespace netgen
if (opt.refine_hp)
{
PrintMessage(3,"refine hp");
BitArray singv(np);
NgBitArray singv(np);
singv.Clear();
if (mesh.GetDimension() == 3)
@ -3833,7 +3833,7 @@ namespace netgen
}
*/
BitArray isnewpoint(np);
NgBitArray isnewpoint(np);
isnewpoint.Clear();
for (int i = 0; i < cutedges.Size(); i++)

View File

@ -19,7 +19,7 @@ namespace netgen
cout << "Old NP: " << mesh.GetNP() << endl;
cout << "Trigs: " << mesh.GetNSE() << endl;
BitArray bndnodes(np);
NgBitArray bndnodes(np);
NgArray<int> mapto(np);
bndnodes.Clear();
@ -210,7 +210,7 @@ namespace netgen
int nseg = mesh.GetNSeg();
// Indicate which points need to be remapped
BitArray bndnodes(np+1); // big enough for 1-based array
NgBitArray bndnodes(np+1); // big enough for 1-based array
// Map of the old points to the new points
NgArray<PointIndex, PointIndex::BASE> mapto(np);
@ -286,7 +286,7 @@ namespace netgen
// don't have boundary layers
// Bit array to keep track of segments already processed
BitArray segsel(nseg);
NgBitArray segsel(nseg);
// Set them all to "1" to initially activate all segments
segsel.Set();

View File

@ -1,5 +1,5 @@
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,
NgBitArray & cornerpoint, NgBitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
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;
@ -423,7 +423,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,
NgBitArray & cornerpoint, NgBitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint)
{
@ -660,7 +660,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,
NgBitArray & cornerpoint, NgBitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint, int dim, const FaceDescriptor & fd)
{
@ -875,7 +875,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,
NgBitArray & cornerpoint, NgBitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint, int dim, const FaceDescriptor & fd)
{
HPREF_ELEMENT_TYPE type = HP_NONE;
@ -1136,7 +1136,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,
NgBitArray & cornerpoint, NgBitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint, int dim, const FaceDescriptor & fd)
{
HPREF_ELEMENT_TYPE type = HP_NONE;
@ -1486,7 +1486,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,
NgBitArray & cornerpoint, NgBitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint)
{
HPREF_ELEMENT_TYPE type = HP_NONE;
@ -1586,7 +1586,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,
NgBitArray & cornerpoint, NgBitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint)
{
@ -1629,7 +1629,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,
NgBitArray & cornerpoint, NgBitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint)
{
HPREF_ELEMENT_TYPE type = HP_NONE;

View File

@ -805,7 +805,7 @@ namespace netgen
// remove degenerated
BitArray badnode(mesh.GetNP());
NgBitArray badnode(mesh.GetNP());
badnode.Clear();
int ndeg = 0;
for (int i = 1; i <= tempels.Size(); i++)
@ -1320,7 +1320,7 @@ namespace netgen
ne = tempels.Size();
BitArray inner(ne), outer(ne);
NgBitArray inner(ne), outer(ne);
inner.Clear();
outer.Clear();
NgArray<int> elstack;

View File

@ -551,7 +551,7 @@ namespace netgen
}
bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoiclt_dom,
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
NgBitArray & cornerpoint, NgBitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint, int & levels, int & act_ref);
bool ClassifyHPElements (Mesh & mesh, NgArray<HPRefElement> & elements, int & act_ref, int & levels);
@ -1558,7 +1558,7 @@ namespace netgen
}
bool CheckSingularities(Mesh & mesh, 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,
NgBitArray & cornerpoint, NgBitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint, int & levels, int & act_ref)
{
bool sing = 0;
@ -1812,11 +1812,11 @@ bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HAS
bool ClassifyHPElements (Mesh & mesh, NgArray<HPRefElement> & elements, int & act_ref, int & levels)
{
INDEX_2_HASHTABLE<int> edges(mesh.GetNSeg()+1);
BitArray edgepoint(mesh.GetNP());
NgBitArray edgepoint(mesh.GetNP());
INDEX_2_HASHTABLE<int> edgepoint_dom(mesh.GetNSeg()+1);
edgepoint.Clear();
BitArray cornerpoint(mesh.GetNP());
NgBitArray cornerpoint(mesh.GetNP());
cornerpoint.Clear();
// value = nr > 0 ... refine elements in domain nr

View File

@ -607,11 +607,11 @@ void MeshOptimize3d :: SplitImprove (Mesh & mesh,
TABLE<ElementIndex,PointIndex::BASE> elementsonnode(np);
NgArray<ElementIndex> hasbothpoints;
BitArray origpoint(np+1), boundp(np+1); // big enough for 0 and 1-based
NgBitArray origpoint(np+1), boundp(np+1); // big enough for 0 and 1-based
origpoint.Set();
NgArray<double> elerrs(ne);
BitArray illegaltet(ne);
NgBitArray illegaltet(ne);
illegaltet.Clear();
const char * savetask = multithread.task;
@ -891,7 +891,7 @@ void MeshOptimize3d :: SplitImprove (Mesh & mesh,
void MeshOptimize3d :: SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal,
const BitArray * working_elements)
const NgBitArray * working_elements)
{
static Timer t("MeshOptimize3d::SwapImprove"); RegionTimer reg(t);
static Timer tloop("MeshOptimize3d::SwapImprove loop");
@ -1769,7 +1769,7 @@ void MeshOptimize3d :: SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal,
void MeshOptimize3d :: SwapImproveSurface (Mesh & mesh, OPTIMIZEGOAL goal,
const BitArray * working_elements,
const NgBitArray * working_elements,
const NgArray< NgArray<int,PointIndex::BASE>* > * idmaps)
{
NgArray< NgArray<int,PointIndex::BASE>* > locidmaps;
@ -2970,7 +2970,7 @@ void MeshOptimize3d :: SwapImprove2 (Mesh & mesh, OPTIMIZEGOAL goal)
}
}
BitArray original(GetNE());
NgBitArray original(GetNE());
original.Set();
for (i = 1; i <= GetNSE(); i++)

View File

@ -24,9 +24,9 @@ public:
void SplitImprove (Mesh & mesh, OPTIMIZEGOAL goal = OPT_QUALITY);
void SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal = OPT_QUALITY,
const BitArray * working_elements = NULL);
const NgBitArray * working_elements = NULL);
void SwapImproveSurface (Mesh & mesh, OPTIMIZEGOAL goal = OPT_QUALITY,
const BitArray * working_elements = NULL,
const NgBitArray * working_elements = NULL,
const NgArray< NgArray<int,PointIndex::BASE>* > * idmaps = NULL);
void SwapImprove2 (Mesh & mesh, OPTIMIZEGOAL goal = OPT_QUALITY);

View File

@ -1824,8 +1824,8 @@ namespace netgen
}
}
// BitArray base is PointIndex::BASE ...
void Mesh :: FixPoints (const BitArray & fixpoints)
// NgBitArray base is PointIndex::BASE ...
void Mesh :: FixPoints (const NgBitArray & fixpoints)
{
if (fixpoints.Size() != GetNP())
{
@ -2469,7 +2469,7 @@ namespace netgen
int np = GetNP();
FindOpenSegments();
BitArray frontpoints(np+1); // for 0- and 1-based
NgBitArray frontpoints(np+1); // for 0- and 1-based
frontpoints.Clear();
for (int i = 1; i <= GetNOpenSegments(); i++)
@ -2994,7 +2994,7 @@ namespace netgen
int nse = GetNSE();
NgArray<Vec3d> normals(np);
BitArray linepoint(np);
NgBitArray linepoint(np);
linepoint.Clear();
for (i = 1; i <= nseg; i++)
@ -3899,7 +3899,7 @@ namespace netgen
int i, j;
int nse = GetNSE();
BitArray used(nse);
NgBitArray used(nse);
used.Clear();
INDEX_2_HASHTABLE<int> edges(nse+1);
@ -5289,8 +5289,8 @@ namespace netgen
int np = GetNP();
int nse = GetNSE();
BitArray surfused(nse);
BitArray pused (np);
NgBitArray surfused(nse);
NgBitArray pused (np);
surfused.Clear();
@ -5401,7 +5401,7 @@ namespace netgen
int fdi;
int np = GetNP();
BitArray usedp(np);
NgBitArray usedp(np);
Array<SurfaceElementIndex> els_of_face;
fdi = 1;

View File

@ -381,7 +381,7 @@ namespace netgen
DLL_HEADER void CalcSurfacesOfNode ();
/// additional (temporarily) fix points
void FixPoints (const BitArray & fixpoints);
void FixPoints (const NgBitArray & fixpoints);
/**
finds elements without neighbour and
@ -544,10 +544,10 @@ namespace netgen
DLL_HEADER void ImproveMesh (const MeshingParameters & mp, OPTIMIZEGOAL goal = OPT_QUALITY);
///
void ImproveMeshJacobian (const MeshingParameters & mp, OPTIMIZEGOAL goal = OPT_QUALITY, const BitArray * usepoint = NULL);
void ImproveMeshJacobian (const MeshingParameters & mp, OPTIMIZEGOAL goal = OPT_QUALITY, const NgBitArray * usepoint = NULL);
///
void ImproveMeshJacobianOnSurface (const MeshingParameters & mp,
const BitArray & usepoint,
const NgBitArray & usepoint,
const NgArray< Vec<3>* > & nv,
OPTIMIZEGOAL goal = OPT_QUALITY,
const NgArray< NgArray<int,PointIndex::BASE>* > * idmaps = NULL);

View File

@ -770,7 +770,7 @@ namespace netgen
can.Elem(parent.I2()));
}
BitArray boundp(np);
NgBitArray boundp(np);
boundp.Clear();
for (auto & sel : mesh.SurfaceElements())
for (auto pi : sel.PNums())
@ -801,7 +801,7 @@ namespace netgen
mesh.Point(i) = can.Get(i);
BitArray free (mesh.GetNP()), fhelp(mesh.GetNP());
NgBitArray free (mesh.GetNP()), fhelp(mesh.GetNP());
free.Clear();
for (int i = 1; i <= mesh.GetNE(); i++)
{

View File

@ -480,7 +480,7 @@ namespace netgen
double facok = 0;
double factry;
BitArray illegalels(ne);
NgBitArray illegalels(ne);
illegalels.Clear();
@ -504,7 +504,7 @@ namespace netgen
can.Elem(parents.Get(i).I2()));
}
BitArray boundp(np);
NgBitArray boundp(np);
boundp.Clear();
for (int i = 1; i <= mesh.GetNSE(); i++)
{

View File

@ -110,7 +110,7 @@ namespace netgen
int np = mesh.GetNP();
int ne = mesh.GetNE();
BitArray badnodes(np);
NgBitArray badnodes(np);
badnodes.Clear();
for (i = 1; i <= ne; i++)

View File

@ -1485,7 +1485,7 @@ void Mesh :: ImproveMesh (const MeshingParameters & mp, OPTIMIZEGOAL goal)
// Improve Condition number of Jacobian, any elements
void Mesh :: ImproveMeshJacobian (const MeshingParameters & mp,
OPTIMIZEGOAL goal, const BitArray * usepoint)
OPTIMIZEGOAL goal, const NgBitArray * usepoint)
{
// int i, j;
@ -1507,7 +1507,7 @@ void Mesh :: ImproveMeshJacobian (const MeshingParameters & mp,
par.maxit_linsearch = 20;
par.maxit_bfgs = 20;
BitArray badnodes(np);
NgBitArray badnodes(np);
badnodes.Clear();
for (int i = 1; i <= ne; i++)
@ -1608,7 +1608,7 @@ void Mesh :: ImproveMeshJacobian (const MeshingParameters & mp,
// Improve Condition number of Jacobian, any elements
void Mesh :: ImproveMeshJacobianOnSurface (const MeshingParameters & mp,
const BitArray & usepoint,
const NgBitArray & usepoint,
const NgArray< Vec<3>* > & nv,
OPTIMIZEGOAL goal,
const NgArray< NgArray<int,PointIndex::BASE>* > * idmaps)
@ -1664,7 +1664,7 @@ void Mesh :: ImproveMeshJacobianOnSurface (const MeshingParameters & mp,
par.maxit_linsearch = 20;
par.maxit_bfgs = 20;
BitArray badnodes(np);
NgBitArray badnodes(np);
badnodes.Clear();
for (int i = 1; i <= ne; i++)

View File

@ -62,7 +62,7 @@ void CutOffAndCombine (Mesh & mesh, const Mesh & othermesh)
}
cout << endl;
BitArray connected(mesh.GetNP());
NgBitArray connected(mesh.GetNP());
connected.Clear();
for (i = 1; i <= mesh.GetNSE(); i++)
{
@ -120,7 +120,7 @@ void CutOffAndCombine (Mesh & mesh, const Mesh & othermesh)
mesh.Compress();
mesh.FindOpenElements();
BitArray locked(mesh.GetNP());
NgBitArray locked(mesh.GetNP());
locked.Set();
for (i = 1; i <= mesh.GetNOpenElements(); i++)
for (j = 1; j <= 3; j++)

View File

@ -6,7 +6,7 @@
namespace netgen
{
void GetPureBadness(Mesh & mesh, NgArray<double> & pure_badness,
const BitArray & isnewpoint)
const NgBitArray & isnewpoint)
{
//const int ne = mesh.GetNE();
const int np = mesh.GetNP();
@ -104,7 +104,7 @@ namespace netgen
}
void GetWorkingArea(BitArray & working_elements, BitArray & working_points,
void GetWorkingArea(NgBitArray & working_elements, NgBitArray & working_points,
const Mesh & mesh, const NgArray<ElementIndex> & bad_elements,
const int width)
{
@ -152,7 +152,7 @@ namespace netgen
void RepairBisection(Mesh & mesh, NgArray<ElementIndex> & bad_elements,
const BitArray & isnewpoint, const Refinement & refinement,
const NgBitArray & isnewpoint, const Refinement & refinement,
const NgArray<double> & pure_badness,
double max_worsening, const bool uselocalworsening,
const NgArray< NgArray<int,PointIndex::BASE>* > & idmaps)
@ -185,7 +185,7 @@ namespace netgen
can[i] = new Point<3>;
}
BitArray isboundarypoint(np),isedgepoint(np);
NgBitArray isboundarypoint(np),isedgepoint(np);
isboundarypoint.Clear();
isedgepoint.Clear();
@ -216,8 +216,8 @@ namespace netgen
Validate(mesh,bad_elements,pure_badness,
((uselocalworsening) ? (0.8*(max_worsening-1.) + 1.) : (0.1*(max_worsening-1.) + 1.)),
uselocalworsening); // -> larger working area
BitArray working_elements(ne);
BitArray working_points(np);
NgBitArray working_elements(ne);
NgBitArray working_points(np);
GetWorkingArea(working_elements,working_points,mesh,bad_elements,numbadneighbours);
//working_elements.Set();
@ -240,7 +240,7 @@ namespace netgen
PrintMessage(5,ostrstr.str());
BitArray isworkingboundary(np);
NgBitArray isworkingboundary(np);
for(int i=1; i<=np; i++)
if(working_points.Test(i) && isboundarypoint.Test(i))
isworkingboundary.Set(i);

View File

@ -5,13 +5,13 @@ namespace netgen
{
void GetPureBadness(Mesh & mesh, NgArray<double> & pure_badness,
const BitArray & isnewpoint);
const NgBitArray & isnewpoint);
double Validate(const Mesh & mesh, NgArray<ElementIndex> & bad_elements,
const NgArray<double> & pure_badness,
double max_worsening, const bool uselocalworsening,
NgArray<double> * quality_loss = NULL);
void RepairBisection(Mesh & mesh, NgArray<ElementIndex> & bad_elements,
const BitArray & isnewpoint, const Refinement & refinement,
const NgBitArray & isnewpoint, const Refinement & refinement,
const NgArray<double> & pure_badness,
double max_worsening, const bool uselocalworsening,
const NgArray< NgArray<int,PointIndex::BASE>* > & idmaps);

View File

@ -1819,7 +1819,7 @@ namespace netgen
NgArray<Element2d> faces;
BitArray shownode(mesh->GetNP());
NgBitArray shownode(mesh->GetNP());
if (vispar.clipping.enable)
{
shownode.Clear();