Metadata-Version: 2.4
Name: femtoscope
Version: 0.2.3
Summary: Python code for solving nonlinear PDEs from modified gravity models on unbounded domains
Author: Hugo Lévy
License: MIT License
        
        Copyright (c) 2024 ONERA
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Repository, https://github.com/onera/femtoscope
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: colorcet
Requires-Dist: gmsh==4.11.1
Requires-Dist: jax>=0.4.26
Requires-Dist: matplotlib
Requires-Dist: meshio==4.4.6
Requires-Dist: numpy<2
Requires-Dist: pandas
Requires-Dist: pdoc>=14.5.1
Requires-Dist: pyevtk
Requires-Dist: pytest
Requires-Dist: pyvista
Requires-Dist: sfepy>=2024.3
Dynamic: license-file

<p align="center">
  <img src="femtoscope/images/logo.png" alt="Femtoscope Logo" width="150"/>
</p>

<p align="center">
  <a href="https://pypi.org/project/femtoscope/">
    <img src="https://img.shields.io/pypi/v/femtoscope" alt="PyPI Version"/>
  </a>
  <a href="https://anaconda.org/conda-forge/femtoscope">
    <img src="https://anaconda.org/conda-forge/femtoscope/badges/version.svg" alt="Conda Version"/>
  </a>
</p>

<h1 align="center">femtoscope</h1>

The *femtoscope* software was written as part of [Hugo Lévy's PhD thesis](https://theses.hal.science/tel-04789073v1/document) (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
```console
pip install femtoscope
```
or from conda-forge
```console
 conda install conda-forge::femtoscope
```

### Generate documentation
The documentation may be generated by running
```console
python -m femtoscope.misc.generate_documentation
cd doc/
```
Alternatively, one can use the CLI Entry Point
```console
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](https://theses.hal.science/tel-04789073v1/document), chapter 4.

### Run tests

To check the installation, it is recommended to run the tests bundle with
```console
python -m femtoscope.tests.run_tests
```
Alternatively, one can use the CLI Entry Point
```console
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
	```console
	conda env create -f femtoscope.yml
	```
	Note that this process is likely to take several tens of minutes.
2) Activate the new environment
	```console
	conda activate femtoscope
	```
3) Verify that the new environment was installed correctly
	```console
    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

```shell
├───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

![](femtoscope/images/uml-femtoscope.svg)

## 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}
}
```
