KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > JSci > physics > relativity > LeviCivita


1 package JSci.physics.relativity;
2
3 /**
4 * The LeviCivita class encapsulates the Levi-Civita tensor.
5 * @version 1.0
6 * @author Mark Hale
7 */

8 public final class LeviCivita extends Rank4Tensor {
9         /**
10         * Constructs the Levi-Civita tensor.
11         */

12         public LeviCivita() {
13                 rank4[0][1][2][3]=1.0;
14                 rank4[0][2][3][1]=1.0;
15                 rank4[0][3][1][2]=1.0;
16                 rank4[1][0][3][2]=1.0;
17                 rank4[1][2][0][3]=1.0;
18                 rank4[1][3][2][0]=1.0;
19                 rank4[2][0][1][3]=1.0;
20                 rank4[2][1][3][0]=1.0;
21                 rank4[2][3][0][1]=1.0;
22                 rank4[3][0][2][1]=1.0;
23                 rank4[3][1][0][2]=1.0;
24                 rank4[3][2][1][0]=1.0;
25
26                 rank4[0][1][3][2]=-1.0;
27                 rank4[0][2][1][3]=-1.0;
28                 rank4[0][3][2][1]=-1.0;
29                 rank4[1][0][2][3]=-1.0;
30                 rank4[1][2][3][0]=-1.0;
31                 rank4[1][3][0][2]=-1.0;
32                 rank4[2][0][3][1]=-1.0;
33                 rank4[2][1][0][3]=-1.0;
34                 rank4[2][3][1][0]=-1.0;
35                 rank4[3][0][1][2]=-1.0;
36                 rank4[3][1][2][0]=-1.0;
37                 rank4[3][2][0][1]=-1.0;
38         }
39 }
40
41
Popular Tags