44 #include <lifev/core/LifeV.hpp> 45 #include <lifev/core/array/VectorContainer.hpp> 47 using namespace LifeV;
49 template <
class VectorType >
51 TestFunction ( std::shared_ptr<VectorType> A1, std::shared_ptr<VectorType> B1,
52 std::shared_ptr<VectorType> A2, std::shared_ptr<VectorType> B2,
53 std::shared_ptr<VectorType> A3, std::shared_ptr<VectorType> B3,
54 std::shared_ptr<VectorType> A4, std::shared_ptr<VectorType> B4 )
57 typedef VectorContainer< VectorType > ContainerOfBaseVectors;
58 typedef std::shared_ptr<ContainerOfBaseVectors> ContainerOfBaseVectors_ptr;
60 ContainerOfBaseVectors_ptr V1, V2, V3, V4;
63 V1.reset (
new ContainerOfBaseVectors() );
66 std::cout <<
"V1" << std::endl;
69 V2.reset (
new ContainerOfBaseVectors() );
72 std::cout <<
"V2" << std::endl;
75 V3.reset (
new ContainerOfBaseVectors() );
78 std::cout <<
"V3" << std::endl;
81 V4.reset (
new ContainerOfBaseVectors() );
84 std::cout <<
"V4" << std::endl;
88 ContainerOfBaseVectors_ptr VV1, VV2, VV3;
89 VV1.reset (
new ContainerOfBaseVectors() );
91 std::cout <<
"VV1 = V1" << std::endl;
96 std::cout <<
"VV1 = 1.0" << std::endl;
101 std::cout <<
"VV1 += V1" << std::endl;
106 std::cout <<
"VV1 = VV1 - V2" << std::endl;
113 std::cout <<
"VV1 = 1.23456789 * V1" << std::endl;
117 scalar = VV1->dot ( *V1 );
118 std::cout <<
"scalarProduct = VV1.Dot(V1) = " << scalar << std::endl << std::endl;
121 VV1->push_back ( *V1 );
122 VV1->push_back ( *V2 );
123 std::cout <<
"VV1->push_back( V1 ); VV1->push_back( V2 )" << std::endl;
126 VV2.reset (
new ContainerOfBaseVectors() );
127 VV2->push_back ( *V3 );
128 VV2->push_back ( *V4 );
129 VV2->push_back ( *V3 );
130 std::cout <<
"VV2->push_back( V3 ); VV2->push_back( V4 ); VV2->push_back( V3 )" << std::endl;
134 std::cout <<
"VV2 *= VV1" << std::endl;
137 std::cout <<
"VV1 =" << std::endl;
141 std::cout <<
"VV2 /= VV1" << std::endl;
144 std::cout <<
"VV1 =" << std::endl;
148 std::cout <<
"VV2 && VV1" << std::endl;
149 (*VV2 && *VV1).showMe();
152 std::cout <<
"VV1 == 0" << std::endl;
153 VV3.reset (
new ContainerOfBaseVectors() );
154 *VV3 = ( *VV1 == 0.0 );
158 std::cout <<
"VV1 >= 2.2" << std::endl;
159 *VV3 = ( *VV1 >= 2.2 );
163 std::cout <<
"VV2 *= -1" << std::endl;
168 std::cout <<
"VV2->abs( *VV3 )" << std::endl;
170 std::cout <<
"VV2:" << std::endl;
172 std::cout <<
"VV3:" << std::endl;
184 std::cout <<
"VV1( 2 ) = B1" << std::endl;
189 std::cout <<
"WeightNorm2(VV1) = " << VV1->weightNorm2() << std::endl << std::endl;
192 std::cout <<
"!VV1 " << std::endl;
193 (! (*VV1) ).showMe();
195 std::cout <<
"!VV3 " << std::endl;
196 (! (*VV3) ).showMe();
void updateInverseJacobian(const UInt &iQuadPt)
uint32_type UInt
generic unsigned integer (used mainly for addressing)
UInt TestFunction(std::shared_ptr< VectorType > A1, std::shared_ptr< VectorType > B1, std::shared_ptr< VectorType > A2, std::shared_ptr< VectorType > B2, std::shared_ptr< VectorType > A3, std::shared_ptr< VectorType > B3, std::shared_ptr< VectorType > A4, std::shared_ptr< VectorType > B4)