{"id":32739872,"url":"https://github.com/mathLab/PINA","last_synced_at":"2025-11-03T10:01:19.974Z","repository":{"id":37033354,"uuid":"433067589","full_name":"mathLab/PINA","owner":"mathLab","description":"Physics-Informed Neural networks for Advanced modeling","archived":false,"fork":false,"pushed_at":"2025-10-28T13:21:57.000Z","size":141996,"stargazers_count":582,"open_issues_count":26,"forks_count":84,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-10-28T13:24:32.180Z","etag":null,"topics":["deep-learning","differential-equations","equation-learning","hacktoberfest","lightining","machine-learning","modeling","neural-networks","neural-operators","ode","pde","physics-informed","physics-informed-neural-networks","pinn","python","pytorch","pytorch-lightning","torch-geometric"],"latest_commit_sha":null,"homepage":"https://mathlab.github.io/PINA/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.rst","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":"GOVERNANCE.md","roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":"MAINTAINERS.md","copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-11-29T14:09:16.000Z","updated_at":"2025-10-27T13:25:50.000Z","dependencies_parsed_at":"2023-02-10T14:31:35.443Z","dependency_job_id":"b0a4d5ac-be2b-40e6-b803-c9d02f4ce290","html_url":"https://github.com/mathLab/PINA","commit_stats":{"total_commits":84,"total_committers":9,"mean_commits":9.333333333333334,"dds":0.3928571428571429,"last_synced_commit":"74c48259fe04a5b738c31c1b6f1dc1b9235c2e33"},"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"purl":"pkg:github/mathLab/PINA","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathLab%2FPINA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathLab%2FPINA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathLab%2FPINA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathLab%2FPINA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathLab","download_url":"https://codeload.github.com/mathLab/PINA/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathLab%2FPINA/sbom","scorecard":{"id":624038,"data":{"date":"2025-08-11","repo":{"name":"github.com/mathLab/PINA","commit":"efc9e327f6795fa2959009dd3436377583a7ca12"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6.8,"checks":[{"name":"Maintained","score":10,"reason":"15 commit(s) and 19 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/deployer.yml:1","Warn: no topLevel permission defined: .github/workflows/master_cleaner.yml:1","Warn: no topLevel permission defined: .github/workflows/monthly-tagger.yml:1","Warn: no topLevel permission defined: .github/workflows/tester.yml:1","Warn: no topLevel permission defined: .github/workflows/tutorial_exporter.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.rst:0","Info: FSF or OSI recognized license: MIT License: LICENSE.rst:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/deployer.yml:41"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deployer.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/deployer.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/deployer.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/deployer.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deployer.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/deployer.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/deployer.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/deployer.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deployer.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/deployer.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/deployer.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/deployer.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/master_cleaner.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/master_cleaner.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/master_cleaner.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/master_cleaner.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/master_cleaner.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/master_cleaner.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/monthly-tagger.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/monthly-tagger.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/monthly-tagger.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/monthly-tagger.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/monthly-tagger.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/monthly-tagger.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tester.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/tester.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tester.yml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/tester.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tester.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/tester.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tester.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/tester.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tester.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/tester.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tester.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/tester.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tester.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/tester.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tutorial_exporter.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/tutorial_exporter.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tutorial_exporter.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/tutorial_exporter.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tutorial_exporter.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/tutorial_exporter.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tutorial_exporter.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/tutorial_exporter.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tutorial_exporter.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/tutorial_exporter.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tutorial_exporter.yml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/tutorial_exporter.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tutorial_exporter.yml:89: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/tutorial_exporter.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tutorial_exporter.yml:92: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/tutorial_exporter.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tutorial_exporter.yml:101: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/tutorial_exporter.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tutorial_exporter.yml:125: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/tutorial_exporter.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tutorial_exporter.yml:133: update your workflow using https://app.stepsecurity.io/secureworkflow/mathLab/PINA/tutorial_exporter.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/deployer.yml:17","Warn: pipCommand not pinned by hash: .github/workflows/deployer.yml:48","Warn: pipCommand not pinned by hash: .github/workflows/monthly-tagger.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/monthly-tagger.yml:24","Warn: pipCommand not pinned by hash: .github/workflows/tester.yml:50","Warn: pipCommand not pinned by hash: .github/workflows/tester.yml:64","Warn: pipCommand not pinned by hash: .github/workflows/tester.yml:65","Warn: pipCommand not pinned by hash: .github/workflows/tester.yml:26","Warn: pipCommand not pinned by hash: .github/workflows/tester.yml:27","Warn: pipCommand not pinned by hash: .github/workflows/tutorial_exporter.yml:31","Warn: pipCommand not pinned by hash: .github/workflows/tutorial_exporter.yml:98","Info:   0 out of  16 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  14 third-party GitHubAction dependencies pinned","Info:   0 out of  11 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T05:55:59.440Z","repository_id":37033354,"created_at":"2025-08-21T05:55:59.440Z","updated_at":"2025-08-21T05:55:59.440Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281926002,"owners_count":26584871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-31T02:00:07.401Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","differential-equations","equation-learning","hacktoberfest","lightining","machine-learning","modeling","neural-networks","neural-operators","ode","pde","physics-informed","physics-informed-neural-networks","pinn","python","pytorch","pytorch-lightning","torch-geometric"],"created_at":"2025-11-03T10:00:35.569Z","updated_at":"2025-11-03T10:01:19.952Z","avatar_url":"https://github.com/mathLab.png","language":"Python","readme":"\u003c!--\nCopyright Contributors to the Pyro project.\n\nSPDX-License-Identifier: Apache-2.0\n--\u003e\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/mathLab/PINA/raw/master/readme/pina_logo.png\"\u003e\n        \u003cimg src=\"https://github.com/mathLab/PINA/raw/master/readme/pina_logo.png\"\n             alt=\"PINA logo\"\n             style=\"width: 220px; aspect-ratio: 1 / 1; object-fit: contain;\"\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ch2 style=\"margin-left: 20px; font-size: 1.8rem; line-height: 1.2;\"\u003e\n        Solving Scientific Problems with Machine Learning, Intuitively\n      \u003c/h2\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n-----------------------------------------\n\n[![pages-build-deployment](https://github.com/mathLab/PINA/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/mathLab/PINA/actions/workflows/pages/pages-build-deployment)\n[![Version](https://img.shields.io/pypi/v/pina-mathlab?label=version\u0026logo=pypi)](https://pypi.org/project/pina-mathlab/)\n[![Downloads](https://img.shields.io/pypi/dm/pina-mathlab?label=downloads\u0026logo=pypi)](https://pypi.org/project/pina-mathlab/)\n[![JOSS](https://img.shields.io/badge/JOSS-10.21105/JOSS.05352-blue?logo=open-access)](https://joss.theoj.org/papers/10.21105/joss.05352)\n[![LICENSE](https://img.shields.io/github/license/mathLab/PINA)](https://github.com/mathLab/PINA/blob/main/LICENSE.rst)\n\n\n[Getting Started](https://github.com/mathLab/PINA/tree/master/tutorials#pina-tutorials) |\n[Documentation](https://mathlab.github.io/PINA/) |\n[Contributing](https://github.com/mathLab/PINA/blob/master/CONTRIBUTING.md)\n\n**PINA** is an open-source Python library designed to simplify and accelerate the development of Scientific Machine Learning (SciML) solutions. Built on top of [PyTorch](https://pytorch.org/), [PyTorch Lightning](https://lightning.ai/docs/pytorch/stable/), and [PyTorch Geometric](https://pytorch-geometric.readthedocs.io/en/latest/), PINA provides an intuitive framework for defining, experimenting with, and solving complex problems using Neural Networks, Physics-Informed Neural Networks (PINNs), Neural Operators, and more.\n\n- **Modular Architecture**: Designed with modularity in mind and relying on powerful yet composable abstractions, PINA allows users to easily plug, replace, or extend components, making experimentation and customization straightforward.\n\n- **Scalable Performance**: With native support for multi-device training, PINA handles large datasets efficiently, offering performance close to hand-crafted implementations with minimal overhead.\n\n- **Highly Flexible**: Whether you're looking for full automation or granular control, PINA adapts to your workflow. High-level abstractions simplify model definition, while expert users can dive deep to fine-tune every aspect of the training and inference process.\n\n\n\n## Installation\n\n### Installing a stable PINA release\n\n**Install using pip:**\n```sh\npip install \"pina-mathlab\"\n```\n\n**Install from source:**\n```sh\ngit clone https://github.com/mathLab/PINA\ncd PINA\ngit checkout master\npip install .\n```\n\n**Install with extra packages:**\n\nTo install extra dependencies required to run tests or tutorials directories, please use the following command:\n```sh\npip install \"pina-mathlab[extras]\" \n```\nAvailable extras include:\n* `dev` for development purpuses, use this if you want to [Contribute](https://github.com/mathLab/PINA/blob/master/CONTRIBUTING.md#contributing-to-pina).\n* `test` for running test locally.\n* `doc` for building documentation locally.\n* `tutorial` for running [Tutorials](https://github.com/mathLab/PINA/tree/master/tutorials#pina-tutorials).\n\n## Quick Tour for New Users\nSolving a differential problem in **PINA** follows the *four steps pipeline*:\n\n1. Define the problem to be solved with its constraints using the [Problem API](https://mathlab.github.io/PINA/_rst/_code.html#problems).\n\n2. Design your model using PyTorch, or for graph-based problems, leverage PyTorch Geometric to build Graph Neural Networks. You can also import models directly from the [Model API](https://mathlab.github.io/PINA/_rst/_code.html#models).\n\n3. Select or build a Solver for the Problem, e.g., supervised solvers, or physics-informed (e.g., PINN) solvers. [PINA Solvers](https://mathlab.github.io/PINA/_rst/_code.html#solvers) are modular and can be used as-is or customized.\n\n4. Train the model using the [Trainer API](https://mathlab.github.io/PINA/_rst/trainer.html) class, built on PyTorch Lightning, which supports efficient, scalable training with advanced features.\n\nDo you want to learn more about it? Look at our [Tutorials](https://github.com/mathLab/PINA/tree/master/tutorials#pina-tutorials).\n\n### Solve Data Driven Problems\nData driven modelling aims to learn a function that given some input data gives an output (e.g. regression, classification, ...). In PINA you can easily do this by:\n```python\nimport torch\nfrom pina import Trainer\nfrom pina.model import FeedForward\nfrom pina.solver import SupervisedSolver\nfrom pina.problem.zoo import SupervisedProblem\n\ninput_tensor  = torch.rand((10, 1))\ntarget_tensor = input_tensor.pow(3)\n\n# Step 1. Define problem\nproblem = SupervisedProblem(input_tensor, target_tensor)\n# Step 2. Design model (you can use your favourite torch.nn.Module in here)\nmodel   = FeedForward(input_dimensions=1, output_dimensions=1, layers=[64, 64])\n# Step 3. Define Solver\nsolver  = SupervisedSolver(problem, model, use_lt=False)\n# Step 4. Train\ntrainer = Trainer(solver, max_epochs=1000, accelerator='gpu')\ntrainer.train()\n```\n### Solve Physics Informed Problems\nPhysics-informed modeling aims to learn functions that not only fit data, but also satisfy known physical laws, such as differential equations or boundary conditions. For example, the following differential problem:\n\n$$\n\\begin{cases}\n\\frac{d}{dx}u(x) \u0026=  u(x) \\quad x \\in(0,1)\\\\\nu(x=0) \u0026= 1\n\\end{cases}\n$$\n\nin PINA, can be easily implemented by:\n\n```python\nfrom pina import Trainer, Condition\nfrom pina.problem import SpatialProblem\nfrom pina.operator import grad\nfrom pina.solver import PINN\nfrom pina.model import FeedForward\nfrom pina.domain import CartesianDomain\nfrom pina.equation import Equation, FixedValue\n\ndef ode_equation(input_, output_):\n    u_x = grad(output_, input_, components=[\"u\"], d=[\"x\"])\n    u = output_.extract([\"u\"])\n    return u_x - u\n\n# build the problem\nclass SimpleODE(SpatialProblem):\n    output_variables = [\"u\"]\n    spatial_domain = CartesianDomain({\"x\": [0, 1]})\n    domains = {\n        \"x0\": CartesianDomain({\"x\": 0.0}),\n        \"D\": CartesianDomain({\"x\": [0, 1]}),\n    }\n    conditions = {\n        \"bound_cond\": Condition(domain=\"x0\", equation=FixedValue(1.0)),\n        \"phys_cond\": Condition(domain=\"D\", equation=Equation(ode_equation)),\n    }\n\n# Step 1. Define problem\nproblem = SimpleODE()\nproblem.discretise_domain(n=100, mode=\"grid\", domains=[\"D\", \"x0\"])\n# Step 2. Design model (you can use your favourite torch.nn.Module in here)\nmodel   = FeedForward(input_dimensions=1, output_dimensions=1, layers=[64, 64])\n# Step 3. Define Solver\nsolver  = PINN(problem, model)\n# Step 4. Train\ntrainer = Trainer(solver, max_epochs=1000, accelerator='gpu')\ntrainer.train()\n```\n\n## Application Programming Interface\nHere's a quick look at PINA's main module. For a better experience and full details, check out the [documentation](https://mathlab.github.io/PINA/).\n\n\u003ca href=\"https://github.com/mathLab/PINA/readme/PINA_API.png\"\u003e\n  \u003cimg src=\"./readme/PINA_API.png\" /\u003e\n\u003c/a\u003e\n\n## Contributing and Community\n\nWe would love to develop PINA together with our community! Best way to get started is to select any issue from the [`good-first-issue` label](https://github.com/mathLab/PINA/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22). If you would like to contribute, please review our [Contributing Guide](CONTRIBUTING.md) for all relevant details.\n\nWe warmly thank all the contributors that have supported PINA so far:\n\n\u003ca href=\"https://github.com/mathLab/PINA/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=mathLab/PINA\"\n       alt=\"Contributors\"\n       style=\"max-width: 100%; height: auto; display: block;\"\u003e\n\u003c/a\u003e\n\nMade with [contrib.rocks](https://contrib.rocks).\n\n## Citation\nIf **PINA** has been significant in your research, and you would like to acknowledge the project in your academic publication, we suggest citing the following paper:\n\n```\nCoscia, D., Ivagnes, A., Demo, N., \u0026 Rozza, G. (2023). Physics-Informed Neural networks for Advanced modeling. Journal of Open Source Software, 8(87), 5352.\n```\n\nOr in BibTex format\n```\n@article{coscia2023physics,\n        title={Physics-Informed Neural networks for Advanced modeling},\n        author={Coscia, Dario and Ivagnes, Anna and Demo, Nicola and Rozza, Gianluigi},\n        journal={Journal of Open Source Software},\n        volume={8},\n        number={87},\n        pages={5352},\n        year={2023}\n        }\n```\n","funding_links":[],"categories":["⚗️ Scientific Machine Learning","Python"],"sub_categories":["Physics-Informed Neural Networks"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FmathLab%2FPINA","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FmathLab%2FPINA","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FmathLab%2FPINA/lists"}