Function graspi::compute_pos_3D

Function Documentation

int graspi::compute_pos_3D(int i_x, int i_y, int i_z, const dim_a_t &d_a, bool if_per_on_sides = false)

This function computes the index in the array/vector storing the color/labels of vertices

Return

the index in the array/vector of colors

Parameters
  • i_x: is the index in x-direction of the vertex under consideration

  • i_y: is the index in y-direction of the vertex under consideration

  • i_z: is the index in z-direction of the vertex under consideration

  • d_a: is the reference to the struct storing dimensions of the morphology represented as a array

  • if_per_on_size: is the flag on periodicity, if it is on, then periodicity is reinforcef when generating neigbors