A class for time-efficient (time-memory trade-off) calculation of density on the lattice.
It holds six FourVectors - positive and negative summands of 4-current, and the time and spatial derivatives of the compound current. These Four-vectors are additive by particles. It is efficient to calculate additive jmu and \( \partial_\nu jmu \) in one loop over particles and then calculate the Eckart density, the gradient of the density, the curl and the time derivative of the current accordingly. Splitting into positive and negative parts of jmu is necessary to avoid problems with the definition of Eckart rest frame.
Intended usage of the class:
- Add particles from some list using add_particle(...). and add_particle_for_derivatives(...) The former sets jmu_pos and jmu_neg, the next sets djmu_dx.
- Get jmus and density whenever necessary via density(), jmu_pos(), jmu_neg()
- Get \(\nabla \cdot \rho\) via grad_rho()
- Get \(\nabla \times \vec j\) via rot_j()
- Get \(\partial_t \vec j\) via dj_dt()
Definition at line 256 of file density.h.
double smash::DensityOnLattice::density |
( |
const double |
norm_factor = 1.0 | ) |
|
|
inline |
Compute the net Eckart density on the local lattice.
Note that the net Eckart density is calculated by taking the difference between the Eckart density of the positively charged particles and that of the negatively charged particles, which are, in general, defined in different frames. So the net Eckart density is not the net density in the Eckart local rest frame. However, this is the only way we can think of to be applied to the case where the density current is space-like. And fortunately, the net eckart densities are only used for calculating the potentials which are valid only in the low-energy collisions where the amount of the negatively charged particles are negligible. May be in the future, the net Eckart density can be calculated in a smarter way.
- Parameters
-
[in] | norm_factor | Normalization factor |
- Returns
- Net Eckart density on the local lattice [fm \(^{-3}\)]
Definition at line 324 of file density.h.
FourVector jmu_neg_
Four-current density of the negatively charged particle.
double abs() const
calculate the lorentz invariant absolute value
FourVector jmu_pos_
Four-current density of the positively charged particle.