]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make compile.
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 3 Aug 2011 08:17:27 +0000 (08:17 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 3 Aug 2011 08:17:27 +0000 (08:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@24001 0785d39b-7218-0410-832d-ea1e28bc413d

tests/base/tensor_complex.cc

index 7f60cb5b791d659f67e5915180325d20371f31a2..f0dd879493ea9a27a2aa7b10437de626e93df135 100644 (file)
@@ -30,14 +30,22 @@ int main ()
   deallog.depth_console(0);
   deallog.threshold_double(1.e-10);
 
-  std::complex<double> a[3][3] = {{{1,-1}, {2,0}, {3,0}},
-                                 {{3,0}, {4,0}, {5,0}},
-                                 {{6,0}, {7,0}, {8,3}}};
-  std::complex<double> b[3][3] = {{{24,-2}, {31,-2}, {37,6}},
-                                 {{45,-3}, {57,0},  {69,15}},
-                                 {{75,12}, {96,21}, {108,48}}};
+  double a_double[3][3][2] = {{{1,-1}, {2,0}, {3,0}},
+                             {{3,0}, {4,0}, {5,0}},
+                             {{6,0}, {7,0}, {8,3}}};
+  double b_double[3][3][2] = {{{24,-2}, {31,-2}, {37,6}},
+                             {{45,-3}, {57,0},  {69,15}},
+                             {{75,12}, {96,21}, {108,48}}};
 
   const unsigned int dim=3;
+  std::complex<double> a[dim][dim], b[dim][dim];
+  for (unsigned int d=0; d<dim; ++d)
+    for (unsigned int e=0; e<dim; ++e)
+      {
+       a[d][e] = std::complex<double>(a_double[d][e][0],a_double[d][e][1]);
+       b[d][e] = std::complex<double>(b_double[d][e][0],b_double[d][e][1]);
+      }
+
   Tensor<2,dim,std::complex<double> > t(a);
   Tensor<2,dim,std::complex<double> > tt;
   Tensor<2,dim,std::complex<double> > result(b);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.