lululxvi / deepxde

A library for scientific machine learning and physics-informed learning
https://deepxde.readthedocs.io
GNU Lesser General Public License v2.1
2.78k stars 760 forks source link

PDE error evaluated on bc points in PDE.losses but not used by following codes #1756

Open mynanshan opened 6 months ago

mynanshan commented 6 months ago

https://github.com/lululxvi/deepxde/blob/10ec4e5f4c91a27229b6b5bba32c6c58fc14bf90/deepxde/data/pde.py#L168

I am just wondering why the PDE loss f is computed on the full input array while its f[:bcs_start[-1]] part is not used. Should it be optimized by just passing the part of the inputs to PDE.losses?

lululxvi commented 4 months ago

PDE error are evaluated at all points including boundary points.