{ "info": { "author": "Roman Poya", "author_email": "roman_poya@yahoo.com", "bugtrack_url": null, "classifiers": [], "description": "[![Build Status](https://travis-ci.com/romeric/florence.svg?token=HFW6d19YsYpKDNwvtqDr&branch=master)](https://travis-ci.com/romeric/florence)\n[![Coverage Status](https://coveralls.io/repos/github/romeric/florence/badge.svg?branch=master&service=github)](https://coveralls.io/github/romeric/florence?branch=master)\n\n**Florence** is a Python-based computational framework for multi-physics simulations using the finite element and boundary 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 solver 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 >= 3.5\n- PyPy >= 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~~~", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/romeric/florence", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "Florence", "package_url": "https://pypi.org/project/Florence/", "platform": "Linux", "project_url": "https://pypi.org/project/Florence/", "project_urls": { "Homepage": "https://github.com/romeric/florence" }, "release_url": "https://pypi.org/project/Florence/0.1.5/", "requires_dist": null, "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "summary": "A Python based computational framework for integrated computer aided design, curvilinear mesh generation and finite and boundary element methods for linear and nonlinear analysis of solids and coupled multiphysics problems", "version": "0.1.5" }, "last_serial": 4100176, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "9d84dfb2241e08fd8cfabbe8028f11de", "sha256": "ccabb85a0880182c8034e09cefe17839b55f45a8bb8b87443c046c2ae7e239a1" }, "downloads": -1, "filename": "Florence-0.1.tar.gz", "has_sig": false, "md5_digest": "9d84dfb2241e08fd8cfabbe8028f11de", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "size": 392365, "upload_time": "2018-06-19T01:55:29", "url": "https://files.pythonhosted.org/packages/0c/df/f16788584758684bb70cc787d7d845b04ecd2f66ead23baeed91841fbeb3/Florence-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "3f9245494dafe924e8e38eda4f358f96", "sha256": "1d37f7414bcf13cb0b1fd1bd0d24125f4c10c2ba0a58e7e7205be00a29cd9eb8" }, "downloads": -1, "filename": "Florence-0.1.1-cp27-cp27m-macosx_10_12_x86_64.whl", "has_sig": false, "md5_digest": "3f9245494dafe924e8e38eda4f358f96", "packagetype": "bdist_wheel", "python_version": "cp27", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "size": 562912, "upload_time": "2018-06-19T03:10:22", "url": "https://files.pythonhosted.org/packages/b8/94/35197ad23e75f76b2968d2dc890c8e34fe430bc7e5afe43a911a862f7cc0/Florence-0.1.1-cp27-cp27m-macosx_10_12_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "5cb714757e662625ebf855184df2c317", "sha256": "4f4f4f8da8ea5e3e54033232380524c46bda3167b3c2fc165213c29a090436cf" }, "downloads": -1, "filename": "Florence-0.1.1.tar.gz", "has_sig": false, "md5_digest": "5cb714757e662625ebf855184df2c317", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "size": 392512, "upload_time": "2018-06-19T03:10:25", "url": "https://files.pythonhosted.org/packages/15/f3/a4fdc600729bbd6a795457611724b5e25120059626956c4726f26efbf159/Florence-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "19e29d5ec9b51f9667d06144a975b749", "sha256": "66bb240126c6584939522484b645c807e921362d89f7b8de4558c0d5dee04064" }, "downloads": -1, "filename": "Florence-0.1.2-cp27-cp27m-macosx_10_12_x86_64.whl", "has_sig": false, "md5_digest": "19e29d5ec9b51f9667d06144a975b749", "packagetype": "bdist_wheel", "python_version": "cp27", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "size": 562906, "upload_time": "2018-06-19T03:55:34", "url": "https://files.pythonhosted.org/packages/a4/92/476a60d03bea36a7eacbb7d2f1912b2f34c4d7fedf230c62ecf25eab576b/Florence-0.1.2-cp27-cp27m-macosx_10_12_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "0595bc5d173ea959a9d0b5ce14cc50be", "sha256": "40f276041131379859b309091b813a01819e789459f9c1474d7eeb061be05d45" }, "downloads": -1, "filename": "Florence-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0595bc5d173ea959a9d0b5ce14cc50be", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "size": 392573, "upload_time": "2018-06-19T03:55:37", "url": "https://files.pythonhosted.org/packages/fd/24/8b353ca0138aca29197f1defa52467f37ace980a335642c3a9fdd5a3f756/Florence-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "7e738b82b253503873e10a1eaa343b47", "sha256": "29100de01e4b965d160c42204161b7daead9c9096b98fa0c13b84a2faa74da0b" }, "downloads": -1, "filename": "Florence-0.1.3-cp27-cp27m-macosx_10_12_x86_64.whl", "has_sig": false, "md5_digest": "7e738b82b253503873e10a1eaa343b47", "packagetype": "bdist_wheel", "python_version": "cp27", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "size": 7616929, "upload_time": "2018-06-19T18:09:13", "url": "https://files.pythonhosted.org/packages/c9/d2/a7d212ad8f647c3f961c2c46b84d60cd0abdfa082558d793da3214fa0c59/Florence-0.1.3-cp27-cp27m-macosx_10_12_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "28e849b3b8e5699c112746c0fdf32968", "sha256": "9b04edd7eb9ae9ee7d3445eff44ec765145a6e78769a51ced0816a076362369d" }, "downloads": -1, "filename": "Florence-0.1.3.tar.gz", "has_sig": false, "md5_digest": "28e849b3b8e5699c112746c0fdf32968", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "size": 393174, "upload_time": "2018-06-19T18:09:17", "url": "https://files.pythonhosted.org/packages/9f/33/1848cd74a4db45f0a49ed4b2cf7c454cd7dd3961a7f1c6b71fbaa91e5911/Florence-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "61b356a0ab856733476955db441f397f", "sha256": "2068eaaf5e50a5cd688b640e93fa7459a0ab8650b6b705fdfe0745aa9fc75cbc" }, "downloads": -1, "filename": "Florence-0.1.4-cp27-cp27m-macosx_10_12_x86_64.whl", "has_sig": false, "md5_digest": "61b356a0ab856733476955db441f397f", "packagetype": "bdist_wheel", "python_version": "cp27", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "size": 7616352, "upload_time": "2018-06-19T22:38:02", "url": "https://files.pythonhosted.org/packages/1b/ba/39965be56b7ffc6ec19b3bc4e014cc4cafffb2348b6a02bc0812069caa03/Florence-0.1.4-cp27-cp27m-macosx_10_12_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "24ef7cff2426ac8bb1f4b3592a4fa4c7", "sha256": "75515d175a6ee04e6fbceedbe3ec8bce47e815490ba3cca2da5c65fab619608a" }, "downloads": -1, "filename": "Florence-0.1.4.tar.gz", "has_sig": false, "md5_digest": "24ef7cff2426ac8bb1f4b3592a4fa4c7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "size": 393420, "upload_time": "2018-06-19T22:38:06", "url": "https://files.pythonhosted.org/packages/dd/30/00141449c56709b29f2b45f48a6fe0a105d6ff36baf78342017e9d2c74ed/Florence-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "5cd85acc4ecc72b8963f3e0172ca16c3", "sha256": "ca10fd0905deeff9010cd40e49342b3beef63b63e42bf8dfce10ddbcd7f04c82" }, "downloads": -1, "filename": "Florence-0.1.5.tar.gz", "has_sig": false, "md5_digest": "5cd85acc4ecc72b8963f3e0172ca16c3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "size": 413250, "upload_time": "2018-07-25T11:11:14", "url": "https://files.pythonhosted.org/packages/e7/1b/d306fbb81e5e4d128b55df1d28aa27efacf4eae124495498b8173dee61f9/Florence-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5cd85acc4ecc72b8963f3e0172ca16c3", "sha256": "ca10fd0905deeff9010cd40e49342b3beef63b63e42bf8dfce10ddbcd7f04c82" }, "downloads": -1, "filename": "Florence-0.1.5.tar.gz", "has_sig": false, "md5_digest": "5cd85acc4ecc72b8963f3e0172ca16c3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "size": 413250, "upload_time": "2018-07-25T11:11:14", "url": "https://files.pythonhosted.org/packages/e7/1b/d306fbb81e5e4d128b55df1d28aa27efacf4eae124495498b8173dee61f9/Florence-0.1.5.tar.gz" } ] }