Path: blob/devel/ElmerGUI/netgen/libsrc/meshing/geomsearch.hpp
3206 views
#ifndef FILE_GEOMSEARCH1#define FILE_GEOMSEARCH23/**************************************************************************/4/* File: geomsearch.hh */5/* Author: Johannes Gerstmayr */6/* Date: 19. Nov. 97 */7/**************************************************************************/89class FrontPoint3;10class FrontFace;11class MiniElement2d;1213/// class for quick access of 3D-elements; class cannot delete elements, but only append14class GeomSearch3d15{1617public:18///19GeomSearch3d();20///21virtual ~GeomSearch3d();2223///24void Init (ARRAY <FrontPoint3,PointIndex::BASE> *pointsi, ARRAY <FrontFace> *facesi);2526///get elements max extension27void ElemMaxExt(Point3d& minp, Point3d& maxp, const MiniElement2d& elem);2829///get minimum coordinates of two points ->p230void MinCoords(const Point3d& p1, Point3d& p2);3132///get minimum coordinates of two points ->p233void MaxCoords(const Point3d& p1, Point3d& p2);3435///create a hashtable from an existing array of triangles36///sizei = number of pieces in one direction37void Create();3839///add new element to Hashtable40void AddElem(const MiniElement2d& elem, INDEX elemnum);4142///GetLocal faces in sphere with radius xh and middlepoint p43void GetLocals(ARRAY<MiniElement2d> & locfaces, ARRAY<INDEX> & findex,44INDEX fstind, const Point3d& p0, double xh);4546private:4748ARRAY <FrontFace> *faces; // Pointers to Arrays in Adfront49ARRAY <FrontPoint3,PointIndex::BASE> *points;5051ARRAY <ARRAY <int>*> hashtable;5253Point3d minext; //extension of Hashdomain54Point3d maxext;55Point3d maxextreal;56Vec3d elemsize; //size of one Hash-Element5758threeint size; // size of Hashtable in each direction59int reset;60int hashcount;61};6263#endif646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119