From the context of your question, I gather that $D$ lies in a 2-D plane. Also, I typeset in LaTeX, which Stackoverflow does not render--please forgive the extra effort this might cost you.
Can you sample (see details below) points throughout $D$? If you get a big enough sample
$$A = \{ x_1, x_2, \ldots, x_N \}$$
of points $x_k$ in $D$, try picking out the subset $S \subset A$ of points on which your function is nonzero. Now, instead of using rectangular tilings for all of $D$, triangulate $S$ (e.g., using a Delaunay triangulation).
Regarding sampling: how you do it should be informed by what you know about the function and the geometry of the subregion $C$ of $D$ where the function is nonzero. What, if anything, is known about the geometry of $C$? Is it convex? Connected? Anything else? If it's convex, you can sample uniformly and don't even need to triangulate $S$: just compute its convex hull.