/usr/share/netgen/libsrc/csg/specpoin.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 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | #ifndef FILE_SPECPOIN
#define FILE_SPECPOIN
/**************************************************************************/
/* File: specpoin.hpp */
/* Author: Joachim Schoeberl */
/* Date: 01. Okt. 95 */
/**************************************************************************/
namespace netgen
{
/*
Special Point Calculation
*/
class Surface;
class Solid;
/// Special point.
class SpecialPoint
{
public:
/// coordinates
Point<3> p;
/// tangential to edge
Vec<3> v;
///
int layer;
/// point must be used in mesh
bool unconditional;
/// surfaces defining edge
int s1, s2;
/// if s1 and s2 are only representatives, then these are the original indices
int s1_orig, s2_orig;
int nr;
///
SpecialPoint () : p(0,0,0), v(0,0,0), layer(0), unconditional(0), s1(0), s2(0), s1_orig(0), s2_orig(0)
{ ; }
///
SpecialPoint (const SpecialPoint & sp2);
///
SpecialPoint & operator= (const SpecialPoint & sp2);
///
void Print (ostream & str) const;
int GetLayer() const { return layer; }
///
bool HasSurfaces (int as1, int as2) const
{
return ( (s1 == as1 && s2 == as2) || (s1 == as2 && s2 == as1) );
}
};
inline ostream & operator<< (ostream & ost, const SpecialPoint & sp)
{
sp.Print (ost);
return ost;
}
///
class SpecialPointCalculation
{
private:
///
const CSGeometry * geometry;
///
Array<MeshPoint> * points;
///
Array<long int> boxesinlevel;
///
double size;
///
double relydegtest; // maximal dimension of bisection intervall for
/// test of degeneration parameters
double cpeps1, epeps1, epeps2, epspointdist2;
double ideps;
public:
///
SpecialPointCalculation ();
///
void SetIdEps(const double epsin) {ideps = epsin;}
///
void CalcSpecialPoints (const CSGeometry & ageometry,
Array<MeshPoint> & points);
///
void AnalyzeSpecialPoints (const CSGeometry & geometry,
Array<MeshPoint> & points,
Array<SpecialPoint> & specpoints);
protected:
///
void CalcSpecialPointsRec (const Solid * sol, int layer,
const BoxSphere<3> & box,
int level,
bool calccp, bool calcep);
///
bool CrossPointNewtonConvergence (const Surface * f1, const Surface * f2,
const Surface * f3, const BoxSphere<3> & box);
///
bool CrossPointDegenerated (const Surface * f1, const Surface * f2,
const Surface * f3, const BoxSphere<3> & box) const;
///
void CrossPointNewton (const Surface * f1, const Surface * f2,
const Surface * f3, Point<3> & p);
bool EdgeNewtonConvergence (const Surface * f1, const Surface * f2,
const Point<3> & p);
///
bool EdgeDegenerated (const Surface * f1, const Surface * f2,
const BoxSphere<3> & box) const;
///
void EdgeNewton (const Surface * f1, const Surface * f2,
Point<3> & p);
///
bool IsEdgeExtremalPoint (const Surface * f1, const Surface * f2,
const Point<3> & p, Point<3> & pp, double rad);
/*
///
bool ExtremalPointPossible (const Surface * f1, const Surface * f2,
int dir, const BoxSphere<3> & box);
///
bool ExtremalPointDegenerated (const Surface * f1, const Surface * f2,
int dir, const BoxSphere<3> & box);
///
bool ExtremalPointNewtonConvergence (const Surface * f1, const Surface * f2,
int dir, const BoxSphere<3> & box);
*/
///
void ExtremalPointNewton (const Surface * f1, const Surface * f2,
int dir, Point<3> & p);
///
bool AddPoint (const Point<3> & p, int layer);
void ComputeExtremalPoints (const Plane * plane,
const QuadraticSurface * quadric,
Array<Point<3> > & pts);
void ComputeExtremalPoints (const Sphere * sphere1,
const Sphere * sphere2,
Array<Point<3> > & pts);
void ComputeCrossPoints (const Plane * plane1,
const Plane * plane2,
const Plane * plane3,
Array<Point<3> > & pts);
void ComputeCrossPoints (const Plane * plane1,
const Plane * plane2,
const QuadraticSurface * quadratic,
Array<Point<3> > & pts);
void ComputeCrossPoints (const Sphere * sphere1,
const Sphere * sphere2,
const Sphere * sphere3,
Array<Point<3> > & pts);
};
}
#endif
|