Flow123d
intersectionLocal.h
Go to the documentation of this file.
1 #ifndef IntersectionLocalH
2 #define IntersectionLocalH
3 
4 #include <iostream>
5 #include <vector>
6 #include <stdio.h>
7 
8 using namespace std;
9 
10 
11 //class IntersectionPoint - dva vektory lokalnich souradnic
13 public:
15  : coord1(c1), coord2(c2) {}
17  : coord1(LC.coord1), coord2(LC.coord2) {}
18  inline const std::vector<double> &el1_coord() const
19  {return coord1;}
20  inline const std::vector<double> &el2_coord() const
21  {return coord2;}
22  bool operator ==(const IntersectionPoint&);
23 protected:
26 
27  friend class IntersectionLocal;
29 };
30 IntersectionPoint *interpolate(const IntersectionPoint &A1, const IntersectionPoint &A2, double t);
31 
32 
34 public:
35  typedef enum {
39  } IntersectionType;
40 
41  IntersectionLocal(IntersectionType i_type);
44 
45  //void set_elements(TElement *elem1, TElement *elem2); //metoda na naplneni ele1, ele2
46  void add_local_coord(const std::vector<double> &coordin1, const std::vector<double> &coordin2); //metoda na pridani souradnic do i_points
47  void add_local_point(IntersectionPoint *InPoint);
48  void print(FILE *out_file);
49 
50  //void AddNewLocalcoord(); //doplnit predavany parametr, pridat novou i_points
51 
52  static int getNumInstances() {
54  }
55 
56  inline IntersectionType get_type() const
57  {return type; }
58  inline unsigned int n_points() const {
59  return i_points.size();
60  }
61  inline const IntersectionPoint * get_point(const unsigned int index) const
62  {
63  if (index >= i_points.size() ) return NULL;
64  else return i_points[index];
65  }
66 
67 private:
68  static int numberInstance;
69  int id;
70 
71  std::vector<IntersectionPoint *> i_points; //vektor ukazatelu na dvojice lokal. souradnic
73 
74 
75  int generateId();
76 };
77 
78 #endif /* IntersectionLocalH */