  We give a short and self-contained proof of the Boundary Harnack inequality
for a class of domains satisfying some geometric conditions given in terms of a
state function that behaves as the distance function to the boundary, is
subharmonic inside the domain and satisfies some suitable estimates on the
measure of its level sets. We also discuss the applications of this result to
some shape optimization and free boundary problems.

Analysis of PDEs