1 package JSci.physics.relativity; 2 3 import JSci.maths.vectors.Double3Vector; 4 5 10 public final class LorentzBoost extends Rank2Tensor { 11 15 public LorentzBoost(Double3Vector v) { 16 this(v.getComponent(0),v.getComponent(1),v.getComponent(2)); 17 } 18 24 public LorentzBoost(double vx,double vy,double vz) { 25 final double vv=vx*vx+vy*vy+vz*vz; 26 final double gamma=1.0/Math.sqrt(1.0-vv); 27 final double k=(gamma-1.0)/vv; 28 rank2[0][0]=gamma; 29 rank2[0][1]=rank2[1][0]=-gamma*vx; 30 rank2[0][2]=rank2[2][0]=-gamma*vy; 31 rank2[0][3]=rank2[3][0]=-gamma*vz; 32 rank2[1][1]=1.0+k*vx*vx; 33 rank2[1][2]=rank2[2][1]=k*vx*vy; 34 rank2[1][3]=rank2[3][1]=k*vx*vz; 35 rank2[2][2]=1.0+k*vy*vy; 36 rank2[2][3]=rank2[3][2]=k*vy*vz; 37 rank2[3][3]=1.0+k*vz*vz; 38 } 39 } 40 41 | Popular Tags |