{"id":32607654,"url":"https://github.com/romeric/florence","last_synced_at":"2025-10-30T11:35:03.636Z","repository":{"id":36234121,"uuid":"40538446","full_name":"romeric/florence","owner":"romeric","description":"A finite element framework for Python's scientific stack: arbitrary order planar/curvilinear mesh generation and finite element methods for linear and nonlinear analysis of coupled multiphysics problems","archived":false,"fork":false,"pushed_at":"2025-07-18T18:49:00.000Z","size":3070,"stargazers_count":91,"open_issues_count":3,"forks_count":16,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-09-25T09:16:48.968Z","etag":null,"topics":["electromechanics","finite-elements","high-performance","mechanics","multiphysics","python"],"latest_commit_sha":null,"homepage":"","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/romeric.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":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-08-11T11:38:35.000Z","updated_at":"2025-08-29T13:31:21.000Z","dependencies_parsed_at":"2022-08-25T21:11:48.854Z","dependency_job_id":"fb8712fd-f968-4ae5-a162-9e22b68c11b9","html_url":"https://github.com/romeric/florence","commit_stats":{"total_commits":842,"total_committers":5,"mean_commits":168.4,"dds":"0.028503562945368155","last_synced_commit":"256777e369b0d2774887bd4ea69e1c42d1bc82f0"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/romeric/florence","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romeric%2Fflorence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romeric%2Fflorence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romeric%2Fflorence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romeric%2Fflorence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romeric","download_url":"https://codeload.github.com/romeric/florence/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romeric%2Fflorence/sbom","scorecard":{"id":783929,"data":{"date":"2025-08-11","repo":{"name":"github.com/romeric/florence","commit":"135bc3a539ccc62f9d8af7a0c61acea06e79afa6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","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":-1,"reason":"no workflows found","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":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Maintained","score":9,"reason":"11 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 9","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"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":"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:0","Info: FSF or OSI recognized license: MIT License: LICENSE: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":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 0.1.4 not signed: https://api.github.com/repos/romeric/florence/releases/11558800","Warn: release artifact 0.1.4 does not have provenance: https://api.github.com/repos/romeric/florence/releases/11558800"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: GHSA-6p56-wp2h-9hxr","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2019-41 / GHSA-qfc5-mcwq-26q8","Warn: Project is vulnerable to: PYSEC-2019-156 / GHSA-xp76-357g-9wqq","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T05:35:34.450Z","repository_id":36234121,"created_at":"2025-08-23T05:35:34.451Z","updated_at":"2025-08-23T05:35:34.451Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281796732,"owners_count":26563207,"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-30T02:00:06.501Z","response_time":61,"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":["electromechanics","finite-elements","high-performance","mechanics","multiphysics","python"],"created_at":"2025-10-30T11:35:01.337Z","updated_at":"2025-10-30T11:35:03.622Z","avatar_url":"https://github.com/romeric.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/romeric/florence.svg?token=HFW6d19YsYpKDNwvtqDr\u0026branch=master)](https://travis-ci.com/romeric/florence)\n[![Coverage Status](https://coveralls.io/repos/github/romeric/florence/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/romeric/florence?branch=master)\n\n**Florence** is a Python-based computational framework for the numerical simulations of multi-physics problems using the finite element methods.\n\n# Features\nA non-exhaustive list of core features:\n- High order planar and curved finite and boundary elements (line, tri, quad, tet, hex)\n- In-built CAD-conformal curvilinear mesh generator\n- Powerful in-built pre and post processor with the ability to visualise high order curved meshes\n- Poisson, electrostatic and heat transfer solvers\n- Linear, geometrically linearised and fully nonlinear solid/structural mechanics solvers\n- Linear, geometrically linearised and fully nonlinear electromechanics solvers\n- Implicit and explicit dynamic solvers with contact formulation\n- Generic monolithic, staggered and multigrid solvers for coupled multiphysics driven problems\n- Strain gradient and micropolar elasticity and electro-elasticty solvers\n- A suite of advanced hyperelastic, electrostatic and electro-hyperelastic material models\n- Ability to read/write mesh/simulation data to/from gmsh, Salome, GID, Tetgen, obj, FRO, VTK and HDF5\n- Support for heterogeneous computing using SIMD, shared parallelism, cloud-based parallelism and cluster-based parallelism\n- Interfaces to a suite of sparse direct and iterative solvers including MUMPS, Pardiso, Petsc and hypre\n\nIn addition, the framework also provides Python interfaces to many low-level numerical subroutines written in C, C++ and Cython.\n\n# Platform support\nFlorence supports all major operating systems including Linux, macOS and Windows (under Cygwin/MinGW) under\n- Python 2.7\n- Python \u003e= 3.5\n- PyPy \u003e= v5.7.0\n\n\n# Dependencies\nThe following packages are hard dependencies\n- [Fastor](https://github.com/romeric/Fastor):          Data parallel (SIMD) FEM assembler\n- cython\n- numpy\n- scipy\n\nThe following packages are optional (but recommended) dependencies\n- [PostMesh](https://github.com/romeric/PostMesh):      High order curvilinear mesh generator\n- pyevtk\n- matplotlib\n- mayavi\n- scikit-umfpack\n- pyamg\n- psutil\n- h5py\n\nIn addition, it is recommended to have an optimised BLAS library such as OpenBLAS or MKL installed and configured on your machine.\n\n# Installation\n## The easy way\nusing pip\n\n```\npip install Florence\n```\n\nFor pip installation to work you need to have `Fastor` installed. You can achieve this by\n\n```\ncd ~\ngit clone https://github.com/romeric/Fastor\nmv Fastor/ /usr/local/include/Fastor/\n```\n\nIt is also a good practice to set your compilers before pip installing florence\n\n```\nexport CC=/path/to/c/compiler\nexport CXX=/path/to/c++/compiler\n```\n\n## Building from source\nHave a look at `travis.yml` file for directions on installing florence's core library. First install `cython`, `numpy` and `scipy`. Download `Fastor` headers and place them under their default location `/usr/local/include/Fastor`\n\n```\ncd ~\ngit clone https://github.com/romeric/Fastor\nmv Fastor/ /usr/local/include/Fastor/\n```\n\nThen installation of the core library is as easy as\n\n```\ngit clone https://github.com/romeric/florence\ncd florence\npython setup.py build\nexport PYTHONPATH=\"/path/to/florence:$PYTHONPATH\"\n```\n\nThis builds many low-level cython modules, ahead of time. Options can be given to `setup.py` for instance\n\n```\npython setup.py build BLAS=mkl CXX=/usr/local/bin/g++ CC=~/LLVM/clang\n```\n\nBy default, florence builds in parallel using all the machine's CPU cores. To limit the build process to a specific number of cores, use the `np` flag for instance, for serial build one can trigger the build process as\n\n```\npython setup.py build np=1\n```\n\n## Configuring MUMPS direct sparse solver\nFlorence can automatically switch to `MUMPS` sparse direct solver if available. To install `MUMPS`, the easiest way is to use `homebrew` on macOS and `linuxbrew` on linux:\n\n```\nbrew install mumps --without-mpi --with-openblas\ngit clone https://github.com/romeric/MUMPS.py\ncd MUMPS.py\npython setup.py build\npython setup.py install\n```\n\nAnd whenever `MUMPS` solver is needed, just open a new terminal window/tab and do (this is the default setting for linuxbrew)\n```\nexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/linuxbrew/.linuxbrew/lib\n```\n\n## Configuring Pardiso direct sparse solver\nThe direct sparse solver shipped with `MKL`, `Pardiso` can be used if `MKL` is available. Both Anaconda and Intel distribution for python ship these.\nIf `MKL` is installed, the low-level FEM assembler in florence is also automatically linked to it during compilation, as long as \"`BLAS=mkl`\" flag is issued to `setup.py`.\n\n```shell\nconda install -c haasad pypardiso\n```\nWe typically do not recommed adding `anaconda/bin` to your path. Hence, whenever `MKL` features or `Pardiso` solver is needed, just open a new terminal window/tab and type\n\n```\nexport PATH=\"/path/to/anaconda2/bin:$PATH\"\n```\n\n# Philosophy\nFlorence follows scipy's philosophy of providing a high level pythonic interface to finite element analysis of partial differential equations. It is a light weight library that depends only on the most ubiquitous python packages namely numpy, scipy and cython. Yet it is aimed to deliver high performance numerical computations on a range modern architectures. It is backend is designed to be configurable for plugging new solvers such as Petsc's and hypre's parallel solvers.\n\n# Documentation\nDocumentation is available under [wiki](https://github.com/romeric/florence/wiki) pages. Furthermore, a series of well explained examples are provided in the example folder that cover most of the functionality of florence.\n\nTo get a quick taste of Florence, let us consider the Laplacian for example. Setting up and solving the Laplace equation using fourth order hexahedral Lagrange shape functions over a cube is as simple as\n\n~~~python\nimport numpy as np\nfrom Florence import *\n\n\ndef simple_laplace():\n    \"\"\"An example of solving the Laplace equation using\n        fourth order hexahedral elements on a cube\n    \"\"\"\n\n    # generate a linear hexahedral mesh on a cube\n    mesh = Mesh()\n    mesh.Cube(element_type=\"hex\", nx=6, ny=6, nz=6)\n    # generate the corresponding fourth order mesh\n    mesh.GetHighOrderMesh(p=4)\n\n    # set up boundary conditions\n    def dirichlet_function(mesh):\n        # create boundary flags - nan values would be treated as free boundary\n        boundary_data = np.zeros(mesh.nnode)+np.NAN\n        # potential at left (Y=0)\n        Y_0 = np.isclose(mesh.points[:,1],0)\n        boundary_data[Y_0] = 0.\n        # potential at right (Y=1)\n        Y_1 = np.isclose(mesh.points[:,1],mesh.points[:,1].max())\n        boundary_data[Y_1] = 10.\n\n        return boundary_data\n\n    boundary_condition = BoundaryCondition()\n    boundary_condition.SetDirichletCriteria(dirichlet_function, mesh)\n\n    # set up material\n    material = IdealDielectric(mesh.InferSpatialDimension(), eps=2.35)\n    # set up variational form\n    formulation = LaplacianFormulation(mesh)\n    # set up solver\n    fem_solver = FEMSolver(optimise=True)\n    # solve\n    results = fem_solver.Solve( boundary_condition=boundary_condition,\n                                material=material,\n                                formulation=formulation,\n                                mesh=mesh)\n\n    # write results to vtk file\n    results.WriteVTK(\"laplacian_results\")\n\n\nif __name__ == \"__main__\":\n    simple_laplace()\n~~~","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromeric%2Fflorence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromeric%2Fflorence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromeric%2Fflorence/lists"}