17 const double velocity_squared = v.
sqr();
20 velocity_squared < 1. ? 1. / std::sqrt(1. - velocity_squared) : 0;
23 const double xprime_0 = gamma * (this->
x0() - this->
threevec() * v);
25 const double constantpart = gamma / (gamma + 1) * (xprime_0 + this->
x0());
The ThreeVector class represents a physical three-vector with the components .
std::array< double, 4 > x_
internal storage of this vector's components
ThreeVector threevec() const
Generic numerical functions.
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...
FourVector LorentzBoost(const ThreeVector &v) const
Returns the FourVector boosted with velocity v.
bool operator==(const FourVector &a) const
Check if all four vector components are almost equal (accuracy ).
std::ostream & operator<<(std::ostream &out, const ActionPtr &action)
Convenience: dereferences the ActionPtr to Action.
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
FourVector()
default constructor nulls the fourvector components