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.
femtoscope can be either installed from PyPI
pip install femtoscopeor from conda-forge
conda install conda-forge::femtoscopeThe 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.
Note on running tests
femtoscope's test suite uses the pytest framework, which should be installed separately by users. Install it with pip install pytest (PyPI) or conda install conda-forge::pytest (conda-forge).
To check the installation, it is recommended to run the tests bundle with
python -m femtoscope.tests.run_testsAlternatively, one can use the CLI Entry Point
run-femtoscope-testsGetting started notebooks are available at https://github.com/onera/femtoscope/tree/main/tutorials.
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:
- Create the environment
Note that this process is likely to take several tens of minutes.
conda env create -f femtoscope.yml - Activate the new environment
conda activate femtoscope - Verify that the new environment was installed correctly
and make sure femtoscope appears in the list.
conda env list
note The project uses Python >= 3.9
- 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
.vtkfiles) - 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)
├───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 notebooksIf 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}
}
