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.2-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.2-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.2-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.2-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.2-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.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nbody_iv_conditioner-0.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c52e14a19ec2f7071e8507e371fd4b82755255dd924d04a17c9f1ac241a68cb0
MD5 d373d6776648174466b887a3918121a4
BLAKE2b-256 fd38a9a02ad2bc346f9156dd6bd584b8eea5d0ebcbad47dcc05c39945e099f25

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbody_iv_conditioner-0.0.2-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.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nbody_iv_conditioner-0.0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 37eff1e85d5969d8fa6cba2286fc4df128dad3cc59fbfafe1c71249e336f48ec
MD5 ac64dfeb2d6f37e4309d1ce3b2a4680d
BLAKE2b-256 26184b2af5105eeb0c7670f89a7b0c4cf35c66126f50e891bf84457b629932dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbody_iv_conditioner-0.0.2-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.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nbody_iv_conditioner-0.0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 656c31eb09ead036d0550378a41fd4ecdc65819289ded2870aba7560eb47664a
MD5 2a57b74d2815762639a738f8b1dfc6a5
BLAKE2b-256 eceff3c326dc4068781c9592246b747f56ab4d7d138bd646906b6770516bdcb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbody_iv_conditioner-0.0.2-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.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nbody_iv_conditioner-0.0.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 aad48d687678ec23ff7eb37c7766d16c9adf70a8d64788bbf5caa2af7c2b9922
MD5 698793e2a5760181123b8b8e4e4b5c99
BLAKE2b-256 1e5bc8f1a838a602bdd33a94f0bf985df1703fb83120f5e196943364b7986612

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbody_iv_conditioner-0.0.2-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.2-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nbody_iv_conditioner-0.0.2-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 47b933966f385f5efe26064692ea3f85990292b4536f4d615f7e931cfbf5e5a8
MD5 1d9fea2d69b9dba1d1c6bd188ee4f544
BLAKE2b-256 7a30895e3ec4ca11f979ca9d530bd84168335d1ed8dddfcdbbb4564e349bae70

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbody_iv_conditioner-0.0.2-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

0.0.3

5 files

This release

0.0.2 This release

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