For the simulation of moving obstacles in a fluid I need to calculate the intersecting volume of a parallelepiped and a cube as well as arbitrary polyhedron and a cube. I am using Nef_polyhedron of the CGAL library. Since I have to do around 90.000 intersection in each of the 10.000 timesteps, I have the major problem that it is too slow. In my implementation it takes 20 minutes for the 90.000 intersections.
It's practically impossible for me to do the simulation like this. In one second, 100 time steps should be possible to be carried out. Is this a limitation of cgal, the problem or due to my bad programming? Can someone tell me how fast it should be and if there is a faster (simple) way to calculate intersections?