Exact and soft boundary conditions in Physics-Informed Neural Networks
  for the Variable Coefficient Poisson equation
Sebastian Barschkis
Boundary conditions (BCs) are a key component in every Physics-Informed
Neural Network (PINN). By defining the solution to partial differential
equations (PDEs) along domain boundaries, BCs constrain the underlying boundary
value problem (BVP) that a PINN tries to approximate. Without them, unique PDE
solutions may not exist and finding approximations with PINNs would be a
challenging, if not impossible task. This study examines how soft loss-based
and exact distance function-based BC imposition approaches differ when applied
in PINNs. The well known variable coefficient Poisson equation serves as the
target PDE for all PINN models trained in this work. Besides comparing BC
imposition approaches, the goal of this work is to also provide resources on
how to implement these PINNs in practice. To this end, Keras models with
Tensorflow backend as well as a Python notebook with code examples and
step-by-step explanations on how to build soft/exact BC PINNs are published
alongside this review.