mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
Rename BitArray to NgBitArray
This commit is contained in:
parent
579e5d3874
commit
1584da69ae
@ -1233,7 +1233,7 @@ namespace netgen
|
|||||||
*testout << "inv: " << endl << refedgesinv << endl;
|
*testout << "inv: " << endl << refedgesinv << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
BitArray todelete(refedges.Size());
|
NgBitArray todelete(refedges.Size());
|
||||||
todelete.Clear();
|
todelete.Clear();
|
||||||
|
|
||||||
|
|
||||||
@ -1748,7 +1748,7 @@ namespace netgen
|
|||||||
int nsol = geometry.GetNTopLevelObjects();
|
int nsol = geometry.GetNTopLevelObjects();
|
||||||
|
|
||||||
|
|
||||||
BitArray pointatsurface (nsurf);
|
NgBitArray pointatsurface (nsurf);
|
||||||
pointatsurface.Clear();
|
pointatsurface.Clear();
|
||||||
|
|
||||||
for (int i = 1; i <= mesh.GetNSeg(); i++)
|
for (int i = 1; i <= mesh.GetNSeg(); i++)
|
||||||
|
@ -2060,7 +2060,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
BitArray testuncond (specpoints.Size());
|
NgBitArray testuncond (specpoints.Size());
|
||||||
testuncond.Clear();
|
testuncond.Clear();
|
||||||
for(int i = 0; i<specpoints.Size(); i++)
|
for(int i = 0; i<specpoints.Size(); i++)
|
||||||
{
|
{
|
||||||
@ -2093,7 +2093,7 @@ namespace netgen
|
|||||||
// if special point is unconditional on some solid,
|
// if special point is unconditional on some solid,
|
||||||
// it must be unconditional everywhere:
|
// it must be unconditional everywhere:
|
||||||
|
|
||||||
BitArray uncond (apoints.Size());
|
NgBitArray uncond (apoints.Size());
|
||||||
uncond.Clear();
|
uncond.Clear();
|
||||||
|
|
||||||
for (int i = 0; i < specpoints.Size(); i++)
|
for (int i = 0; i < specpoints.Size(); i++)
|
||||||
|
@ -28,7 +28,7 @@ namespace netgen
|
|||||||
|
|
||||||
void TriangleApproximation :: RemoveUnusedPoints ()
|
void TriangleApproximation :: RemoveUnusedPoints ()
|
||||||
{
|
{
|
||||||
BitArray used(GetNP());
|
NgBitArray used(GetNP());
|
||||||
NgArray<int> map (GetNP());
|
NgArray<int> map (GetNP());
|
||||||
int i, j;
|
int i, j;
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
|
@ -255,7 +255,7 @@ namespace netgen
|
|||||||
NgArray<INDEX_3> ref_singular;
|
NgArray<INDEX_3> ref_singular;
|
||||||
NgArray<INDEX_4 > ref_slices;
|
NgArray<INDEX_4 > ref_slices;
|
||||||
|
|
||||||
BitArray first_id(geom->identifications.Size());
|
NgBitArray first_id(geom->identifications.Size());
|
||||||
first_id.Set();
|
first_id.Set();
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,14 +2,14 @@ add_definitions(-DNGINTERFACE_EXPORTS)
|
|||||||
add_library(gen INTERFACE)
|
add_library(gen INTERFACE)
|
||||||
set(sdir ${CMAKE_CURRENT_SOURCE_DIR})
|
set(sdir ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
target_sources(gen INTERFACE
|
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}/hashtabl.cpp ${sdir}/mystring.cpp ${sdir}/optmem.cpp ${sdir}/parthreads.cpp
|
||||||
${sdir}/seti.cpp ${sdir}/sort.cpp ${sdir}/spbita2d.cpp ${sdir}/table.cpp
|
${sdir}/seti.cpp ${sdir}/sort.cpp ${sdir}/spbita2d.cpp ${sdir}/table.cpp
|
||||||
${sdir}/mpi_interface.cpp ${sdir}/gzstream.cpp
|
${sdir}/mpi_interface.cpp ${sdir}/gzstream.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES
|
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
|
dynamicmem.hpp hashtabl.hpp mpi_interface.hpp myadt.hpp
|
||||||
ngsimd.hpp mystring.hpp netgenout.hpp ngpython.hpp
|
ngsimd.hpp mystring.hpp netgenout.hpp ngpython.hpp
|
||||||
optmem.hpp parthreads.hpp seti.hpp sort.hpp
|
optmem.hpp parthreads.hpp seti.hpp sort.hpp
|
||||||
|
@ -33,7 +33,7 @@ namespace netgen
|
|||||||
#include "hashtabl.hpp"
|
#include "hashtabl.hpp"
|
||||||
|
|
||||||
|
|
||||||
#include "bitarray.hpp"
|
#include "ngbitarray.hpp"
|
||||||
#include "spbita2d.hpp"
|
#include "spbita2d.hpp"
|
||||||
|
|
||||||
#include "seti.hpp"
|
#include "seti.hpp"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
data type BitArray
|
data type NgBitArray
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <mystdlib.h>
|
#include <mystdlib.h>
|
||||||
@ -16,25 +16,25 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
//using namespace netgen;
|
//using namespace netgen;
|
||||||
|
|
||||||
BitArray :: BitArray ()
|
NgBitArray :: NgBitArray ()
|
||||||
{
|
{
|
||||||
size = 0;
|
size = 0;
|
||||||
data = NULL;
|
data = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
BitArray :: BitArray (int asize)
|
NgBitArray :: NgBitArray (int asize)
|
||||||
{
|
{
|
||||||
size = 0;
|
size = 0;
|
||||||
data = NULL;
|
data = NULL;
|
||||||
SetSize (asize);
|
SetSize (asize);
|
||||||
}
|
}
|
||||||
|
|
||||||
BitArray :: ~BitArray ()
|
NgBitArray :: ~NgBitArray ()
|
||||||
{
|
{
|
||||||
delete [] data;
|
delete [] data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitArray :: SetSize (int asize)
|
void NgBitArray :: SetSize (int asize)
|
||||||
{
|
{
|
||||||
if (size == asize) return;
|
if (size == asize) return;
|
||||||
delete [] data;
|
delete [] data;
|
||||||
@ -43,14 +43,14 @@ namespace netgen
|
|||||||
data = new unsigned char [Addr (size)+1];
|
data = new unsigned char [Addr (size)+1];
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitArray :: Set ()
|
void NgBitArray :: Set ()
|
||||||
{
|
{
|
||||||
if (!size) return;
|
if (!size) return;
|
||||||
for (int i = 0; i <= Addr (size); i++)
|
for (int i = 0; i <= Addr (size); i++)
|
||||||
data[i] = UCHAR_MAX;
|
data[i] = UCHAR_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitArray :: Clear ()
|
void NgBitArray :: Clear ()
|
||||||
{
|
{
|
||||||
if (!size) return;
|
if (!size) return;
|
||||||
for (int i = 0; i <= Addr (size); i++)
|
for (int i = 0; i <= Addr (size); i++)
|
||||||
@ -59,14 +59,14 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void BitArray :: Invert ()
|
void NgBitArray :: Invert ()
|
||||||
{
|
{
|
||||||
if (!size) return;
|
if (!size) return;
|
||||||
for (int i = 0; i <= Addr (size); i++)
|
for (int i = 0; i <= Addr (size); i++)
|
||||||
data[i] ^= 255;
|
data[i] ^= 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitArray :: And (const BitArray & ba2)
|
void NgBitArray :: And (const NgBitArray & ba2)
|
||||||
{
|
{
|
||||||
if (!size) return;
|
if (!size) return;
|
||||||
for (int i = 0; i <= Addr (size); i++)
|
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;
|
if (!size) return;
|
||||||
for (int i = 0; i <= Addr (size); i++)
|
for (int i = 0; i <= Addr (size); i++)
|
@ -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.
|
the whole array or one bit can be set or reset, respectively.
|
||||||
Test returns the state of the occurring bit.
|
Test returns the state of the occurring bit.
|
||||||
No range checking is done.
|
No range checking is done.
|
||||||
|
|
||||||
index ranges from 0 to size-1
|
index ranges from 0 to size-1
|
||||||
*/
|
*/
|
||||||
class BitArray
|
class NgBitArray
|
||||||
{
|
{
|
||||||
INDEX size;
|
INDEX size;
|
||||||
unsigned char * data;
|
unsigned char * data;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BitArray ();
|
NgBitArray ();
|
||||||
///
|
///
|
||||||
BitArray (INDEX asize);
|
NgBitArray (INDEX asize);
|
||||||
///
|
///
|
||||||
~BitArray ();
|
~NgBitArray ();
|
||||||
|
|
||||||
///
|
///
|
||||||
void SetSize (INDEX asize);
|
void SetSize (INDEX asize);
|
||||||
@ -67,9 +67,9 @@ public:
|
|||||||
///
|
///
|
||||||
void Invert ();
|
void Invert ();
|
||||||
///
|
///
|
||||||
void And (const BitArray & ba2);
|
void And (const NgBitArray & ba2);
|
||||||
///
|
///
|
||||||
void Or (const BitArray & ba2);
|
void Or (const NgBitArray & ba2);
|
||||||
private:
|
private:
|
||||||
///
|
///
|
||||||
inline unsigned char Mask (INDEX i) const
|
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
|
// 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++)
|
for (int i = 1; i <= a.Size(); i++)
|
||||||
{
|
{
|
||||||
@ -105,37 +105,37 @@ inline ostream & operator<< (ostream & s, const BitArray & a)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
inline
|
inline
|
||||||
INDEX BitArray :: Size () const
|
INDEX NgBitArray :: Size () const
|
||||||
{
|
{
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
unsigned char BitArray :: Mask (INDEX i) const
|
unsigned char NgBitArray :: Mask (INDEX i) const
|
||||||
{
|
{
|
||||||
return char(1) << (i % CHAR_BIT);
|
return char(1) << (i % CHAR_BIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
INDEX BitArray :: Addr (INDEX i) const
|
INDEX NgBitArray :: Addr (INDEX i) const
|
||||||
{
|
{
|
||||||
return (i / CHAR_BIT);
|
return (i / CHAR_BIT);
|
||||||
}
|
}
|
||||||
inline
|
inline
|
||||||
void BitArray :: Set (INDEX i)
|
void NgBitArray :: Set (INDEX i)
|
||||||
{
|
{
|
||||||
data[Addr(i)] |= Mask(i);
|
data[Addr(i)] |= Mask(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
void BitArray :: Clear (INDEX i)
|
void NgBitArray :: Clear (INDEX i)
|
||||||
{
|
{
|
||||||
data[Addr(i)] &= ~Mask(i);
|
data[Addr(i)] &= ~Mask(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline
|
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;
|
return (data[i / CHAR_BIT] & (char(1) << (i % CHAR_BIT) ) ) ? 1 : 0;
|
||||||
}
|
}
|
@ -17,7 +17,7 @@ namespace netgen
|
|||||||
class IndexSet
|
class IndexSet
|
||||||
{
|
{
|
||||||
NgArray<int> set;
|
NgArray<int> set;
|
||||||
BitArray flags;
|
NgBitArray flags;
|
||||||
public:
|
public:
|
||||||
IndexSet (int maxind);
|
IndexSet (int maxind);
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ void WriteAbaqusFormat (const Mesh & mesh,
|
|||||||
int masternode(0);
|
int masternode(0);
|
||||||
|
|
||||||
NgArray<INDEX_2> pairs;
|
NgArray<INDEX_2> pairs;
|
||||||
BitArray master(np), help(np);
|
NgBitArray master(np), help(np);
|
||||||
master.Set();
|
master.Set();
|
||||||
for (i = 1; i <= 3; i++)
|
for (i = 1; i <= 3; i++)
|
||||||
{
|
{
|
||||||
@ -205,7 +205,7 @@ void WriteAbaqusFormat (const Mesh & mesh,
|
|||||||
<< "*EQUATION, INPUT=" << mpcfilename << endl;
|
<< "*EQUATION, INPUT=" << mpcfilename << endl;
|
||||||
|
|
||||||
|
|
||||||
BitArray eliminated(np);
|
NgBitArray eliminated(np);
|
||||||
eliminated.Clear();
|
eliminated.Clear();
|
||||||
for (i = 1; i <= mesh.GetIdentifications().GetMaxNr(); i++)
|
for (i = 1; i <= mesh.GetIdentifications().GetMaxNr(); i++)
|
||||||
{
|
{
|
||||||
|
@ -938,7 +938,7 @@ void WriteFile (int typ,
|
|||||||
NgArray<INDEX_2> edgelist;
|
NgArray<INDEX_2> edgelist;
|
||||||
|
|
||||||
// edge (point) on boundary ?
|
// 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 },
|
static int eledges[6][2] = { { 1, 2 } , { 1, 3 } , { 1, 4 },
|
||||||
{ 2, 3 } , { 2, 4 } , { 3, 4 } };
|
{ 2, 3 } , { 2, 4 } , { 3, 4 } };
|
||||||
|
@ -3159,7 +3159,7 @@ namespace netgen
|
|||||||
if (opt.refine_hp)
|
if (opt.refine_hp)
|
||||||
{
|
{
|
||||||
PrintMessage(3,"refine hp");
|
PrintMessage(3,"refine hp");
|
||||||
BitArray singv(np);
|
NgBitArray singv(np);
|
||||||
singv.Clear();
|
singv.Clear();
|
||||||
|
|
||||||
if (mesh.GetDimension() == 3)
|
if (mesh.GetDimension() == 3)
|
||||||
@ -3833,7 +3833,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BitArray isnewpoint(np);
|
NgBitArray isnewpoint(np);
|
||||||
isnewpoint.Clear();
|
isnewpoint.Clear();
|
||||||
|
|
||||||
for (int i = 0; i < cutedges.Size(); i++)
|
for (int i = 0; i < cutedges.Size(); i++)
|
||||||
|
@ -19,7 +19,7 @@ namespace netgen
|
|||||||
cout << "Old NP: " << mesh.GetNP() << endl;
|
cout << "Old NP: " << mesh.GetNP() << endl;
|
||||||
cout << "Trigs: " << mesh.GetNSE() << endl;
|
cout << "Trigs: " << mesh.GetNSE() << endl;
|
||||||
|
|
||||||
BitArray bndnodes(np);
|
NgBitArray bndnodes(np);
|
||||||
NgArray<int> mapto(np);
|
NgArray<int> mapto(np);
|
||||||
|
|
||||||
bndnodes.Clear();
|
bndnodes.Clear();
|
||||||
@ -210,7 +210,7 @@ namespace netgen
|
|||||||
int nseg = mesh.GetNSeg();
|
int nseg = mesh.GetNSeg();
|
||||||
|
|
||||||
// Indicate which points need to be remapped
|
// 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
|
// Map of the old points to the new points
|
||||||
NgArray<PointIndex, PointIndex::BASE> mapto(np);
|
NgArray<PointIndex, PointIndex::BASE> mapto(np);
|
||||||
@ -286,7 +286,7 @@ namespace netgen
|
|||||||
// don't have boundary layers
|
// don't have boundary layers
|
||||||
|
|
||||||
// Bit array to keep track of segments already processed
|
// 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
|
// Set them all to "1" to initially activate all segments
|
||||||
segsel.Set();
|
segsel.Set();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
HPREF_ELEMENT_TYPE ClassifyTet(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
HPREF_ELEMENT_TYPE ClassifyTet(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
||||||
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
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)
|
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint)
|
||||||
{
|
{
|
||||||
int ep1(0), ep2(0), ep3(0), ep4(0), cp1(0), cp2(0), cp3(0), cp4(0), fp1, fp2, fp3, fp4;
|
int ep1(0), ep2(0), ep3(0), ep4(0), cp1(0), cp2(0), cp3(0), cp4(0), fp1, fp2, fp3, fp4;
|
||||||
@ -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,
|
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)
|
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
|
// #ifdef SABINE
|
||||||
HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
||||||
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
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)
|
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
|
#ifdef HPREF_OLD
|
||||||
HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
||||||
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
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)
|
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint, int dim, const FaceDescriptor & fd)
|
||||||
{
|
{
|
||||||
HPREF_ELEMENT_TYPE type = HP_NONE;
|
HPREF_ELEMENT_TYPE type = HP_NONE;
|
||||||
@ -1136,7 +1136,7 @@ HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE<int> & edge
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
HPREF_ELEMENT_TYPE ClassifyQuad(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
HPREF_ELEMENT_TYPE ClassifyQuad(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoint_dom,
|
||||||
BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE<int> & faces, INDEX_2_HASHTABLE<int> & face_edges,
|
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)
|
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint, int dim, const FaceDescriptor & fd)
|
||||||
{
|
{
|
||||||
HPREF_ELEMENT_TYPE type = HP_NONE;
|
HPREF_ELEMENT_TYPE type = HP_NONE;
|
||||||
@ -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,
|
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)
|
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint)
|
||||||
{
|
{
|
||||||
HPREF_ELEMENT_TYPE type = HP_NONE;
|
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,
|
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)
|
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,
|
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)
|
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint)
|
||||||
{
|
{
|
||||||
HPREF_ELEMENT_TYPE type = HP_NONE;
|
HPREF_ELEMENT_TYPE type = HP_NONE;
|
||||||
|
@ -805,7 +805,7 @@ namespace netgen
|
|||||||
|
|
||||||
// remove degenerated
|
// remove degenerated
|
||||||
|
|
||||||
BitArray badnode(mesh.GetNP());
|
NgBitArray badnode(mesh.GetNP());
|
||||||
badnode.Clear();
|
badnode.Clear();
|
||||||
int ndeg = 0;
|
int ndeg = 0;
|
||||||
for (int i = 1; i <= tempels.Size(); i++)
|
for (int i = 1; i <= tempels.Size(); i++)
|
||||||
@ -1320,7 +1320,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
ne = tempels.Size();
|
ne = tempels.Size();
|
||||||
BitArray inner(ne), outer(ne);
|
NgBitArray inner(ne), outer(ne);
|
||||||
inner.Clear();
|
inner.Clear();
|
||||||
outer.Clear();
|
outer.Clear();
|
||||||
NgArray<int> elstack;
|
NgArray<int> elstack;
|
||||||
|
@ -551,7 +551,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HASHTABLE<int> & edgepoiclt_dom,
|
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);
|
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);
|
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,
|
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)
|
INDEX_2_HASHTABLE<int> & surf_edges, NgArray<int, PointIndex::BASE> & facepoint, int & levels, int & act_ref)
|
||||||
{
|
{
|
||||||
bool sing = 0;
|
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)
|
bool ClassifyHPElements (Mesh & mesh, NgArray<HPRefElement> & elements, int & act_ref, int & levels)
|
||||||
{
|
{
|
||||||
INDEX_2_HASHTABLE<int> edges(mesh.GetNSeg()+1);
|
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);
|
INDEX_2_HASHTABLE<int> edgepoint_dom(mesh.GetNSeg()+1);
|
||||||
|
|
||||||
edgepoint.Clear();
|
edgepoint.Clear();
|
||||||
BitArray cornerpoint(mesh.GetNP());
|
NgBitArray cornerpoint(mesh.GetNP());
|
||||||
cornerpoint.Clear();
|
cornerpoint.Clear();
|
||||||
|
|
||||||
// value = nr > 0 ... refine elements in domain nr
|
// value = nr > 0 ... refine elements in domain nr
|
||||||
|
@ -607,11 +607,11 @@ void MeshOptimize3d :: SplitImprove (Mesh & mesh,
|
|||||||
TABLE<ElementIndex,PointIndex::BASE> elementsonnode(np);
|
TABLE<ElementIndex,PointIndex::BASE> elementsonnode(np);
|
||||||
NgArray<ElementIndex> hasbothpoints;
|
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();
|
origpoint.Set();
|
||||||
|
|
||||||
NgArray<double> elerrs(ne);
|
NgArray<double> elerrs(ne);
|
||||||
BitArray illegaltet(ne);
|
NgBitArray illegaltet(ne);
|
||||||
illegaltet.Clear();
|
illegaltet.Clear();
|
||||||
|
|
||||||
const char * savetask = multithread.task;
|
const char * savetask = multithread.task;
|
||||||
@ -891,7 +891,7 @@ void MeshOptimize3d :: SplitImprove (Mesh & mesh,
|
|||||||
|
|
||||||
|
|
||||||
void MeshOptimize3d :: SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal,
|
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 t("MeshOptimize3d::SwapImprove"); RegionTimer reg(t);
|
||||||
static Timer tloop("MeshOptimize3d::SwapImprove loop");
|
static Timer tloop("MeshOptimize3d::SwapImprove loop");
|
||||||
@ -1769,7 +1769,7 @@ void MeshOptimize3d :: SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal,
|
|||||||
|
|
||||||
|
|
||||||
void MeshOptimize3d :: SwapImproveSurface (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)
|
const NgArray< NgArray<int,PointIndex::BASE>* > * idmaps)
|
||||||
{
|
{
|
||||||
NgArray< NgArray<int,PointIndex::BASE>* > locidmaps;
|
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();
|
original.Set();
|
||||||
|
|
||||||
for (i = 1; i <= GetNSE(); i++)
|
for (i = 1; i <= GetNSE(); i++)
|
||||||
|
@ -24,9 +24,9 @@ public:
|
|||||||
|
|
||||||
void SplitImprove (Mesh & mesh, OPTIMIZEGOAL goal = OPT_QUALITY);
|
void SplitImprove (Mesh & mesh, OPTIMIZEGOAL goal = OPT_QUALITY);
|
||||||
void SwapImprove (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,
|
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);
|
const NgArray< NgArray<int,PointIndex::BASE>* > * idmaps = NULL);
|
||||||
void SwapImprove2 (Mesh & mesh, OPTIMIZEGOAL goal = OPT_QUALITY);
|
void SwapImprove2 (Mesh & mesh, OPTIMIZEGOAL goal = OPT_QUALITY);
|
||||||
|
|
||||||
|
@ -1824,8 +1824,8 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// BitArray base is PointIndex::BASE ...
|
// NgBitArray base is PointIndex::BASE ...
|
||||||
void Mesh :: FixPoints (const BitArray & fixpoints)
|
void Mesh :: FixPoints (const NgBitArray & fixpoints)
|
||||||
{
|
{
|
||||||
if (fixpoints.Size() != GetNP())
|
if (fixpoints.Size() != GetNP())
|
||||||
{
|
{
|
||||||
@ -2469,7 +2469,7 @@ namespace netgen
|
|||||||
int np = GetNP();
|
int np = GetNP();
|
||||||
|
|
||||||
FindOpenSegments();
|
FindOpenSegments();
|
||||||
BitArray frontpoints(np+1); // for 0- and 1-based
|
NgBitArray frontpoints(np+1); // for 0- and 1-based
|
||||||
frontpoints.Clear();
|
frontpoints.Clear();
|
||||||
|
|
||||||
for (int i = 1; i <= GetNOpenSegments(); i++)
|
for (int i = 1; i <= GetNOpenSegments(); i++)
|
||||||
@ -2994,7 +2994,7 @@ namespace netgen
|
|||||||
int nse = GetNSE();
|
int nse = GetNSE();
|
||||||
|
|
||||||
NgArray<Vec3d> normals(np);
|
NgArray<Vec3d> normals(np);
|
||||||
BitArray linepoint(np);
|
NgBitArray linepoint(np);
|
||||||
|
|
||||||
linepoint.Clear();
|
linepoint.Clear();
|
||||||
for (i = 1; i <= nseg; i++)
|
for (i = 1; i <= nseg; i++)
|
||||||
@ -3899,7 +3899,7 @@ namespace netgen
|
|||||||
int i, j;
|
int i, j;
|
||||||
int nse = GetNSE();
|
int nse = GetNSE();
|
||||||
|
|
||||||
BitArray used(nse);
|
NgBitArray used(nse);
|
||||||
used.Clear();
|
used.Clear();
|
||||||
INDEX_2_HASHTABLE<int> edges(nse+1);
|
INDEX_2_HASHTABLE<int> edges(nse+1);
|
||||||
|
|
||||||
@ -5289,8 +5289,8 @@ namespace netgen
|
|||||||
int np = GetNP();
|
int np = GetNP();
|
||||||
int nse = GetNSE();
|
int nse = GetNSE();
|
||||||
|
|
||||||
BitArray surfused(nse);
|
NgBitArray surfused(nse);
|
||||||
BitArray pused (np);
|
NgBitArray pused (np);
|
||||||
|
|
||||||
surfused.Clear();
|
surfused.Clear();
|
||||||
|
|
||||||
@ -5401,7 +5401,7 @@ namespace netgen
|
|||||||
int fdi;
|
int fdi;
|
||||||
int np = GetNP();
|
int np = GetNP();
|
||||||
|
|
||||||
BitArray usedp(np);
|
NgBitArray usedp(np);
|
||||||
Array<SurfaceElementIndex> els_of_face;
|
Array<SurfaceElementIndex> els_of_face;
|
||||||
|
|
||||||
fdi = 1;
|
fdi = 1;
|
||||||
|
@ -381,7 +381,7 @@ namespace netgen
|
|||||||
DLL_HEADER void CalcSurfacesOfNode ();
|
DLL_HEADER void CalcSurfacesOfNode ();
|
||||||
|
|
||||||
/// additional (temporarily) fix points
|
/// additional (temporarily) fix points
|
||||||
void FixPoints (const BitArray & fixpoints);
|
void FixPoints (const NgBitArray & fixpoints);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
finds elements without neighbour and
|
finds elements without neighbour and
|
||||||
@ -544,10 +544,10 @@ namespace netgen
|
|||||||
DLL_HEADER void ImproveMesh (const MeshingParameters & mp, OPTIMIZEGOAL goal = OPT_QUALITY);
|
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,
|
void ImproveMeshJacobianOnSurface (const MeshingParameters & mp,
|
||||||
const BitArray & usepoint,
|
const NgBitArray & usepoint,
|
||||||
const NgArray< Vec<3>* > & nv,
|
const NgArray< Vec<3>* > & nv,
|
||||||
OPTIMIZEGOAL goal = OPT_QUALITY,
|
OPTIMIZEGOAL goal = OPT_QUALITY,
|
||||||
const NgArray< NgArray<int,PointIndex::BASE>* > * idmaps = NULL);
|
const NgArray< NgArray<int,PointIndex::BASE>* > * idmaps = NULL);
|
||||||
|
@ -770,7 +770,7 @@ namespace netgen
|
|||||||
can.Elem(parent.I2()));
|
can.Elem(parent.I2()));
|
||||||
}
|
}
|
||||||
|
|
||||||
BitArray boundp(np);
|
NgBitArray boundp(np);
|
||||||
boundp.Clear();
|
boundp.Clear();
|
||||||
for (auto & sel : mesh.SurfaceElements())
|
for (auto & sel : mesh.SurfaceElements())
|
||||||
for (auto pi : sel.PNums())
|
for (auto pi : sel.PNums())
|
||||||
@ -801,7 +801,7 @@ namespace netgen
|
|||||||
mesh.Point(i) = can.Get(i);
|
mesh.Point(i) = can.Get(i);
|
||||||
|
|
||||||
|
|
||||||
BitArray free (mesh.GetNP()), fhelp(mesh.GetNP());
|
NgBitArray free (mesh.GetNP()), fhelp(mesh.GetNP());
|
||||||
free.Clear();
|
free.Clear();
|
||||||
for (int i = 1; i <= mesh.GetNE(); i++)
|
for (int i = 1; i <= mesh.GetNE(); i++)
|
||||||
{
|
{
|
||||||
|
@ -480,7 +480,7 @@ namespace netgen
|
|||||||
double facok = 0;
|
double facok = 0;
|
||||||
double factry;
|
double factry;
|
||||||
|
|
||||||
BitArray illegalels(ne);
|
NgBitArray illegalels(ne);
|
||||||
illegalels.Clear();
|
illegalels.Clear();
|
||||||
|
|
||||||
|
|
||||||
@ -504,7 +504,7 @@ namespace netgen
|
|||||||
can.Elem(parents.Get(i).I2()));
|
can.Elem(parents.Get(i).I2()));
|
||||||
}
|
}
|
||||||
|
|
||||||
BitArray boundp(np);
|
NgBitArray boundp(np);
|
||||||
boundp.Clear();
|
boundp.Clear();
|
||||||
for (int i = 1; i <= mesh.GetNSE(); i++)
|
for (int i = 1; i <= mesh.GetNSE(); i++)
|
||||||
{
|
{
|
||||||
|
@ -110,7 +110,7 @@ namespace netgen
|
|||||||
int np = mesh.GetNP();
|
int np = mesh.GetNP();
|
||||||
int ne = mesh.GetNE();
|
int ne = mesh.GetNE();
|
||||||
|
|
||||||
BitArray badnodes(np);
|
NgBitArray badnodes(np);
|
||||||
badnodes.Clear();
|
badnodes.Clear();
|
||||||
|
|
||||||
for (i = 1; i <= ne; i++)
|
for (i = 1; i <= ne; i++)
|
||||||
|
@ -1485,7 +1485,7 @@ void Mesh :: ImproveMesh (const MeshingParameters & mp, OPTIMIZEGOAL goal)
|
|||||||
|
|
||||||
// Improve Condition number of Jacobian, any elements
|
// Improve Condition number of Jacobian, any elements
|
||||||
void Mesh :: ImproveMeshJacobian (const MeshingParameters & mp,
|
void Mesh :: ImproveMeshJacobian (const MeshingParameters & mp,
|
||||||
OPTIMIZEGOAL goal, const BitArray * usepoint)
|
OPTIMIZEGOAL goal, const NgBitArray * usepoint)
|
||||||
{
|
{
|
||||||
// int i, j;
|
// int i, j;
|
||||||
|
|
||||||
@ -1507,7 +1507,7 @@ void Mesh :: ImproveMeshJacobian (const MeshingParameters & mp,
|
|||||||
par.maxit_linsearch = 20;
|
par.maxit_linsearch = 20;
|
||||||
par.maxit_bfgs = 20;
|
par.maxit_bfgs = 20;
|
||||||
|
|
||||||
BitArray badnodes(np);
|
NgBitArray badnodes(np);
|
||||||
badnodes.Clear();
|
badnodes.Clear();
|
||||||
|
|
||||||
for (int i = 1; i <= ne; i++)
|
for (int i = 1; i <= ne; i++)
|
||||||
@ -1608,7 +1608,7 @@ void Mesh :: ImproveMeshJacobian (const MeshingParameters & mp,
|
|||||||
|
|
||||||
// Improve Condition number of Jacobian, any elements
|
// Improve Condition number of Jacobian, any elements
|
||||||
void Mesh :: ImproveMeshJacobianOnSurface (const MeshingParameters & mp,
|
void Mesh :: ImproveMeshJacobianOnSurface (const MeshingParameters & mp,
|
||||||
const BitArray & usepoint,
|
const NgBitArray & usepoint,
|
||||||
const NgArray< Vec<3>* > & nv,
|
const NgArray< Vec<3>* > & nv,
|
||||||
OPTIMIZEGOAL goal,
|
OPTIMIZEGOAL goal,
|
||||||
const NgArray< NgArray<int,PointIndex::BASE>* > * idmaps)
|
const NgArray< NgArray<int,PointIndex::BASE>* > * idmaps)
|
||||||
@ -1664,7 +1664,7 @@ void Mesh :: ImproveMeshJacobianOnSurface (const MeshingParameters & mp,
|
|||||||
par.maxit_linsearch = 20;
|
par.maxit_linsearch = 20;
|
||||||
par.maxit_bfgs = 20;
|
par.maxit_bfgs = 20;
|
||||||
|
|
||||||
BitArray badnodes(np);
|
NgBitArray badnodes(np);
|
||||||
badnodes.Clear();
|
badnodes.Clear();
|
||||||
|
|
||||||
for (int i = 1; i <= ne; i++)
|
for (int i = 1; i <= ne; i++)
|
||||||
|
@ -62,7 +62,7 @@ void CutOffAndCombine (Mesh & mesh, const Mesh & othermesh)
|
|||||||
}
|
}
|
||||||
cout << endl;
|
cout << endl;
|
||||||
|
|
||||||
BitArray connected(mesh.GetNP());
|
NgBitArray connected(mesh.GetNP());
|
||||||
connected.Clear();
|
connected.Clear();
|
||||||
for (i = 1; i <= mesh.GetNSE(); i++)
|
for (i = 1; i <= mesh.GetNSE(); i++)
|
||||||
{
|
{
|
||||||
@ -120,7 +120,7 @@ void CutOffAndCombine (Mesh & mesh, const Mesh & othermesh)
|
|||||||
mesh.Compress();
|
mesh.Compress();
|
||||||
|
|
||||||
mesh.FindOpenElements();
|
mesh.FindOpenElements();
|
||||||
BitArray locked(mesh.GetNP());
|
NgBitArray locked(mesh.GetNP());
|
||||||
locked.Set();
|
locked.Set();
|
||||||
for (i = 1; i <= mesh.GetNOpenElements(); i++)
|
for (i = 1; i <= mesh.GetNOpenElements(); i++)
|
||||||
for (j = 1; j <= 3; j++)
|
for (j = 1; j <= 3; j++)
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
namespace netgen
|
namespace netgen
|
||||||
{
|
{
|
||||||
void GetPureBadness(Mesh & mesh, NgArray<double> & pure_badness,
|
void GetPureBadness(Mesh & mesh, NgArray<double> & pure_badness,
|
||||||
const BitArray & isnewpoint)
|
const NgBitArray & isnewpoint)
|
||||||
{
|
{
|
||||||
//const int ne = mesh.GetNE();
|
//const int ne = mesh.GetNE();
|
||||||
const int np = mesh.GetNP();
|
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 Mesh & mesh, const NgArray<ElementIndex> & bad_elements,
|
||||||
const int width)
|
const int width)
|
||||||
{
|
{
|
||||||
@ -152,7 +152,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
void RepairBisection(Mesh & mesh, NgArray<ElementIndex> & bad_elements,
|
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,
|
const NgArray<double> & pure_badness,
|
||||||
double max_worsening, const bool uselocalworsening,
|
double max_worsening, const bool uselocalworsening,
|
||||||
const NgArray< NgArray<int,PointIndex::BASE>* > & idmaps)
|
const NgArray< NgArray<int,PointIndex::BASE>* > & idmaps)
|
||||||
@ -185,7 +185,7 @@ namespace netgen
|
|||||||
can[i] = new Point<3>;
|
can[i] = new Point<3>;
|
||||||
}
|
}
|
||||||
|
|
||||||
BitArray isboundarypoint(np),isedgepoint(np);
|
NgBitArray isboundarypoint(np),isedgepoint(np);
|
||||||
isboundarypoint.Clear();
|
isboundarypoint.Clear();
|
||||||
isedgepoint.Clear();
|
isedgepoint.Clear();
|
||||||
|
|
||||||
@ -216,8 +216,8 @@ namespace netgen
|
|||||||
Validate(mesh,bad_elements,pure_badness,
|
Validate(mesh,bad_elements,pure_badness,
|
||||||
((uselocalworsening) ? (0.8*(max_worsening-1.) + 1.) : (0.1*(max_worsening-1.) + 1.)),
|
((uselocalworsening) ? (0.8*(max_worsening-1.) + 1.) : (0.1*(max_worsening-1.) + 1.)),
|
||||||
uselocalworsening); // -> larger working area
|
uselocalworsening); // -> larger working area
|
||||||
BitArray working_elements(ne);
|
NgBitArray working_elements(ne);
|
||||||
BitArray working_points(np);
|
NgBitArray working_points(np);
|
||||||
|
|
||||||
GetWorkingArea(working_elements,working_points,mesh,bad_elements,numbadneighbours);
|
GetWorkingArea(working_elements,working_points,mesh,bad_elements,numbadneighbours);
|
||||||
//working_elements.Set();
|
//working_elements.Set();
|
||||||
@ -240,7 +240,7 @@ namespace netgen
|
|||||||
PrintMessage(5,ostrstr.str());
|
PrintMessage(5,ostrstr.str());
|
||||||
|
|
||||||
|
|
||||||
BitArray isworkingboundary(np);
|
NgBitArray isworkingboundary(np);
|
||||||
for(int i=1; i<=np; i++)
|
for(int i=1; i<=np; i++)
|
||||||
if(working_points.Test(i) && isboundarypoint.Test(i))
|
if(working_points.Test(i) && isboundarypoint.Test(i))
|
||||||
isworkingboundary.Set(i);
|
isworkingboundary.Set(i);
|
||||||
|
@ -5,13 +5,13 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
|
|
||||||
void GetPureBadness(Mesh & mesh, NgArray<double> & pure_badness,
|
void GetPureBadness(Mesh & mesh, NgArray<double> & pure_badness,
|
||||||
const BitArray & isnewpoint);
|
const NgBitArray & isnewpoint);
|
||||||
double Validate(const Mesh & mesh, NgArray<ElementIndex> & bad_elements,
|
double Validate(const Mesh & mesh, NgArray<ElementIndex> & bad_elements,
|
||||||
const NgArray<double> & pure_badness,
|
const NgArray<double> & pure_badness,
|
||||||
double max_worsening, const bool uselocalworsening,
|
double max_worsening, const bool uselocalworsening,
|
||||||
NgArray<double> * quality_loss = NULL);
|
NgArray<double> * quality_loss = NULL);
|
||||||
void RepairBisection(Mesh & mesh, NgArray<ElementIndex> & bad_elements,
|
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,
|
const NgArray<double> & pure_badness,
|
||||||
double max_worsening, const bool uselocalworsening,
|
double max_worsening, const bool uselocalworsening,
|
||||||
const NgArray< NgArray<int,PointIndex::BASE>* > & idmaps);
|
const NgArray< NgArray<int,PointIndex::BASE>* > & idmaps);
|
||||||
|
@ -1819,7 +1819,7 @@ namespace netgen
|
|||||||
|
|
||||||
NgArray<Element2d> faces;
|
NgArray<Element2d> faces;
|
||||||
|
|
||||||
BitArray shownode(mesh->GetNP());
|
NgBitArray shownode(mesh->GetNP());
|
||||||
if (vispar.clipping.enable)
|
if (vispar.clipping.enable)
|
||||||
{
|
{
|
||||||
shownode.Clear();
|
shownode.Clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user