Reference

PhaseSpaceDTFE.BVHType
BVH(data, box, depth, left, right)

A Bounding Volume Hierarchy (BVH) tree structure on a set of geometric objects.

source
PhaseSpaceDTFE.BVHMethod
BVH(data, box::Matrix{Float64}, points::Matrix{Float64}, simplices, depth::Int)

Generates a Bounding Volume Hierarchy (BVH) tree structure.

source
PhaseSpaceDTFE.PS_DTFEType
PS_DTFE(positions_initial, positions, velocities, m, depth, box)

Generates an Phase-Space DTFE object given the initial positions, final positions and velocities of an N-body simulation. The Boundary Volume Hirarchy goes depth levels deep. The PS_DTFE-object contains:

rho::Vector{Float64}
Drho::Matrix{Float64}
Dv::Array{Float64}
tree::BVH
simplices::Matrix{Int}
positions::Matrix{Float64}
velocities::Matrix{Float64}
positions_initial::Matrix{Float64}
source
PhaseSpaceDTFE.PS_DTFE_subboxType
PS_DTFE_subbox

Phase-Space DTFE subbox object containing

N_sub::Int64
N_target::Int64
m::Float64
depth::Int64
dir::String
L::Float64
Ni::Int64
source
PhaseSpaceDTFE.SimBoxType
SimBox(L, Ni)

Holds the size L of the simulation box and the particle number Ni per side length.

Examples

julia> SimBox(100, 64)
SimBox(100.0, 64)
source
PhaseSpaceDTFE.DTFE_periodicMethod
DTFE_periodic(coords_q, coords_x, m, depth, sim_box; pad=0.05)

Constructs the DTFE-object from the final positions coords_x assuming periodic boundary conditions. These are Float64 matrices of size (N,3). m is the particle mass, a single Float64 or a matching matrix (N, 3). pad specifies the framing width in units of L.

source
PhaseSpaceDTFE.DTFE_periodicMethod
DTFE_periodic(coords_q, coords_x, velocities, m, depth, sim_box; pad=0.05)

Constructs the DTFE-object from the final positions coords_x and velocities velocities assuming periodic boundary conditions. These are Float64 matrices of size (N,3). m is the particle mass, a single Float64 or a matching matrix (N, 3). pad specifies the framing width in units of L.

source
PhaseSpaceDTFE.PS_DTFE_periodicMethod
PS_DTFE_periodic(coords_q, coords_x, m, depth, sim_box; pad=0.05)

Constructs the PS-DTFE-object from the initial positions coords_q and final positions coords_x assuming periodic boundary conditions. These are Float64 matrices of size (N,3). m is the particle mass, a single Float64 or a matching matrix (N, 3). pad specifies the framing width in units of L.

source
PhaseSpaceDTFE.PS_DTFE_periodicMethod
PS_DTFE_periodic(coords_q, coords_x, velocities, m, depth, sim_box; pad=0.05)

Constructs the PS-DTFE-object from the initial positions coords_q, final positions coords_x and velocities velocities assuming periodic boundary conditions. These are Float64 matrices of size (N,3). m is the particle mass, a single Float64 or a matching matrix (N, 3). pad specifies the framing width in units of L.

source
PhaseSpaceDTFE.densityMethod
density(p::Vector{Float64}, estimator::PS_DTFE)

Evaluate the Phase-Space DTFE density estimate in the point p.

source
PhaseSpaceDTFE.density_subboxMethod
density_subbox(coords_arr, ps_dtfe_sb)

Evaluate the Phase-Space DTFE density estimates in given coordinates coords_arr from the PS_DTFE_subbox object ps_dtfe_sb. coords_arr can be of any shape (..., 3).

source
PhaseSpaceDTFE.findBoxMethod
findBox(p::Vector{Float64}, BVH_tree::BVH)

Find the box in the Bounding Volume Hierarchy containing the point p.

source
PhaseSpaceDTFE.findCandidateSimplicesMethod
findCandidateSimplices(p::Vector{Float64}, BVH_tree::BVH)

Given a Bounding Volume Hierarchy, find a set candidate simplices that may contain the point p. The function outputs the indices of the candidate simplices.

source
PhaseSpaceDTFE.frameFunction
frame(coords_q, coords_x, L, pad=0.05)

Cosmological N-body simulations normally work with periodic boundary conditions. This function adds a frame of periodic particle positions around the simulation box to implement periodicity in the Delaunay tesselation. pad specifies the width of the frame in units of the simulation box size L.

source
PhaseSpaceDTFE.frame_velocitiesFunction
frame_velocities(coords_x, velocities, L, pad=0.05)

Cosmological N-body simulations normally work with periodic boundary conditions. This function adds a frame of velocities (corresponding to the periodic particle positions) around the simulation box to implement periodicity in the Delaunay tesselation. pad specifies the width of the frame in units of the simulation box size L.

source
PhaseSpaceDTFE.get_subbox_estimatorMethod
get_subbox_estimator(coords_q, coords_x, velocities, idx, N_sub, m, depth, sim_box::SimBox; pad=0.05, dir="./ps_dtfe")

Construct the Phase-Space DTFE object for given coordinates and velocities. Called for each subbox estimator construction.

source
PhaseSpaceDTFE.get_subbox_estimatorMethod
get_subbox_estimator(coords_q, coords_x, idx, N_sub, m, depth, sim_box::SimBox; pad=0.05, dir="./ps_dtfe")

Obtain the subbox estimator associated to a given position.

source
PhaseSpaceDTFE.inSimplicesMethod
inSimplices(p::Vector{Float64}, estimator::PS_DTFE)

Find the simplices in the Eulerian-evolved tesselation that contain the point p.

source
PhaseSpaceDTFE.numberOfStreams_subboxMethod
numberOfStreams_subbox(coords_arr, ps_dtfe_sb)

Evaluate the number of streams field in given coordinates coords_arr from the PS_DTFE_subbox object ps_dtfe_sb. coords_arr can be of any shape (..., 3).

source
PhaseSpaceDTFE.ps_dtfe_subboxMethod
ps_dtfe_subbox(coords_q, coords_x, velocities, m, depth, sim_box::SimBox; N_target=128, pad=0.05, dir="./ps_dtfe")

Construct the Phase-Space DTFE subbox estimator given the initial positions coords_q, final positions coords_x and velocities velocities of an N-body simulation, assuming periodic boundary positions. The Boundary Volume Hirarchy goes depth levels deep. For data types, see documentation of PS_DTFE_periodic(). The keyword argument N_target=128 specifies the number of particles (N_target^3) per subbox. pad is the framing width in units of L. dir is the data storage directory.

source
PhaseSpaceDTFE.ps_dtfe_subboxMethod
ps_dtfe_subbox(coords_q, coords_x, m, depth, sim_box::SimBox; N_target=128, pad=0.05, dir="./ps_dtfe")

Construct the Phase-Space DTFE subbox estimator given the initial positions coords_q and final positions coords_x of an N-body simulation, assuming periodic boundary positions. The Boundary Volume Hirarchy goes depth levels deep. For data types, see documentation of PS_DTFE_periodic(). The keyword argument N_target=128 specifies the number of particles (N_target^3) per subbox. pad is the framing width in units of L. dir is the data storage directory.

source
PhaseSpaceDTFE.translateMethod
translate(coords_q, coords_x, L)

Cosmological N-body simulations normally work with periodic boundary conditions. This function shifts both the initial and final positions of the particles such that they are located in the simulation box in Eulerian space.

source
PhaseSpaceDTFE.unwrap_sMethod
unwrap_s(s, L)

Cosmological N-body simulations normally work with periodic boundary conditions. This function undoes the wrapping of particles around the box in the displacement field, assuming the particles did not travel more than half the size of the box.

source
PhaseSpaceDTFE.unwrap_x_Method
unwrap_x_(q, x, L)

Cosmological N-body simulations normally work with periodic boundary conditions. This function undoes the wrapping of particles around the box, assuming the particles did not travel more than half the size of the box.

source
PhaseSpaceDTFE.velocityFunction
velocity(p::Vector{Float64}, estimator::PS_DTFE, single_stream=false)

Evaluate the Phase-Space DTFE velocity estimate in the point p. Returns a matrix of size (n, 3) for n stream velocities ((1,3) in single-stream regions, (n, 3) otherwise). If single_stream=true, returns [NaN NaN NaN] in multistream regions.

source
PhaseSpaceDTFE.velocitySumMethod
velocitySum(p::Vector{Float64}, estimator::PS_DTFE)

Evaluate the stream-mass weighted sum of the Phase-Space DTFE velocities estimates for the individual streams in the point p.

source
PhaseSpaceDTFE.velocitySum_subboxMethod
velocitySum_subbox(coords_arr, ps_dtfe_sb)

Evaluate the stream-mass weighted sum of the Phase-Space DTFE stream velocity estimates in given coordinates coords_arr from the PS_DTFE_subbox object ps_dtfe_sb. coords_arr can be of any shape (..., 3).

source
PhaseSpaceDTFE.velocity_subboxMethod
velocity_subbox(coords_arr, ps_dtfe_sb)

Evaluate the Phase-Space DTFE velocity estimates in given coordinates coords_arr from the PS_DTFE_subbox object ps_dtfe_sb. coords_arr can be of any shape (..., 3). In the current code release, [NaN NaN NaN] is returned in multistream regions, i.e. individual stream velocities are not supported.

source