Python/SymPy-based code generation for numerical relativity... and beyond!
Project description
NRPy+: Python-Based Code Generation for Numerical Relativity... and Beyond!
Quick start:
pip install nrpy- 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_cartesian3. Curvilinear coordinates:python3 -m nrpy.examples.wave_equation_curvilinear4. General relativity 5. Two black holes collide:python3 -m nrpy.examples.two_blackholes_collide
Slow start, in case you want to develop NRPy+ directly:
- Clone this repository.
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.- 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 fileout0d-conv_factor1.00.txt. - 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 editablewavetoy.par. - In addition, users can override certain parameter file parameters at the command line. E.g.,
wavetoyhas a parameterconvergence_factorthat increases the resolution (technicallyNx=Ny=Nz) by this factor. To output at twice the resolution, simply run./wavetoy 2.0, and a new file will be outputout0d-conv_factor2.00.txt, which contains data at 2x the resolution. - Analyze the output from
out0d-conv_factor1.00.txtandout0d-conv_factor2.00.txtin e.g.,gnuplot.
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
nrpy-2.0.0-py3-none-any.whl
(226.2 kB
view details)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f05eb842530dfada4ccf978cf7075640e658fd1f0447b638b3e58a77e0dece25
|
|
| MD5 |
0c34f3176bfea83aefd13b4a84b74068
|
|
| BLAKE2b-256 |
768fde0e256b1ae15f0c503d8e3b4ad5c87156267b619505d11f243189a6bc3a
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2d68c2d9c08f36e5226e9d302aa5af84e31693c22a4d9a1300b11de41322717
|
|
| MD5 |
e92df303ee7704a2c558bf64fcf16dee
|
|
| BLAKE2b-256 |
6ed9d4e6c3babcf0153ecb1b84af44f5c47ca648ac66b05f1a8ff9b875a5ba68
|