Skip to content

Commit

Permalink
add new references, improve paper
Browse files Browse the repository at this point in the history
  • Loading branch information
schuhmaj committed Oct 11, 2023
1 parent c8fbea1 commit 2566610
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 6 deletions.
36 changes: 36 additions & 0 deletions paper/paper.bib
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,39 @@ @article{vsprlak2021use
year={2021},
publisher={Elsevier}
}
@article{biscani2020pygmo,
doi = {10.21105/joss.02338},
url = {https://doi.org/10.21105/joss.02338},
year = {2020},
publisher = {The Open Journal},
volume = {5},
number = {53},
pages = {2338},
author = {Francesco Biscani and Dario Izzo},
title = {A parallel global multiobjective framework for optimization: pagmo},
journal = {Journal of Open Source Software}
}

@misc{gaskell2008eros,
title = {{Eros polyhedral model}},
howpublished = {\url{https://arcnav.psi.edu/urn:nasa:pds:gaskell.ast-eros.shape-model}},
note = {last accessed: 15.04.2023},
year={2008},
author={Gaskell, R. W.}
}

@inproceedings{zhang2010modeling,
title={Modeling and Analysis of Gravity Field of 433Eros Using Polyhedron Model Method},
author={Zhang, Zhenjiang and Cui, Hutao and Cui, Pingyuan and Yu, Meng},
booktitle={2010 2nd International Conference on Information Engineering and Computer Science},
pages={1--4},
year={2010},
organization={IEEE}
}

@inproceedings{martin2023physics,
title={The physics-informed neural network gravity model revisited: model generation III},
author={Martin, JR and Schaub, H},
booktitle={33rd AAS/AIAA Space Flight Mechanics Meeting, Austin, United States},
year={2023}
}
15 changes: 9 additions & 6 deletions paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ affiliations:
index: 1
- name: Advanced Concepts Team, European Space Agency, European Space Research and Technology Centre (ESTEC), Keplerlaan 1, 2201 AZ Noordwijk, The Netherlands
index: 2
date: 07 July 2023
date: 11 October 2023
bibliography: paper.bib

---

# Summary

Polyhedral gravity models are essential for modeling the gravitational field of irregular bodies, such as asteroids and comets.
We present an open-source C++ library for the efficient, parallelized computation of a polyhedral gravity model following the line integral approach by Tsoulis [@tsoulis2012analytical]. A slim, easy-to-use Python interface using *pybind11* accompanies the library. The library is particularly focused on delivering high performance and scalability, which we achieve through vectorization and parallelization with *xsimd* and *thrust*, respectively. For example, the average evaluation of 1 out of 1000 randomly sampled points took 253 microseconds on a M1 Pro chip for the mesh of Eros consisting of 24235 vertices and 14744 faces (see \autoref{fig:mesh}).
We present an open-source C++ library for the efficient, parallelized computation of a polyhedral gravity model following the line integral approach by Tsoulis [@tsoulis2012analytical]. A slim, easy-to-use Python interface using *pybind11* accompanies the library. The library is particularly focused on delivering high performance and scalability, which we achieve through vectorization and parallelization with *xsimd* and *thrust*, respectively. For example, the average evaluation of 1 out of 1000 randomly sampled points took 253 microseconds on a M1 Pro chip for the mesh of Eros consisting of 24235 vertices and 14744 faces (see downscaled in \autoref{fig:mesh} [@gaskell2008eros]).
The library supports many common formats, such as *.stl*, *.off*, *.ply*, *.mesh* and *tetgen*'s *.node* and *.face* [@hang2015tetgen]. These properties make the application of this implementation straightforward to (re-)use in an arbitrary context.

![Downscaled mesh of (433) Eros to 10% of its vertices and faces.\label{fig:mesh}](figures/eros.png){ width=50% }
![Downscaled mesh of (433) Eros to 10% of its original vertices and faces.\label{fig:mesh}](figures/eros.png){ width=50% }

# Statement of Need

Expand All @@ -52,11 +52,13 @@ The computation of the gravitational potential and acceleration is a computation

While some research code for these models exists, they are not focused on usability and are limited to FORTRAN\footnote{\url{https://software.seg.org/2012/0001/index.html}} and proprietary software like MATLAB\footnote{\url{https://github.com/Gavriilidou/GPolyhedron}}. There is a lack of well-documented, actively maintained open-source implementations, particularly in modern programming languages, and with a focus on scalability and performance.

The presented software has already seen application in several research works. It has been used to optimize trajectories around the highly irregular comet 67P/Churyumov-Gerasimenko with the goal of maximizing the gravity signal using a genetic optimization algorithm of pygmo [@marak2023trajectory]. In the context of that work, the presented solution was extended to enable caching and even serialization to persistent memory on the C++ side. A change that enables researchers to, e.g., efficiently propagate an orbit since the computation points can be given individually and do not need to be all known from the beginning.
This circumstance and the fact that polyhedral models are often used in studying gravitational fields, e.g., for Eros [@zhang2010modeling], or as a reference for creating new neural models [@martin2023physics] make an easy-to-install implementation necessary.

The presented software has already seen application in several research works. It has been used to optimize trajectories around the highly irregular comet 67P/Churyumov-Gerasimenko with the goal of maximizing the gravity signal [@marak2023trajectory] using pygmo [@biscani2020pygmo]. In the context of that work, the presented implementation was extended to enable caching and even serialization to persistent memory on the C++ side. A change that enables researchers to, e.g., efficiently propagate an orbit since the computation points can be given apiece and do not need to be all known from the beginning.

Further, it has been used to study the effectiveness of so-called neural density fields [@izzo2022geodesy], where it served as ground truth to (pre-)train neural networks representing the density distribution of an arbitrarily shaped body [@schuhmacher2023investigation].

Thus, this model is highly versatile overall due to its easy-to-use API and can be used in a wide range of applications. Especially due to the availability on major platforms like Windows, macOS, and Linux for ARM64 and x86_64.
Thus, this model is highly versatile overall due to its easy-to-use API. It can be used in a wide range of applications, especially due to the availability on major platforms like Windows, macOS, and Linux for ARM64 and x86_64.
We hope it will enable further research in the field, especially related to recent machine-learning techniques, which typically rely on Python implementations.

# Polyhedral Model
Expand All @@ -65,7 +67,7 @@ On a mathematical level, the implemented model follows the line integral approac

Implementation-wise, it makes use of the inherent parallelization opportunity of the approach as it iterates over the mesh elements. This parallelization is achieved via *thrust*, which allows utilizing *OpenMP* and *Intel TBB*. On a finer scale, individual, costly operations have been investigated, and, e.g., the \texttt{arctan} operations have been vectorized using *xsimd*. On the application side, the user can choose between the functional interface for evaluating the full gravity tensor or the object-oriented \texttt{GravityEvaluable}, providing the same functionality while implementing a caching mechanism to avoid recomputing mesh properties that can be shared between multipoint evaluation, such as the face normals.

![UML Component Diagram of the implementation. External dependencies in blue. Internal component decomposition in grey.\label{fig:implementation}](figures/PolyhedralGravityModel.png)
![UML Component Diagram of the implementation. External dependencies are depicted in blue. Internal components are colored in grey.\label{fig:implementation}](figures/PolyhedralGravityModel.png)

Extensive tests using GoogleTest for the C++ side and pytest for the Python interface are employed via GitHub Actions to ensure the (continued) correctness of the implementation.

Expand All @@ -82,3 +84,4 @@ The project is open to contributions via pull requests, with instructions on how
We provide detailed usage instructions in the technical documentation on ReadTheDocs\footnote{\url{https://polyhedral-gravity-model-cpp.readthedocs.io/en/latest/}}. Additionally, a minimal working example is given in the repository readme, and more extensive examples, including a walkthrough over the available options as a *Jupyter* notebook\footnote{\url{https://github.com/esa/polyhedral-gravity-model/blob/main/script/polyhedral-gravity.ipynb}}.

# References

0 comments on commit 2566610

Please sign in to comment.