Skip to main content

Python code for solving nonlinear PDEs from modified gravity models on unbounded domains

Project description

Femtoscope Logo

PyPI Version Conda Version

femtoscope

The femtoscope software was written as part of Hugo Lévy's PhD thesis (2021-2024). This Python code can be used to investigate different models of modified gravity within complex geometries on unbounded domains.

Installation

femtoscope can be either installed from PyPI

pip install femtoscope

or from conda-forge

 conda install conda-forge::femtoscope

Generate documentation

The documentation may be generated by running

python -m femtoscope.misc.generate_documentation
cd doc/

Alternatively, one can use the CLI Entry Point

generate-femtoscope-docs
cd doc/

Note that these two options will generate the documentation at the current directory. Additional information about femtoscope can be found in Hugo Lévy's PhD thesis, chapter 4.

Run tests

To check the installation, it is recommended to run the tests bundle with

python -m femtoscope.tests.run_tests

Alternatively, one can use the CLI Entry Point

run-femtoscope-tests

Getting started

Getting started notebooks are available at https://github.com/onera/femtoscope/tree/main/tutorials.

Development mode

Clone the femtoscope repository https://github.com/onera/femtoscope/ which contains the source files. It is recommended to run femtoscope on a dedicated virtual environment. The femtoscope.yml file can be used to automate the creation of a conda environment as follows:

  1. Create the environment
    conda env create -f femtoscope.yml
    
    Note that this process is likely to take several tens of minutes.
  2. Activate the new environment
    conda activate femtoscope
    
  3. Verify that the new environment was installed correctly
    conda env list
    
    and make sure femtoscope appears in the list.

note The project uses Python >= 3.9

Main dependencies

  • Python >= 3.9
  • meshio == 4.4.6 (read & write mesh files)
  • numpy < 2 (sfepy is not yet compatible with numpy 2.x)
  • pandas >= 1.5.3
  • pyevtk (creation of .vtk files)
  • pyvista (visualization of FEM results)
  • scipy
  • sfepy >= 2024.3 (FEM engine)
  • pdoc >= 14.5.1 (patch against polyfill.io malicious CDN)
  • gmsh == 4.11.1 (some features of femtoscope are broken in newer versions)

Tree structure

├───doc
│
├───femtoscope
│   ├───core	# weak form representation & solvers   ├───data	# I/O files      ├───mesh
│         └───geo
│      ├───model
│      ├───result
│      └───tmp
│   ├───display
│   ├───images
│   ├───inout	# mesh & VTK generation   ├───misc
│   ├───physics	# Poisson & Chameleon classes   ├───tests	# unit & integration tests
│
└───tutorials	# hands-on notebooks

UML Diagram

Citing

If you would like to cite femtoscope in a paper or presentation, please use the following reference:

@article{hlevy:femtoscope,
	doi = {10.1103/PhysRevD.106.124021},
	url = {https://link.aps.org/doi/10.1103/PhysRevD.106.124021},
	author = {Lévy, Hugo and Bergé, Joël and Uzan, Jean-Philippe},
	title = {Solving nonlinear Klein-Gordon equations on unbounded domains via
	the Finite Element Method},
	month = {09},
	year = {2022}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

femtoscope-0.2.3.tar.gz (417.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

femtoscope-0.2.3-py3-none-any.whl (439.7 kB view details)

Uploaded Python 3

File details

Details for the file femtoscope-0.2.3.tar.gz.

File metadata

  • Download URL: femtoscope-0.2.3.tar.gz
  • Upload date:
  • Size: 417.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for femtoscope-0.2.3.tar.gz
Algorithm Hash digest
SHA256 eca4b45df2d5a5d92423d471d9b4437847a74e43efce471cb56f51045a96002a
MD5 c787ee248ec82333f68e9891f1eeeb08
BLAKE2b-256 2063bdaaa0e58fd21a6c2b27eca2f2bde10de7946c0c3c06ffd71cf66c055e12

See more details on using hashes here.

Provenance

The following attestation bundles were made for femtoscope-0.2.3.tar.gz:

Publisher: release.yaml on onera/femtoscope

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file femtoscope-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: femtoscope-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 439.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for femtoscope-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5741649301c93739b64de10b9766005fea47db706e5a7d35a02fd4f1ad61ec56
MD5 658a55a76539386e48c9ccb26f8d4215
BLAKE2b-256 24e87573270c66ca98a61b4806366f3ac3cda5b493d5c3b4e26385019a17a297

See more details on using hashes here.

Provenance

The following attestation bundles were made for femtoscope-0.2.3-py3-none-any.whl:

Publisher: release.yaml on onera/femtoscope

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page