MIDAS  0.75
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
dupl.h
Go to the documentation of this file.
1 #ifndef MIDAS_DUPL_H
2 #define MIDAS_DUPL_H
3 
4 #include "alias.h"
5 
6 #include "gelib.h"
7 #include "mathlib.h"
8 #include "arrays.h"
9 
10 
17 namespace midaspace {
18 
23 {
24  static const bool PRINT = false;
25 
26  long np; // number of points
27  const PoinT **points; // array of points
28  double averdist; // average distance between points
29  double Zero; // pocitacova nula--zaokrouhlovani == priblizne 1e-10
30  double Zero_dist; // maximal distance between duplicite points
31 
32  double mincoo[3], maxcoo[3], dcoo[3]; // boundary box
33  long cc[3]; // count of cells in xyz axis directions
34  int ****ccellpoints; // count of points in one cell
35  long ****cellpoints; // id of points in one cell
36 
37  public:
39  DuplicatePoints (long n, double ad, double zero) {
40  np = n;
41  points = new const PoinT* [np];
42 
43  averdist = ad;
44  Zero = zero;
45  Zero_dist = averdist/500.0;
46  }
48  ~DuplicatePoints () { delete [] points; }
49 
51  void set_point (long i, const PoinT* p) { points[i] = p; }
52  void assign_cellpoints (void);
53  void find_duplicitys (long &nd, long *Cduplicity, long **duplicity);
54 
55  private:
56  void add_point_to_cell (long id, long pos[]);
57  bool point_is_in_cell (long id, long pos[], double offset);
58 
59 };
60 
61 } // namespace midaspace
62 
63 #endif // MIDAS_DUPL_H
void add_point_to_cell(long id, long pos[])
*** *** *** *** CLASS MESHGEOMETRY *** *** *** ***
Definition: dupl.cpp:18
General functions.
*** *** *** *** CLASS MESHGEOMETRY *** *** *** ***
Definition: dupl.h:22
Alias.
const PoinT ** points
Definition: dupl.h:27
Structs Elem3D, PoinT and VectoR; classes Array, Array1d, Xscal, Dscal, Xvctr, Lvctr, Dvctr, Xmtrx, Lmtrx and Dmtrx.
static const bool PRINT
Definition: dupl.h:24
bool point_is_in_cell(long id, long pos[], double offset)
Definition: dupl.cpp:36
void set_point(long i, const PoinT *p)
Definition: dupl.h:51
long **** cellpoints
Definition: dupl.h:35
void assign_cellpoints(void)
Definition: dupl.cpp:49
Mathematic functions.
void find_duplicitys(long &nd, long *Cduplicity, long **duplicity)
return duplicity squads = 2 or more points with same coordinates nd ...
Definition: dupl.cpp:139
~DuplicatePoints()
DESTRUCTOR.
Definition: dupl.h:48
DuplicatePoints(long n, double ad, double zero)
CONSTRUCTOR.
Definition: dupl.h:39
int **** ccellpoints
Definition: dupl.h:34