{"id":26005401,"url":"https://github.com/precice/fenics-adapter","last_synced_at":"2025-03-15T14:08:14.244Z","repository":{"id":36416197,"uuid":"150404620","full_name":"precice/fenics-adapter","owner":"precice","description":"preCICE-adapter for the open source computing platform FEniCS","archived":false,"fork":false,"pushed_at":"2024-09-07T11:08:56.000Z","size":5285,"stargazers_count":29,"open_issues_count":23,"forks_count":15,"subscribers_count":8,"default_branch":"develop","last_synced_at":"2024-10-06T14:35:35.156Z","etag":null,"topics":["conjugate-heat-transfer","fenics","heat-transfer","multi-physics","precice","precice-adapter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/precice.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"https://precice.org/community-support-precice"}},"created_at":"2018-09-26T09:48:09.000Z","updated_at":"2024-09-23T09:23:10.000Z","dependencies_parsed_at":"2022-07-25T21:18:15.502Z","dependency_job_id":"ce24c294-e070-43e8-a5e3-726f9a382307","html_url":"https://github.com/precice/fenics-adapter","commit_stats":{"total_commits":209,"total_committers":15,"mean_commits":"13.933333333333334","dds":0.4736842105263158,"last_synced_commit":"6f998598aac79f923235bf1288fd9dd28ae07ef6"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Ffenics-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Ffenics-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Ffenics-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Ffenics-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/precice","download_url":"https://codeload.github.com/precice/fenics-adapter/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243738985,"owners_count":20340002,"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","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":["conjugate-heat-transfer","fenics","heat-transfer","multi-physics","precice","precice-adapter"],"created_at":"2025-03-05T20:53:53.125Z","updated_at":"2025-03-15T14:08:14.233Z","avatar_url":"https://github.com/precice.png","language":"Python","funding_links":["https://precice.org/community-support-precice"],"categories":[],"sub_categories":[],"readme":"# FEniCS-preCICE adapter\n\n\u003ca style=\"text-decoration: none\" href=\"https://github.com/precice/fenics-adapter/blob/master/LICENSE\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/precice/fenics-adapter.svg\" alt=\"GNU LGPL license\"\u003e\n\u003c/a\u003e\n\n\u003ca style=\"text-decoration: none\" href=\"https://doi.org/10.1016/j.softx.2021.100807\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://zenodo.org/badge/DOI/10.1016/j.softx.2021.100807.svg\" alt=\"DOI\"\u003e\n\u003c/a\u003e\n\n\u003ca style=\"text-decoration: none\" href=\"https://github.com/precice/fenics-adapter/actions/workflows/build-and-test.yml\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://github.com/precice/fenics-adapter/actions/workflows/build-and-test.yml/badge.svg\" alt=\"Build and Test\"\u003e\n\u003c/a\u003e\n\u003ca style=\"text-decoration: none\" href=\"https://github.com/precice/fenics-adapter/actions/workflows/run-tutorials.yml\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://github.com/precice/fenics-adapter/actions/workflows/run-tutorials.yml/badge.svg\" alt=\"Run preCICE Tutorials\"\u003e\n\u003c/a\u003e\n\u003ca style=\"text-decoration: none\" href=\"https://pypi.org/project/fenicsprecice/\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://github.com/precice/fenics-adapter/actions/workflows/pythonpublish.yml/badge.svg\" alt=\"Upload Python Package\"\u003e\n\u003c/a\u003e\n\npreCICE-adapter for the open source computing platform FEniCS.\n\n## Installing the package\n\nGenerally, we recommend to create a virtual environment and install the package there. The following commands will create the virtual environment `.venv`:\n\n```bash\npython3 -m venv --system-site-packages .venv\n. .venv/bin/activate\n```\n\nYou can replace `.venv` with `path/of/your/venv/venv_name` if you want to create the virtual environment somewhere else. The command `--system-site-packages` will allow the virtual environment to access the FEniCS installation on your system. Refer to the [Python documentation](https://docs.python.org/3/library/venv.html) for further details on virtual environments.\n\nIf you do not want to use a virtual environment, you might encounter the `error: externally-managed-environment` during installation of the adapter; this depends on your pip version and operating system. You can read why this error shows up [here](https://packaging.python.org/en/latest/specifications/externally-managed-environments/).\n\n### Using pip to install from PyPI\n\nIt is recommended to install [fenicsprecice from PyPI](https://pypi.org/project/fenicsprecice/) via\n\n```bash\npip install fenicsprecice\n```\n\nThis should work out of the box, if all dependencies are installed correctly. If you face problems during installation or you want to run the tests, see below for a list of dependencies and alternative installation procedures\n\n### Clone this repository and use pip\n\n#### Required dependencies\n\nMake sure to install the following dependencies:\n\n* [preCICE](https://github.com/precice/precice/wiki)\n* python3 (this adapter **only supports python3**)\n* [the python language bindings for preCICE](https://github.com/precice/python-bindings)\n* [FEniCS](https://fenicsproject.org/) (with Python interface, installed by default)\n* and scipy (`pip install scipy`)\n\n#### Build and install the adapter\n\nAfter cloning this repository and switching to the root directory (`fenics-adapter`), run ``pip install .`` from your shell.\n\n#### Test the adapter\n\nAs a first test, try to import the adapter via `python3 -c \"import fenicsprecice\"`.\n\nYou can run the other tests via `tox`.\nIf you want to run them separately, use `tox -e unit` and `tox -e integration` respectively.\n\nSingle tests can be also be run. For example the test `test_vector_write` in the file `test_write_read.py` can be run as follows:\n\n```bash\ntox -e all -- tests/integration/test_write_read.py::TestWriteandReadData::test_vector_write\n```\n\n#### Troubleshooting\n\n**FEniCS is suddenly broken:** There are two known issues with preCICE, fenicsprecice and FEniCS:\n\n* If you see `ImportError: cannot import name 'sub_forms_by_domain'` run `pip3 uninstall -y fenics-ufl`. For details, refer to [issue #103](https://github.com/precice/fenics-adapter/issues/103).\n* If you see `ImportError: cannot import name 'cellname2facetname' from 'ufl.cell'`, refer to [issue #154](https://github.com/precice/fenics-adapter/issues/154).\n* If you see `ModuleNotFoundError: No module named 'dolfin'` and have installed PETSc from source, refer to [this forum post](https://fenicsproject.discourse.group/t/modulenotfounderror-no-module-named-dolfin-if-petsc-dir-is-set/4407). Short version: Try to use the PETSc that comes with your system, if possible. Note that you can also [compile preCICE without PETSc](https://www.precice.org/installation-source-configuration.html), if necessary.\n\nIf this does not help, you can contact us on [gitter](https://gitter.im/precice/lobby) or [open an issue](https://github.com/precice/fenics-adapter/issues/new).\n\n## Use the adapter\n\nPlease refer to [our website](https://www.precice.org/adapter-fenics.html#how-can-i-use-my-own-solver-with-the-adapter-).\n\n## Packaging\n\nTo create and install the `fenicsprecice` Python package the following instructions were used: [\"How To Package Your Python Code\" from python-packaging.readthedocs.io](https://python-packaging.readthedocs.io/en/latest/index.html).\n\n## Citing\n\n* FEniCS-preCICE: If you are using this adapter (`fenics-adapter`), please refer to the [citing information on the FEniCS adapter](https://www.precice.org/adapter-fenics.html#how-to-cite).\n* preCICE: preCICE is an academic project, developed at the [Technical University of Munich](https://www5.in.tum.de/) and at the [University of Stuttgart](https://www.ipvs.uni-stuttgart.de/). If you use preCICE, please [cite preCICE](https://precice.org/publications.html#how-to-cite-precice).\n* FEniCS: If you are using FEniCS, please also consider the information on [the official FEniCS website on citing](https://fenicsproject.org/citing/).\n\n## Development history\n\nThe initial version of this adapter was developed by [Benjamin Rodenberg](https://www.cs.cit.tum.de/sccs/personen/benjamin-rodenberg/) during his research stay at Lund University in the group for [Numerical Analysis (Philipp Birken)](https://www.maths.lu.se/forskning/forskningsavdelningar/numerisk-analys/forskning/) in close collaboration with Peter Meisrimel.\n\n[Richard Hertrich](https://github.com/richahert) contributed the possibility to perform FSI simulations using the adapter in his [Bachelor thesis](https://mediatum.ub.tum.de/node?id=1520579).\n\n[Ishaan Desai](https://www.ipvs.uni-stuttgart.de/institute/team/Desai/) improved the user interface and extended the adapter to allow for parallel FEniCS computations and 3D cases in certain scenarios.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprecice%2Ffenics-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprecice%2Ffenics-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprecice%2Ffenics-adapter/lists"}