Lattice Boltzmann method on quadtree grids for simulating fluid flow through porous media: A new automatic algorithm