Efficient Parallel Computation of Particle-based Biological Systems: Applications to Simulations of Bird Flocks and Optimizing Models of Cardiac Tissue