SLIP  1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DenseVector3dField2d.hpp
Go to the documentation of this file.
1 /*
2  * Copyright(c):
3  * Signal Image and Communications (SIC) Department
4  * http://www.sic.sp2mi.univ-poitiers.fr/
5  * - University of Poitiers, France http://www.univ-poitiers.fr
6  * - XLIM Institute UMR CNRS 7252 http://www.xlim.fr/
7  *
8  * and
9  *
10  * D2 Fluid, Thermic and Combustion
11  * - University of Poitiers, France http://www.univ-poitiers.fr
12  * - PPRIME Institute - UPR CNRS 3346 http://www.pprime.fr
13  * - ISAE-ENSMA http://www.ensma.fr
14  *
15  * Contributor(s):
16  * The SLIP team,
17  * Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>,
18  * Laurent David <laurent.david_AT_lea.univ-poitiers.fr>,
19  * Ludovic Chatellier <ludovic.chatellier_AT_univ-poitiers.fr>,
20  * Lionel Thomas <lionel.thomas_AT_univ-poitiers.fr>,
21  * Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>,
22  * Julien Dombre <julien.dombre_AT_univ-poitiers.fr>.
23  *
24  * Description:
25  * The Simple Library of Image Processing (SLIP) is a new image processing
26  * library. It is written in the C++ language following as much as possible
27  * the ISO/ANSI C++ standard. It is consequently compatible with any system
28  * satisfying the ANSI C++ complience. It works on different Unix , Linux ,
29  * Mircrosoft Windows and Mac OS X plateforms. SLIP is a research library that
30  * was created by the Signal, Image and Communications (SIC) departement of
31  * the XLIM, UMR 7252 CNRS Institute in collaboration with the Fluids, Thermic
32  * and Combustion departement of the P', UPR 3346 CNRS Institute of the
33  * University of Poitiers.
34  *
35  * The SLIP Library source code has been registered to the APP (French Agency
36  * for the Protection of Programs) by the University of Poitiers and CNRS,
37  * under registration number IDDN.FR.001.300034.000.S.P.2010.000.21000.
38 
39  * http://www.sic.sp2mi.univ-poitiers.fr/slip/
40  *
41  * This software is governed by the CeCILL-C license under French law and
42  * abiding by the rules of distribution of free software. You can use,
43  * modify and/ or redistribute the software under the terms of the CeCILL-C
44  * license as circulated by CEA, CNRS and INRIA at the following URL
45  * http://www.cecill.info.
46  * As a counterpart to the access to the source code and rights to copy,
47  * modify and redistribute granted by the license, users are provided only
48  * with a limited warranty and the software's author, the holder of the
49  * economic rights, and the successive licensors have only limited
50  * liability.
51  *
52  * In this respect, the user's attention is drawn to the risks associated
53  * with loading, using, modifying and/or developing or reproducing the
54  * software by the user in light of its specific status of free software,
55  * that may mean that it is complicated to manipulate, and that also
56  * therefore means that it is reserved for developers and experienced
57  * professionals having in-depth computer knowledge. Users are therefore
58  * encouraged to load and test the software's suitability as regards their
59  * requirements in conditions enabling the security of their systems and/or
60  * data to be ensured and, more generally, to use and operate it in the
61  * same conditions as regards security.
62  *
63  * The fact that you are presently reading this means that you have had
64  * knowledge of the CeCILL-C license and that you accept its terms.
65  */
66 
67 
68 
75 #ifndef SLIP_DENSEVECTOR3DFIELD2D_HPP
76 #define SLIP_DENSEVECTOR3DFIELD2D_HPP
77 
78 #include <iostream>
79 #include <fstream>
80 #include <iterator>
81 #include <cassert>
82 #include <numeric>
83 #include <cmath>
84 #include <string>
85 #include <cstddef>
86 #include "Matrix.hpp"
87 #include "stride_iterator.hpp"
88 #include "kstride_iterator.hpp"
89 #include "iterator2d_box.hpp"
90 #include "apply.hpp"
91 #include "Vector3d.hpp"
93 
94 #include <boost/serialization/access.hpp>
95 #include <boost/serialization/split_member.hpp>
96 #include <boost/serialization/version.hpp>
97 #include <boost/serialization/base_object.hpp>
98 
99 namespace slip
100 {
101 
102 template<class T>
103 class stride_iterator;
104 
105 template<class T>
106 class iterator2d_box;
107 
108 template <class T>
109 class DPoint2d;
110 
111 template <class T>
112 class Point2d;
113 
114 template <class T>
115 class Box2d;
116 
117 template <typename T>
119 
120 
139 template <typename T>
140 class DenseVector3dField2d:public GenericMultiComponent2d<slip::Vector3d<T> >
141 {
142 public :
143 
147 
148 
149  typedef value_type* pointer;
150  typedef const value_type* const_pointer;
152  typedef const value_type& const_reference;
153 
154  typedef ptrdiff_t difference_type;
155  typedef std::size_t size_type;
156 
157  typedef pointer iterator;
159 
160  typedef std::reverse_iterator<iterator> reverse_iterator;
161  typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
162 
163 
168 
169  typedef std::reverse_iterator<iterator> reverse_row_iterator;
170  typedef std::reverse_iterator<const_iterator> const_reverse_row_iterator;
171  typedef std::reverse_iterator<col_iterator> reverse_col_iterator;
172  typedef std::reverse_iterator<const_col_iterator> const_reverse_col_iterator;
173 
175 
183 
184  static const std::size_t DIM = 2;
185 public:
190 
195  base()
196  {}
197 
204  const size_type width):
205  base(height,width)
206  {}
207 
215  const size_type width,
216  const slip::Vector3d<T>& val):
217  base(height,width,val)
218  {}
219 
227  const size_type width,
228  const T* val):
229  base(height,width,val)
230  {}
231 
239  const size_type width,
240  const slip::Vector3d<T>* val):
241  base(height,width,val)
242  {}
243 
244 
255  template<typename InputIterator>
257  const size_type width,
258  InputIterator first,
259  InputIterator last):
260  base(height,width,first,last)
261  {}
262 
263 
264 
265 
281  template<typename InputIterator>
283  const size_type width,
284  InputIterator first1,
285  InputIterator last1,
286  InputIterator first2,
287  InputIterator first3):
288  base(height,width)
289  {
290 
291  std::vector<InputIterator> first_iterators_list(3);
292  first_iterators_list[0] = first1;
293  first_iterators_list[1] = first2;
294  first_iterators_list[2] = first3;
295  this->fill(first_iterators_list,last1);
296 
297  }
298 
299 
303  DenseVector3dField2d(const self& rhs):
304  base(rhs)
305  {}
306 
311  {}
312 
313 
322  std::string name() const;
323 
324 
329 
337  void write_gnuplot(const std::string& file_path_name);
338 
339 
352  void write_tecplot(const std::string& file_path_name,
353  const std::string& title,
354  const std::string& zone);
355 
356 
357 
358 
359 
366 
367 
368 
374  self& operator=(const slip::Vector3d<T>& val);
375 
376 
382  self& operator=(const T& val);
383 
384 
385 
386 
387 
407  T& Vx1(const size_type i,
408  const size_type j);
409 
410 
411 
424  const T& Vx1(const size_type i,
425  const size_type j) const;
426 
427 
441  T& Vx2(const size_type i,
442  const size_type j);
443 
456  const T& Vx2(const size_type i,
457  const size_type j) const;
458 
472  T& Vx3(const size_type i,
473  const size_type j);
474 
487  const T& Vx3(const size_type i,
488  const size_type j) const;
489 
490 
505  self& operator+=(const T& val);
506  self& operator-=(const T& val);
507  self& operator*=(const T& val);
508  self& operator/=(const T& val);
509 
510 // self& operator%=(const T& val);
511 // self& operator^=(const T& val);
512 // self& operator&=(const T& val);
513 // self& operator|=(const T& val);
514 // self& operator<<=(const T& val);
515 // self& operator>>=(const T& val);
516 
517 
518  self operator-() const;
519 // self operator!() const;
520 
526  self& operator+=(const slip::Vector3d<T>& val);
527  self& operator-=(const slip::Vector3d<T>& val);
528  self& operator*=(const slip::Vector3d<T>& val);
529  self& operator/=(const slip::Vector3d<T>& val);
530 
531 
532 
533  self& operator+=(const self& rhs);
534  self& operator-=(const self& rhs);
535  self& operator*=(const self& rhs);
536  self& operator/=(const self& rhs);
537 
538 
541  private :
543  template<class Archive>
544  void save(Archive & ar, const unsigned int version) const
545  {
546  ar & boost::serialization::base_object<slip::GenericMultiComponent2d<slip::Vector3d<T> > >(*this);
547  }
548  template<class Archive>
549  void load(Archive & ar, const unsigned int version)
550  {
551  ar & boost::serialization::base_object<slip::GenericMultiComponent2d<slip::Vector3d<T> > >(*this);
552  }
553  BOOST_SERIALIZATION_SPLIT_MEMBER()
554  };
555 
576 
577 
578 }//slip::
579 
580 namespace slip{
581 
582 
589 template<typename T>
590 DenseVector3dField2d<T> operator+(const DenseVector3dField2d<T>& M1,
591  const T& val);
592 
599  template<typename T>
600  DenseVector3dField2d<T> operator+(const T& val,
601  const DenseVector3dField2d<T>& M1);
602 
603 
610 template<typename T>
611 DenseVector3dField2d<T> operator-(const DenseVector3dField2d<T>& M1,
612  const T& val);
613 
620  template<typename T>
621  DenseVector3dField2d<T> operator-(const T& val,
622  const DenseVector3dField2d<T>& M1);
623 
624 
625 
632  template<typename T>
633  DenseVector3dField2d<T> operator*(const DenseVector3dField2d<T>& M1,
634  const T& val);
635 
642  template<typename T>
643  DenseVector3dField2d<T> operator*(const T& val,
644  const DenseVector3dField2d<T>& M1);
645 
646 
647 
654  template<typename T>
655  DenseVector3dField2d<T> operator/(const DenseVector3dField2d<T>& M1,
656  const T& val);
657 
658 
667 template<typename T>
668 DenseVector3dField2d<T> operator+(const DenseVector3dField2d<T>& M1,
669  const DenseVector3dField2d<T>& M2);
670 
677 template<typename T>
678 DenseVector3dField2d<T> operator+(const DenseVector3dField2d<T>& M1,
679  const slip::Vector3d<T>& val);
680 
687  template<typename T>
688  DenseVector3dField2d<T> operator+(const slip::Vector3d<T>& val,
689  const DenseVector3dField2d<T>& M1);
690 
691 
692 
701 template<typename T>
702 DenseVector3dField2d<T> operator-(const DenseVector3dField2d<T>& M1,
703  const DenseVector3dField2d<T>& M2);
704 
705 
712 template<typename T>
713 DenseVector3dField2d<T> operator-(const DenseVector3dField2d<T>& M1,
714  const slip::Vector3d<T>& val);
715 
722  template<typename T>
723  DenseVector3dField2d<T> operator-(const slip::Vector3d<T>& val,
724  const DenseVector3dField2d<T>& M1);
725 
726 
727 
736  template<typename T>
737  DenseVector3dField2d<T> operator*(const DenseVector3dField2d<T>& M1,
738  const DenseVector3dField2d<T>& M2);
739 
740 
747 template<typename T>
748 DenseVector3dField2d<T> operator*(const DenseVector3dField2d<T>& M1,
749  const slip::Vector3d<T>& val);
750 
757  template<typename T>
758  DenseVector3dField2d<T> operator*(const slip::Vector3d<T>& val,
759  const DenseVector3dField2d<T>& M1);
760 
761 
762 
771  template<typename T>
772  DenseVector3dField2d<T> operator/(const DenseVector3dField2d<T>& M1,
773  const DenseVector3dField2d<T>& M2);
774 
781 template<typename T>
782 DenseVector3dField2d<T> operator/(const DenseVector3dField2d<T>& M1,
783  const slip::Vector3d<T>& val);
784 
785 
786 
787 
788 }//slip::
789 
790 namespace slip
791 {
792 
793 
794 // template<typename T>
795 // inline
796 // DenseVector3dField2d<T>& DenseVector3dField2d<T>::operator=(const DenseVector3dField2d<T> & rhs)
797 // {
798 // if(this != &rhs)
799 // {
800 // *matrix_ = *(rhs.matrix_);
801 // }
802 // return *this;
803 // }
804 
805  template<typename T>
806  inline
808  {
809  std::fill_n(this->begin(),this->size(),val);
810  return *this;
811  }
812 
813 
814  template<typename T>
815  inline
817  {
818  std::fill_n(this->begin(),this->size(),val);
819  return *this;
820  }
821 
822 
823  template<typename T>
824  inline
826  const typename DenseVector3dField2d::size_type j)
827  {
828  return (*this)[i][j][0];
829  }
830 
831  template<typename T>
832  inline
834  const typename DenseVector3dField2d::size_type j) const
835  {
836  return (*this)[i][j][0];
837  }
838 
839  template<typename T>
840  inline
842  const typename DenseVector3dField2d::size_type j)
843  {
844  return (*this)[i][j][1];
845  }
846 
847 
848  template<typename T>
849  inline
851  const typename DenseVector3dField2d::size_type j) const
852  {
853  return (*this)[i][j][1];
854  }
855 
856 
857  template<typename T>
858  inline
860  const typename DenseVector3dField2d::size_type j)
861  {
862  return (*this)[i][j][2];
863  }
864 
865  template<typename T>
866  inline
868  const typename DenseVector3dField2d::size_type j) const
869  {
870  return (*this)[i][j][2];
871  }
872 
873  template<typename T>
874  inline
876  {
877  std::transform(this->begin(),this->end(),this->begin(),std::bind2nd(std::plus<slip::Vector3d<T> >(),val));
878  return *this;
879  }
880 
881  template<typename T>
882  inline
884  {
885  std::transform(this->begin(),this->end(),this->begin(),std::bind2nd(std::minus<slip::Vector3d<T> >(),val));
886  return *this;
887  }
888 
889  template<typename T>
890  inline
892  {
893  std::transform(this->begin(),this->end(),this->begin(),std::bind2nd(std::multiplies<slip::Vector3d<T> >(),val));
894  return *this;
895  }
896 
897  template<typename T>
898  inline
900  {
901  std::transform(this->begin(),this->end(),this->begin(),std::bind2nd(std::divides<slip::Vector3d<T> >(),val));
902  return *this;
903  }
904 
905 
906 
907  template<typename T>
908  inline
910  {
911  std::transform(this->begin(),this->end(),this->begin(),std::bind2nd(std::plus<slip::Vector3d<T> >(),val));
912  return *this;
913  }
914 
915  template<typename T>
916  inline
918  {
919  std::transform(this->begin(),this->end(),this->begin(),std::bind2nd(std::minus<slip::Vector3d<T> >(),val));
920  return *this;
921  }
922 
923  template<typename T>
924  inline
926  {
927  std::transform(this->begin(),this->end(),this->begin(),std::bind2nd(std::multiplies<slip::Vector3d<T> >(),val));
928  return *this;
929  }
930 
931  template<typename T>
932  inline
934  {
935  std::transform(this->begin(),this->end(),this->begin(),std::bind2nd(std::divides<slip::Vector3d<T> >(),val));
936  return *this;
937  }
938 
939 
940 
941  template<typename T>
942  inline
944  {
945  DenseVector3dField2d<T> tmp(*this);
946  std::transform(this->begin(),this->end(),tmp.begin(),std::negate<slip::Vector3d<T> >());
947  return tmp;
948  }
949 
950  template<typename T>
951  inline
953  {
954  assert(this->dim1() == rhs.dim1());
955  assert(this->dim2() == rhs.dim2());
956  std::transform(this->begin(),this->end(),rhs.begin(),this->begin(),std::plus<typename DenseVector3dField2d::value_type>());
957  return *this;
958  }
959 
960  template<typename T>
961  inline
963  {
964  assert(this->dim1() == rhs.dim1());
965  assert(this->dim2() == rhs.dim2());
966  std::transform(this->begin(),this->end(),rhs.begin(),this->begin(),std::minus<typename DenseVector3dField2d::value_type>());
967  return *this;
968  }
969 
970  template<typename T>
971  inline
973  {
974  assert(this->dim1() == rhs.dim1());
975  assert(this->dim2() == rhs.dim2());
976  std::transform(this->begin(),this->end(),rhs.begin(),this->begin(),std::multiplies<typename DenseVector3dField2d::value_type>());
977  return *this;
978  }
979 
980  template<typename T>
981  inline
983  {
984  assert(this->dim1() == rhs.dim1());
985  assert(this->dim2() == rhs.dim2());
986  std::transform(this->begin(),this->end(),rhs.begin(),this->begin(),std::divides<typename DenseVector3dField2d::value_type>());
987  return *this;
988  }
989 
990 
991  template<typename T>
992  inline
993  std::string
994  DenseVector3dField2d<T>::name() const {return "DenseVector3dField2d";}
995 
996  template<typename T>
997  inline
998  void DenseVector3dField2d<T>::write_gnuplot(const std::string& file_path_name)
999  {
1000  std::ofstream sortie(file_path_name.c_str(),std::ios::out);
1001  //Put an exception
1002  if(!sortie)
1003  {
1004  std::cerr<<"Fail to open the file "<<file_path_name<<std::endl;
1005  sortie.close();
1006  exit(1);
1007  }
1008 
1009  typename DenseVector3dField2d::size_type dim1 = this->dim1();
1010  typename DenseVector3dField2d::size_type dim2 = this->dim2();
1011 
1012  sortie<<"#zone f=point, i="<<dim1<<", j="<<dim2<<"\n";
1013  for(typename DenseVector3dField2d::size_type i = 0; i < dim1; ++i)
1014  {
1015  for(typename DenseVector3dField2d::size_type j = 0; j < dim2; ++j)
1016  {
1017  sortie<<i<<" "<<j<<" "<<(*this)[i][j][0]<<" "<<(*this)[i][j][1]<<(*this)[i][j][2]<<"\n";
1018  }
1019  }
1020  }
1021 
1022  template<typename T>
1023  inline
1024  void DenseVector3dField2d<T>::write_tecplot(const std::string& file_path_name,
1025  const std::string& title,
1026  const std::string& zone)
1027  {
1028  std::ofstream output(file_path_name.c_str(),std::ios::out);
1029  //Put an exception
1030  if(!output)
1031  {
1032  std::cerr<<"Fail to open the file "<<file_path_name<<std::endl;
1033  output.close();
1034  exit(1);
1035  }
1036 
1037  typename DenseVector3dField2d::size_type dim1 = this->dim1();
1038  typename DenseVector3dField2d::size_type dim2 = this->dim2();
1039 
1040  //write file informations
1041  output<<"TITLE=\"" <<title<<"\""<<std::endl;
1042  output<<"VARIABLES=\"X\",\"Y\",\"U\",\"V\"" <<std::endl;
1043  output<<"ZONE T=\""<<zone<<"\", I="<<dim1<<", J="<<dim2<<std::endl;
1044  //write data
1045  for(typename DenseVector3dField2d::size_type i = 0; i < dim1; ++i)
1046  {
1047  for(typename DenseVector3dField2d::size_type j = 0; j < dim2; ++j)
1048  {
1049  output<<i<<" "<<j<<" "<<(*this)[i][j][0]<<" "<<(*this)[i][j][1]<<(*this)[i][j][2]<<"\n";
1050  }
1051  }
1052  }
1053 
1055  /* @{ */
1056  template<typename T>
1057  inline
1059  const T& val)
1060  {
1061  DenseVector3dField2d<T> tmp = M1;
1062  tmp += val;
1063  return tmp;
1064  }
1065 
1066  template<typename T>
1067  inline
1069  const DenseVector3dField2d<T>& M1)
1070  {
1071  return M1 + val;
1072  }
1073 
1074  template<typename T>
1075  inline
1077  const T& val)
1078  {
1079  DenseVector3dField2d<T> tmp = M1;
1080  tmp -= val;
1081  return tmp;
1082  }
1083 
1084  template<typename T>
1085  inline
1087  const DenseVector3dField2d<T>& M1)
1088  {
1089  return -(M1 - val);
1090  }
1091 
1092 
1093  template<typename T>
1094  inline
1096  const T& val)
1097  {
1098  DenseVector3dField2d<T> tmp = M1;
1099  tmp *= val;
1100  return tmp;
1101  }
1102 
1103  template<typename T>
1104  inline
1106  const DenseVector3dField2d<T>& M1)
1107  {
1108  return M1 * val;
1109  }
1110 
1111 
1112  template<typename T>
1113  inline
1115  const T& val)
1116  {
1117  DenseVector3dField2d<T> tmp = M1;
1118  tmp /= val;
1119  return tmp;
1120  }
1121 
1122  template<typename T>
1123  inline
1125  const DenseVector3dField2d<T>& M2)
1126  {
1127  assert(M1.dim1() == M2.dim1());
1128  assert(M1.dim2() == M2.dim2());
1129  DenseVector3dField2d<T> tmp(M1.dim1(),M1.dim2());
1130  std::transform(M1.begin(),M1.end(),M2.begin(),tmp.begin(),std::plus<slip::Vector3d<T> >());
1131  return tmp;
1132  }
1133 
1134 
1135  template<typename T>
1136  inline
1138  const slip::Vector3d<T>&val)
1139  {
1140  DenseVector3dField2d<T> tmp = M1;
1141  tmp += val;
1142  return tmp;
1143  }
1144 
1145  template<typename T>
1146  inline
1148  const DenseVector3dField2d<T>& M1)
1149  {
1150  return M1 + val;
1151  }
1152 
1153 
1154 
1155  template<typename T>
1156  inline
1158  const DenseVector3dField2d<T>& M2)
1159  {
1160  assert(M1.dim1() == M2.dim1());
1161  assert(M1.dim2() == M2.dim2());
1162  DenseVector3dField2d<T> tmp(M1.dim1(),M1.dim2());
1163  std::transform(M1.begin(),M1.end(),M2.begin(),tmp.begin(),std::minus<slip::Vector3d<T> >());
1164  return tmp;
1165  }
1166 
1167 
1168  template<typename T>
1169  inline
1171  const slip::Vector3d<T>&val)
1172  {
1173  DenseVector3dField2d<T> tmp = M1;
1174  tmp -= val;
1175  return tmp;
1176  }
1177 
1178  template<typename T>
1179  inline
1181  const DenseVector3dField2d<T>& M1)
1182  {
1183  return -(M1 - val);
1184  }
1185 
1186 
1187  template<typename T>
1188  inline
1190  const DenseVector3dField2d<T>& M2)
1191  {
1192  assert(M1.dim1() == M2.dim1());
1193  assert(M1.dim2() == M2.dim2());
1194  DenseVector3dField2d<T> tmp(M1.dim1(),M1.dim2());
1195  std::transform(M1.begin(),M1.end(),M2.begin(),tmp.begin(),std::multiplies<slip::Vector3d<T> >());
1196  return tmp;
1197  }
1198 
1199 
1200  template<typename T>
1201  inline
1203  const slip::Vector3d<T>&val)
1204  {
1205  DenseVector3dField2d<T> tmp = M1;
1206  tmp *= val;
1207  return tmp;
1208  }
1209 
1210  template<typename T>
1211  inline
1213  const DenseVector3dField2d<T>& M1)
1214  {
1215  return M1 * val;
1216  }
1217 
1218 
1219  template<typename T>
1220  inline
1222  const DenseVector3dField2d<T>& M2)
1223  {
1224  assert(M1.dim1() == M2.dim1());
1225  assert(M1.dim2() == M2.dim2());
1226  DenseVector3dField2d<T> tmp(M1.dim1(),M1.dim2());
1227  std::transform(M1.begin(),M1.end(),M2.begin(),tmp.begin(),std::divides<slip::Vector3d<T> >());
1228  return tmp;
1229  }
1230 
1231 
1232  template<typename T>
1233  inline
1235  const slip::Vector3d<T>&val)
1236  {
1237  DenseVector3dField2d<T> tmp = M1;
1238  tmp /= val;
1239  return tmp;
1240  }
1241 
1242 
1243 /* @} */
1244 
1245 
1246 
1247 }//slip::
1248 
1249 #endif //SLIP_DENSEVECTOR3DFIELD2D_HPP
void minus(InputIterator1 __first1, InputIterator1 __last1, InputIterator2 __first2, OutputIterator __result)
Computes the difference of two ranges.
vector3d_value_type & vector3d_reference
DenseVector3dField2d(const size_type height, const size_type width)
Constructs a DenseVector3dField2d.
iterator begin()
Returns a read/write iterator that points to the first element in the GenericMultiComponent2d. Iteration is done in ordinary element order.
DenseVector3dField2d(const size_type height, const size_type width, InputIterator first1, InputIterator last1, InputIterator first2, InputIterator first3)
Contructs a DenseVector3dField2d from a 3 ranges.
This is a GenericMultiComponent2d class. This container statisfies the BidirectionnalContainer concep...
slip::DenseVector3dField2d< double > DenseVector3dField2d_d
double alias
friend class boost::serialization::access
T & Vx1(const size_type i, const size_type j)
Subscript access to first element of the data contained in the DenseVector3dField2d.
DenseVector3dField2d(const size_type height, const size_type width, const T *val)
Constructs a DenseVector3dField2d initialized by an array val.
void write_tecplot(const std::string &file_path_name, const std::string &title, const std::string &zone)
Writes a DenseVector3dField2d to a tecplot file path name.
DenseVector3dField2d(const size_type height, const size_type width, InputIterator first, InputIterator last)
Contructs a DenseVector3dField2d from a range.
slip::DenseVector3dField2d< short > DenseVector3dField2d_s
short alias
This is a Vector3d struct. It is a specialization of kvector. It implements some specific 3d operatio...
Definition: Vector3d.hpp:96
This is a dense 2d Field containing Vector3d. This container statisfies the BidirectionnalContainer c...
T & Vx3(const size_type i, const size_type j)
Subscript access to third element of the data contained in the DenseVector3dField2d.
std::reverse_iterator< iterator > reverse_row_iterator
Provides a class to manipulate multicomponent 2d containers.
std::reverse_iterator< col_iterator > reverse_col_iterator
slip::DenseVector3dField2d< int > DenseVector3dField2d_i
int alias
Color< T > operator+(const Color< T > &V1, const Color< T > &V2)
Definition: Color.hpp:602
Provides a class to manipulate iterator2d within a slip::Box2d. It is used to iterate throw 2d contai...
void divides(InputIterator1 __first1, InputIterator1 __last1, InputIterator2 __first2, OutputIterator __result)
Computes the pointwise division of two ranges.
slip::stride_iterator< pointer > col_iterator
size_type dim2() const
Returns the number of columns (second dimension size) in the GenericMultiComponent2d.
static const std::size_t DIM
std::reverse_iterator< const_col_iterator > const_reverse_col_iterator
vector3d_value_type * vector3d_pointer
slip::DenseVector3dField2d< unsigned long > DenseVector3dField2d_ul
unsigned long alias
Provides a class to iterate a 1d range according to a constant step.
std::reverse_iterator< const_iterator > const_reverse_row_iterator
std::reverse_iterator< const_iterator > const_reverse_iterator
slip::DenseVector3dField2d< float > DenseVector3dField2d_f
float alias
size_type height() const
Returns the height (first dimension size) in the GenericMultiComponent2d.
size_type dim1() const
Returns the number of rows (first dimension size) in the GenericMultiComponent2d. ...
slip::stride_iterator< const_pointer > const_col_iterator
void write_gnuplot(const std::string &file_path_name)
Writes a DenseVector3dField2d to a gnuplot file path name.
DenseVector3dField2d(const size_type height, const size_type width, const slip::Vector3d< T > *val)
Constructs a DenseVector3dField2d initialized by an array val.
iterator begin()
Returns a read/write iterator that points to the first element in the kvector. Iteration is done in o...
Definition: KVector.hpp:196
slip::DenseVector3dField2d< char > DenseVector3dField2d_c
char alias
slip::DenseVector3dField2d< unsigned short > DenseVector3dField2d_us
unsigned long alias
self & operator+=(const T &val)
Add val to each element of the DenseVector3dField2d.
void plus(InputIterator1 __first1, InputIterator1 __last1, InputIterator2 __first2, OutputIterator __result)
Computes the addition of two ranges.
void multiplies(InputIterator1 __first1, InputIterator1 __last1, InputIterator2 __first2, OutputIterator __result)
Computes the pointwise product of two ranges.
slip::kstride_iterator< const_vector3d_pointer, 2 > const_vector3d_iterator
DenseVector3dField2d()
Constructs a DenseVector3dField2d.
Provides a class to manipulate 3d Vector.
const vector3d_value_type * const_vector3d_pointer
std::reverse_iterator< iterator > reverse_iterator
slip::DenseVector3dField2d< unsigned char > DenseVector3dField2d_uc
unsigned char alias
DenseVector3dField2d(const size_type height, const size_type width, const slip::Vector3d< T > &val)
Constructs a DenseVector3dField2d initialized by the scalar value val.
GenericMultiComponent2d< slip::Vector3d< T > > base
std::string name() const
Returns the name of the class.
const vector3d_value_type const_vector3d_reference
This is some iterator to iterate a 2d container into a slip::Box2d area defined by the indices of the...
Definition: Array2d.hpp:116
DenseVector3dField2d(const self &rhs)
Constructs a copy of the DenseVector3dField2d rhs.
void fill(const slip::Vector3d< T > &value)
Fills the container range [begin(),begin()+size()) with copies of value.
iterator end()
Returns a read/write iterator that points one past the last element in the GenericMultiComponent2d. Iteration is done in ordinary element order.
size_type width() const
Returns the number of columns (second dimension size) in the GenericMultiComponent2d.
slip::GenericMultiComponent2d< Vector3d< T > >::iterator2d iterator2d
Provides a class to manipulate Numerical Matrix.
Provides some algorithms to apply C like functions to ranges.
Provides a class to iterate a 1d range according to a step.
slip::DenseVector3dField2d< unsigned int > DenseVector3dField2d_ui
unsigned int alias
slip::kstride_iterator< vector3d_pointer, 2 > vector3d_iterator
T & Vx2(const size_type i, const size_type j)
Subscript access to second element of the data contained in the DenseVector3dField2d.
Color< T > operator*(const Color< T > &V1, const Color< T > &V2)
Definition: Color.hpp:658
slip::DenseVector3dField2d< long > DenseVector3dField2d_l
long alias
self & operator=(const slip::Vector3d< T > &val)
Affects all the element of the DenseVector3dField2d by val.
Color< T > operator/(const Color< T > &V1, const Color< T > &V2)
Definition: Color.hpp:686
~DenseVector3dField2d()
Destructor of the DenseVector3dField2d.
Color< T > operator-(const Color< T > &V1, const Color< T > &V2)
Definition: Color.hpp:630