10 #ifndef SRC_INCLUDE_SMASH_ENERGYMOMENTUMTENSOR_H_ 
   11 #define SRC_INCLUDE_SMASH_ENERGYMOMENTUMTENSOR_H_ 
   41     for (
size_t i = 0; i < 10; i++) {
 
   54   static std::int8_t 
tmn_index(std::int8_t mu, std::int8_t nu) {
 
   56     constexpr std::array<std::int8_t, 16> indices = {0, 1, 2, 3,
 
   61     if (mu < 4 && nu < 4 && mu >= 0 && nu >= 0) {
 
   62       return indices[mu + 4 * nu];
 
   64       throw std::invalid_argument(
"Invalid indices: " + std::to_string(mu) +
 
   65                                   ", " + std::to_string(nu));
 
  156   for (
size_t i = 0; i < 10; i++) {
 
  170   for (
size_t i = 0; i < 10; i++) {
 
  183   for (
size_t i = 0; i < 10; i++) {
 
  200   for (
size_t i = 0; i < 10; i++) {
 
The EnergyMomentumTensor class represents a symmetric positive semi-definite energy-momentum tensor .
 
EnergyMomentumTensor operator*=(double a)
Scaling of the tensor by scalar .
 
tmn_type::const_iterator const_iterator
Constant iterator over the components.
 
const_iterator cend() const
 
const_iterator end() const
Const overload of the above.
 
tmn_type::iterator iterator
Iterator over the components.
 
EnergyMomentumTensor boosted(const FourVector &u) const
Boost to a given 4-velocity.
 
FourVector landau_frame_4velocity() const
Find the Landau frame 4-velocity from energy-momentum tensor.
 
tmn_type Tmn_
The internal storage of the components.
 
EnergyMomentumTensor operator+=(const EnergyMomentumTensor &Tmn0)
Addition of  to tensor.
 
EnergyMomentumTensor operator/=(double a)
Division of the tensor by scalar .
 
std::array< double, 10 > tmn_type
The energy-momentum tensor is symmetric and has 10 independent components.
 
EnergyMomentumTensor operator-=(const EnergyMomentumTensor &Tmn0)
Subtraction of  of tensor.
 
EnergyMomentumTensor(const tmn_type &Tmn)
Copy constructor.
 
iterator begin()
Returns an iterator starting at the (0,0) component.
 
const_iterator begin() const
Const overload of the above.
 
void add_particle_for_derivatives(const ParticleData &, double, ThreeVector)
Dummy function need for update_general_lattice.
 
iterator end()
Returns an iterator pointing after the (3,3)th component.
 
EnergyMomentumTensor()
Default constructor (nulls all components)
 
double operator[](std::size_t i) const
Return ith component of the tensor.
 
const_iterator cbegin() const
 
static std::int8_t tmn_index(std::int8_t mu, std::int8_t nu)
Access the index of component .
 
void add_particle(const FourVector &mom)
Given momentum of the particle adds  to the energy momentum tensor.
 
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
 
ParticleData contains the dynamic information of a certain particle.
 
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.
 
EnergyMomentumTensor operator-(EnergyMomentumTensor a, const EnergyMomentumTensor &b)
Direct subtraction operator.
 
EnergyMomentumTensor operator*(EnergyMomentumTensor a, const double b)
Direct multiplication operator.
 
EnergyMomentumTensor operator+(EnergyMomentumTensor a, const EnergyMomentumTensor &b)
Direct addition operator.
 
EnergyMomentumTensor operator/(EnergyMomentumTensor a, const double b)
Direct division operator.