Поиск

Библиотеки и исходники

Код

Весь код проекта — сферический решатель, 3D-модули для GRTeclyn и GRChombo, скрипты анализа и проверенный модуль диагностики. Исходники можно читать прямо здесь или скачать архивом.

Как запустить

Библиотека pbhgr — Python ≥ 3.12 с numpy, scipy, psutil, pyyaml, h5py и небольшим C-ядром:

tar xzf pbhgr-*.tar.gz && cd pbhgr
make            # собирает pbhgr/_kernels.so из csrc/kernels.c
make test       # pytest: FLRW, вакуум, пылевой коллапс, распад, статические решения
python3 scripts/v1_ladder.py --help

3D-модули собираются внутри деревьев GRTeclyn (AMReX) и GRChombo (Chombo): как это сделано на сервере, описано в документе о сборке и в scripts/grchombo/build_grchombo_ax102.sh; параметры рабочих прогонов лежат рядом с исходниками (params_*.txt) и генерируются скриптом scripts/grchombo/stage1b_params.py.

Архивы собраны из последнего коммита репозиториев; служебные адреса серверов в них заменены. Отдельные файлы ниже показаны с подсветкой и номерами строк, ссылка «как текст» отдаёт файл без обработки.

pbhgr

14 файлов · 2 196 строк · pbhgr

Основная библиотека на Python + C: сферический Эйнштейн–Власов в ареально-CMC калибровке (горизонтопроникающей), точное решение LTB, профили пиков, ньютоновский 3D particle-mesh, начальные данные, провенанс прогонов. C-ядро — подшаги частиц и интегрирование связей.

Файлстрок
pbhgr/__init__.pypbhgr: Stage-A spherical Einstein-Vlasov + decay solver and campaign scaffolding.6как текст
pbhgr/analytic.pyAnalytic references for the mandatory Stage-A tests.41как текст
pbhgr/background.pyHomogeneous flat FLRW with cold X + radiation + X -> radiation decay.48как текст
pbhgr/cosmo_ev.pySpherically symmetric Einstein-Vlasov solver in the areal-CMC gauge with an expanding FLRW exterior (Stage A step 2; equations in Appendix B of brief_verification/verification_and_plan.md).656как текст
pbhgr/cosmo_id.pyCosmological initial data for the areal-CMC spherical Einstein-Vlasov solver (Stage A step 2).125как текст
pbhgr/initial_data.pyInitial data families for the spherical solver.64как текст
pbhgr/ltb.pyExact growing-mode LTB solution for a Gaussian curvature profile (Yoo et al. 2026, arXiv:2609.14218).119как текст
pbhgr/pm3d.pyNewtonian 3D particle-mesh code for one triaxial peak in an Einstein-de Sitter background (item 3b of the plan).160как текст
pbhgr/profiles.pyCurvature profiles zeta(r) beyond the Yoo Gaussian: mean peak profiles of log-normal spectra (BBKS conditioning on the peak height nu and the mean curvature x_bar(nu, gamma)) and a broad near-top-hat control.63как текст
pbhgr/provenance.pyRun provenance record, as required by the specification (section 12, Reproducibility).84как текст
pbhgr/scan.pyOutcome-map scan driver for the spherical solver (Stage A, section 4 'Скан').77как текст
pbhgr/spherical_ev.pySpherically symmetric Einstein-Vlasov system with X decay (Stage A prototype).492как текст
pbhgr/steady_state.pyStatic spherically symmetric Einstein-Vlasov solutions (isotropic polytropes, Rein-Rendall type ansatz f = (E0 - e^mu E)_+^k) and particle sampling from them.89как текст
csrc/kernels.cCompiled kernels for the spherical Einstein-Vlasov solver (polar-areal gauge). mass_integrate: integrate the Hamiltonian constraint dm/dr = s_k * sqrt(1 - 2 m / r) across K cells [r_e[k], r_e[k+1]] with piecewise-constant coordinate…172как текст

PBHVlasov (GRTeclyn)

19 файлов · 3 558 строк · pbhgr

3D-модуль частиц Власова для GRTeclyn/AMReX: осаждение на AMR-уровнях, геодезическое движение с собственным временем, калибровка PBH, ранний старт по данным Yoo, лучевая и сферическая диагностика горизонта.

Файлстрок
grteclyn/PBHVlasov/GNUmakefileLine extraction uses the particle interpolator.42как текст
grteclyn/PBHVlasov/Main_PBHVlasov.cppEngage!80как текст
grteclyn/PBHVlasov/PBHAHFinder.hppCopy of GRTeclyn's AHFinder (branch AHFinder, fd76177, BSD-3) with an iteration cap, quiet iterations and public accessors, for use inside a PBHVlasov run.163как текст
grteclyn/PBHVlasov/PBHAHFinder.impl.hppCopy of GRTeclyn's AHFinder (branch AHFinder, fd76177, BSD-3) with an iteration cap, quiet iterations and public accessors, for use inside a PBHVlasov run.513как текст
grteclyn/PBHVlasov/PBHGaugeTeclyn.hppPBHVlasov example (pbhgr project).53как текст
grteclyn/PBHVlasov/PBHVlasovAmr.hppPBHVlasov example for GRTeclyn (pbhgr project).70как текст
grteclyn/PBHVlasov/PBHVlasovLevel.cppPBHVlasov example for GRTeclyn (pbhgr project, stage 2).1217как текст
grteclyn/PBHVlasov/PBHVlasovLevel.hppPBHVlasov example for GRTeclyn (pbhgr project, stage 2): BSSN/CCZ4 + Vlasov particles.64как текст
grteclyn/PBHVlasov/ParticleMatter.hppPBHVlasov example for GRTeclyn (pbhgr project). matter_t for CCZ4RHSWithMatter / ConstraintsWithMatter: the energy-momentum tensor is read from the grid variables deposited from the particles (rho_p, S_i, S_ij, all measured by the…96как текст
grteclyn/PBHVlasov/ParticleMatterVars.hppPBHVlasov example for GRTeclyn (pbhgr project).26как текст
grteclyn/PBHVlasov/SimulationParameters.hppPBHVlasov example for GRTeclyn (pbhgr project).33как текст
grteclyn/PBHVlasov/StateVariables.hppPBHVlasov example for GRTeclyn (pbhgr project, stage 2).46как текст
grteclyn/PBHVlasov/VlasovParticles.cppPBHVlasov example for GRTeclyn (pbhgr project, stage 2).787как текст
grteclyn/PBHVlasov/VlasovParticles.hppPBHVlasov example for GRTeclyn (pbhgr project, stage 2).149как текст
grteclyn/PBHVlasov/params_flrw.txtPBHVlasov: FLRW dust test (periodic box, geodesic slicing).33как текст
grteclyn/PBHVlasov/params_flrw_amr1.txtPBHVlasov: FLRW dust test (periodic box, geodesic slicing).35как текст
grteclyn/PBHVlasov/params_yoo_flrw.txtEarly-start test 1: FLRW (mu = 0) from t_i = 2/(3 H_i) with the expansion-aware step and adaptive subcycling.42как текст
grteclyn/PBHVlasov/params_yoo_mu0.3_e0_prod.txtStage 1b production template: Yoo long-wavelength data from t_i, seven levels, same box and coordinates as the validated late-start runs (a_ref = a(0.5 t_C(0)) for mu = 0.3).57как текст
grteclyn/PBHVlasov/params_yoo_mu0.3_l2.txtEarly-start test 2: Yoo profile mu = 0.3, e = p = 0 on three levels (same box and coordinates as the validated late-start runs: a_ref = a(0.5 t_C(0)), L' = 6194.41), from t_i to 0.97 t_C(0); shell check against LTB.52как текст

PBHCosmo (GRChombo)

16 файлов · 1 272 строк · pbhgr

Этап 1: скалярное поле в GRChombo — начальные данные LTB, калибровка с профилем отсчёта K, диагностики. Показал отскок когерентного ядра (предел Каупа).

Файлстрок
grchombo/PBHCosmo/ConstraintsExtraction.hpp!117как текст
grchombo/PBHCosmo/CosmoDiagnostics.hpp!66как текст
grchombo/PBHCosmo/CosmoDiagnostics.impl.hpperror "This file should only be included through CosmoDiagnostics.hpp"55как текст
grchombo/PBHCosmo/CustomExtraction.hppFunction to convert double to string with precision124как текст
grchombo/PBHCosmo/DiagnosticVariables.hppassign an enum to each variable38как текст
grchombo/PBHCosmo/GNUmakefile-*- Mode: Makefile -*- PBHCosmo example: copy this directory into $GRCHOMBO_HOME/Examples/PBHCosmo and run make all24как текст
grchombo/PBHCosmo/InitialLTBData.hppPBHCosmo example for GRChombo (pbhgr project, plan 6.12 stage 1).122как текст
grchombo/PBHCosmo/Main_PBHCosmo.cppChombo includes112как текст
grchombo/PBHCosmo/PBHCosmoLevel.cppPBHCosmo example for GRChombo (pbhgr project).243как текст
grchombo/PBHCosmo/PBHCosmoLevel.hppPBHCosmo example for GRChombo (pbhgr project).36как текст
grchombo/PBHCosmo/PBHGauge.hppPBHCosmo example (pbhgr project).59как текст
grchombo/PBHCosmo/Potential.hpp!40как текст
grchombo/PBHCosmo/ScalarFieldRef.hppPBHCosmo example (pbhgr project).89как текст
grchombo/PBHCosmo/SimulationParameters.hppPBHCosmo example for GRChombo (pbhgr project).70как текст
grchombo/PBHCosmo/SphereTaggingCriterion.hppPBHCosmo example (pbhgr project): nested-sphere tagging — level l+1 is created inside radius radii[l] around the centre (coordinate radius). criterion = 100 inside, 0 outside; use regrid_threshold < 100.39как текст
grchombo/PBHCosmo/UserVariables.hppassign an enum to each variable38как текст

scripts

31 файлов · 2 460 строк · pbhgr

Драйверы прогонов, сканы, бенчмарки, сравнения 3D с 1D и LTB, генераторы параметров, сборка GRChombo.

Файлстрок
scripts/build_gallery.pyAssemble reports/gallery.html: the figure set with reading notes, PNGs embedded as data URIs.132как текст
scripts/debug_ah.py23как текст
scripts/debug_caustic.py23как текст
scripts/debug_inner.py27как текст
scripts/debug_ueq.py27как текст
scripts/ellipsoidal_collapse.pyBond-Myers (1996) ellipsoidal collapse of a homogeneous ellipsoid in a matter-dominated background, external tide in linear theory, Zel'dovich initial conditions (lambda_1 >= lambda_2 >= lambda_3, delta = sum lambda, e = (l1 - l3)/(2…74как текст
scripts/make_figures.pyBuild the visualisation set in reports/figures from runs/viz, runs/scan_pilot, runs/resource_probe.json.235как текст
scripts/newton_shells.pyNewtonian spherical shell code started from the exact LTB state at 0.9 t_C(0) (LTB shell dynamics are Newtonian in form, so this is exact until the first crossing).44как текст
scripts/pm3d_peak.pyItem 3b: Newtonian 3D PM run of one triaxial peak.36как текст
scripts/pm3d_shelltest.pyLagrangian-shell test of the PM code against the exact LTB solution (spherical Yoo profile, mu = 0.1).28как текст
scripts/resource_probe.pyMeasure wall time per RK4 step and peak RSS vs particle number / grid size, then extrapolate the Stage-A workload to see where this VPS stops being sufficient.31как текст
scripts/run_scan.pyPilot outcome scan on the dev VPS.21как текст
scripts/run_showcase.pyRun representative cases with full snapshot storage for visualisation -> runs/viz/*.pkl41как текст
scripts/v1_caustic_bench.pyCaustic benchmark: cold dust sphere at rest (time-symmetric, weak field), evolved with the GR areal/maximal-slicing code (StaticBackground) and with a Newtonian multi-stream shell code on IDENTICAL shells.80как текст
scripts/v1_caustic_polar.pyCross-code check of the caustic benchmark: the same cold Gaussian sphere at rest evolved with pbhgr's polar-areal Einstein-Vlasov code (spherical_ev.py: polar slicing, zero shift, independent implementation) and sampled at equal central…47как текст
scripts/v1_ladder.pyV1 validation ladder, steps 1-3 (areal-CMC gauge): flrw homogeneous FLRW to a chosen t/t_H: alpha = 1, A = 1, Kth = -H, particles static in x, P ∝ 1/a idcheck Yoo spherical CMC initial data vs the exact LTB functions (mass and energy…161как текст
scripts/v1_static_test.pyLadder step 4: an Einstein-Vlasov steady state (isotropic polytrope from pbhgr.steady_state) must stay static in the areal gauge with maximal slicing (K = 0).41как текст
scripts/verify_bh_convergence.pyConvergence of the horizon-approach case (nu=0.3, flat=3, L_rms=0.5) in time step, grid and particles.35как текст
scripts/verify_cold_convergence.pyCold-limit convergence: nearly cold cloud (L_rms=0.05) at three (K, N) resolutions.28как текст
scripts/verify_static.pyStatic Einstein-Vlasov benchmark: sampled steady state must remain steady under evolution.42как текст
scripts/verify_static_res.pyStatic benchmark: does the slow secular drift of max 2m/r shrink with grid resolution / time step?28как текст
scripts/warm_summary.pySummary table of the warm campaign: python3 scripts/warm_summary.py [dir]28как текст
scripts/grchombo/build_grchombo_ax102.sh============================================================================ build_grchombo_ax102.sh — GRChombo + Chombo + GRTresna on Hetzner AX102-1 (AMD Ryzen 9 7950X3D 16C/32T, 128 GB DDR5 ECC, 2x1.92 TB NVMe, Ubuntu 24.04 LTS)…397как текст
scripts/grchombo/chk_diag.pyDiagnostics of a GRTeclyn/PBHVlasov checkpoint: per-level min/max of the state, an x-line through the centre on the finest level, coordinate-speed bound of the particle push, and the spherical expansion Theta(r).111как текст
scripts/grchombo/ltb_to_grchombo.pyLate-start initial data for the GRChombo PBHCosmo example from the exact LTB solution (e = 0 test, plan 6.12 stage 1).320как текст
scripts/grchombo/pbh_analyse.pyAnalyse a PBHCosmo (GRChombo) run directory: data/data_out.dat, data/*_lineout.dat, AH stats.65как текст
scripts/grchombo/stage1b_params.pyParameter file for a stage-1b early-start run (Yoo long-wavelength data, seven levels, geodesic phase to 0.5 t_C(0), then the profile-referenced 1+log lapse and the Gamma-driver) for given (mu, e, p).93как текст
scripts/grchombo/vlasov_gauge_check.pyGauge check of the particle push: central density versus the proper time of the core, compared with LTB.52как текст
scripts/grchombo/vlasov_ltb_compare.pyCompare a PBHVlasov (GRTeclyn) LTB e = 0 particle run in geodesic slicing with the analytic LTB solution.72как текст
scripts/grchombo/vlasov_shell_check.pyInvariant check of the 3D particle run against LTB before the caustic, shell by shell.45как текст
scripts/grchombo/vlasov_tau_compare.pyInvariant comparison of the 3D particle run with the 1D Einstein-Vlasov references and LTB: horizon mass M_AH versus the proper time of the matter at the horizon.73как текст

tests

7 файлов · 274 строк · pbhgr

Набор pytest фазы 1: FLRW, вакуум Шварцшильда, пылевой коллапс, распад, статические решения.

Файлстрок
tests/conftest.py16как текст
tests/test_background.py35как текст
tests/test_decay.pyProper-time decay of macroparticles, daughter emission, energy bookkeeping, Gamma -> 0.53как текст
tests/test_dust_collapse.pyCold dust collapse (LTB / Oppenheimer-Snyder): every shell is a radial Schwarzschild geodesic of the mass m(r0) enclosed initially, in its own proper time; the outermost shell also follows the exterior coordinate-time law.65как текст
tests/test_static_exterior.py18как текст
tests/test_static_solution.pyKnown Einstein-Vlasov benchmark: an isotropic polytropic steady state (f = (E0 - e^mu E)_+) sampled into macroparticles must reproduce the analytic metric at t = 0 and remain static.33как текст
tests/test_vacuum.pySchwarzschild vacuum regression: excised interior mass, zero-weight test particles.54как текст

sphdiag (PBH-VERIFY-01)

6 файлов · 1 466 строк · pbh_verify_01

Проверенный модуль диагностики сферического 3+1-среза: проекции материи, невязки связей, масса Мизнера–Шарпа, θ±, кандидаты в видимый горизонт со статусами.

Файлстрок
src/sphdiag/__init__.pysphdiag -- physical diagnostics of spherically symmetric 3+1 slices (PBH-VERIFY-01).20как текст
src/sphdiag/diagnose.pydiagnose(): physical diagnostics of a spherically symmetric slice (contract §5-§10).839как текст
src/sphdiag/fd.pyFinite-difference machinery for sphdiag (contract §8).187как текст
src/sphdiag/matter.pyMatter adapters (contract §4): n-frame projections rho, j_r, S^r_r, S^theta_theta.152как текст
src/sphdiag/slice.pySphericalSlice: container + validation of the 3+1 slice data (contract §2, §3, §8, §9).176как текст
src/sphdiag/README.mdsphdiag92как текст