gonzales.lib.octree

  • gonzales.lib.octree.calc_accs_octree(w, r_x, r_y, r_z, r, m, G, eps, theta)
    Parallel calculation of accelerations using the Barnes-Hut algorithm. Constructs the

    octree and calculates the accelerations.

    param w

    double, root node width

    param r_x

    double, x-coordinate of root node center

    param r_y

    double, y-coordinate of root node center

    param r_z

    double, z-coordinate of root node center

    param r

    N x 3 numpy array, position vectors of the particles

    param m

    N x 1 numpy array, mass vector of the particles

    param G

    gravitational constant

    param eps

    gravitational softening

    param theta

    threshold parameter

    return

    N x 3 numpy array, acceleration vectors of particles