  The physics-informed neural network (PINN) is effective in solving the
partial differential equation (PDE) by capturing the physics constraints as a
part of the training loss function through the Automatic Differentiation (AD).
This study proposes the hybrid finite difference with the physics-informed
neural network (HFD-PINN) to fully use the domain knowledge. The main idea is
to use the finite difference method (FDM) locally instead of AD in the
framework of PINN. In particular, we use AD at complex boundaries and the FDM
in other domains. The hybrid learning model shows promising results in
experiments. To use the FDM locally in the complex boundary domain and avoid
the generation of background mesh, we propose the HFD-PINN-sdf method, which
locally uses the finite difference scheme at random points. In addition, the
signed distance function is used to avoid the difference scheme from crossing
the domain boundary. In this paper, we demonstrate the performance of our
proposed methods and compare the results with the different number of
collocation points for the Poisson equation, Burgers equation. We also chose
several different finite difference schemes, including the compact finite
difference method (CDM) and crank-nicolson method (CNM), to verify the
robustness of HFD-PINN. We take the heat conduction problem and the heat
transfer problem on the irregular domain as examples to demonstrate the
efficacy of our framework. In summary, HFD-PINN, especially HFD-PINN-sdf, are
more instructive and efficient, significantly when solving PDEs in complex
geometries.
