]> www.ginac.de Git - ginac.git/blobdiff - check/exam_indexed.cpp
Use "modern" CMake facilities to manage includes and libs
[ginac.git] / check / exam_indexed.cpp
index cf58ac7fbe7ded16cb5f78ca97d92bad3f010ce1..96f6faa2e4157f4f64bb8a0b2b472e013e434a95 100644 (file)
@@ -3,7 +3,7 @@
  *  Here we test manipulations on GiNaC's indexed objects. */
 
 /*
- *  GiNaC Copyright (C) 1999-2015 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2020 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -244,18 +244,16 @@ static unsigned edyn_check()
        symbol Bx("Bx"), By("By"), Bz("Bz");
 
        // Lorentz transformation matrix (boost along x axis)
-       matrix L(4, 4);
-       L =       gamma, -beta*gamma, 0, 0,
-           -beta*gamma,       gamma, 0, 0,
-                     0,           0, 1, 0,
-                     0,           0, 0, 1;
+       matrix L = {{      gamma, -beta*gamma, 0, 0},
+                   {-beta*gamma,       gamma, 0, 0},
+                   {          0,           0, 1, 0},
+                   {          0,           0, 0, 1}};
 
        // Electromagnetic field tensor
-       matrix F(4, 4);
-       F =  0, -Ex, -Ey, -Ez,
-               Ex,   0, -Bz,  By,
-               Ey,  Bz,   0, -Bx,
-               Ez, -By,  Bx,   0;
+       matrix F = {{ 0, -Ex, -Ey, -Ez},
+                   {Ex,   0, -Bz,  By},
+                   {Ey,  Bz,   0, -Bx},
+                   {Ez, -By,  Bx,   0}};
 
        // Indices
        symbol s_mu("mu"), s_nu("nu"), s_rho("rho"), s_sigma("sigma");