{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/physics-informed-neural-networks-with-hard","title":"Physics-informed neural networks with hard constraints for inverse design","arxiv_id":"2102.04626","date":"2021-02-09","proceeding":null,"authors":["Lu Lu","Raphael Pestourie","Wenjie Yao","Zhicheng Wang","Francesc Verdugo","Steven G. Johnson"],"abstract":"Inverse design arises in a variety of areas in engineering such as acoustic, mechanics, thermal/electronic transport, electromagnetism, and optics. Topology optimization is a major form of inverse design, where we optimize a designed geometry to achieve targeted properties and the geometry is parameterized by a density function. This optimization is challenging, because it has a very high dimensionality and is usually constrained by partial differential equations (PDEs) and additional inequalities. Here, we propose a new deep learning method -- physics-informed neural networks with hard constraints (hPINNs) -- for solving topology optimization. hPINN leverages the recent development of PINNs for solving PDEs, and thus does not rely on any numerical PDE solver. However, all the constraints in PINNs are soft constraints, and hence we impose hard constraints by using the penalty method and the augmented Lagrangian method. We demonstrate the effectiveness of hPINN for a holography problem in optics and a fluid problem of Stokes flow. We achieve the same objective as conventional PDE-constrained optimization methods based on adjoint methods and numerical PDE solvers, but find that the design obtained from hPINN is often simpler and smoother for problems whose solution is not unique. Moreover, the implementation of inverse design with hPINN can be easier than that of conventional methods.","url_abs":"https://arxiv.org/abs/2102.04626v1","url_pdf":"https://arxiv.org/pdf/2102.04626v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"physics-informed-neural-networks-with-hard","repo_url":"https://github.com/lululxvi/hpinn","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":null},{"paper_slug":"physics-informed-neural-networks-with-hard","repo_url":"https://github.com/lululxvi/deepxde","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"LGPL-2.1"}},{"paper_slug":"physics-informed-neural-networks-with-hard","repo_url":"https://github.com/tianshao1992/hPINN4paddle","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"paddle","reach":{"status":"unanswered"}},{"paper_slug":"physics-informed-neural-networks-with-hard","repo_url":"https://github.com/PaddlePaddle/PaddleScience/blob/develop/examples/hpinns/holography.py","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"paddle","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2102.04626","atlas_url":"https://app.syntology.ai/?focus=2102.04626","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2102.04626"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/tianshao1992/hPINN4paddle","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/PaddlePaddle/PaddleScience/blob/develop/examples/hpinns/holography.py","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lululxvi/hpinn","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lululxvi/deepxde","reach":{"status":"ok","spdx":"LGPL-2.1"}}],"summary":{"ran_violates":1,"ran_draft_wrong":1,"ran_honours":1},"by_repo_kind":{"official":{"samples":3,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"5edb45c23cb22530","entry":"alpha","repo":"lululxvi/hpinn","repo_kind":"official","path":"stokes/stokes.py","file_url":"https://github.com/lululxvi/hpinn/blob/HEAD/stokes/stokes.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5edb45c23cb22530"}},{"code_sha256_prefix":"d9bfd6853a5d462a","entry":"solution_forward","repo":"lululxvi/hpinn","repo_kind":"official","path":"holography/holography_main.py","file_url":"https://github.com/lululxvi/hpinn/blob/HEAD/holography/holography_main.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d9bfd6853a5d462a"}},{"code_sha256_prefix":"eb0c23cb1e9cb324","entry":"volume","repo":"lululxvi/hpinn","repo_kind":"official","path":"stokes/stokes.py","file_url":"https://github.com/lululxvi/hpinn/blob/HEAD/stokes/stokes.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"eb0c23cb1e9cb324"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}