#include <energymomentumtensor.h>
The EnergyMomentumTensor class represents a symmetric positive semi-definite energy-momentum tensor \( T^{\mu \nu}\). 
Definition at line 29 of file energymomentumtensor.h.
 
 | 
| typedef std::array< double, 10 >  | tmn_type | 
|   | The energy-momentum tensor is symmetric and has 10 independent components.  More...
  | 
|   | 
| using  | iterator = tmn_type::iterator | 
|   | Iterator over the components.  More...
  | 
|   | 
| using  | const_iterator = tmn_type::const_iterator | 
|   | Constant iterator over the components.  More...
  | 
|   | 
 | 
| static std::int8_t  | tmn_index (std::int8_t mu, std::int8_t nu) | 
|   | Access the index of component \( (\mu, \nu) \).  More...
  | 
|   | 
◆ tmn_type
The energy-momentum tensor is symmetric and has 10 independent components. 
Definition at line 32 of file energymomentumtensor.h.
 
 
◆ iterator
◆ const_iterator
◆ EnergyMomentumTensor() [1/2]
  
  
      
        
          | smash::EnergyMomentumTensor::EnergyMomentumTensor  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ EnergyMomentumTensor() [2/2]
  
  
      
        
          | smash::EnergyMomentumTensor::EnergyMomentumTensor  | 
          ( | 
          const tmn_type &  | 
          Tmn | ) | 
           | 
         
       
   | 
  
inlineexplicit   | 
  
 
Copy constructor. 
- Parameters
 - 
  
    | [in] | Tmn | Components of the energy-momentum tensor  | 
  
   
Definition at line 40 of file energymomentumtensor.h.
   41     for (
size_t i = 0; i < 10; i++) {
 
 
 
 
◆ operator[]()
  
  
      
        
          | double smash::EnergyMomentumTensor::operator[]  | 
          ( | 
          std::size_t  | 
          i | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ tmn_index()
  
  
      
        
          | static std::int8_t smash::EnergyMomentumTensor::tmn_index  | 
          ( | 
          std::int8_t  | 
          mu,  | 
         
        
           | 
           | 
          std::int8_t  | 
          nu  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestatic   | 
  
 
Access the index of component \( (\mu, \nu) \). 
- Parameters
 - 
  
    | [in] | mu | \(\mu\) is the row index (0 to 3)  | 
    | [in] | nu | \(\nu\) is the line index (0 to 3)  | 
  
   
Definition at line 54 of file energymomentumtensor.h.
   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));
 
 
 
 
◆ operator+=()
Addition of \(T^{\mu \nu}_0\) to tensor. 
Definition at line 154 of file energymomentumtensor.h.
  156   for (
size_t i = 0; i < 10; i++) {
 
 
 
 
◆ operator-=()
Subtraction of \(T^{\mu \nu}_0\) of tensor. 
Definition at line 168 of file energymomentumtensor.h.
  170   for (
size_t i = 0; i < 10; i++) {
 
 
 
 
◆ operator*=()
Scaling of the tensor by scalar \(a\). 
Definition at line 182 of file energymomentumtensor.h.
  183   for (
size_t i = 0; i < 10; i++) {
 
 
 
 
◆ operator/=()
Division of the tensor by scalar \(a\). 
Definition at line 199 of file energymomentumtensor.h.
  200   for (
size_t i = 0; i < 10; i++) {
 
 
 
 
◆ landau_frame_4velocity()
      
        
          | FourVector smash::EnergyMomentumTensor::landau_frame_4velocity  | 
          ( | 
           | ) | 
           const | 
        
      
 
Find the Landau frame 4-velocity from energy-momentum tensor. 
IMPORTANT: resulting 4-velocity is fourvector with LOWER index 
Definition at line 23 of file energymomentumtensor.cc.
   24   using Eigen::Matrix4d;
 
   25   using Eigen::Vector4d;
 
   49   logg[
LTmn].debug(
"Looking for Landau frame for T_{mu}^{nu} ", A);
 
   50   Eigen::EigenSolver<Matrix4d> es(A);
 
   60   Vector4d eig_im = es.eigenvalues().imag();
 
   61   Vector4d eig_re = es.eigenvalues().real();
 
   62   for (
size_t i = 0; i < 4; i++) {
 
   71   assert(eig_re(0) >= eig_re(1));
 
   72   assert(eig_re(0) >= eig_re(2));
 
   73   assert(eig_re(0) >= eig_re(3));
 
   74   logg[
LTmn].debug(
"eigenvalues: ", eig_re);
 
   77   Vector4d tmp = es.eigenvectors().col(0).real();
 
   83   FourVector u(tmp(0), tmp(1), tmp(2), tmp(3));
 
   84   const double u_sqr = u.sqr();
 
   86     u /= std::sqrt(u_sqr);
 
   89         "Landau frame is not defined.", 
" Eigen vector", u, 
" of ", A,
 
   90         " is not time-like and",
 
   91         " cannot be 4-velocity. This may happen if energy-momentum",
 
   92         " tensor was constructed for a massless particle.");
 
   93     u = FourVector(1., 0., 0., 0.);
 
 
 
 
◆ boosted()
Boost to a given 4-velocity. 
IMPORTANT: boost 4-velocity is fourvector with LOWER index 
- Parameters
 - 
  
  
 
Definition at line 98 of file energymomentumtensor.cc.
   99   using Eigen::Matrix4d;
 
  109   const ThreeVector tmp = u.threevec() / (1.0 + u[0]);
 
  111   L << u[0], u[1], u[2], u[3],
 
  112        u[1], u[1] * tmp.x1() + 1.0, u[2] * tmp.x1(), u[3] * tmp.x1(),
 
  113        u[2], u[1] * tmp.x2(), u[2] * tmp.x2() + 1.0, u[3] * tmp.x2(),
 
  114        u[3], u[1] * tmp.x3(), u[2] * tmp.x3(), u[3] * tmp.x3() + 1.0;
 
  120                                         R(1, 1), 
R(1, 2), 
R(1, 3),
 
 
 
 
◆ add_particle() [1/2]
      
        
          | void smash::EnergyMomentumTensor::add_particle  | 
          ( | 
          const FourVector &  | 
          mom | ) | 
           | 
        
      
 
Given momentum of the particle adds \(p^{\mu}p^{\mu}/p^0\) to the energy momentum tensor. 
- Parameters
 - 
  
    | [in] | mom | Momentum 4-vector with upper index, as all 4-momenta in SMASH  | 
  
   
Definition at line 126 of file energymomentumtensor.cc.
  127   const ThreeVector tmp = mom.threevec() / mom[0];
 
  132   Tmn_[4] += mom[1] * tmp.x1();
 
  133   Tmn_[5] += mom[1] * tmp.x2();
 
  134   Tmn_[6] += mom[1] * tmp.x3();
 
  135   Tmn_[7] += mom[2] * tmp.x2();
 
  136   Tmn_[8] += mom[2] * tmp.x3();
 
  137   Tmn_[9] += mom[3] * tmp.x3();
 
 
 
 
◆ add_particle() [2/2]
      
        
          | void smash::EnergyMomentumTensor::add_particle  | 
          ( | 
          const ParticleData &  | 
          p,  | 
        
        
           | 
           | 
          double  | 
          factor  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Same, but \( p^{\mu}p^{\mu}/p^0\) times factor is added. 
- Parameters
 - 
  
    | [in] | p | Reference to the data information of the particle  | 
  
   
- See also
 - ParticleData 
 
- Parameters
 - 
  
    | [in] | factor | Usually a smearing factor  | 
  
   
Definition at line 140 of file energymomentumtensor.cc.
 
 
◆ add_particle_for_derivatives()
◆ begin() [1/2]
  
  
      
        
          | iterator smash::EnergyMomentumTensor::begin  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Returns an iterator starting at the (0,0) component. 
The iterator implements the randomIterator concept. Thus, you can simply write begin() + 1 to get an iterator that points to the 1st component. 
Definition at line 120 of file energymomentumtensor.h.
  120 { 
return Tmn_.begin(); }
 
 
 
 
◆ end() [1/2]
  
  
      
        
          | iterator smash::EnergyMomentumTensor::end  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ begin() [2/2]
◆ end() [2/2]
◆ cbegin()
◆ cend()
◆ Tmn_
  
  
      
        
          | tmn_type smash::EnergyMomentumTensor::Tmn_ | 
         
       
   | 
  
private   | 
  
 
The internal storage of the components. 
Tensor has 16 components, but it is symmetric, so number of independent components reduces to 10. 
Definition at line 143 of file energymomentumtensor.h.
 
 
The documentation for this class was generated from the following files: