ViennaGrid for Python
 All Classes Files Functions Variables
cartesian.hpp
Go to the documentation of this file.
1 
6 #ifndef POINTS_CARTESIAN_HPP
7 #define POINTS_CARTESIAN_HPP
8 
9 #include "types.hpp"
10 #include "forward.hpp"
11 
12 #include <boost/python.hpp>
13 using namespace boost::python;
14 
26  PointCartesian1D_t *point;
27 
36  int id; // TODO: move to vertex
37 public:
49 
60  PointCartesian1D(double x);
61 
78  PointCartesian1D(PointCartesian1D_t *initial_point, unsigned int initial_id=0);
79 
93  PointCartesian1D(PointCartesian1D_t &initial_point, unsigned int initial_id=-1);
94 
100  size_t get_dimension();
101 
107  const char * get_coord_system();
108 
114  double get_coord(unsigned int index);
115 
121  void set_coord(unsigned int index, double new_value);
122 
128  list get_coord_list();
129 
136  PointCartesian1D & operator=(const PointCartesian1D &other);
137 
143  PointCartesian1D operator+(const PointCartesian1D &other);
144 
150  PointCartesian1D operator-(const PointCartesian1D &other);
151 
157  PointCartesian1D operator*(const double factor);
158 
164  PointCartesian1D operator/(const double factor);
165 
171  PointCartesian1D operator-();
172 
178  PointCartesian1D_t & get_point();
179 
185  unsigned int get_id();
186 
192  void set_id(unsigned int new_id);
193 
199  double inner_prod(PointCartesian1D &other);
200 
206  double norm_1();
207 
213  double norm_2();
214 
220  double norm_inf();
221 };
222 
234  PointCartesian2D_t *point;
235 
244  int id; // TODO: move to vertex
245 public:
257 
268  PointCartesian2D(double x, double y);
269 
286  PointCartesian2D(PointCartesian2D_t *initial_point, unsigned int initial_id=0);
287 
301  PointCartesian2D(PointCartesian2D_t &initial_point, unsigned int initial_id=-1);
302 
308  size_t get_dimension();
309 
315  const char * get_coord_system();
316 
322  double get_coord(unsigned int index);
323 
329  void set_coord(unsigned int index, double new_value);
330 
336  list get_coord_list();
337 
344  PointCartesian2D & operator=(const PointCartesian2D &other);
345 
351  PointCartesian2D operator+(const PointCartesian2D &other);
352 
358  PointCartesian2D operator-(const PointCartesian2D &other);
359 
365  PointCartesian2D operator*(const double factor);
366 
372  PointCartesian2D operator/(const double factor);
373 
379  PointCartesian2D operator-();
380 
386  PointCartesian2D_t & get_point();
387 
393  unsigned int get_id();
394 
400  void set_id(unsigned int new_id);
401 
407  PointPolar2D to_polar();
408 
414  double inner_prod(PointCartesian2D &other);
415 
421  double norm_1();
422 
428  double norm_2();
429 
435  double norm_inf();
436 };
437 
449  PointCartesian3D_t *point;
450 
459  int id; // TODO: move to vertex
460 public:
472 
483  PointCartesian3D(double x, double y, double z);
484 
501  PointCartesian3D(PointCartesian3D_t *initial_point, unsigned int initial_id=0);
502 
516  PointCartesian3D(PointCartesian3D_t &initial_point, unsigned int initial_id=-1);
517 
523  size_t get_dimension();
524 
530  const char * get_coord_system();
531 
537  double get_coord(unsigned int index);
538 
544  void set_coord(unsigned int index, double new_value);
545 
551  list get_coord_list();
552 
559  PointCartesian3D & operator=(const PointCartesian3D &other);
560 
566  PointCartesian3D operator+(const PointCartesian3D &other);
567 
573  PointCartesian3D operator-(const PointCartesian3D &other);
574 
580  PointCartesian3D operator*(const double factor);
581 
587  PointCartesian3D operator/(const double factor);
588 
594  PointCartesian3D operator-();
595 
601  PointCartesian3D_t & get_point();
602 
608  unsigned int get_id();
609 
615  void set_id(unsigned int new_id);
616 
622  PointCylindrical3D to_cylindrical();
623 
629  PointSpherical3D to_spherical();
630 
636  double inner_prod(PointCartesian3D &other);
637 
643  PointCartesian3D cross_prod(PointCartesian3D &other);
644 
650  double norm_1();
651 
657  double norm_2();
658 
664  double norm_inf();
665 };
666 
667 #endif /* end of include guard: POINTS_CARTESIAN_HPP */