https://github.com/avitase/libgravix2

A fast yet precise simulation of conservative, attractive forces acting on point-like particles embedded onto the surface of a unit sphere.

https://github.com/avitase/libgravix2

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.8%) to scientific vocabulary

Keywords

c-api ode ode-solver simulation symplectic-integrator
Last synced: 5 months ago · JSON representation

Repository

A fast yet precise simulation of conservative, attractive forces acting on point-like particles embedded onto the surface of a unit sphere.

Basic Info
  • Host: GitHub
  • Owner: avitase
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage:
  • Size: 6.58 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 4
  • Releases: 0
Topics
c-api ode ode-solver simulation symplectic-integrator
Created about 4 years ago · Last pushed over 2 years ago
Metadata Files
Readme Contributing License

README.md

libgravix2 🌎🚀

Build docs Unit tests Test coverage

A fast yet precise simulation of conservative, attractive forces acting on point-like particles embedded onto the surface of a unit sphere. The force fields are generated by static points that are embedded on the surface of the same unit sphere. We implement different symmetric and symplectic integrators and expose a simple C-API to generate and propagate particles.

This library is meant to be a physics engine for small games where, e.g., missiles fly in the gravitational force fields of planets in a curved universe. It is fast, lightweight, and lends itself perfectly to be spawned in many concurrent instances.

🚧 WORK IN PROGRESS 🚧

This is all work in progress and any help is highly appreciated. If you find any bugs or want to improve the documentation, please submit a pull request or open an issue. There are already open issues, and you can help to close them!

If you plan to contribute, please read the CONTRIBUTING guide.

Documentation

Find the documentation of our C-API here: avitase.github.io/libgravix2/

Furthermore, our C-API can easily be wrapped in high-level languages. For example, we provide a minimalistic Python binding here: avitase.github.io/libgravix2/py-bindings/ and use it to showcase a few simple applications in a Jupyter notebook.

How to build

This is a C library with (almost) no external dependencies, except for: - C mathematical operations from math.h, e.g., libm.so.6 - Standard C library, e.g., libc.so.6 - that's all

Building is straightforward with cmake and its predefined CMake Presets:

libgravix2 $ cmake --preset=release [...] -- Configuring done -- Generating done -- Build files have been written to: build/release libgravix2 $ cmake --build build/release You'll now find the shared library under build/release/libgravix2.so. If you want to install the library system-wide, you can either copy this (and the other generated files) from the build directory manually or use CMake to install them automatically. libgravix2 $ cmake --install build/release If you prefer to find the files in non-default locations you have to set CMAKE_INSTALL_PREFIX during configuration, e.g., libgravix2 $ cmake --preset=release -DCMAKE_INSTALL_PREFIX=/some/path libgravix2 $ cmake --build build/release # as before libgravix2 $ cmake --install build/release # as before

There are more configuration options that can be set during compilation either by passing them directly via -D to cmake (as shown before with CMAKE_INSTALL_PREFIX) or via a graphical tool, such as ccmake: - CMAKE_BUILD_TYPE: Release (default) or Debug. If enabling unit tests, this has to be set to Debug. - ENABLE_TESTING: On or Off (default). Generate unit tests and require a Debug build. Tests can be run with ctest after building. - ENABLE_DOXYGEN: On or Off (default). Generate documentation and require a Doxygen installation. - GRVX_POT_TYPE: 2D (default) or 3D. - GRVX_N_POT: Approximation order of the force field. Only available if GRVX_POT_TYPE is set to 3D. (Default: 0) - GRVX_TRAJECTORY_SIZE: Size of trajectory. (Default: 100) - GRVX_INT_STEPS: Number of integration steps between trajectory points. (Default: 10) - GRVX_MIN_DIST: Smallest allowed distance between missiles and planets. (Default: 1 degree.) - GRVX_COMPOSITION_SCHEME: p2s1 , p4s3 , p4s5 , p6s9 or p8s15 (default).

Have a look into our documentation for more information about these options.

CMake package

We also export a CMake package upon installation to be used with the find_package command of CMake:

  • Package name: libgravix2
  • Target name: libgravix2::libgravix2

Example usage:

```cmake find_package(libgravix2 REQUIRED)

Declare the imported target as a build requirement using PRIVATE, where

project_target is a target created in the consuming project

targetlinklibraries( project_target PRIVATE libgravix2::libgravix2 ) ```

Owner

  • Name: Nis Meinert
  • Login: avitase
  • Kind: user
  • Company: Pasteur Labs

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 9
  • Total pull requests: 0
  • Average time to close issues: 26 days
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.56
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • avitase (9)
Pull Request Authors
Top Labels
Issue Labels
enhancement (5) documentation (1)
Pull Request Labels

Dependencies

bindings/python/requirements.txt pypi
  • numpy *
.github/workflows/build_docs.yml actions
  • actions/checkout v3 composite
  • actions/configure-pages v2 composite
  • actions/deploy-pages v1 composite
  • actions/upload-pages-artifact v1 composite
.github/workflows/coverage.yml actions
  • actions/checkout v3 composite
  • codecov/codecov-action v3 composite
.github/workflows/validate.yml actions
  • actions/checkout v3 composite
bindings/python/pyproject.toml pypi
doc/src/requirements.txt pypi
  • matplotlib *
  • numpy *