Table of contents


Back to the main page Back to the documentation 1. Overview: Tidal tensor classification 2. Availiable methods

Overview: Tidal tensor classification


The cosmic web can be classified (void, sheet, filament, halo) by the eigenvalues (and eigenvectors) of the tidal tensor (see e.g. Section 3.3 of this). We provide a few methods that are useful for computing such a classification.

Availiable methods


//=================================================================================
// Computes the Hessian matrix of a grid [norm * f] via Fourier transforms.
// If hessian_of_potential_of_f is true then we compute the Hessian 
// phi_ij where D^2 phi = norm * f_real
// Since f_ij = f_ji we only compute the elements for j >= i and they are stored in
// the order fxx fxy ... fyy fyz ... etc. in hessian_real
// In 2D: [fxx fxy fyy]
// In 3D: [fxx fxy fxz fyy fyz fzz]
//=================================================================================
template<int N>
  void ComputeHessianWithFT(
    FFTWGrid<N> & f_real,
    std::vector< FFTWGrid<N> > & hessian_real,
    double norm = 1.0,
    bool hessian_of_potential_of_f = false)

//=================================================================================
// For each point in the grid compute eigenvectors and eigenvalues of the tensor
// H_ij where tensor_real contains the N(N-1)/2 grids [ 00,01,02,..,11,12,...,NN ]
//
// Eigenvalues are ordered in descending order 
// Eigenvectors are stored in row major order in the grid vector
// This allocates N grids if compute_eigenvectors = false and N(N+1) grids otherwise
//=================================================================================
template<int N>
  void SymmetricTensorEigensystem(
    std::vector< FFTWGrid<N> > & tensor_real,
    std::vector< FFTWGrid<N> > & eigenvalues,
    std::vector< FFTWGrid<N> > & eigenvectors,
    bool compute_eigenvectors = false)