18 const double velocity_squared = v.
sqr();
21 velocity_squared < 1. ? 1. / std::sqrt(1. - velocity_squared) : 0;
24 const double xprime_0 = gamma * (this->
x0() - this->
threevec() * v);
26 const double constantpart = gamma / (gamma + 1) * (xprime_0 + this->
x0());
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
bool operator==(const FourVector &a) const
Check if all four vector components are almost equal (accuracy ).
FourVector lorentz_boost(const ThreeVector &v) const
Returns the FourVector boosted with velocity v.
ThreeVector threevec() const
FourVector()
default constructor nulls the fourvector components
std::array< double, 4 > x_
internal storage of this vector's components
The ThreeVector class represents a physical three-vector with the components .
std::ostream & operator<<(std::ostream &out, const ActionPtr &action)
Convenience: dereferences the ActionPtr to Action.
bool almost_equal_physics(const N x, const N y)
Same as smash::almost_equal, but for physical checks like energy-momentum conservation small_number i...
Generic numerical functions.