Computations might hang on this do while. I think it would be better for the paralelization to make the number of iterations deterministic. Then, we would be able to use nested for feature of the OpenMP for this task.
I will try to modify the generation scheme to include some kind of normalization if the new position violates box constraints, similar to genericPSO model shown in https://core.ac.uk/download/pdf/56374467.pdf. Present version of the code is somehow similar to the zigzag strategy from the linked paper (I think we can implement the deterministic version too).
Additionally, new class for position vector operations was introduced class PositionVectorOperator. It is far suboptimal at the moment, but I guess it might be properly developed for new features.
Computations might hang on this
do while
. I think it would be better for the paralelization to make the number of iterations deterministic. Then, we would be able to use nested for feature of the OpenMP for this task.I will try to modify the generation scheme to include some kind of normalization if the new position violates box constraints, similar to genericPSO model shown in https://core.ac.uk/download/pdf/56374467.pdf. Present version of the code is somehow similar to the zigzag strategy from the linked paper (I think we can implement the deterministic version too).
https://github.com/egi-megi/rojCzastek_Szczepanski_Jurkiewicz_Pikulinski/blob/883b7e137bde3d66b01c4ba695bff04abcde4ec9/src/Particle.cpp#L89-L92