예제 #1
0
/**
 * @brief Computes the flat source region base indices for each of the
 *        Lattice cells within this Lattice (i.e., the minimum ID for the flat
 *        source regions within each Lattice cell). Returns the number of
 *        FSRs in the Lattice.
 * @return the number of FSRs
 */
int Lattice::computeFSRMaps() {

  /* Initialize a counter */
  int count = 0;

  /* loop over Universes in the Lattice to set the map and update count */
  for (int i = 0; i < _num_y; i++) {
    for (int j = 0; j < _num_x; j++) {
      Universe *u = _universes.at(i).at(j).second;
      _region_map[i][j].second = count;
      count += u->computeFSRMaps();
    }
  }

  return count;
}
예제 #2
0
파일: Cell.cpp 프로젝트: ajayrawat/OpenMOC
int CellFill::getNumFSRs() {
	Universe *univ = getUniverseFill();
	return univ->computeFSRMaps();
}