/usr/share/netgen/libsrc/csg/identify.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 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | #ifndef FILE_IDENTIFY
#define FILE_IDENTIFY
/**************************************************************************/
/* File: identify.hh */
/* Author: Joachim Schoeberl */
/* Date: 1. Aug. 99 */
/**************************************************************************/
namespace netgen
{
/**
Identify surfaces for periodic b.c. or
thin domains
*/
class SpecialPoint;
class Identification
{
protected:
const CSGeometry & geom;
// identified faces, index sorted
INDEX_2_HASHTABLE<int> identfaces;
int nr;
public:
Identification (int anr, const CSGeometry & ageom);
virtual ~Identification ();
virtual void Print (ostream & ost) const = 0;
virtual void GetData (ostream & ost) const = 0;
/// obsolete
// virtual void IdentifySpecialPoints (Array<class SpecialPoint> & points);
/// can identify both special points (fixed direction)
/// (identified points, same tangent)
virtual int Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2,
const TABLE<int> & specpoint2solid,
const TABLE<int> & specpoint2surface) const;
///
virtual int Identifyable (const Point<3> & p1, const Point<3> & sp2) const;
/// is it possible to identify sp1 with some other ?
virtual int IdentifyableCandidate (const SpecialPoint & sp1) const;
/// are points (if connected) by a short edge (direction anyhow) ?
virtual int ShortEdge (const SpecialPoint & sp1, const SpecialPoint & sp2) const;
/// add entries in mesh identification tables
virtual void IdentifyPoints (class Mesh & mesh);
/// add entries to identified faces (based on segment infos)
virtual void IdentifyFaces (class Mesh & mesh);
/// get point on other surface, add entry in mesh identifications
virtual int GetIdentifiedPoint (class Mesh & mesh, int pi1);
/// copy surfaces, or fill rectangles
virtual void BuildSurfaceElements (Array<class Segment> & segs,
class Mesh & mesh,
const Surface * surf);
/// insert volume elements in thin layers
virtual void BuildVolumeElements (Array<class Element2d> & surfels,
class Mesh & mesh);
/// get list of identified faces
virtual void GetIdentifiedFaces (Array<INDEX_2> & idfaces) const;
friend ostream & operator<< (ostream & ost, Identification & ident);
};
class PeriodicIdentification : public Identification
{
const Surface * s1;
const Surface * s2;
public:
PeriodicIdentification (int anr,
const CSGeometry & ageom,
const Surface * as1,
const Surface * as2);
virtual ~PeriodicIdentification ();
virtual void Print (ostream & ost) const;
virtual void GetData (ostream & ost) const;
// virtual void IdentifySpecialPoints (Array<class SpecialPoint> & points);
virtual int Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2,
const TABLE<int> & specpoint2solid,
const TABLE<int> & specpoint2surface) const;
virtual int Identifyable (const Point<3> & p1, const Point<3> & sp2) const;
virtual int GetIdentifiedPoint (class Mesh & mesh, int pi1);
virtual void IdentifyPoints (class Mesh & mesh);
virtual void IdentifyFaces (class Mesh & mesh);
virtual void BuildSurfaceElements (Array<class Segment> & segs,
class Mesh & mesh,
const Surface * surf);
};
///
class TopLevelObject;
class CloseSurfaceIdentification : public Identification
{
const Surface * s1;
const Surface * s2;
const TopLevelObject * domain;
///
int dom_nr;
/// number of refinement levels (in Z-refinement)
int ref_levels;
/// number of refinement levels for layer next to s1 (in Z-refinement)
int ref_levels_s1;
/// number of refinement levels for layer next to s2 (in Z-refinement)
int ref_levels_s2;
///
double eps_n;
Array<double> slices;
/// used only for domain-local identification:
Array<int> domain_surfaces;
///
bool dom_surf_valid;
///
Vec<3> direction;
///
bool usedirection;
public:
CloseSurfaceIdentification (int anr,
const CSGeometry & ageom,
const Surface * as1,
const Surface * as2,
const TopLevelObject * adomain,
const Flags & flags);
virtual ~CloseSurfaceIdentification ();
virtual void Print (ostream & ost) const;
virtual void GetData (ostream & ost) const;
// virtual void IdentifySpecialPoints (Array<class SpecialPoint> & points);
virtual int Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2,
const TABLE<int> & specpoint2solid,
const TABLE<int> & specpoint2surface) const;
virtual int Identifyable (const Point<3> & p1, const Point<3> & sp2) const;
virtual int IdentifyableCandidate (const SpecialPoint & sp1) const;
virtual int ShortEdge (const SpecialPoint & sp1, const SpecialPoint & sp2) const;
virtual int GetIdentifiedPoint (class Mesh & mesh, int pi1);
const Array<double> & GetSlices () const { return slices; }
virtual void IdentifyPoints (class Mesh & mesh);
virtual void IdentifyFaces (class Mesh & mesh);
virtual void BuildSurfaceElements (Array<class Segment> & segs,
class Mesh & mesh,
const Surface * surf);
void BuildSurfaceElements2 (Array<class Segment> & segs,
class Mesh & mesh,
const Surface * surf);
virtual void BuildVolumeElements (Array<class Element2d> & surfels,
class Mesh & mesh);
int RefLevels () const { return ref_levels; }
int RefLevels1 () const { return ref_levels_s1; }
int RefLevels2 () const { return ref_levels_s2; }
bool IsSkewIdentification(void) const {return usedirection;}
const Vec<3> & GetDirection(void) const {return direction;}
const Surface & GetSurface1(void) const
{ return *s1;}
const Surface & GetSurface2(void) const
{ return *s2;}
};
class CloseEdgesIdentification : public Identification
{
const Surface * facet;
const Surface * s1;
const Surface * s2;
public:
CloseEdgesIdentification (int anr,
const CSGeometry & ageom,
const Surface * afacet,
const Surface * as1,
const Surface * as2);
virtual ~CloseEdgesIdentification ();
virtual void Print (ostream & ost) const;
virtual void GetData (ostream & ost) const;
// virtual void IdentifySpecialPoints (Array<class SpecialPoint> & points);
virtual int Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2,
const TABLE<int> & specpoint2solid,
const TABLE<int> & specpoint2surface) const;
virtual void IdentifyPoints (class Mesh & mesh);
virtual void BuildSurfaceElements (Array<class Segment> & segs,
class Mesh & mesh,
const Surface * surf);
};
}
#endif
|