/usr/share/netgen/libsrc/meshing/localh.hpp is in netgen-headers 4.9.13.dfsg-8build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | #ifndef LOCALH
#define LOCALH
/**************************************************************************/
/* File: localh.hh */
/* Author: Joachim Schoeberl */
/* Date: 29. Jan. 97 */
/**************************************************************************/
/// box for grading
class GradingBox
{
/*
/// xmin
float x1[3];
/// xmax
float x2[3];
*/
/// xmid
float xmid[3];
/// half edgelength
float h2;
///
GradingBox * childs[8];
///
GradingBox * father;
///
double hopt;
///
struct
{
unsigned int cutboundary:1;
unsigned int isinner:1;
unsigned int oldcell:1;
unsigned int pinner:1;
} flags;
public:
///
GradingBox (const double * ax1, const double * ax2);
///
void DeleteChilds();
///
friend class LocalH;
static BlockAllocator ball;
void * operator new(size_t);
void operator delete (void *);
};
/**
Control of 3D mesh grading
*/
class LocalH
{
///
GradingBox * root;
///
double grading;
///
Array<GradingBox*> boxes;
///
Box3d boundingbox;
public:
///
LocalH (const Point3d & pmin, const Point3d & pmax, double grading);
///
~LocalH();
///
void Delete();
///
void SetGrading (double agrading) { grading = agrading; }
///
void SetH (const Point3d & x, double h);
///
double GetH (const Point3d & x) const;
/// minimal h in box (pmin, pmax)
double GetMinH (const Point3d & pmin, const Point3d & pmax) const;
/// mark boxes intersecting with boundary-box
void CutBoundary (const Point3d & pmin, const Point3d & pmax)
{ CutBoundaryRec (pmin, pmax, root); }
/// find inner boxes
void FindInnerBoxes ( // int (*sameside)(const Point3d & p1, const Point3d & p2),
class AdFront3 * adfront,
int (*testinner)(const Point3d & p1));
/// clears all flags
void ClearFlags ()
{ ClearFlagsRec(root); }
/// widen refinement zone
void WidenRefinement ();
/// get points in inner elements
void GetInnerPoints (Array<Point3d> & points);
/// get points in outer closure
void GetOuterPoints (Array<Point3d> & points);
///
void Convexify ();
///
int GetNBoxes () { return boxes.Size(); }
const Box3d & GetBoundingBox () const
{ return boundingbox; }
///
void PrintMemInfo (ostream & ost) const;
private:
///
double GetMinHRec (const Point3d & pmin, const Point3d & pmax,
const GradingBox * box) const;
///
void CutBoundaryRec (const Point3d & pmin, const Point3d & pmax,
GradingBox * box);
///
void FindInnerBoxesRec ( int (*inner)(const Point3d & p),
GradingBox * box);
///
void FindInnerBoxesRec2 (GradingBox * box,
class AdFront3 * adfront,
Array<Box3d> & faceboxes,
Array<int> & finds, int nfinbox);
///
void SetInnerBoxesRec (GradingBox * box);
///
void ClearFlagsRec (GradingBox * box);
///
void ConvexifyRec (GradingBox * box);
};
#endif
|