|
Orrery
A GPU-accelerated N-body gravitational simulator
|
The traceless second moment of a cell about its centre of mass. More...
#include <orrery/solvers/octree.hpp>
Public Attributes | |
| core::Real | xx {} |
| core::Real | xy {} |
| core::Real | xz {} |
| core::Real | yy {} |
| core::Real | yz {} |
| core::Real | zz {} |
The traceless second moment of a cell about its centre of mass.
Q_ij = sum_k m_k (3 x_i x_j - |x|^2 delta_ij)
where x is a particle's displacement from the centre of mass. This is the standard normalisation, in which the potential of the cell at displacement d carries the term Q_ij d_i d_j / (2 |d|^5) with no further factors, and the monopole term is unaffected by its presence.
The tensor is symmetric, so six components describe it, and it is traceless, so five would. The sixth is kept because the walk contracts the tensor with a vector twice per accepted cell, and recovering zz from the other two would put an addition inside the hottest loop in the solver to save eight bytes in an array that is only allocated when quadrupoles are asked for. The redundancy is asserted by test rather than assumed.