netgen/libsrc/meshing/geomsearch.hpp

70 lines
1.9 KiB
C++
Raw Normal View History

#ifndef NETGEN_GEOMSEARCH_HPP
#define NETGEN_GEOMSEARCH_HPP
2009-01-13 04:40:13 +05:00
/**************************************************************************/
/* File: geomsearch.hh */
/* Author: Johannes Gerstmayr */
/* Date: 19. Nov. 97 */
/**************************************************************************/
#include "meshtype.hpp"
namespace netgen
{
2009-01-13 04:40:13 +05:00
class FrontPoint3;
class FrontFace;
class MiniElement2d;
/// class for quick access of 3D-elements; class cannot delete elements, but only append
class GeomSearch3d
{
public:
///
GeomSearch3d();
///
virtual ~GeomSearch3d();
///
2024-12-14 22:57:12 +05:00
void Init (Array <FrontPoint3,PointIndex> *pointsi, NgArray <FrontFace> *facesi);
2009-01-13 04:40:13 +05:00
///get elements max extension
void ElemMaxExt(Point3d& minp, Point3d& maxp, const MiniElement2d& elem);
///get minimum coordinates of two points ->p2
void MinCoords(const Point3d& p1, Point3d& p2);
///get minimum coordinates of two points ->p2
void MaxCoords(const Point3d& p1, Point3d& p2);
///create a hashtable from an existing array of triangles
///sizei = number of pieces in one direction
void Create();
///add new element to Hashtable
void AddElem(const MiniElement2d& elem, INDEX elemnum);
///GetLocal faces in sphere with radius xh and middlepoint p
2019-07-09 13:39:16 +05:00
void GetLocals(NgArray<MiniElement2d> & locfaces, NgArray<INDEX> & findex,
2009-01-13 04:40:13 +05:00
INDEX fstind, const Point3d& p0, double xh);
private:
2019-07-09 13:39:16 +05:00
NgArray <FrontFace> *faces; // Pointers to Arrays in Adfront
2024-12-14 22:57:12 +05:00
Array <FrontPoint3,PointIndex> *points;
2009-01-13 04:40:13 +05:00
2019-07-09 13:39:16 +05:00
NgArray <NgArray <int>*> hashtable;
2009-01-13 04:40:13 +05:00
Point3d minext; //extension of Hashdomain
Point3d maxext;
Point3d maxextreal;
Vec3d elemsize; //size of one Hash-Element
threeint size; // size of Hashtable in each direction
int reset;
int hashcount;
};
} // namespace netgen
#endif // NETGEN_GEOMSEARCH_HPP