fiesta-pkg 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fiesta_pkg-1.0.2/PKG-INFO +146 -0
- fiesta_pkg-1.0.2/README.md +104 -0
- fiesta_pkg-1.0.2/VERSION +1 -0
- fiesta_pkg-1.0.2/docs/source/conf.py +56 -0
- fiesta_pkg-1.0.2/fiesta/__init__.py +12 -0
- fiesta_pkg-1.0.2/fiesta/boundary/__init__.py +18 -0
- fiesta_pkg-1.0.2/fiesta/boundary/mpi_periodic.py +216 -0
- fiesta_pkg-1.0.2/fiesta/boundary/mpi_randoms.py +215 -0
- fiesta_pkg-1.0.2/fiesta/boundary/periodic.py +322 -0
- fiesta_pkg-1.0.2/fiesta/boundary/randoms.py +167 -0
- fiesta_pkg-1.0.2/fiesta/coords/__init__.py +16 -0
- fiesta_pkg-1.0.2/fiesta/coords/mpi_points.py +639 -0
- fiesta_pkg-1.0.2/fiesta/coords/points.py +153 -0
- fiesta_pkg-1.0.2/fiesta/dtfe/__init__.py +19 -0
- fiesta_pkg-1.0.2/fiesta/dtfe/dtfe2d.py +562 -0
- fiesta_pkg-1.0.2/fiesta/dtfe/dtfe3d.py +759 -0
- fiesta_pkg-1.0.2/fiesta/dtfe/dtfe4grid.py +1709 -0
- fiesta_pkg-1.0.2/fiesta/dtfe/mpi_dtfe4grid.py +1146 -0
- fiesta_pkg-1.0.2/fiesta/gridsph/__init__.py +9 -0
- fiesta_pkg-1.0.2/fiesta/gridsph/gridsph.py +221 -0
- fiesta_pkg-1.0.2/fiesta/gridsph/integral_image.py +46 -0
- fiesta_pkg-1.0.2/fiesta/gridsph/mpi_gridsph.py +412 -0
- fiesta_pkg-1.0.2/fiesta/interp/__init__.py +6 -0
- fiesta_pkg-1.0.2/fiesta/interp/bilinear.py +273 -0
- fiesta_pkg-1.0.2/fiesta/interp/trilinear.py +339 -0
- fiesta_pkg-1.0.2/fiesta/kdtree/__init__.py +3 -0
- fiesta_pkg-1.0.2/fiesta/kdtree/kdtree1d.py +87 -0
- fiesta_pkg-1.0.2/fiesta/kdtree/kdtree2d.py +97 -0
- fiesta_pkg-1.0.2/fiesta/kdtree/kdtree3d.py +112 -0
- fiesta_pkg-1.0.2/fiesta/maths/__init__.py +10 -0
- fiesta_pkg-1.0.2/fiesta/maths/diff.py +213 -0
- fiesta_pkg-1.0.2/fiesta/maths/matrix.py +122 -0
- fiesta_pkg-1.0.2/fiesta/maths/mpi_diff.py +116 -0
- fiesta_pkg-1.0.2/fiesta/p2g/__init__.py +11 -0
- fiesta_pkg-1.0.2/fiesta/p2g/deconvol.py +255 -0
- fiesta_pkg-1.0.2/fiesta/p2g/mpi_part2grid.py +271 -0
- fiesta_pkg-1.0.2/fiesta/p2g/part2grid.py +214 -0
- fiesta_pkg-1.0.2/fiesta/randoms/__init__.py +3 -0
- fiesta_pkg-1.0.2/fiesta/randoms/cartesian.py +102 -0
- fiesta_pkg-1.0.2/fiesta/sph/__init__.py +12 -0
- fiesta_pkg-1.0.2/fiesta/sph/kernels.py +87 -0
- fiesta_pkg-1.0.2/fiesta/sph/mpi_sph4grid.py +312 -0
- fiesta_pkg-1.0.2/fiesta/sph/sph1d.py +167 -0
- fiesta_pkg-1.0.2/fiesta/sph/sph2d.py +167 -0
- fiesta_pkg-1.0.2/fiesta/sph/sph3d.py +174 -0
- fiesta_pkg-1.0.2/fiesta/sph/sph4grid.py +269 -0
- fiesta_pkg-1.0.2/fiesta/src/__init__.py +69 -0
- fiesta_pkg-1.0.2/fiesta/src/bilinear.py +307 -0
- fiesta_pkg-1.0.2/fiesta/src/delaunay2d.py +190 -0
- fiesta_pkg-1.0.2/fiesta/src/delaunay3d.py +244 -0
- fiesta_pkg-1.0.2/fiesta/src/differentiate.py +248 -0
- fiesta_pkg-1.0.2/fiesta/src/grid.py +52 -0
- fiesta_pkg-1.0.2/fiesta/src/gridsph.py +831 -0
- fiesta_pkg-1.0.2/fiesta/src/matrix.py +147 -0
- fiesta_pkg-1.0.2/fiesta/src/part2grid_2d.py +291 -0
- fiesta_pkg-1.0.2/fiesta/src/part2grid_3d.py +346 -0
- fiesta_pkg-1.0.2/fiesta/src/part2grid_pix.py +306 -0
- fiesta_pkg-1.0.2/fiesta/src/part2grid_wei.py +105 -0
- fiesta_pkg-1.0.2/fiesta/src/polygon.py +72 -0
- fiesta_pkg-1.0.2/fiesta/src/polyhedron.py +46 -0
- fiesta_pkg-1.0.2/fiesta/src/trilinear.py +429 -0
- fiesta_pkg-1.0.2/fiesta/src/voronoi2d.py +96 -0
- fiesta_pkg-1.0.2/fiesta/src/voronoi3d.py +111 -0
- fiesta_pkg-1.0.2/fiesta/utils/__init__.py +7 -0
- fiesta_pkg-1.0.2/fiesta/utils/complex.py +37 -0
- fiesta_pkg-1.0.2/fiesta/utils/lists.py +15 -0
- fiesta_pkg-1.0.2/fiesta/utils/vectors.py +41 -0
- fiesta_pkg-1.0.2/fiesta_pkg.egg-info/PKG-INFO +146 -0
- fiesta_pkg-1.0.2/fiesta_pkg.egg-info/SOURCES.txt +95 -0
- fiesta_pkg-1.0.2/fiesta_pkg.egg-info/dependency_links.txt +1 -0
- fiesta_pkg-1.0.2/fiesta_pkg.egg-info/requires.txt +20 -0
- fiesta_pkg-1.0.2/fiesta_pkg.egg-info/top_level.txt +4 -0
- fiesta_pkg-1.0.2/pyproject.toml +59 -0
- fiesta_pkg-1.0.2/setup.cfg +4 -0
- fiesta_pkg-1.0.2/tests/mpi_tests/test_mpi_boundary.py +194 -0
- fiesta_pkg-1.0.2/tests/mpi_tests/test_mpi_coords.py +373 -0
- fiesta_pkg-1.0.2/tests/mpi_tests/test_mpi_diff.py +113 -0
- fiesta_pkg-1.0.2/tests/mpi_tests/test_mpi_dtfe4grid.py +245 -0
- fiesta_pkg-1.0.2/tests/mpi_tests/test_mpi_gridsph.py +377 -0
- fiesta_pkg-1.0.2/tests/mpi_tests/test_mpi_interp.py +340 -0
- fiesta_pkg-1.0.2/tests/mpi_tests/test_mpi_part2grid.py +227 -0
- fiesta_pkg-1.0.2/tests/mpi_tests/test_mpi_randoms.py +108 -0
- fiesta_pkg-1.0.2/tests/mpi_tests/test_mpi_routines.py +215 -0
- fiesta_pkg-1.0.2/tests/mpi_tests/test_mpi_sph4grid.py +353 -0
- fiesta_pkg-1.0.2/tests/normal_tests/test_boundary.py +126 -0
- fiesta_pkg-1.0.2/tests/normal_tests/test_coords.py +91 -0
- fiesta_pkg-1.0.2/tests/normal_tests/test_dtfe.py +747 -0
- fiesta_pkg-1.0.2/tests/normal_tests/test_gridsph.py +456 -0
- fiesta_pkg-1.0.2/tests/normal_tests/test_interp.py +106 -0
- fiesta_pkg-1.0.2/tests/normal_tests/test_kdtree.py +79 -0
- fiesta_pkg-1.0.2/tests/normal_tests/test_maths.py +52 -0
- fiesta_pkg-1.0.2/tests/normal_tests/test_mpi_dtfe4grid.py +339 -0
- fiesta_pkg-1.0.2/tests/normal_tests/test_p2g.py +178 -0
- fiesta_pkg-1.0.2/tests/normal_tests/test_randoms.py +26 -0
- fiesta_pkg-1.0.2/tests/normal_tests/test_sph.py +128 -0
- fiesta_pkg-1.0.2/tests/normal_tests/test_sph4grid.py +331 -0
- fiesta_pkg-1.0.2/tests/normal_tests/test_utils.py +45 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fiesta-pkg
|
|
3
|
+
Version: 1.0.2
|
|
4
|
+
Summary: FIESTA is a python library for general interpolation of field values from uniform and non-uniform input points in 2D and 3D.
|
|
5
|
+
Author-email: Krishna Naidoo <krishna.naidoo.11@ucl.ac.uk>
|
|
6
|
+
Maintainer-email: Krishna Naidoo <krishna.naidoo.11@ucl.ac.uk>
|
|
7
|
+
License: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/knaidoo29/FIESTA
|
|
9
|
+
Project-URL: Repository, https://github.com/knaidoo29/FIESTA
|
|
10
|
+
Project-URL: Documentation, https://fiesta-docs.readthedocs.io/en/latest/
|
|
11
|
+
Project-URL: Bug Tracker, https://github.com/knaidoo29/FIESTA/issues
|
|
12
|
+
Project-URL: Changelog, https://github.com/knaidoo29/FIESTA/blob/main/CHANGELOG.md
|
|
13
|
+
Keywords: astronomy,interpolation,mathematics,simulations
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: Natural Language :: English
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
Requires-Dist: numba
|
|
26
|
+
Requires-Dist: numpy
|
|
27
|
+
Requires-Dist: scipy
|
|
28
|
+
Requires-Dist: shift-fft
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: black; extra == "dev"
|
|
31
|
+
Requires-Dist: flake8; extra == "dev"
|
|
32
|
+
Requires-Dist: ipython; extra == "dev"
|
|
33
|
+
Requires-Dist: jupyter; extra == "dev"
|
|
34
|
+
Requires-Dist: mypy; extra == "dev"
|
|
35
|
+
Provides-Extra: docs
|
|
36
|
+
Requires-Dist: numpydoc; extra == "docs"
|
|
37
|
+
Requires-Dist: sphinx; extra == "docs"
|
|
38
|
+
Requires-Dist: sphinx-rtd-theme; extra == "docs"
|
|
39
|
+
Provides-Extra: test
|
|
40
|
+
Requires-Dist: pytest>=6.0; extra == "test"
|
|
41
|
+
Requires-Dist: pytest-cov; extra == "test"
|
|
42
|
+
|
|
43
|
+

|
|
45
|
+
|
|
46
|
+
# FIESTA: Field Interpolation and Estimation using Spatial Techniques and Algorithms
|
|
47
|
+
|
|
48
|
+
<p align="center">
|
|
49
|
+
<a href="https://github.com/knaidoo29/FIESTA/actions/workflows/tests.yml">
|
|
50
|
+
<img src="https://github.com/knaidoo29/FIESTA/actions/workflows/tests.yml/badge.svg" alt="Python Tests">
|
|
51
|
+
</a>
|
|
52
|
+
<a href="https://codecov.io/gh/knaidoo29/FIESTA" >
|
|
53
|
+
<img src="https://codecov.io/gh/knaidoo29/FIESTA/branch/main/graph/badge.svg?token=RFSEAKTTKG"/>
|
|
54
|
+
</a>
|
|
55
|
+
<a href="https://img.shields.io/badge/Python-3.9%20|%203.10%20|%203.11%20|%203.12-blue">
|
|
56
|
+
<img src="https://img.shields.io/badge/Python-3.9%20|%203.10%20|%203.11%20|%203.12-blue" alt="Python Version Support">
|
|
57
|
+
</a>
|
|
58
|
+
<a href="https://img.shields.io/github/v/release/knaidoo29/FIESTA">
|
|
59
|
+
<img src="https://img.shields.io/github/v/release/knaidoo29/FIESTA" alt="Version">
|
|
60
|
+
</a>
|
|
61
|
+
<a href="https://pypi.org/project/fiesta-pkg/">
|
|
62
|
+
<img src="https://img.shields.io/pypi/v/fiesta-pkg.svg" alt="PyPI version">
|
|
63
|
+
</a>
|
|
64
|
+
<a href="https://fiesta-docs.readthedocs.io/">
|
|
65
|
+
<img src="https://readthedocs.org/projects/fiesta-docs/badge/?version=latest" alt="Documentation Status">
|
|
66
|
+
</a>
|
|
67
|
+
<a href="https://github.com/knaidoo29/FIESTA">
|
|
68
|
+
<img src="https://img.shields.io/badge/GitHub-repo-blue?logo=github" alt="GitHub repository">
|
|
69
|
+
</a>
|
|
70
|
+
<a href="https://img.shields.io/github/stars/knaidoo29/fiesta">
|
|
71
|
+
<img src="https://img.shields.io/github/stars/knaidoo29/fiesta" alt="github: stars">
|
|
72
|
+
</a>
|
|
73
|
+
<a href="https://img.shields.io/github/stars/knaidoo29/fiesta">
|
|
74
|
+
<img src="https://img.shields.io/github/forks/knaidoo29/fiesta" alt="github: forks">
|
|
75
|
+
</a>
|
|
76
|
+
<a href="https://opensource.org/licenses/MIT">
|
|
77
|
+
<img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT">
|
|
78
|
+
</a>
|
|
79
|
+
<a href="https://github.com/psf/black">
|
|
80
|
+
<img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black">
|
|
81
|
+
</a>
|
|
82
|
+
<!-- <a href="https://doi.org/10.5281/zenodo.17093446">
|
|
83
|
+
<img src="https://zenodo.org/badge/DOI/10.5281/zenodo.17093446.svg" alt="zenodo: DOI">
|
|
84
|
+
</a> -->
|
|
85
|
+
</p>
|
|
86
|
+
|
|
87
|
+
## Introduction
|
|
88
|
+
|
|
89
|
+
``FIESTA`` is a python library for general interpolation from uniform and non-uniform input points. The library is written in python with numba acceleration for speed. The library has the *optional* capability to be used on large data-sets by distributing jobs across multiple processes via ``MPI``. This relies on the ``mpi4py`` library and the ``MPI`` object from the ``shift-fft`` package (see [here](https://shift.readthedocs.io/en/latest/mpiutils.html)) which is passed as an additional object into ``MPI`` related functions.
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
## Dependencies
|
|
93
|
+
|
|
94
|
+
* [numba](https://numba.pydata.org/)
|
|
95
|
+
* [numpy](http://www.numpy.org/)
|
|
96
|
+
* [scipy](http://scipy.org/)
|
|
97
|
+
* [shift-fft](https://shift.readthedocs.io/en/latest/index.html)
|
|
98
|
+
* [mpi4py](https://mpi4py.readthedocs.io/en/stable/) [Optional: enables MPI distributed processes]
|
|
99
|
+
|
|
100
|
+
## Installation
|
|
101
|
+
|
|
102
|
+
FIESTA can be installed via ``pip``:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
pip install fiesta-pkg
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
or by cloning the repository:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
git clone https://github.com/knaidoo29/fiesta.git
|
|
112
|
+
cd FIESTA
|
|
113
|
+
pip install .
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Once this is done you should be able to call `fiesta` from python:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
import fiesta
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
To use the ``MPI`` functionality please take a look at the documentation in FIESTA which instructs users how to use the ``shift-fft`` ``MPI`` object and how to run these distributed jobs successfully without errors or MPI related hanging.
|
|
123
|
+
|
|
124
|
+
## Documentation
|
|
125
|
+
|
|
126
|
+
In depth documentation and tutorials are provided [here](https://fiesta-docs.readthedocs.io/).
|
|
127
|
+
|
|
128
|
+
## Citation
|
|
129
|
+
|
|
130
|
+
If you use **FIESTA** in your work, please cite:
|
|
131
|
+
|
|
132
|
+
<!-- [](https://doi.org/10.5281/zenodo.17093446)
|
|
133
|
+
|
|
134
|
+
```bibtex
|
|
135
|
+
@software{naidoo_shift_2025,
|
|
136
|
+
author = {Naidoo, Krishna},
|
|
137
|
+
title = {SHIFT: a scalable MPI library for computing fast Fourier transforms in python},
|
|
138
|
+
year = 2025,
|
|
139
|
+
publisher = {Zenodo},
|
|
140
|
+
doi = {10.5281/zenodo.17093446},
|
|
141
|
+
url = {https://doi.org/10.5281/zenodo.17093446}}
|
|
142
|
+
``` -->
|
|
143
|
+
|
|
144
|
+
## Support
|
|
145
|
+
|
|
146
|
+
If you have any issues with the code or want to suggest ways to improve it please open a new issue ([here](https://github.com/knaidoo29/FIESTA/issues)) or (if you don't have a github account) email _krishna.naidoo.11@ucl.ac.uk_.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+

|
|
3
|
+
|
|
4
|
+
# FIESTA: Field Interpolation and Estimation using Spatial Techniques and Algorithms
|
|
5
|
+
|
|
6
|
+
<p align="center">
|
|
7
|
+
<a href="https://github.com/knaidoo29/FIESTA/actions/workflows/tests.yml">
|
|
8
|
+
<img src="https://github.com/knaidoo29/FIESTA/actions/workflows/tests.yml/badge.svg" alt="Python Tests">
|
|
9
|
+
</a>
|
|
10
|
+
<a href="https://codecov.io/gh/knaidoo29/FIESTA" >
|
|
11
|
+
<img src="https://codecov.io/gh/knaidoo29/FIESTA/branch/main/graph/badge.svg?token=RFSEAKTTKG"/>
|
|
12
|
+
</a>
|
|
13
|
+
<a href="https://img.shields.io/badge/Python-3.9%20|%203.10%20|%203.11%20|%203.12-blue">
|
|
14
|
+
<img src="https://img.shields.io/badge/Python-3.9%20|%203.10%20|%203.11%20|%203.12-blue" alt="Python Version Support">
|
|
15
|
+
</a>
|
|
16
|
+
<a href="https://img.shields.io/github/v/release/knaidoo29/FIESTA">
|
|
17
|
+
<img src="https://img.shields.io/github/v/release/knaidoo29/FIESTA" alt="Version">
|
|
18
|
+
</a>
|
|
19
|
+
<a href="https://pypi.org/project/fiesta-pkg/">
|
|
20
|
+
<img src="https://img.shields.io/pypi/v/fiesta-pkg.svg" alt="PyPI version">
|
|
21
|
+
</a>
|
|
22
|
+
<a href="https://fiesta-docs.readthedocs.io/">
|
|
23
|
+
<img src="https://readthedocs.org/projects/fiesta-docs/badge/?version=latest" alt="Documentation Status">
|
|
24
|
+
</a>
|
|
25
|
+
<a href="https://github.com/knaidoo29/FIESTA">
|
|
26
|
+
<img src="https://img.shields.io/badge/GitHub-repo-blue?logo=github" alt="GitHub repository">
|
|
27
|
+
</a>
|
|
28
|
+
<a href="https://img.shields.io/github/stars/knaidoo29/fiesta">
|
|
29
|
+
<img src="https://img.shields.io/github/stars/knaidoo29/fiesta" alt="github: stars">
|
|
30
|
+
</a>
|
|
31
|
+
<a href="https://img.shields.io/github/stars/knaidoo29/fiesta">
|
|
32
|
+
<img src="https://img.shields.io/github/forks/knaidoo29/fiesta" alt="github: forks">
|
|
33
|
+
</a>
|
|
34
|
+
<a href="https://opensource.org/licenses/MIT">
|
|
35
|
+
<img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT">
|
|
36
|
+
</a>
|
|
37
|
+
<a href="https://github.com/psf/black">
|
|
38
|
+
<img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black">
|
|
39
|
+
</a>
|
|
40
|
+
<!-- <a href="https://doi.org/10.5281/zenodo.17093446">
|
|
41
|
+
<img src="https://zenodo.org/badge/DOI/10.5281/zenodo.17093446.svg" alt="zenodo: DOI">
|
|
42
|
+
</a> -->
|
|
43
|
+
</p>
|
|
44
|
+
|
|
45
|
+
## Introduction
|
|
46
|
+
|
|
47
|
+
``FIESTA`` is a python library for general interpolation from uniform and non-uniform input points. The library is written in python with numba acceleration for speed. The library has the *optional* capability to be used on large data-sets by distributing jobs across multiple processes via ``MPI``. This relies on the ``mpi4py`` library and the ``MPI`` object from the ``shift-fft`` package (see [here](https://shift.readthedocs.io/en/latest/mpiutils.html)) which is passed as an additional object into ``MPI`` related functions.
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## Dependencies
|
|
51
|
+
|
|
52
|
+
* [numba](https://numba.pydata.org/)
|
|
53
|
+
* [numpy](http://www.numpy.org/)
|
|
54
|
+
* [scipy](http://scipy.org/)
|
|
55
|
+
* [shift-fft](https://shift.readthedocs.io/en/latest/index.html)
|
|
56
|
+
* [mpi4py](https://mpi4py.readthedocs.io/en/stable/) [Optional: enables MPI distributed processes]
|
|
57
|
+
|
|
58
|
+
## Installation
|
|
59
|
+
|
|
60
|
+
FIESTA can be installed via ``pip``:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
pip install fiesta-pkg
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
or by cloning the repository:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
git clone https://github.com/knaidoo29/fiesta.git
|
|
70
|
+
cd FIESTA
|
|
71
|
+
pip install .
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Once this is done you should be able to call `fiesta` from python:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
import fiesta
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
To use the ``MPI`` functionality please take a look at the documentation in FIESTA which instructs users how to use the ``shift-fft`` ``MPI`` object and how to run these distributed jobs successfully without errors or MPI related hanging.
|
|
81
|
+
|
|
82
|
+
## Documentation
|
|
83
|
+
|
|
84
|
+
In depth documentation and tutorials are provided [here](https://fiesta-docs.readthedocs.io/).
|
|
85
|
+
|
|
86
|
+
## Citation
|
|
87
|
+
|
|
88
|
+
If you use **FIESTA** in your work, please cite:
|
|
89
|
+
|
|
90
|
+
<!-- [](https://doi.org/10.5281/zenodo.17093446)
|
|
91
|
+
|
|
92
|
+
```bibtex
|
|
93
|
+
@software{naidoo_shift_2025,
|
|
94
|
+
author = {Naidoo, Krishna},
|
|
95
|
+
title = {SHIFT: a scalable MPI library for computing fast Fourier transforms in python},
|
|
96
|
+
year = 2025,
|
|
97
|
+
publisher = {Zenodo},
|
|
98
|
+
doi = {10.5281/zenodo.17093446},
|
|
99
|
+
url = {https://doi.org/10.5281/zenodo.17093446}}
|
|
100
|
+
``` -->
|
|
101
|
+
|
|
102
|
+
## Support
|
|
103
|
+
|
|
104
|
+
If you have any issues with the code or want to suggest ways to improve it please open a new issue ([here](https://github.com/knaidoo29/FIESTA/issues)) or (if you don't have a github account) email _krishna.naidoo.11@ucl.ac.uk_.
|
fiesta_pkg-1.0.2/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.0.2
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Configuration file for the Sphinx documentation builder.
|
|
2
|
+
import os
|
|
3
|
+
import sys
|
|
4
|
+
|
|
5
|
+
sys.path.insert(0, os.path.abspath("../.."))
|
|
6
|
+
|
|
7
|
+
import vinfo
|
|
8
|
+
|
|
9
|
+
# -- Project information
|
|
10
|
+
|
|
11
|
+
project = "FIESTA"
|
|
12
|
+
copyright = "2021-2026, Krishna Naidoo"
|
|
13
|
+
author = "Krishna Naidoo"
|
|
14
|
+
|
|
15
|
+
version = vinfo.vstr
|
|
16
|
+
|
|
17
|
+
# -- General configuration
|
|
18
|
+
|
|
19
|
+
extensions = [
|
|
20
|
+
"sphinx.ext.duration",
|
|
21
|
+
"sphinx.ext.doctest",
|
|
22
|
+
"sphinx.ext.autodoc",
|
|
23
|
+
"sphinx.ext.autosummary",
|
|
24
|
+
"sphinx.ext.intersphinx",
|
|
25
|
+
"sphinx.ext.napoleon",
|
|
26
|
+
"sphinx.ext.mathjax",
|
|
27
|
+
"sphinx_simplepdf",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
source_suffix = [".rst", ".md"]
|
|
31
|
+
|
|
32
|
+
# Napoleon settings
|
|
33
|
+
napoleon_numpy_docstring = True
|
|
34
|
+
|
|
35
|
+
intersphinx_mapping = {
|
|
36
|
+
"python": ("https://docs.python.org/3/", None),
|
|
37
|
+
"sphinx": ("https://www.sphinx-doc.org/en/master/", None),
|
|
38
|
+
}
|
|
39
|
+
intersphinx_disabled_domains = ["std"]
|
|
40
|
+
|
|
41
|
+
templates_path = ["_templates"]
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
# -- Options for HTML output
|
|
45
|
+
|
|
46
|
+
# html_theme = 'sphinx_rtd_theme'
|
|
47
|
+
html_theme = "furo"
|
|
48
|
+
|
|
49
|
+
html_static_path = ["_static"]
|
|
50
|
+
html_theme_options = {
|
|
51
|
+
"light_logo": "FiEsta_logo_small_white.jpg",
|
|
52
|
+
"dark_logo": "FiEsta_logo_small_black.jpg",
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
# -- Options for EPUB output
|
|
56
|
+
epub_show_urls = "footnote"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from . import boundary
|
|
2
|
+
from . import coords
|
|
3
|
+
from . import dtfe
|
|
4
|
+
from . import maths
|
|
5
|
+
from . import p2g
|
|
6
|
+
from . import interp
|
|
7
|
+
from . import kdtree
|
|
8
|
+
from . import randoms
|
|
9
|
+
from . import sph
|
|
10
|
+
from . import src
|
|
11
|
+
from . import utils
|
|
12
|
+
from . import gridsph
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from .periodic import buffer_periodic
|
|
2
|
+
from .periodic import subbox_buffer_periodic
|
|
3
|
+
from .periodic import buffer_periodic_2D
|
|
4
|
+
from .periodic import subbox_buffer_periodic_2D
|
|
5
|
+
from .periodic import buffer_periodic_3D
|
|
6
|
+
from .periodic import subbox_buffer_periodic_3D
|
|
7
|
+
|
|
8
|
+
from .randoms import buffer_random_2D
|
|
9
|
+
from .randoms import buffer_random_3D
|
|
10
|
+
|
|
11
|
+
from .mpi_periodic import mpi_buffer_internal_2D
|
|
12
|
+
from .mpi_periodic import mpi_buffer_internal_3D
|
|
13
|
+
from .mpi_periodic import mpi_buffer_periodic_2D
|
|
14
|
+
from .mpi_periodic import mpi_buffer_periodic_3D
|
|
15
|
+
|
|
16
|
+
from .mpi_randoms import mpi_buffer_random_2D
|
|
17
|
+
from .mpi_randoms import mpi_buffer_random_3D
|
|
18
|
+
from .mpi_randoms import mpi_buffer_random_utils
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
|
|
3
|
+
from . import periodic
|
|
4
|
+
|
|
5
|
+
from typing import Union, List
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def mpi_buffer_internal_2D(
|
|
9
|
+
data: np.ndarray,
|
|
10
|
+
boxsize: float,
|
|
11
|
+
buffer_length: float,
|
|
12
|
+
MPI: object,
|
|
13
|
+
origin: float = 0.0,
|
|
14
|
+
) -> np.ndarray:
|
|
15
|
+
"""
|
|
16
|
+
Internal buffer particles between partitions are moved up and down.
|
|
17
|
+
|
|
18
|
+
Parameters
|
|
19
|
+
----------
|
|
20
|
+
data : array
|
|
21
|
+
Where columns 0 and 1 correspond to the x and y coordinates.
|
|
22
|
+
xboxsize : float
|
|
23
|
+
Boxsize along x-axis.
|
|
24
|
+
buffer_length : float
|
|
25
|
+
Length of the buffer region.
|
|
26
|
+
MPI : class object
|
|
27
|
+
MPIutils MPI class object.
|
|
28
|
+
origin : float, optional
|
|
29
|
+
Origin point.
|
|
30
|
+
|
|
31
|
+
Returns
|
|
32
|
+
-------
|
|
33
|
+
datap : array
|
|
34
|
+
Periodic data values.
|
|
35
|
+
"""
|
|
36
|
+
if np.isscalar(origin):
|
|
37
|
+
xorigin = origin
|
|
38
|
+
else:
|
|
39
|
+
xorigin = origin[0]
|
|
40
|
+
if np.isscalar(boxsize):
|
|
41
|
+
xboxsize = boxsize
|
|
42
|
+
else:
|
|
43
|
+
xboxsize = boxsize[0]
|
|
44
|
+
cond = np.where(data[:, 0] <= xorigin + buffer_length)[0]
|
|
45
|
+
data_send_down = MPI.send_down(data[cond])
|
|
46
|
+
cond = np.where(data[:, 0] >= xorigin + xboxsize - buffer_length)[0]
|
|
47
|
+
data_send_up = MPI.send_up(data[cond])
|
|
48
|
+
if MPI.rank == 0:
|
|
49
|
+
# data_send_up[:,0] -= xboxsize
|
|
50
|
+
datap = np.vstack([data, data_send_down])
|
|
51
|
+
elif MPI.rank == MPI.size - 1:
|
|
52
|
+
# data_send_down[:,0] += xboxsize
|
|
53
|
+
datap = np.vstack([data, data_send_up])
|
|
54
|
+
else:
|
|
55
|
+
datap = np.vstack([data, data_send_down, data_send_up])
|
|
56
|
+
return datap
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def mpi_buffer_periodic_2D(
|
|
60
|
+
data: np.ndarray,
|
|
61
|
+
boxsize: Union[float, List[float]],
|
|
62
|
+
buffer_length: float,
|
|
63
|
+
MPI: object,
|
|
64
|
+
origin: Union[float, List[float]] = 0.0,
|
|
65
|
+
include_internal: bool = True,
|
|
66
|
+
) -> np.ndarray:
|
|
67
|
+
"""
|
|
68
|
+
Generates random buffer particles around a 2D box.
|
|
69
|
+
|
|
70
|
+
Parameters
|
|
71
|
+
----------
|
|
72
|
+
data : array
|
|
73
|
+
Where columns 0 and 1 are x and y.
|
|
74
|
+
boxsize : float or list
|
|
75
|
+
Boxsize.
|
|
76
|
+
buffer_length : float
|
|
77
|
+
Length of the buffer region.
|
|
78
|
+
MPI : class object
|
|
79
|
+
MPIutils MPI class object.
|
|
80
|
+
origin : float or list, optional
|
|
81
|
+
Origin point.
|
|
82
|
+
include_internal : bool, optional
|
|
83
|
+
Whether to include internal buffer particles.
|
|
84
|
+
|
|
85
|
+
Returns
|
|
86
|
+
-------
|
|
87
|
+
datap : array
|
|
88
|
+
Periodic data values.
|
|
89
|
+
"""
|
|
90
|
+
if np.isscalar(origin):
|
|
91
|
+
xorigin, yorigin = origin, origin
|
|
92
|
+
else:
|
|
93
|
+
xorigin, yorigin = origin[0], origin[1]
|
|
94
|
+
if np.isscalar(boxsize):
|
|
95
|
+
xboxsize, yboxsize = boxsize, boxsize
|
|
96
|
+
else:
|
|
97
|
+
xboxsize, yboxsize = boxsize[0], boxsize[1]
|
|
98
|
+
datap = periodic.buffer_periodic(data, 1, yboxsize, buffer_length, origin=yorigin)
|
|
99
|
+
cond = np.where(datap[:, 0] <= xorigin + buffer_length)[0]
|
|
100
|
+
data_send_down = MPI.send_down(datap[cond])
|
|
101
|
+
cond = np.where(datap[:, 0] >= xorigin + xboxsize - buffer_length)[0]
|
|
102
|
+
data_send_up = MPI.send_up(datap[cond])
|
|
103
|
+
if MPI.rank == 0:
|
|
104
|
+
data_send_up[:, 0] -= xboxsize
|
|
105
|
+
elif MPI.rank == MPI.size - 1:
|
|
106
|
+
data_send_down[:, 0] += xboxsize
|
|
107
|
+
datap = np.vstack([datap, data_send_down, data_send_up])
|
|
108
|
+
if include_internal:
|
|
109
|
+
datap = mpi_buffer_internal_2D(datap, boxsize, buffer_length, MPI, origin)
|
|
110
|
+
return datap
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def mpi_buffer_internal_3D(
|
|
114
|
+
data: np.ndarray,
|
|
115
|
+
boxsize: float,
|
|
116
|
+
buffer_length: float,
|
|
117
|
+
MPI: object,
|
|
118
|
+
origin: float = 0.0,
|
|
119
|
+
) -> np.ndarray:
|
|
120
|
+
"""
|
|
121
|
+
Internal buffer particles between partitions are moved up and down.
|
|
122
|
+
|
|
123
|
+
Parameters
|
|
124
|
+
----------
|
|
125
|
+
data : array
|
|
126
|
+
Where columns 0, 1 and 2 correspond to the x, y and z coordinates.
|
|
127
|
+
xboxsize : float
|
|
128
|
+
Boxsize along x-axis.
|
|
129
|
+
buffer_length : float
|
|
130
|
+
Length of the buffer region.
|
|
131
|
+
MPI : class object
|
|
132
|
+
MPIutils MPI class object.
|
|
133
|
+
origin : float, optional
|
|
134
|
+
Origin point.
|
|
135
|
+
|
|
136
|
+
Returns
|
|
137
|
+
-------
|
|
138
|
+
datap : array
|
|
139
|
+
Periodic data values.
|
|
140
|
+
"""
|
|
141
|
+
if np.isscalar(origin):
|
|
142
|
+
xorigin = origin
|
|
143
|
+
else:
|
|
144
|
+
xorigin = origin[0]
|
|
145
|
+
if np.isscalar(boxsize):
|
|
146
|
+
xboxsize = boxsize
|
|
147
|
+
else:
|
|
148
|
+
xboxsize = boxsize[0]
|
|
149
|
+
cond = np.where(data[:, 0] <= xorigin + buffer_length)[0]
|
|
150
|
+
data_send_down = MPI.send_down(data[cond])
|
|
151
|
+
cond = np.where(data[:, 0] >= xorigin + xboxsize - buffer_length)[0]
|
|
152
|
+
data_send_up = MPI.send_up(data[cond])
|
|
153
|
+
if MPI.rank == 0:
|
|
154
|
+
# data_send_up[:,0] -= xboxsize
|
|
155
|
+
datap = np.vstack([data, data_send_down])
|
|
156
|
+
elif MPI.rank == MPI.size - 1:
|
|
157
|
+
# data_send_down[:,0] += xboxsize
|
|
158
|
+
datap = np.vstack([data, data_send_up])
|
|
159
|
+
else:
|
|
160
|
+
datap = np.vstack([data, data_send_down, data_send_up])
|
|
161
|
+
return datap
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
def mpi_buffer_periodic_3D(
|
|
165
|
+
data: np.ndarray,
|
|
166
|
+
boxsize: Union[float, List[float]],
|
|
167
|
+
buffer_length: float,
|
|
168
|
+
MPI: object,
|
|
169
|
+
origin: Union[float, List[float]] = 0.0,
|
|
170
|
+
include_internal: bool = True,
|
|
171
|
+
) -> np.ndarray:
|
|
172
|
+
"""
|
|
173
|
+
Generates random buffer particles around a 3D box.
|
|
174
|
+
|
|
175
|
+
Parameters
|
|
176
|
+
----------
|
|
177
|
+
data : array
|
|
178
|
+
Where columns 0, 1 and 2 correspond to the x, y and z coordinates.
|
|
179
|
+
xboxsize : float or list
|
|
180
|
+
Boxsize along x-axis.
|
|
181
|
+
buffer_length : float
|
|
182
|
+
Length of the buffer region.
|
|
183
|
+
MPI : class object
|
|
184
|
+
MPIutils MPI class object.
|
|
185
|
+
origin : float or list, optional
|
|
186
|
+
Origin point.
|
|
187
|
+
include_internal : bool, optional
|
|
188
|
+
Whether to include internal buffer particles.
|
|
189
|
+
|
|
190
|
+
Returns
|
|
191
|
+
-------
|
|
192
|
+
datap : array
|
|
193
|
+
Periodic data values.
|
|
194
|
+
"""
|
|
195
|
+
if np.isscalar(origin):
|
|
196
|
+
xorigin, yorigin, zorigin = origin, origin, origin
|
|
197
|
+
else:
|
|
198
|
+
xorigin, yorigin, zorigin = origin[0], origin[1], origin[2]
|
|
199
|
+
if np.isscalar(boxsize):
|
|
200
|
+
xboxsize, yboxsize, zboxsize = boxsize, boxsize, boxsize
|
|
201
|
+
else:
|
|
202
|
+
xboxsize, yboxsize, zboxsize = boxsize[0], boxsize[1], boxsize[2]
|
|
203
|
+
datap = periodic.buffer_periodic(data, 1, yboxsize, buffer_length, origin=yorigin)
|
|
204
|
+
datap = periodic.buffer_periodic(datap, 2, zboxsize, buffer_length, origin=zorigin)
|
|
205
|
+
cond = np.where(datap[:, 0] <= xorigin + buffer_length)[0]
|
|
206
|
+
data_send_down = MPI.send_down(datap[cond])
|
|
207
|
+
cond = np.where(datap[:, 0] >= xorigin + xboxsize - buffer_length)[0]
|
|
208
|
+
data_send_up = MPI.send_up(datap[cond])
|
|
209
|
+
if MPI.rank == 0:
|
|
210
|
+
data_send_up[:, 0] -= xboxsize
|
|
211
|
+
elif MPI.rank == MPI.size - 1:
|
|
212
|
+
data_send_down[:, 0] += xboxsize
|
|
213
|
+
datap = np.vstack([datap, data_send_down, data_send_up])
|
|
214
|
+
if include_internal:
|
|
215
|
+
datap = mpi_buffer_internal_3D(datap, boxsize, buffer_length, MPI, origin)
|
|
216
|
+
return datap
|