Skip to main content

nbody-iv-conditioner

A N-body initial values conditioner. Given state vectors and desired first integrals, this lib conditionates these state vectors to obtain these first integrals (as long as it's physically possible).

The theory behind all this thing is in the documentation.

Python interface

The python interface is available on a PyPI repository and to install it just run

pip install nbody-iv-conditioner

The interface is almost the same as the Fortran, and it have two big classes: Utils and Conditioners. Although the modules are available too, the parameters needs to be in Fortran format in many functions (because in Fortran they may be subroutines with intent(inout)), and using the classes Utils and Conditioners all the functions have the automatic conversor.

import nbody_iv_conditioner as nivc
import numpy as np

N = 10
ms = np.ones(N)/N
qs = 2.0 * np.random.random((3,N)) - 1.0

# move the com to origin
ms, qs, ps = nivc.Conditioners.comori(ms, qs)

com = nivc.Utils.center_of_mass(ms, qs)

Fortran interface

To compile the Fortran interface, just go the directory fortran and run

make lib

It's possible to change the directory where the library goes. The default is /lib (at the root of this directory). To change, just use the parameter INSTALL_DIR.

To link the compiled library to your script if you installed it on the directory "/abobrinha", just add the flags to your gfortran command:

-I/abobrinha -L/abobrinha -lconditioners_mod -lutils

Example:

gfortran -o my_program my_script.f90 -I/abobrinha -L/abobrinha -lconditioners_mod -lutils

To use the subroutines, just import the modules:

use conditioners_mod
use utils_mod

Tests/examples

There are some tests to guarantee that all the things works. To run it:

make test
./test

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

nbody_iv_conditioner-0.0.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

nbody_iv_conditioner-0.0.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

nbody_iv_conditioner-0.0.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

nbody_iv_conditioner-0.0.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

nbody_iv_conditioner-0.0.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file nbody_iv_conditioner-0.0.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nbody_iv_conditioner-0.0.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9441732c25fbc13f31b0de60985600f6840d91f532af8da97ba2bcdda6326f58
MD5 5c9a05ad7f85bf364f70e632a5e9a560
BLAKE2b-256 8f4647c17a45f4c6e25669c491f1bfe640041ca42710ab43a733ff5a0cf64fec

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbody_iv_conditioner-0.0.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: pypi.yml on Potalej/nbody-iv-conditioner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbody_iv_conditioner-0.0.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nbody_iv_conditioner-0.0.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e274fb43e5f33febb6762de0d5511110d1e8ae3688d33775d2a33125ce1dd43b
MD5 5f5c06aac623d302c4307d039fcd88b5
BLAKE2b-256 f8bd993e3bec446db8d7840867d7e22eb3cbc2e25a61ffa9dd1475e1cd88af29

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbody_iv_conditioner-0.0.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: pypi.yml on Potalej/nbody-iv-conditioner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbody_iv_conditioner-0.0.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nbody_iv_conditioner-0.0.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 248cf3ff01cd55e2842217118e510332ec45573d21b9acb2063bf50c1cd3504b
MD5 e863bf67d7f0c023232e693d66bce2a8
BLAKE2b-256 06371a0d7b09fe121ec6c8959b71a67d62d4b0b5d44ed090bd354424fd64e79c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbody_iv_conditioner-0.0.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: pypi.yml on Potalej/nbody-iv-conditioner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbody_iv_conditioner-0.0.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nbody_iv_conditioner-0.0.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8486bb54694b2318bfe43e4a3c74385caa79eba9def40ebf8cc613afe24acbce
MD5 0d919006c0fa24708977ccf63508b6e6
BLAKE2b-256 19544a48e2bb520193ea77237e489bef42077146266c51b5f8d504876b98d065

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbody_iv_conditioner-0.0.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: pypi.yml on Potalej/nbody-iv-conditioner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbody_iv_conditioner-0.0.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nbody_iv_conditioner-0.0.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 475e09a6bdd1a41d7746e757002bec38852850bdcff34fc6668d3e88930d81d6
MD5 7087ab52d08eb04574fe561e06c91100
BLAKE2b-256 fc19b69b3e727607887597c180865ca1cad8553465062d79a74e493f7957cce1

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbody_iv_conditioner-0.0.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: pypi.yml on Potalej/nbody-iv-conditioner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.0.3 This release

5 files

0.0.2

5 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page