#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.
Public Types | |
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... | |
Public Member Functions | |
EnergyMomentumTensor () | |
Default constructor (nulls all components) More... | |
EnergyMomentumTensor (const tmn_type &Tmn) | |
Copy constructor. More... | |
double | operator[] (std::size_t i) const |
Return ith component of the tensor. More... | |
EnergyMomentumTensor | operator+= (const EnergyMomentumTensor &Tmn0) |
Addition of \(T^{\mu \nu}_0\) to tensor. More... | |
EnergyMomentumTensor | operator-= (const EnergyMomentumTensor &Tmn0) |
Subtraction of \(T^{\mu \nu}_0\) of tensor. More... | |
EnergyMomentumTensor | operator*= (double a) |
Scaling of the tensor by scalar \(a\). More... | |
EnergyMomentumTensor | operator/= (double a) |
Division of the tensor by scalar \(a\). More... | |
FourVector | landau_frame_4velocity () const |
Find the Landau frame 4-velocity from energy-momentum tensor. More... | |
EnergyMomentumTensor | boosted (const FourVector &u) const |
Boost to a given 4-velocity. More... | |
void | add_particle (const FourVector &mom) |
Given momentum of the particle adds \(p^{\mu}p^{\mu}/p^0\) to the energy momentum tensor. More... | |
void | add_particle (const ParticleData &p, double factor) |
Same, but \( p^{\mu}p^{\mu}/p^0\) times factor is added. More... | |
void | add_particle_for_derivatives (const ParticleData &, double, ThreeVector) |
Dummy function need for update_general_lattice. More... | |
iterator | begin () |
Returns an iterator starting at the (0,0) component. More... | |
iterator | end () |
Returns an iterator pointing after the (3,3)th component. More... | |
const_iterator | begin () const |
Const overload of the above. More... | |
const_iterator | end () const |
Const overload of the above. More... | |
const_iterator | cbegin () const |
const_iterator | cend () const |
Static Public Member Functions | |
static std::int8_t | tmn_index (std::int8_t mu, std::int8_t nu) |
Access the index of component \( (\mu, \nu) \). More... | |
Private Attributes | |
tmn_type | Tmn_ |
The internal storage of the components. More... | |
typedef std::array<double, 10> smash::EnergyMomentumTensor::tmn_type |
The energy-momentum tensor is symmetric and has 10 independent components.
Definition at line 32 of file energymomentumtensor.h.
using smash::EnergyMomentumTensor::iterator = tmn_type::iterator |
Iterator over the components.
Definition at line 79 of file energymomentumtensor.h.
using smash::EnergyMomentumTensor::const_iterator = tmn_type::const_iterator |
Constant iterator over the components.
Definition at line 81 of file energymomentumtensor.h.
|
inline |
Default constructor (nulls all components)
Definition at line 34 of file energymomentumtensor.h.
|
inlineexplicit |
Copy constructor.
[in] | Tmn | Components of the energy-momentum tensor |
Definition at line 40 of file energymomentumtensor.h.
|
inline |
Return ith component of the tensor.
Definition at line 47 of file energymomentumtensor.h.
|
inlinestatic |
Access the index of component \( (\mu, \nu) \).
[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.
|
inline |
Addition of \(T^{\mu \nu}_0\) to tensor.
Definition at line 154 of file energymomentumtensor.h.
|
inline |
Subtraction of \(T^{\mu \nu}_0\) of tensor.
Definition at line 168 of file energymomentumtensor.h.
|
inline |
Scaling of the tensor by scalar \(a\).
Definition at line 182 of file energymomentumtensor.h.
|
inline |
Division of the tensor by scalar \(a\).
Definition at line 199 of file energymomentumtensor.h.
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 22 of file energymomentumtensor.cc.
EnergyMomentumTensor smash::EnergyMomentumTensor::boosted | ( | const FourVector & | u | ) | const |
Boost to a given 4-velocity.
IMPORTANT: boost 4-velocity is fourvector with LOWER index
[in] | u | 4-velocity vector |
Definition at line 97 of file energymomentumtensor.cc.
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.
[in] | mom | Momentum 4-vector with upper index, as all 4-momenta in SMASH |
Definition at line 125 of file energymomentumtensor.cc.
void smash::EnergyMomentumTensor::add_particle | ( | const ParticleData & | p, |
double | factor | ||
) |
Same, but \( p^{\mu}p^{\mu}/p^0\) times factor is added.
[in] | p | Reference to the data information of the particle |
[in] | factor | Usually a smearing factor |
Definition at line 139 of file energymomentumtensor.cc.
|
inline |
Dummy function need for update_general_lattice.
Definition at line 111 of file energymomentumtensor.h.
|
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.
|
inline |
Returns an iterator pointing after the (3,3)th component.
Definition at line 125 of file energymomentumtensor.h.
|
inline |
Const overload of the above.
Definition at line 128 of file energymomentumtensor.h.
|
inline |
Const overload of the above.
Definition at line 130 of file energymomentumtensor.h.
|
inline |
Definition at line 133 of file energymomentumtensor.h.
|
inline |
Definition at line 135 of file energymomentumtensor.h.
|
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.