In each iteration of the motor position optimization blocking is calculated. The lbvh for blocking is calculated in each iteration. The lbvh clusters the heliostats spatially based on their position. While the orientations of the heliostats change in each iteration, the heliostat positions on which this lbvh is based are static and same in each iteration.
Therefore we could reduce computation to only once before the loop and save some time (and memory?).
(Writing this I noticed that during final operation one could in the future always save the lbvh for the whole field and reuse it. This might not be significant outside of the motor position optimization when only one or few forward passes happen and is not practicable for research purposes when the activated helisotats change a lot and varying subsets are used as then the lbvh needs to be recomputed for the specific subsets.)
In each iteration of the motor position optimization blocking is calculated. The lbvh for blocking is calculated in each iteration. The lbvh clusters the heliostats spatially based on their position. While the orientations of the heliostats change in each iteration, the heliostat positions on which this lbvh is based are static and same in each iteration.
Therefore we could reduce computation to only once before the loop and save some time (and memory?).
(Writing this I noticed that during final operation one could in the future always save the lbvh for the whole field and reuse it. This might not be significant outside of the motor position optimization when only one or few forward passes happen and is not practicable for research purposes when the activated helisotats change a lot and varying subsets are used as then the lbvh needs to be recomputed for the specific subsets.)