Some other thing: how many particles are you talking about? MVectors with large N (P in your case) are not a good idea and will make compile times be very large. Better data structures are standard vectors or, probably, a vector of SVectors.
Some other thing: how many particles are you talking about? MVectors with large N (P in your case) are not a good idea and will make compile times be very large. Better data structures are standard vectors or, probably, a vector of SVectors.