Assume that $\Omega$ is a bounded connected domain and $\partial \Omega \in C^{\infty}$. Denote $\Gamma\_1,\Gamma\_2,\cdots,\Gamma\_n$ are $n$ connected components of $\partial\Omega$. This notation leads to $\partial \Omega=\cup^n\_{i=1}\Gamma\_i$. Consider the following problem.
\begin{cases}
\Delta \phi&=0\\
\phi|\_{\partial \Omega}&=g(x),\quad g\in C^{\infty}
\end{cases}
Denote $\mathcal{S}$ is subset of $\{1,2,\cdots,n\}$ and $\mathcal{S}^c$ is $\{1,2,\cdots,n\}\setminus \mathcal{S} $. If we know that
$$
\min\_{i\in \mathcal{S}}\inf\_{x\in \Gamma\_i}\phi(x)\ge \max\_{i\in \mathcal{S}^c} \sup\_{x\in \Gamma\_i} \phi(x)+\delta,
$$ where $\delta$ is a positive constant,
how to prove that
\begin{align\*}
\sum\_{i\in \mathcal{S}}\int\_{\Gamma\_i}\nabla \phi\cdot \vec{n}d\sigma>0?
\end{align\*}
where $\vec{n}$ denotes the outer normal of $\partial \Omega$.


**My effort:** I meet this question when I read a paper. This paper say that it is a standard comparison principle exercise, but I still don't know how to solve this question. When $g(x)$ is a step function, we may consider Hopf Lemma or strong maximum principle. However, $g$ is a function. Any comments will be welcome.
[the equation (2.51) of page 2992 in this paper](https://projecteuclid.org/journals/duke-mathematical-journal/volume-170/issue-13/Symmetry-in-stationary-and-uniformly-rotating-solutions-of-active-scalar/10.1215/00127094-2021-0002.full) 



How to use comparison principle to prove the following inequality about Laplace equation?
Let $\psi$ be harmonic in $\Omega$, with $\psi=\phi$ on $\cup \_{i \in S} \Gamma\_i$, $\psi=m$ on $\cup\_{i \not \in S}\Gamma\_i$, where $m=\max\_{i \not \in S} \max\_{\Gamma\_i} \phi$. By comparison, $\psi \geq \phi$ and then $\nabla \psi \cdot n \leq \nabla \phi \cdot n$ on $\cup \_{i \in S} \Gamma\_i$. Then
$$
0=\int\_{\partial \Omega}\nabla \psi\cdot n=\sum\_{i \in S}\int\_{\partial \Gamma\_i} \nabla \psi\cdot n+\sum\_{i \not \in S}\int\_{\partial \Gamma\_i} \nabla \psi\cdot n.
$$
The function $\psi$ attains its minimum at any point of $\cup\_{i \not \in S} \Gamma\_i$, hence Hopf's lemma gives $\nabla \psi\cdot n<0$ and each integral on $\partial \Gamma\_i, i \not \in S$ is negative. Then
$$
\sum\_{i \in S}\int\_{\partial \Gamma\_i} \nabla \phi\cdot n \geq \sum\_{i \in S}\int\_{\partial \Gamma\_i} \nabla \psi\cdot n >0.
$$


