45 #include <lifev/core/LifeV.hpp> 46 #include <lifev/core/array/VectorSmall.hpp> 48 using namespace LifeV;
58 std::cout << v1 << std::endl << std::endl;
59 std::cout << v2 << std::endl << std::endl;
60 std::cout << v3 << std::endl << std::endl;
61 std::cout << v1[ 0 ] << std::endl << std::endl;
63 std::cout << v1[ 0 ] << std::endl << std::endl;
64 std::cout << v1 ( 0 ) << std::endl << std::endl;
66 std::cout << v1 ( 0 ) << std::endl << std::endl;
67 std::cout << v1 + v2 << std::endl << std::endl;
68 std::cout << v1 - v2 << std::endl << std::endl;
69 std::cout << 2. * v1 << std::endl << std::endl;
70 std::cout << v1 / 2. << std::endl << std::endl;
71 std::cout << v1.dot ( v2 ) << std::endl << std::endl;
72 std::cout << v1.cross ( v2 ) << std::endl << std::endl;
73 std::cout << v1.normalized() << std::endl << std::endl;
75 std::cout << v1 << std::endl << std::endl;
77 std::vector<Real> v4 ( 3, 1. );
78 std::cout << castToVector3D ( v4 ) << std::endl << std::endl;
79 KN<
Real> v5 ( 3, 2. );
80 std::cout << castToVector3D ( v5 ) << std::endl << std::endl;
85 for (
UInt i = 0; i < 5; i++ )
91 std::cout << a << std::endl << std::endl;
92 std::cout << b << std::endl << std::endl;
93 std::cout << a + b << std::endl << std::endl;
94 std::cout << a - b << std::endl << std::endl;
95 std::cout << 0.5 * a << std::endl << std::endl;
96 std::cout << b / 2. << std::endl << std::endl;
97 std::cout << a.dot (b) << std::endl << std::endl;
98 std::cout << a.normalized() << std::endl << std::endl;
100 std::cout << b << std::endl << std::endl;
102 std::vector<Real> c ( 5, 1. );
103 std::cout << castToVectorSmall<5> ( c ) << std::endl << std::endl;
104 KN<
Real> d ( 5, 2. );
105 std::cout << castToVectorSmall<5> ( d ) << std::endl << std::endl;
107 VectorSmall<10> v6 = VectorSmall<10>::Constant ( 3. );
108 std::cout << v6 << std::endl << std::endl;
109 v6 = VectorSmall<10>::Zero();
110 std::cout << v6 << std::endl << std::endl;
void updateInverseJacobian(const UInt &iQuadPt)
void normalize()
Normalize vector.
Real & operator[](UInt const &i)
Operator [].
double Real
Generic real data.
VectorSmall< 3 > Vector3D
VectorSmall(Real const &x, Real const &y, Real const &z)
Full constructor with all components explicitly initialized.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Real & operator()(UInt const &i)
Operator ()