netgen/libsrc/meshing/meshing3.hpp

131 lines
2.2 KiB
C++
Raw Permalink Normal View History

2009-01-13 04:40:13 +05:00
#ifndef FILE_MESHING3
#define FILE_MESHING3
enum MESHING3_RESULT
{
MESHING3_OK = 0,
MESHING3_GIVEUP = 1,
MESHING3_NEGVOL = 2,
MESHING3_OUTERSTEPSEXCEEDED = 3,
MESHING3_TERMINATE = 4,
MESHING3_BADSURFACEMESH = 5
};
/// 3d volume mesh generation
class Meshing3
{
/// current state of front
AdFront3 * adfront;
/// 3d generation rules
2009-01-25 17:35:25 +05:00
Array<vnetrule*> rules;
2009-01-13 04:40:13 +05:00
/// counts how often a rule is used
2009-01-25 17:35:25 +05:00
Array<int> ruleused, canuse, foundmap;
2009-01-13 04:40:13 +05:00
/// describes, why a rule is not applied
2009-01-25 17:35:25 +05:00
Array<char*> problems;
2009-01-13 04:40:13 +05:00
/// tolerance criterion
double tolfak;
public:
///
Meshing3 (const string & rulefilename);
///
Meshing3 (const char ** rulep);
///
virtual ~Meshing3 ();
///
void LoadRules (const char * filename, const char ** prules);
///
MESHING3_RESULT GenerateMesh (Mesh & mesh, const MeshingParameters & mp);
///
2009-01-25 17:35:25 +05:00
int ApplyRules (Array<Point3d> & lpoints, Array<int> & allowpoint,
Array<MiniElement2d> & lfaces, INDEX lfacesplit,
2009-01-13 04:40:13 +05:00
INDEX_2_HASHTABLE<int> & connectedpairs,
2009-01-25 17:35:25 +05:00
Array<Element> & elements,
Array<INDEX> & delfaces, int tolerance,
2009-01-13 04:40:13 +05:00
double sloppy, int rotind1,
float & retminerr);
///
PointIndex AddPoint (const Point3d & p, PointIndex globind);
///
void AddBoundaryElement (const Element2d & elem);
///
void AddBoundaryElement (const MiniElement2d & elem);
///
int AddConnectedPair (const INDEX_2 & pair);
///
void BlockFill (Mesh & mesh, double gh);
///
void BlockFillLocalH (Mesh & mesh, const MeshingParameters & mp);
/// uses points of adfront, and puts new elements into mesh
void Delaunay (Mesh & mesh, int domainnr, const MeshingParameters & mp);
///
friend class PlotVolMesh;
///
friend void TestRules ();
};
/// status of mesh generation
class MeshingStat3d
{
public:
///
MeshingStat3d ();
///
int cntsucc;
///
int cnttrials;
///
int cntelem;
///
int nff;
///
int qualclass;
///
double vol0;
///
double vol;
///
double h;
///
int problemindex;
};
/*
2009-01-25 17:35:25 +05:00
template <typename POINTArray, typename FACEArray>
extern int FindInnerPoint (POINTArray & grouppoints,
FACEArray & groupfaces,
2009-01-13 04:40:13 +05:00
Point3d & p);
*/
#endif