  We present a second-order monolithic method for solving incompressible
Navier--Stokes equations on irregular domains with quadtree grids. A
semi-collocated grid layout is adopted, where velocity variables are located at
cell vertices, and pressure variables are located at cell centers. Compact
finite difference methods with ghost values are used to discretize the
advection and diffusion terms of the velocity. A pressure gradient and
divergence operator on the quadtree that use compact stencils are developed.
Furthermore, the proposed method is extended to cubical domains with octree
grids. Numerical results demonstrate that the method is second-order convergent
in $L^\infty$ norms and can handle irregular domains for various Reynolds
numbers.
