Skip to main content

Python/SymPy-based code generation for numerical relativity... and beyond!

Project description

Python CI

NRPy+: Python-Based Code Generation for Numerical Relativity... and Beyond!

Quick start:

  1. pip install nrpy
  2. Choose a project to build, run the provided command, then follow the instructions for compiling & running the generated C code. 3. Wave equation solver 3. Cartesian coordinates: python3 -m nrpy.examples.wave_equation_cartesian 3. Curvilinear coordinates: python3 -m nrpy.examples.wave_equation_curvilinear 4. General relativity 5. Two black holes collide: python3 -m nrpy.examples.two_blackholes_collide

Slow start, in case you want to develop NRPy+ directly:

  1. Clone this repository.
  2. cd nrpy , then e.g., run an example code: python3 nrpy/examples/wave_equation_cartesian , then follow the instructions for compiling & running the generated C code.
  3. Run ./wavetoy . It'll output at various times the solution from the point closest to r=0, as well as the relative error compared to the exact solution at that point to a file out0d-conv_factor1.00.txt .
  4. All BlackHoles@Home (BHaH) infrastructure codes now support parameter files, and each code generation automatically outputs a parfile named [project name].par. So you'll find an editable wavetoy.par.
  5. In addition, users can override certain parameter file parameters at the command line. E.g., wavetoy has a parameter convergence_factor that increases the resolution (technically Nx=Ny=Nz) by this factor. To output at twice the resolution, simply run ./wavetoy 2.0, and a new file will be output out0d-conv_factor2.00.txt, which contains data at 2x the resolution.
  6. Analyze the output from out0d-conv_factor1.00.txt and out0d-conv_factor2.00.txt in e.g., gnuplot.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nrpy-2.0.0.tar.gz (188.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nrpy-2.0.0-py3-none-any.whl (226.2 kB view details)

Uploaded Python 3

File details

Details for the file nrpy-2.0.0.tar.gz.

File metadata

  • Download URL: nrpy-2.0.0.tar.gz
  • Upload date:
  • Size: 188.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for nrpy-2.0.0.tar.gz
Algorithm Hash digest
SHA256 f05eb842530dfada4ccf978cf7075640e658fd1f0447b638b3e58a77e0dece25
MD5 0c34f3176bfea83aefd13b4a84b74068
BLAKE2b-256 768fde0e256b1ae15f0c503d8e3b4ad5c87156267b619505d11f243189a6bc3a

See more details on using hashes here.

File details

Details for the file nrpy-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: nrpy-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 226.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for nrpy-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2d68c2d9c08f36e5226e9d302aa5af84e31693c22a4d9a1300b11de41322717
MD5 e92df303ee7704a2c558bf64fcf16dee
BLAKE2b-256 6ed9d4e6c3babcf0153ecb1b84af44f5c47ca648ac66b05f1a8ff9b875a5ba68

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page