Git Product home page Git Product logo

riccipy's Introduction

EinsteinPy logo

Name

EinsteinPy

Website

https://einsteinpy.org/

Version

0.5.dev0

astropy docslatest Join the chat at https://gitter.im/EinsteinPy-Project/EinsteinPy riotchat mailing license

circleci appveyor codecov

EinsteinPy is an open-source pure Python package dedicated to the study of problems arising in General Relativity and gravitational physics. Using EinsteinPy, it is possible to approach problems symbolically as well as numerically. On the symbolic side, EinsteinPy provides a robust API, which allows users to access several predefined metrics or to define custom metrics and perform symbolic calculations on them. Computation of quantities, such as terms of metric tensors, Christoffel symbols, Riemann Curvature tensor, Ricci tensor, stress-energy tensor and more are all supported and extensible, since the symbolic modules are built on top of SymPy. On the numerical side, EinsteinPy provides tools to calculate and visualize geodesics, metric singularities and hypersurface embeddings in certain spacetimes. We hope to extend the package to include more features in the future. EinsteinPy is released under the MIT license.

Documentation

docslatest docsstable

Complete documentation, including a user guide and an API reference, can be perused on the wonderful Read the Docs.

Examples

mybinder

Several tutorial Jupyter notebooks on specific applications of EinsteinPy can be found in the examples directory. You can launch a Jupyter notebook instance in the cloud using binder to run and edit these notebooks without installing anything. Try it out!

Requirements

EinsteinPy requires the following Python packages:

  • NumPy, for basic numerical routines
  • SciPy, for solving ordinary differential equations
  • SymPy, for symbolic calculations
  • Astropy, for handling conversion between physical units
  • Matplotlib, for producing static visualizations
  • Plotly, for producing interactive visualizations
  • Numba, for accelerating the code

EinsteinPy is currently tested on Linux, Windows and macOS on Python 3.7 and 3.8, against the latest NumPy.

Platform Site Status
Linux CircleCI circleci
macOS Github Actions
Windows x64 Appveyor appveyor

Installation

Currently, the recommended way to install EinsteinPy is using pip from PyPI:

$ pip install einsteinpy

Or, you can install the package using conda:

$ conda install einsteinpy --channel conda-forge

Note that the package on conda-forge is currently a version behind PyPI. We are working on updating it.

For Debian/Ubuntu/Mint users, the package is installable via apt (Ubuntu 19.04 onwards):

$ sudo apt install python3-einsteinpy

If you prefer to install from source to stay on the latest but likely unstable version, you can do so using the method described here.

Problems

If the installation fails or you find something that doesn't work as expected, please open an issue in the issue tracker.

Contributing

EinsteinPy is a community project. Hence, all contributions are more than welcome! For more information, head to CONTRIBUTING or see the developer guide.

Support

Join the chat at https://gitter.im/EinsteinPy-Project/EinsteinPy riotchat mailing

Please join our [matrix] channel or Gitter chat room for general discussions and further queries.

Release announcements take place on our mailing list. Feel free to join!

If you still have a doubt, write to us directly at [email protected].

Citing

If you use EinsteinPy in your project, please drop us a line. You can also use the DOI to cite it in your publications. This is the latest one:

doi

And this is an example citation format:

Shreyas Bapat et al (2021). EinsteinPy 0.4.0 (v0.4.0). Zenodo. https://doi.org/10.5281/zenodo.2582387

License

license

EinsteinPy is released under the MIT license, thereby allowing commercial use of the library. Please refer to COPYING for more details.

FAQ

Why "EinsteinPy"?

EinsteinPy borrows the name of the famous physicist, Nobel laureate and revolutionary human, Dr. Albert Einstein. This is a small tribute on our part for the amazing work he did for humanity!

Can I do <insert nerdy thing> with EinsteinPy?

EinsteinPy is focused on general relativity. One can always discuss probable features in discussion forums and the mailing list and also work with the maintainers to try to implement them. We welcome every contribution to EinsteinPy. Please see CONTRIBUTING for more details.

What's the future of the project?

EinsteinPy is actively maintained and we hope to receive an influx of new contributors. The best way to get an idea about the roadmap is to view the milestones of the project.

Inspiration

The documentation and code structure is shamelessly inspired by poliastro. We wholeheartedly thank the poliastro developers that made this possible. EinsteinPy is nothing without its supporters and community.

riccipy's People

Contributors

cjayross avatar ritzvik avatar shreyasbapat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

riccipy's Issues

Add support for lambdify.

It's very important to provide a minimum bridge between the usefulness and compact symbolic manipulations provided by RicciPy and the numerical functions required by EinsteinPy. As such RicciPy should provide a convenient way to produce numpy-like functions with ~sympy.lambdify to return either numpy arrays or functions for individual components.

Add covariant derivative/connection support.

For a given vector equation, we need a method for calculating the covariant derivative given by:

equation

The covariant derivative should be implemented as an operator, however, the contraction of the input vector with the Christoffel symbols implies that the covariant derivative is not compatible with the current API for tensors.

I propose to simply model the covariant derivative as a tensor operator similar to the DiffOperator in partial.py where it is a subclass of ~sympy.tensor.tensor.TensExpr and defines the __mul__ and __rmul__ magic methods to return an expression of the form provided by the equation above.

Add tons of metrics!

Create a directory for storing a collection of different exact solutions to the EFE and provide a means by which these files can be used to initialize a Metric object.

Replace ReplacementManager

Having a global data structure for managing array replacement is not efficient and causes conflicts in multithreading/multiprocessing. It would be best to find a way to construct the necessary replacement dictionary from within expand_tensor from the arguments of the passed expression.

Issue with calculating contraction

For some reason the API has it that
equation

Currently, the left hand side yields the correct value while the right hand side sums the diagonal components of the array representing the tensor literally.

However this is only an issue with contractions on a single tensor (not a product of tensors), and when the contraction yields a scalar. Meaning that the calculation of the Ricci tensor is fine, but the Ricci scalar is not.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.