meshing headers

This commit is contained in:
Joachim Schoeberl 2011-03-02 20:50:39 +00:00
parent 807d091d9e
commit ab0077c609
11 changed files with 2198 additions and 2164 deletions

View File

@ -7,14 +7,15 @@
/* Date: 23. Aug. 09 */
/**************************************************************************/
class Tcl_Interp;
struct Tcl_Interp;
namespace netgen
{
class NetgenGeometry
{
public:
class NetgenGeometry
{
public:
virtual ~NetgenGeometry () { ; }
virtual int GenerateMesh (Mesh*& mesh, MeshingParameters & mparam,
@ -24,24 +25,24 @@ public:
virtual void Save (string filename) const;
virtual void SaveToMeshFile (ostream & ost) const { ; }
};
};
class GeometryRegister
{
public:
class GeometryRegister
{
public:
virtual ~GeometryRegister();
virtual NetgenGeometry * Load (string filename) const = 0;
virtual NetgenGeometry * LoadFromMeshFile (istream & ist) const { return NULL; }
virtual class VisualScene * GetVisualScene (const NetgenGeometry * geom) const
{ return NULL; }
virtual void SetParameters (Tcl_Interp * interp) { ; }
};
};
extern Array<GeometryRegister*> geometryregister;
extern Array<GeometryRegister*> geometryregister;
}

View File

@ -12,23 +12,26 @@
global functions and variables
*/
///
DLL_HEADER extern double GetTime ();
extern void ResetTime ();
///
extern int testmode;
/// calling parameters
// extern Flags parameters;
extern MeshingParameters mparam;
extern Array<int> tets_in_qualclass;
class multithreadt
namespace netgen
{
public:
///
DLL_HEADER extern double GetTime ();
extern void ResetTime ();
///
extern int testmode;
/// calling parameters
// extern Flags parameters;
extern MeshingParameters mparam;
extern Array<int> tets_in_qualclass;
class multithreadt
{
public:
int pause;
int testmode;
int redraw;
@ -39,12 +42,13 @@ public:
const char * task;
bool demorunning;
multithreadt();
};
};
extern volatile multithreadt multithread;
extern volatile multithreadt multithread;
extern string ngdir;
extern DebugParameters debugparam;
extern bool verbose;
extern string ngdir;
extern DebugParameters debugparam;
extern bool verbose;
}
#endif

View File

@ -8,11 +8,13 @@
/**************************************************************************/
/// box for grading
class GradingBox
namespace netgen
{
/// box for grading
class GradingBox
{
/// xmid
float xmid[3];
/// half edgelength
@ -24,7 +26,7 @@ class GradingBox
///
double hopt;
///
public:
public:
struct
{
@ -48,16 +50,16 @@ public:
static BlockAllocator ball;
void * operator new(size_t);
void operator delete (void *);
};
};
/**
/**
Control of 3D mesh grading
*/
class LocalH
{
class LocalH
{
///
GradingBox * root;
///
@ -66,7 +68,7 @@ class LocalH
Array<GradingBox*> boxes;
///
Box3d boundingbox;
public:
public:
///
LocalH (const Point3d & pmin, const Point3d & pmax, double grading);
///
@ -119,7 +121,7 @@ public:
{ return boundingbox; }
///
void PrintMemInfo (ostream & ost) const;
private:
private:
///
double GetMinHRec (const Point3d & pmin, const Point3d & pmax,
const GradingBox * box) const;
@ -160,24 +162,26 @@ private:
void ConvexifyRec (GradingBox * box);
friend ostream & operator<< (ostream & ost, const LocalH & loch);
};
};
inline ostream & operator<< (ostream & ost, const GradingBox & box)
{
inline ostream & operator<< (ostream & ost, const GradingBox & box)
{
ost << "gradbox, pmid = " << box.PMid() << ", h2 = " << box.H2()
<< " cutbound = " << box.flags.cutboundary << " isinner = " << box.flags.isinner
<< endl;
return ost;
}
}
inline ostream & operator<< (ostream & ost, const LocalH & loch)
{
inline ostream & operator<< (ostream & ost, const LocalH & loch)
{
for (int i = 0; i < loch.boxes.Size(); i++)
ost << "box[" << i << "] = " << *(loch.boxes[i]);
return ost;
}
}
#endif

View File

@ -11,18 +11,19 @@
The mesh class
*/
namespace netgen
{
enum resthtype { RESTRICTH_FACE, RESTRICTH_EDGE,
enum resthtype { RESTRICTH_FACE, RESTRICTH_EDGE,
RESTRICTH_SURFACEELEMENT, RESTRICTH_POINT, RESTRICTH_SEGMENT };
class HPRefElement;
class HPRefElement;
/// 2d/3d mesh
class Mesh
{
public:
/// 2d/3d mesh
class Mesh
{
public:
typedef ::netgen::T_POINTS T_POINTS;
// typedef MoveableArray<MeshPoint,PointIndex::BASE> T_POINTS;
@ -34,7 +35,7 @@ public:
typedef Array<Element2d> T_SURFELEMENTS;
private:
private:
/// point coordinates
T_POINTS points;
@ -147,10 +148,10 @@ private:
#endif
private:
private:
void BuildBoundaryEdges(void);
public:
public:
bool PointContainedIn2DElement(const Point3d & p,
double lami[3],
const int element,
@ -162,7 +163,7 @@ public:
double lami[3],
const int element) const;
public:
public:
// store coarse mesh before hp-refinement
Array<HPRefElement> * hpelements;
@ -605,31 +606,31 @@ public:
FaceDescriptor & GetFaceDescriptor (int i)
{ return facedecoding.Elem(i); }
// #ifdef NONE
// /*
// Identify points pi1 and pi2, due to
// identification nr identnr
// */
// void AddIdentification (int pi1, int pi2, int identnr);
// #ifdef NONE
// /*
// Identify points pi1 and pi2, due to
// identification nr identnr
// */
// void AddIdentification (int pi1, int pi2, int identnr);
// int GetIdentification (int pi1, int pi2) const;
// int GetIdentificationSym (int pi1, int pi2) const;
// ///
// INDEX_2_HASHTABLE<int> & GetIdentifiedPoints ()
// {
// return *identifiedpoints;
// }
// int GetIdentification (int pi1, int pi2) const;
// int GetIdentificationSym (int pi1, int pi2) const;
// ///
// INDEX_2_HASHTABLE<int> & GetIdentifiedPoints ()
// {
// return *identifiedpoints;
// }
// ///
// void GetIdentificationMap (int identnr, Array<int> & identmap) const;
// ///
// void GetIdentificationPairs (int identnr, Array<INDEX_2> & identpairs) const;
// ///
// int GetMaxIdentificationNr () const
// {
// return maxidentnr;
// }
// #endif
// ///
// void GetIdentificationMap (int identnr, Array<int> & identmap) const;
// ///
// void GetIdentificationPairs (int identnr, Array<INDEX_2> & identpairs) const;
// ///
// int GetMaxIdentificationNr () const
// {
// return maxidentnr;
// }
// #endif
/// return periodic, close surface etc. identifications
Identifications & GetIdentifications () { return *ident; }
@ -728,10 +729,10 @@ public:
void ReceiveParallelMesh ();
/// find connection to parallel meshes
// void FindExchangePoints () ;
// void FindExchangePoints () ;
// void FindExchangeEdges ();
// void FindExchangeFaces ();
// void FindExchangeEdges ();
// void FindExchangeFaces ();
/// use metis to decompose master mesh
void ParallelMetis (); // Array<int> & neloc );
@ -747,15 +748,16 @@ public:
#endif
};
};
inline ostream& operator<<(ostream& ost, const Mesh& mesh)
{
inline ostream& operator<<(ostream& ost, const Mesh& mesh)
{
ost << "mesh: " << endl;
mesh.Save(ost);
return ost;
}
}
}
#endif

View File

@ -12,20 +12,22 @@
namespace netgen
{
extern int printmessage_importance;
// extern int printmessage_importance;
class CSGeometry;
class NetgenGeometry;
}
#include "msghandler.hpp"
#include "meshtype.hpp"
#include "localh.hpp"
#include "meshclass.hpp"
#include "global.hpp"
namespace netgen
{
#include "meshtool.hpp"
#include "ruler2.hpp"
#include "adfront2.hpp"
@ -37,17 +39,12 @@ namespace netgen
#include "adfront3.hpp"
#include "ruler3.hpp"
#ifndef SMALLLIB
#define _INCLUDE_MORE
#endif
#ifdef LINUX
#define _INCLUDE_MORE
#endif
#ifdef _INCLUDE_MORE
#include "meshing3.hpp"
#include "improve3.hpp"
#endif
#include "findip.hpp"
#include "findip2.hpp"
@ -55,23 +52,20 @@ namespace netgen
#include "curvedelems.hpp"
#include "clusters.hpp"
#ifdef _INCLUDE_MORE
#include "meshfunc.hpp"
#endif
#include "bisect.hpp"
#include "hprefinement.hpp"
#include "boundarylayer.hpp"
#include "specials.hpp"
}
#include "validate.hpp"
#include "basegeom.hpp"
#ifdef PARALLEL
#include "paralleltop.hpp"
// #include "../parallel/parallelmesh.hpp"
#endif
}
#include "basegeom.hpp"
#endif

View File

@ -8,64 +8,68 @@
/* Date: 01. Okt. 95 */
/**************************************************************************/
/*
namespace netgen
{
/*
Classes for NETGEN
*/
*/
enum ELEMENT_TYPE {
enum ELEMENT_TYPE {
SEGMENT = 1, SEGMENT3 = 2,
TRIG = 10, QUAD=11, TRIG6 = 12, QUAD6 = 13, QUAD8 = 14,
TET = 20, TET10 = 21,
PYRAMID = 22, PRISM = 23, PRISM12 = 24,
HEX = 25
};
};
typedef int ELEMENT_EDGE[2]; // initial point, end point
typedef int ELEMENT_FACE[4]; // points, last one is -1 for trig
typedef int ELEMENT_EDGE[2]; // initial point, end point
typedef int ELEMENT_FACE[4]; // points, last one is -1 for trig
#define ELEMENT_MAXPOINTS 12
#define ELEMENT2D_MAXPOINTS 8
enum POINTTYPE { FIXEDPOINT = 1, EDGEPOINT = 2, SURFACEPOINT = 3, INNERPOINT = 4 };
enum ELEMENTTYPE { FREEELEMENT, FIXEDELEMENT };
enum OPTIMIZEGOAL { OPT_QUALITY, OPT_CONFORM, OPT_REST, OPT_WORSTCASE, OPT_LEGAL };
enum POINTTYPE { FIXEDPOINT = 1, EDGEPOINT = 2, SURFACEPOINT = 3, INNERPOINT = 4 };
enum ELEMENTTYPE { FREEELEMENT, FIXEDELEMENT };
enum OPTIMIZEGOAL { OPT_QUALITY, OPT_CONFORM, OPT_REST, OPT_WORSTCASE, OPT_LEGAL };
extern int GetTimeStamp();
extern int NextTimeStamp();
extern int GetTimeStamp();
extern int NextTimeStamp();
class PointGeomInfo
{
public:
class PointGeomInfo
{
public:
int trignum; // for STL Meshing
double u, v; // for OCC Meshing
PointGeomInfo ()
: trignum(-1), u(0), v(0) { ; }
};
};
inline ostream & operator<< (ostream & ost, const PointGeomInfo & gi)
{
inline ostream & operator<< (ostream & ost, const PointGeomInfo & gi)
{
return (ost << gi.trignum << " " << gi.u << " " << gi.v);
}
}
inline istream & operator>> (istream & ist, PointGeomInfo & gi)
{
inline istream & operator>> (istream & ist, PointGeomInfo & gi)
{
return (ist >> gi.trignum >> gi.u >> gi.v);
}
}
#define MULTIPOINTGEOMINFO_MAX 100
class MultiPointGeomInfo
{
class MultiPointGeomInfo
{
int cnt;
PointGeomInfo mgi[MULTIPOINTGEOMINFO_MAX];
public:
public:
MultiPointGeomInfo () { cnt = 0; }
int AddPointGeomInfo (const PointGeomInfo & gi);
void Init () { cnt = 0; }
@ -73,18 +77,18 @@ public:
int GetNPGI () const { return cnt; }
const PointGeomInfo & GetPGI (int i) const { return mgi[i-1]; }
};
};
class EdgePointGeomInfo
{
public:
class EdgePointGeomInfo
{
public:
int edgenr;
int body; // for ACIS
double dist; // for 2d meshing
double u, v; // for OCC Meshing
public:
public:
EdgePointGeomInfo ()
: edgenr(0), body(0), dist(0.0), u(0.0), v(0.0) { ; }
@ -97,22 +101,22 @@ public:
u = gi2.u; v = gi2.v;
return *this;
}
};
};
inline ostream & operator<< (ostream & ost, const EdgePointGeomInfo & gi)
{
inline ostream & operator<< (ostream & ost, const EdgePointGeomInfo & gi)
{
ost << "epgi: edgnr=" << gi.edgenr << ", dist=" << gi.dist;
return ost;
}
}
class PointIndex
{
class PointIndex
{
int i;
public:
public:
PointIndex () { ; }
PointIndex (int ai) : i(ai) { ; }
PointIndex & operator= (const PointIndex &ai) { i = ai.i; return *this; }
@ -127,25 +131,25 @@ public:
#else
enum { BASE = 1 };
#endif
};
};
inline istream & operator>> (istream & ist, PointIndex & pi)
{
inline istream & operator>> (istream & ist, PointIndex & pi)
{
int i; ist >> i; pi = i; return ist;
}
}
inline ostream & operator<< (ostream & ost, const PointIndex & pi)
{
inline ostream & operator<< (ostream & ost, const PointIndex & pi)
{
return (ost << pi.GetInt());
}
}
class ElementIndex
{
class ElementIndex
{
int i;
public:
public:
ElementIndex () { ; }
ElementIndex (int ai) : i(ai) { ; }
ElementIndex & operator= (const ElementIndex & ai) { i = ai.i; return *this; }
@ -153,23 +157,23 @@ public:
operator int () const { return i; }
ElementIndex & operator++ (int) { i++; return *this; }
ElementIndex & operator-- (int) { i--; return *this; }
};
};
inline istream & operator>> (istream & ist, ElementIndex & pi)
{
inline istream & operator>> (istream & ist, ElementIndex & pi)
{
int i; ist >> i; pi = i; return ist;
}
}
inline ostream & operator<< (ostream & ost, const ElementIndex & pi)
{
inline ostream & operator<< (ostream & ost, const ElementIndex & pi)
{
return (ost << int(pi));
}
}
class SurfaceElementIndex
{
class SurfaceElementIndex
{
int i;
public:
public:
SurfaceElementIndex () { ; }
SurfaceElementIndex (int ai) : i(ai) { ; }
SurfaceElementIndex & operator= (const SurfaceElementIndex & ai)
@ -178,22 +182,22 @@ public:
operator int () const { return i; }
SurfaceElementIndex & operator++ (int) { i++; return *this; }
SurfaceElementIndex & operator-- (int) { i--; return *this; }
};
};
inline istream & operator>> (istream & ist, SurfaceElementIndex & pi)
{
inline istream & operator>> (istream & ist, SurfaceElementIndex & pi)
{
int i; ist >> i; pi = i; return ist;
}
}
inline ostream & operator<< (ostream & ost, const SurfaceElementIndex & pi)
{
inline ostream & operator<< (ostream & ost, const SurfaceElementIndex & pi)
{
return (ost << int(pi));
}
}
class SegmentIndex
{
class SegmentIndex
{
int i;
public:
public:
SegmentIndex () { ; }
SegmentIndex (int ai) : i(ai) { ; }
SegmentIndex & operator= (const SegmentIndex & ai)
@ -202,27 +206,27 @@ public:
operator int () const { return i; }
SegmentIndex & operator++ (int) { i++; return *this; }
SegmentIndex & operator-- (int) { i--; return *this; }
};
};
inline istream & operator>> (istream & ist, SegmentIndex & pi)
{
inline istream & operator>> (istream & ist, SegmentIndex & pi)
{
int i; ist >> i; pi = i; return ist;
}
}
inline ostream & operator<< (ostream & ost, const SegmentIndex & pi)
{
inline ostream & operator<< (ostream & ost, const SegmentIndex & pi)
{
return (ost << int(pi));
}
}
/**
/**
Point in the mesh.
Contains layer (a new feature in 4.3 for overlapping meshes.
*/
class MeshPoint : public Point<3>
{
class MeshPoint : public Point<3>
{
int layer;
double singular; // singular factor for hp-refinement
POINTTYPE type;
@ -231,14 +235,14 @@ class MeshPoint : public Point<3>
bool isghost;
#endif
public:
public:
MeshPoint ()
{
#ifdef PARALLEL
isghost = 0;
#endif
;
}
}
MeshPoint (const Point<3> & ap, int alayer = 1, POINTTYPE apt = INNERPOINT)
: Point<3> (ap), layer(alayer), singular(0.),type(apt)
@ -273,25 +277,25 @@ public:
void SetGhost ( bool aisghost ) { isghost = aisghost; }
#endif
};
};
inline ostream & operator<<(ostream & s, const MeshPoint & pt)
{
inline ostream & operator<<(ostream & s, const MeshPoint & pt)
{
return (s << Point<3> (pt));
}
}
typedef Array<MeshPoint, PointIndex::BASE> T_POINTS;
typedef Array<MeshPoint, PointIndex::BASE> T_POINTS;
/**
/**
Triangle element for surface mesh generation.
*/
class Element2d
{
class Element2d
{
/// point numbers
PointIndex pnum[ELEMENT2D_MAXPOINTS];
/// geom info of points
@ -325,7 +329,7 @@ class Element2d
/// a linked list for all segments in the same face
SurfaceElementIndex next;
public:
public:
///
Element2d ();
///
@ -509,23 +513,23 @@ public:
#else
bool IsGhost () const { return false; }
#endif
};
};
ostream & operator<<(ostream & s, const Element2d & el);
ostream & operator<<(ostream & s, const Element2d & el);
class IntegrationPointData
{
public:
class IntegrationPointData
{
public:
Point<3> p;
double weight;
Vector shape;
DenseMatrix dshape;
};
};
@ -534,12 +538,12 @@ public:
/**
/**
Volume element
*/
class Element
{
private:
class Element
{
private:
/// point numbers
PointIndex pnum[ELEMENT_MAXPOINTS];
///
@ -579,7 +583,7 @@ private:
bool isghost;
#endif
public:
public:
flagstruct flags;
///
@ -782,21 +786,21 @@ public:
#endif
// friend class Mesh;
};
};
ostream & operator<<(ostream & s, const Element & el);
ostream & operator<<(ostream & s, const Element & el);
/**
/**
Edge segment.
*/
class Segment
{
public:
class Segment
{
public:
///
Segment();
Segment (const Segment& other);
@ -836,10 +840,10 @@ public:
///
int meshdocval;
private:
private:
string* bcname;
public:
public:
/*
PointIndex operator[] (int i) const
{ return (i == 0) ? p1 : p2; }
@ -885,19 +889,19 @@ public:
PointIndex & operator[] (int i) { return pnums[i]; }
const PointIndex & operator[] (int i) const { return pnums[i]; }
};
};
ostream & operator<<(ostream & s, const Segment & seg);
ostream & operator<<(ostream & s, const Segment & seg);
// class Surface;
// class FaceDescriptor;
// class Surface;
// class FaceDescriptor;
///
class FaceDescriptor
{
///
class FaceDescriptor
{
/// which surface, 0 if not available
int surfnr;
/// domain nr inside
@ -922,7 +926,7 @@ class FaceDescriptor
double domin_singular;
double domout_singular;
public:
public:
FaceDescriptor();
FaceDescriptor(int surfnri, int domini, int domouti, int tlosurfi);
FaceDescriptor(const Segment & seg);
@ -962,16 +966,16 @@ public:
SurfaceElementIndex FirstElement() { return firstelement; }
// friend ostream & operator<<(ostream & s, const FaceDescriptor & fd);
friend class Mesh;
};
};
ostream & operator<< (ostream & s, const FaceDescriptor & fd);
ostream & operator<< (ostream & s, const FaceDescriptor & fd);
class EdgeDescriptor
{
class EdgeDescriptor
{
int tlosurf;
int surfnr[2];
public:
public:
EdgeDescriptor ()
: tlosurf(-1)
{ surfnr[0] = surfnr[1] = -1; }
@ -981,13 +985,13 @@ public:
int TLOSurface() const { return tlosurf; }
void SetTLOSurface (int nr) { tlosurf = nr; }
};
};
class MeshingParameters
{
public:
class MeshingParameters
{
public:
/**
3d optimization strategy:
// m .. move nodes
@ -1093,13 +1097,13 @@ public:
void Print (ostream & ost) const;
void CopyFrom(const MeshingParameters & other);
};
};
class DebugParameters
{
public:
class DebugParameters
{
public:
///
int debugoutput;
/// use slow checks
@ -1128,24 +1132,24 @@ public:
int haltfacenr;
///
DebugParameters ();
};
};
inline void Element2d :: Invert()
{
inline void Element2d :: Invert()
{
if (typ == TRIG)
Swap (PNum(2), PNum(3));
else
Invert2();
}
}
inline void Element2d :: NormalizeNumbering ()
{
inline void Element2d :: NormalizeNumbering ()
{
if (GetNP() == 3)
{
if (PNum(1) < PNum(2) && PNum(1) < PNum(3))
@ -1170,18 +1174,18 @@ inline void Element2d :: NormalizeNumbering ()
}
else
NormalizeNumbering2();
}
}
static const int gftetfacesa[4][3] =
static const int gftetfacesa[4][3] =
{ { 1, 2, 3 },
{ 2, 0, 3 },
{ 0, 1, 3 },
{ 1, 0, 2 } };
inline void Element :: GetFace (int i, Element2d & face) const
{
inline void Element :: GetFace (int i, Element2d & face) const
{
if (typ == TET)
{
face.SetType(TRIG);
@ -1191,7 +1195,7 @@ inline void Element :: GetFace (int i, Element2d & face) const
}
else
GetFace2 (i, face);
}
}
@ -1199,16 +1203,16 @@ inline void Element :: GetFace (int i, Element2d & face) const
/**
/**
Identification of periodic surfaces, close surfaces, etc.
*/
class Identifications
{
public:
class Identifications
{
public:
enum ID_TYPE { UNDEFINED = 1, PERIODIC = 2, CLOSESURFACES = 3, CLOSEEDGES = 4};
private:
private:
class Mesh & mesh;
/// identify points (thin layers, periodic b.c.)
@ -1225,7 +1229,7 @@ private:
/// number of identifications (or, actually used identifications ?)
int maxidentnr;
public:
public:
///
Identifications (class Mesh & amesh);
///
@ -1290,10 +1294,10 @@ public:
void SetMaxPointNr (int maxpnum);
void Print (ostream & ost) const;
};
};
}

View File

@ -8,45 +8,49 @@
/**************************************************************************/
extern void PrintDot(char ch = '.');
namespace netgen
{
extern void PrintDot(char ch = '.');
//Message Pipeline:
//Message Pipeline:
//importance: importance of message: 1=very important, 3=middle, 5=low, 7=unimportant
extern void PrintMessage(int importance,
//importance: importance of message: 1=very important, 3=middle, 5=low, 7=unimportant
extern void PrintMessage(int importance,
const MyStr& s1, const MyStr& s2=MyStr());
extern void PrintMessage(int importance,
extern void PrintMessage(int importance,
const MyStr& s1, const MyStr& s2, const MyStr& s3, const MyStr& s4=MyStr());
extern void PrintMessage(int importance,
extern void PrintMessage(int importance,
const MyStr& s1, const MyStr& s2, const MyStr& s3, const MyStr& s4,
const MyStr& s5, const MyStr& s6=MyStr(), const MyStr& s7=MyStr(), const MyStr& s8=MyStr());
// CR without line-feed
extern void PrintMessageCR(int importance,
// CR without line-feed
extern void PrintMessageCR(int importance,
const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8="");
extern void PrintFnStart(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
extern void PrintFnStart(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8="");
extern void PrintWarning(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
extern void PrintWarning(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8="");
extern void PrintError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
extern void PrintError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8="");
extern void PrintFileError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
extern void PrintFileError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8="");
extern void PrintSysError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
extern void PrintSysError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8="");
extern void PrintUserError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
extern void PrintUserError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8="");
extern void PrintTime(const MyStr& s1="", const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
extern void PrintTime(const MyStr& s1="", const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8="");
extern void SetStatMsg(const MyStr& s);
extern void SetStatMsg(const MyStr& s);
extern void PushStatus(const MyStr& s);
extern void PushStatusF(const MyStr& s);
extern void PopStatus();
extern void SetThreadPercent(double percent);
extern void GetStatus(MyStr & s, double & percentage);
extern void PushStatus(const MyStr& s);
extern void PushStatusF(const MyStr& s);
extern void PopStatus();
extern void SetThreadPercent(double percent);
extern void GetStatus(MyStr & s, double & percentage);
}
#endif

View File

@ -1,12 +1,13 @@
#ifndef FILE_PARALLELTOP
#define FILE_PARALLELTOP
#include <meshing.hpp>
extern int ntasks;
class ParallelMeshTopology
namespace netgen
{
extern int ntasks;
class ParallelMeshTopology
{
const Mesh & mesh;
// number of local elements, vertices, points (?), edges, faces
@ -36,7 +37,7 @@ class ParallelMeshTopology
bool coarseupdate;
int overlap;
public:
public:
ParallelMeshTopology (const Mesh & amesh);
~ParallelMeshTopology ();
@ -228,8 +229,8 @@ public:
bool IsGhostEdge ( int ednum ) const { return isghostedge.Test(ednum-1); }
bool IsGhostVert ( int pnum ) const { return mesh.Point(pnum).IsGhost(); }
// inline void SetGhostVert ( const int pnum )
// { isghostvert.Set(pnum-1); }
// inline void SetGhostVert ( const int pnum )
// { isghostvert.Set(pnum-1); }
void SetGhostEdge ( int ednum )
{ isghostedge.Set(ednum-1); }
@ -258,10 +259,10 @@ public:
int GetNVGlob () { return nvglob; }
int GetNEGlob () { return neglob; }
};
};
}

View File

@ -1,17 +1,21 @@
#ifndef VALIDATE_HPP
#define VALIDATE_HPP
namespace netgen
{
void GetPureBadness(Mesh & mesh, Array<double> & pure_badness,
void GetPureBadness(Mesh & mesh, Array<double> & pure_badness,
const BitArray & isnewpoint);
double Validate(const Mesh & mesh, Array<ElementIndex> & bad_elements,
double Validate(const Mesh & mesh, Array<ElementIndex> & bad_elements,
const Array<double> & pure_badness,
double max_worsening, const bool uselocalworsening,
Array<double> * quality_loss = NULL);
void RepairBisection(Mesh & mesh, Array<ElementIndex> & bad_elements, const BitArray & isnewpoint, const Refinement & refinement,
void RepairBisection(Mesh & mesh, Array<ElementIndex> & bad_elements,
const BitArray & isnewpoint, const Refinement & refinement,
const Array<double> & pure_badness,
double max_worsening, const bool uselocalworsening,
const Array< Array<int,PointIndex::BASE>* > & idmaps);
}
#endif // VALIDATE_HPP

View File

@ -5,7 +5,7 @@ dist_pkgdata_DATA = boxcyl.geo circle_on_cube.geo cone.geo cube.geo \
cylsphere.geo ellipsoid.geo ellipticcyl.geo extrusion.geo fichera.geo lshape3d.geo \
manyholes.geo manyholes2.geo matrix.geo ortho.geo period.geo revolution.geo \
sculpture.geo shaft.geo shell.geo sphere.geo sphereincube.geo torus.geo trafo.geo \
twobricks.geo twocubes.geo twocyl.geo \
twobricks.geo twocubes.geo twocyl.geo boundarycondition.geo \
hinge.stl part1.stl frame.step screw.step \
squarehole.in2d squarecircle.in2d square.in2d

View File

@ -0,0 +1,16 @@
algebraic3d
solid p1 = plane (0.5, 0, 0; 1, 0, 0);
# since surfaces of both bricks are identic they get the same bc id:
solid brick1 = orthobrick (0,0,0; 1,1,1) and p1 -bc=1;
solid brick2 = orthobrick (0,0,-1; 1,1,0) and p1 -bc=2;
tlo brick1;
tlo brick2;
# override bc number:
# all faces of solid p1 belonging to the boundary of tlo brick1 get bc=3
boundarycondition p1 brick1 3;