type_vector.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2018 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #ifndef LIBMESH_TYPE_VECTOR_H
21 #define LIBMESH_TYPE_VECTOR_H
22 
23 // Local includes
24 #include "libmesh/libmesh_common.h"
25 #include "libmesh/compare_types.h"
26 #include "libmesh/tensor_tools.h"
27 
28 // C++ includes
29 #include <cstdlib> // *must* precede <cmath> for proper std:abs() on PGI, Sun Studio CC
30 #include <cmath>
31 #include <complex>
32 
33 namespace libMesh
34 {
35 
36 // Forward declarations
37 template <typename T> class TypeTensor;
38 template <typename T> class VectorValue;
39 template <typename T> class TensorValue;
40 
49 template <typename T>
50 class TypeVector
51 {
52  template <typename T2>
53  friend class TypeVector;
54 
55  friend class TypeTensor<T>;
56 
57 public:
62  TypeVector ();
63 
64 protected:
69  TypeVector (const T x,
70  const T y=0,
71  const T z=0);
72 
77  template <typename Scalar1, typename Scalar2, typename Scalar3>
78  TypeVector (typename
80  const Scalar1>::type x,
81  typename
83  const Scalar2>::type y=0,
84  typename
86  const Scalar3>::type z=0);
87 
94  template <typename Scalar>
95  TypeVector (const Scalar x,
96  typename
98  const Scalar>::type * sfinae = nullptr);
99 
100 public:
101 
105  typedef T value_type;
106 
110  typedef unsigned int index_type;
111 
115  template <typename T2>
116  TypeVector (const TypeVector<T2> & p);
117 
121  ~TypeVector ();
122 
126  template <typename T2>
127  void assign (const TypeVector<T2> &);
128 
132  template <typename Scalar>
133  typename boostcopy::enable_if_c<
135  TypeVector &>::type
136  operator = (const Scalar & libmesh_dbg_var(p))
137  { libmesh_assert_equal_to (p, Scalar(0)); this->zero(); return *this; }
138 
142  const T & operator () (const unsigned int i) const;
143  const T & slice (const unsigned int i) const { return (*this)(i); }
144 
148  T & operator () (const unsigned int i);
149  T & slice (const unsigned int i) { return (*this)(i); }
150 
156  template <typename T2>
158  operator + (const TypeVector<T2> &) const;
159 
165  template <typename T2>
166  const TypeVector<T> & operator += (const TypeVector<T2> &);
167 
171  template <typename T2>
172  void add (const TypeVector<T2> &);
173 
177  template <typename T2>
178  void add_scaled (const TypeVector<T2> &, const T);
179 
185  template <typename T2>
187  operator - (const TypeVector<T2> &) const;
188 
194  template <typename T2>
195  const TypeVector<T> & operator -= (const TypeVector<T2> &);
196 
200  template <typename T2>
201  void subtract (const TypeVector<T2> &);
202 
207  template <typename T2>
208  void subtract_scaled (const TypeVector<T2> &, const T);
209 
213  TypeVector<T> operator - () const;
214 
220  template <typename Scalar>
221  typename boostcopy::enable_if_c<
224  operator * (const Scalar) const;
225 
231  const TypeVector<T> & operator *= (const T);
232 
238  template <typename Scalar>
239  typename boostcopy::enable_if_c<
242  operator / (const Scalar) const;
243 
249  const TypeVector<T> & operator /= (const T);
250 
257  template <typename T2>
259  operator * (const TypeVector<T2> &) const;
260 
264  template <typename T2>
266  contract (const TypeVector<T2> &) const;
267 
271  template <typename T2>
273  cross(const TypeVector<T2> & v) const;
274 
278  TypeVector<T> unit() const;
279 
286 #ifdef LIBMESH_ENABLE_DEPRECATED
287  Real size() const;
288 #endif
289 
294  Real norm() const;
295 
302 #ifdef LIBMESH_ENABLE_DEPRECATED
303  Real size_sq() const;
304 #endif
305 
310  Real norm_sq() const;
311 
315  void zero();
316 
321  bool relative_fuzzy_equals(const TypeVector<T> & rhs,
322  Real tol = TOLERANCE) const;
323 
328  bool absolute_fuzzy_equals(const TypeVector<T> & rhs,
329  Real tol = TOLERANCE) const;
330 
338  bool operator == (const TypeVector<T> & rhs) const;
339 
343  bool operator != (const TypeVector<T> & rhs) const;
344 
351  bool operator < (const TypeVector<T> & rhs) const;
352 
359  bool operator <= (const TypeVector<T> & rhs) const;
360 
367  bool operator > (const TypeVector<T> & rhs) const;
368 
375  bool operator >= (const TypeVector<T> & rhs) const;
376 
380  void print(std::ostream & os = libMesh::out) const;
381 
390  friend std::ostream & operator << (std::ostream & os, const TypeVector<T> & t)
391  {
392  t.print(os);
393  return os;
394  }
395 
402  void write_unformatted (std::ostream & out, const bool newline = true) const;
403 
404 protected:
405 
409  T _coords[LIBMESH_DIM];
410 };
411 
412 
413 
414 
415 
416 //------------------------------------------------------
417 // Inline functions
418 
419 template <typename T>
420 inline
422 {
423  _coords[0] = 0;
424 
425 #if LIBMESH_DIM > 1
426  _coords[1] = 0;
427 #endif
428 
429 #if LIBMESH_DIM > 2
430  _coords[2] = 0;
431 #endif
432 }
433 
434 
435 
436 template <typename T>
437 inline
439  const T y,
440  const T z)
441 {
442  _coords[0] = x;
443 
444 #if LIBMESH_DIM > 1
445  _coords[1] = y;
446 #else
447  libmesh_assert_equal_to (y, 0);
448 #endif
449 
450 #if LIBMESH_DIM > 2
451  _coords[2] = z;
452 #else
453  libmesh_assert_equal_to (z, 0);
454 #endif
455 }
456 
457 
458 template <typename T>
459 template <typename Scalar1, typename Scalar2, typename Scalar3>
460 inline
463  const Scalar1>::type x,
464  typename
466  const Scalar2>::type y,
467  typename
469  const Scalar3>::type z)
470 {
471  _coords[0] = x;
472 
473 #if LIBMESH_DIM > 1
474  _coords[1] = y;
475 #else
476  libmesh_assert_equal_to (y, 0);
477 #endif
478 
479 #if LIBMESH_DIM > 2
480  _coords[2] = z;
481 #else
482  libmesh_assert_equal_to (z, 0);
483 #endif
484 }
485 
486 
487 
488 template <typename T>
489 template <typename Scalar>
490 inline
492  typename
494  const Scalar>::type * /*sfinae*/)
495 {
496  _coords[0] = x;
497 
498 #if LIBMESH_DIM > 1
499  _coords[1] = 0;
500 #endif
501 
502 #if LIBMESH_DIM > 2
503  _coords[2] = 0;
504 #endif
505 }
506 
507 
508 
509 template <typename T>
510 template <typename T2>
511 inline
513 {
514  // copy the nodes from vector p to me
515  for (unsigned int i=0; i<LIBMESH_DIM; i++)
516  _coords[i] = p._coords[i];
517 }
518 
519 
520 
521 template <typename T>
522 inline
524 {
525 }
526 
527 
528 
529 template <typename T>
530 template <typename T2>
531 inline
533 {
534  for (unsigned int i=0; i<LIBMESH_DIM; i++)
535  _coords[i] = p._coords[i];
536 }
537 
538 
539 
540 template <typename T>
541 inline
542 const T & TypeVector<T>::operator () (const unsigned int i) const
543 {
544  libmesh_assert_less (i, LIBMESH_DIM);
545 
546  return _coords[i];
547 }
548 
549 
550 
551 template <typename T>
552 inline
553 T & TypeVector<T>::operator () (const unsigned int i)
554 {
555  libmesh_assert_less (i, LIBMESH_DIM);
556 
557  return _coords[i];
558 }
559 
560 
561 
562 template <typename T>
563 template <typename T2>
564 inline
567 {
568  typedef typename CompareTypes<T, T2>::supertype TS;
569 #if LIBMESH_DIM == 1
570  return TypeVector<TS> (_coords[0] + p._coords[0]);
571 #endif
572 
573 #if LIBMESH_DIM == 2
574  return TypeVector<TS> (_coords[0] + p._coords[0],
575  _coords[1] + p._coords[1]);
576 #endif
577 
578 #if LIBMESH_DIM == 3
579  return TypeVector<TS> (_coords[0] + p._coords[0],
580  _coords[1] + p._coords[1],
581  _coords[2] + p._coords[2]);
582 #endif
583 
584 }
585 
586 
587 
588 template <typename T>
589 template <typename T2>
590 inline
592 {
593  this->add (p);
594 
595  return *this;
596 }
597 
598 
599 
600 template <typename T>
601 template <typename T2>
602 inline
604 {
605 #if LIBMESH_DIM == 1
606  _coords[0] += p._coords[0];
607 #endif
608 
609 #if LIBMESH_DIM == 2
610  _coords[0] += p._coords[0];
611  _coords[1] += p._coords[1];
612 #endif
613 
614 #if LIBMESH_DIM == 3
615  _coords[0] += p._coords[0];
616  _coords[1] += p._coords[1];
617  _coords[2] += p._coords[2];
618 #endif
619 
620 }
621 
622 
623 
624 template <typename T>
625 template <typename T2>
626 inline
627 void TypeVector<T>::add_scaled (const TypeVector<T2> & p, const T factor)
628 {
629 #if LIBMESH_DIM == 1
630  _coords[0] += factor*p(0);
631 #endif
632 
633 #if LIBMESH_DIM == 2
634  _coords[0] += factor*p(0);
635  _coords[1] += factor*p(1);
636 #endif
637 
638 #if LIBMESH_DIM == 3
639  _coords[0] += factor*p(0);
640  _coords[1] += factor*p(1);
641  _coords[2] += factor*p(2);
642 #endif
643 
644 }
645 
646 
647 
648 template <typename T>
649 template <typename T2>
650 inline
653 {
654  typedef typename CompareTypes<T, T2>::supertype TS;
655 
656 #if LIBMESH_DIM == 1
657  return TypeVector<TS>(_coords[0] - p._coords[0]);
658 #endif
659 
660 #if LIBMESH_DIM == 2
661  return TypeVector<TS>(_coords[0] - p._coords[0],
662  _coords[1] - p._coords[1]);
663 #endif
664 
665 #if LIBMESH_DIM == 3
666  return TypeVector<TS>(_coords[0] - p._coords[0],
667  _coords[1] - p._coords[1],
668  _coords[2] - p._coords[2]);
669 #endif
670 
671 }
672 
673 
674 
675 template <typename T>
676 template <typename T2>
677 inline
679 {
680  this->subtract (p);
681 
682  return *this;
683 }
684 
685 
686 
687 template <typename T>
688 template <typename T2>
689 inline
691 {
692  for (unsigned int i=0; i<LIBMESH_DIM; i++)
693  _coords[i] -= p._coords[i];
694 }
695 
696 
697 
698 template <typename T>
699 template <typename T2>
700 inline
701 void TypeVector<T>::subtract_scaled (const TypeVector<T2> & p, const T factor)
702 {
703  for (unsigned int i=0; i<LIBMESH_DIM; i++)
704  _coords[i] -= factor*p(i);
705 }
706 
707 
708 
709 template <typename T>
710 inline
712 {
713 
714 #if LIBMESH_DIM == 1
715  return TypeVector(-_coords[0]);
716 #endif
717 
718 #if LIBMESH_DIM == 2
719  return TypeVector(-_coords[0],
720  -_coords[1]);
721 #endif
722 
723 #if LIBMESH_DIM == 3
724  return TypeVector(-_coords[0],
725  -_coords[1],
726  -_coords[2]);
727 #endif
728 
729 }
730 
731 
732 
733 template <typename T>
734 template <typename Scalar>
735 inline
736 typename boostcopy::enable_if_c<
739 TypeVector<T>::operator * (const Scalar factor) const
740 {
741  typedef typename CompareTypes<T, Scalar>::supertype SuperType;
742 
743 #if LIBMESH_DIM == 1
744  return TypeVector<SuperType>(_coords[0]*factor);
745 #endif
746 
747 #if LIBMESH_DIM == 2
748  return TypeVector<SuperType>(_coords[0]*factor,
749  _coords[1]*factor);
750 #endif
751 
752 #if LIBMESH_DIM == 3
753  return TypeVector<SuperType>(_coords[0]*factor,
754  _coords[1]*factor,
755  _coords[2]*factor);
756 #endif
757 }
758 
759 
760 
761 template <typename T, typename Scalar>
762 inline
763 typename boostcopy::enable_if_c<
766 operator * (const Scalar factor,
767  const TypeVector<T> & v)
768 {
769  return v * factor;
770 }
771 
772 
773 
774 template <typename T>
775 inline
777 {
778 #if LIBMESH_DIM == 1
779  _coords[0] *= factor;
780 #endif
781 
782 #if LIBMESH_DIM == 2
783  _coords[0] *= factor;
784  _coords[1] *= factor;
785 #endif
786 
787 #if LIBMESH_DIM == 3
788  _coords[0] *= factor;
789  _coords[1] *= factor;
790  _coords[2] *= factor;
791 #endif
792 
793  return *this;
794 }
795 
796 
797 
798 template <typename T>
799 template <typename Scalar>
800 inline
801 typename boostcopy::enable_if_c<
804 TypeVector<T>::operator / (const Scalar factor) const
805 {
806  libmesh_assert_not_equal_to (factor, static_cast<T>(0.));
807 
808  typedef typename CompareTypes<T, Scalar>::supertype TS;
809 
810 #if LIBMESH_DIM == 1
811  return TypeVector<TS>(_coords[0]/factor);
812 #endif
813 
814 #if LIBMESH_DIM == 2
815  return TypeVector<TS>(_coords[0]/factor,
816  _coords[1]/factor);
817 #endif
818 
819 #if LIBMESH_DIM == 3
820  return TypeVector<TS>(_coords[0]/factor,
821  _coords[1]/factor,
822  _coords[2]/factor);
823 #endif
824 
825 }
826 
827 
828 
829 
830 template <typename T>
831 inline
832 const TypeVector<T> &
834 {
835  libmesh_assert_not_equal_to (factor, static_cast<T>(0.));
836 
837  for (unsigned int i=0; i<LIBMESH_DIM; i++)
838  _coords[i] /= factor;
839 
840  return *this;
841 }
842 
843 
844 
845 
846 template <typename T>
847 template <typename T2>
848 inline
851 {
852 #if LIBMESH_DIM == 1
853  return _coords[0]*p._coords[0];
854 #endif
855 
856 #if LIBMESH_DIM == 2
857  return (_coords[0]*p._coords[0] +
858  _coords[1]*p._coords[1]);
859 #endif
860 
861 #if LIBMESH_DIM == 3
862  return (_coords[0]*p(0) +
863  _coords[1]*p(1) +
864  _coords[2]*p(2));
865 #endif
866 }
867 
868 template <typename T>
869 template <typename T2>
870 inline
873 {
874  return (*this)*(p);
875 }
876 
877 
878 
879 template <typename T>
880 template <typename T2>
883 {
884  typedef typename CompareTypes<T, T2>::supertype TS;
885  libmesh_assert_equal_to (LIBMESH_DIM, 3);
886 
887  // | i j k |
888  // |(*this)(0) (*this)(1) (*this)(2)|
889  // | p(0) p(1) p(2) |
890 
891  return TypeVector<TS>( _coords[1]*p._coords[2] - _coords[2]*p._coords[1],
892  -_coords[0]*p._coords[2] + _coords[2]*p._coords[0],
893  _coords[0]*p._coords[1] - _coords[1]*p._coords[0]);
894 }
895 
896 
897 
898 #ifdef LIBMESH_ENABLE_DEPRECATED
899 template <typename T>
900 inline
902 {
903  libmesh_deprecated();
904  return this->norm();
905 }
906 #endif
907 
908 
909 
910 template <typename T>
911 inline
913 {
914  return std::sqrt(this->norm_sq());
915 }
916 
917 
918 
919 template <typename T>
920 inline
922 {
923  for (unsigned int i=0; i<LIBMESH_DIM; i++)
924  _coords[i] = 0.;
925 }
926 
927 
928 
929 #ifdef LIBMESH_ENABLE_DEPRECATED
930 template <typename T>
931 inline
933 {
934  libmesh_deprecated();
935  return this->norm_sq();
936 }
937 #endif
938 
939 
940 
941 template <typename T>
942 inline
944 {
945 #if LIBMESH_DIM == 1
946  return (TensorTools::norm_sq(_coords[0]));
947 #endif
948 
949 #if LIBMESH_DIM == 2
950  return (TensorTools::norm_sq(_coords[0]) +
951  TensorTools::norm_sq(_coords[1]));
952 #endif
953 
954 #if LIBMESH_DIM == 3
955  return (TensorTools::norm_sq(_coords[0]) +
956  TensorTools::norm_sq(_coords[1]) +
957  TensorTools::norm_sq(_coords[2]));
958 #endif
959 }
960 
961 
962 
963 template <typename T>
964 inline
966 {
967 #if LIBMESH_DIM == 1
968  return (std::abs(_coords[0] - rhs._coords[0])
969  <= tol);
970 #endif
971 
972 #if LIBMESH_DIM == 2
973  return (std::abs(_coords[0] - rhs._coords[0]) +
974  std::abs(_coords[1] - rhs._coords[1])
975  <= tol);
976 #endif
977 
978 #if LIBMESH_DIM == 3
979  return (std::abs(_coords[0] - rhs._coords[0]) +
980  std::abs(_coords[1] - rhs._coords[1]) +
981  std::abs(_coords[2] - rhs._coords[2])
982  <= tol);
983 #endif
984 }
985 
986 
987 
988 template <typename T>
989 inline
991 {
992 #if LIBMESH_DIM == 1
993  return this->absolute_fuzzy_equals(rhs, tol *
994  (std::abs(_coords[0]) + std::abs(rhs._coords[0])));
995 #endif
996 
997 #if LIBMESH_DIM == 2
998  return this->absolute_fuzzy_equals(rhs, tol *
999  (std::abs(_coords[0]) + std::abs(rhs._coords[0]) +
1000  std::abs(_coords[1]) + std::abs(rhs._coords[1])));
1001 #endif
1002 
1003 #if LIBMESH_DIM == 3
1004  return this->absolute_fuzzy_equals(rhs, tol *
1005  (std::abs(_coords[0]) + std::abs(rhs._coords[0]) +
1006  std::abs(_coords[1]) + std::abs(rhs._coords[1]) +
1007  std::abs(_coords[2]) + std::abs(rhs._coords[2])));
1008 #endif
1009 }
1010 
1011 
1012 
1013 template <typename T>
1014 inline
1016 {
1017 #if LIBMESH_DIM == 1
1018  return (_coords[0] == rhs._coords[0]);
1019 #endif
1020 
1021 #if LIBMESH_DIM == 2
1022  return (_coords[0] == rhs._coords[0] &&
1023  _coords[1] == rhs._coords[1]);
1024 #endif
1025 
1026 #if LIBMESH_DIM == 3
1027  return (_coords[0] == rhs._coords[0] &&
1028  _coords[1] == rhs._coords[1] &&
1029  _coords[2] == rhs._coords[2]);
1030 #endif
1031 }
1032 
1033 
1034 
1035 template <typename T>
1036 inline
1038 {
1039  return (!(*this == rhs));
1040 }
1041 
1042 
1043 //------------------------------------------------------
1044 // Non-member functions on TypeVectors
1045 
1046 // Compute a * (b.cross(c)) without creating a temporary
1047 // for the cross product. Equivalent to the determinant
1048 // of the 3x3 tensor:
1049 // [a0, a1, a2]
1050 // [b0, b1, b2]
1051 // [c0, c1, c2]
1052 template <typename T>
1053 inline
1055  const TypeVector<T> & b,
1056  const TypeVector<T> & c)
1057 {
1058 #if LIBMESH_DIM == 3
1059  return
1060  a(0)*(b(1)*c(2) - b(2)*c(1)) -
1061  a(1)*(b(0)*c(2) - b(2)*c(0)) +
1062  a(2)*(b(0)*c(1) - b(1)*c(0));
1063 #else
1064  return 0;
1065 #endif
1066 }
1067 
1068 
1069 
1074 template <typename T>
1075 inline
1077  const TypeVector<T> & c)
1078 {
1079  T z = b(0)*c(1) - b(1)*c(0);
1080 
1081 #if LIBMESH_DIM == 3
1082  T x = b(1)*c(2) - b(2)*c(1),
1083  y = b(0)*c(2) - b(2)*c(0);
1084  return x*x + y*y + z*z;
1085 #else
1086  return z*z;
1087 #endif
1088 }
1089 
1090 
1091 
1095 template <typename T>
1096 inline
1098  const TypeVector<T> & c)
1099 {
1100  return std::sqrt(cross_norm_sq(b,c));
1101 }
1102 
1103 } // namespace libMesh
1104 
1105 #endif // LIBMESH_TYPE_VECTOR_H
T _coords[LIBMESH_DIM]
Definition: type_vector.h:409
double abs(double a)
boostcopy::enable_if_c< ScalarTraits< Scalar >::value, TypeVector< typename CompareTypes< T, Scalar >::supertype > >::type operator*(const Scalar) const
Definition: type_vector.h:739
TypeVector< typename CompareTypes< T, T2 >::supertype > operator+(const TypeVector< T2 > &) const
Definition: type_vector.h:566
Real norm() const
Definition: type_vector.h:912
CompareTypes< T, T2 >::supertype contract(const TypeVector< T2 > &) const
Definition: type_vector.h:872
void add_scaled(const TypeVector< T2 > &, const T)
Definition: type_vector.h:627
T cross_norm(const TypeVector< T > &b, const TypeVector< T > &c)
Definition: type_vector.h:1097
bool operator>(const TypeVector< T > &rhs) const
Definition: type_vector.C:138
unsigned int index_type
Definition: type_vector.h:110
static const Real TOLERANCE
const TypeVector< T > & operator+=(const TypeVector< T2 > &)
Definition: type_vector.h:591
void add(const TypeVector< T2 > &)
Definition: type_vector.h:603
const TypeVector< T > & operator/=(const T)
Definition: type_vector.h:833
T cross_norm_sq(const TypeVector< T > &b, const TypeVector< T > &c)
Definition: type_vector.h:1076
bool operator>=(const TypeVector< T > &rhs) const
Definition: type_vector.C:152
void print(std::ostream &os=libMesh::out) const
Definition: type_vector.C:64
T triple_product(const TypeVector< T > &a, const TypeVector< T > &b, const TypeVector< T > &c)
Definition: type_vector.h:1054
TypeVector< T > unit() const
Definition: type_vector.C:37
TypeVector< T > operator-() const
Definition: type_vector.h:711
void write_unformatted(std::ostream &out, const bool newline=true) const
Definition: type_vector.C:92
void subtract(const TypeVector< T2 > &)
Definition: type_vector.h:690
boostcopy::enable_if_c< ScalarTraits< Scalar >::value, TypeNTensor< N, typename CompareTypes< Scalar, T >::supertype > >::type operator*(const Scalar &, const TypeNTensor< N, T > &)
TypeVector< typename CompareTypes< T, T2 >::supertype > cross(const TypeVector< T2 > &v) const
Definition: type_vector.h:882
bool absolute_fuzzy_equals(const TypeVector< T > &rhs, Real tol=TOLERANCE) const
Definition: type_vector.h:965
void subtract_scaled(const TypeVector< T2 > &, const T)
Definition: type_vector.h:701
Real norm_sq() const
Definition: type_vector.h:943
const TypeVector< T > & operator-=(const TypeVector< T2 > &)
Definition: type_vector.h:678
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void assign(const TypeVector< T2 > &)
Definition: type_vector.h:532
T & slice(const unsigned int i)
Definition: type_vector.h:149
const T & operator()(const unsigned int i) const
Definition: type_vector.h:542
bool operator==(const TypeVector< T > &rhs) const
Definition: type_vector.h:1015
boostcopy::enable_if_c< ScalarTraits< Scalar >::value, TypeVector< typename CompareTypes< T, Scalar >::supertype > >::type operator/(const Scalar) const
Definition: type_vector.h:804
Real size() const
Definition: type_vector.h:901
const TypeVector< T > & operator*=(const T)
Definition: type_vector.h:776
OStreamProxy out(std::cout)
bool relative_fuzzy_equals(const TypeVector< T > &rhs, Real tol=TOLERANCE) const
Definition: type_vector.h:990
boostcopy::enable_if_c< ScalarTraits< Scalar >::value, TypeVector & >::type operator=(const Scalar &libmesh_dbg_var(p))
Definition: type_vector.h:136
bool operator!=(const TypeVector< T > &rhs) const
Definition: type_vector.h:1037
Real size_sq() const
Definition: type_vector.h:932
const T & slice(const unsigned int i) const
Definition: type_vector.h:143