{"id":20956017,"url":"https://github.com/olivierverdier/femshape","last_synced_at":"2026-04-20T21:35:56.538Z","repository":{"id":136950809,"uuid":"155703719","full_name":"olivierverdier/femshape","owner":"olivierverdier","description":"Library for computing shape invariants of planar curves using finite element method","archived":false,"fork":false,"pushed_at":"2019-03-22T10:43:34.000Z","size":2255,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-31T10:30:28.295Z","etag":null,"topics":["fenics","finite-element-methods","math","shape"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olivierverdier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-01T11:16:54.000Z","updated_at":"2023-10-22T05:02:14.000Z","dependencies_parsed_at":"2024-06-19T22:15:07.994Z","dependency_job_id":null,"html_url":"https://github.com/olivierverdier/femshape","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/olivierverdier/femshape","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivierverdier%2Ffemshape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivierverdier%2Ffemshape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivierverdier%2Ffemshape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivierverdier%2Ffemshape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olivierverdier","download_url":"https://codeload.github.com/olivierverdier/femshape/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivierverdier%2Ffemshape/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32067617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T21:26:33.338Z","status":"ssl_error","status_checked_at":"2026-04-20T21:26:22.081Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["fenics","finite-element-methods","math","shape"],"created_at":"2024-11-19T01:23:40.958Z","updated_at":"2026-04-20T21:35:56.521Z","avatar_url":"https://github.com/olivierverdier.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a Python library for computing shape invariants of planar curves using FEM and the FEniCS package. To run the module, [FEniCS](http://fenicsproject.org) must be installed.\r\n\r\nIt is the supporting code for the paper [Currents and finite elements as tools for shape space](https://arxiv.org/abs/1702.02780) by James Benn, Stephen Marsland, Robert I McLachlan, Klas Modin and Olivier Verdier.\r\n\r\n## Getting started ##\r\n\r\nThe simplest way to calculate the invariants of a curve are as follows.\r\n\r\n1. Create a space\r\n\r\n```python\r\nspace = Space()\r\n```\r\nCheck the documentation of the `Space` class to see the available options.\r\n\r\n2. Create a curve\r\n\r\nThis is just an arbitrary array of size P x 2, where P is the number of points.\r\nFor instance,\r\n```python\r\nts = np.arange(0, 2*np.pi, 200)\r\ncurve = .7*np.array([np.cos(ts), np.sin(3*ts)]).T\r\n```\r\n\r\n3. Compute the associated current\r\n\r\n```python\r\ncurrent = Current(space, curve)\r\n```\r\n\r\nYou have now access to the property `invariants` which contains the result of the current evaluated on the basis of one-forms.\r\n\r\nYou can inspect the invariants using\r\n```python\r\nplot_invariants(current)\r\n```\r\n\r\n\u003cimg alt=\"invariants\" src=\"https://raw.githubusercontent.com/olivierverdier/femshape/master/invariants.png\"/\u003e\r\n\r\n4. Compute the representer\r\n\r\nGivne an underlying Hilbert space structure on the one forms, one can compute the associated representer of the current:\r\n\r\n```python\r\nrepresenter = Representer(current, scale=.2)\r\n```\r\n\r\nYou can plot the result using\r\n\r\n```python\r\nplot_representer(representer)\r\n```\r\n\r\n\u003cimg alt=\"representer\" src=\"https://raw.githubusercontent.com/olivierverdier/femshape/master/representer.png\"/\u003e\r\n\r\n## Further examples\r\n\r\nThe notebooks contain further examples:\r\n\r\n- [Accuracy of norm computation](https://gist.github.com/olivierverdier/267d1298259f3e0735b49c4e4c88b6a3)\r\n- [Sensitivity with respect to perturbations](https://gist.github.com/olivierverdier/72d2f7b751703f6498f4650be59e4b62)\r\n- [Shape classification with PCA](https://gist.github.com/olivierverdier/9d457d75670d949c0e93321449b60dd0)\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folivierverdier%2Ffemshape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folivierverdier%2Ffemshape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folivierverdier%2Ffemshape/lists"}