Function graspi::generate_ngbr

Function Documentation

void graspi::generate_ngbr(int i, int j, int k, const dim_a_t &d_a, std::pair<int, char> *ngbr, bool if_per_on_sides = false)

This function generates the neigborhood for a vertex in the array (indices of neighbors are generated)

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

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

  • k: 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

  • ngbr: is the pointer to pairs of neighbors (this is the pointer that points to the beginning of vector of neigbors that will be created as an output from this function)

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