r/ScientificComputing • • 7h ago

Exact Gram matrices in binary64 from sparse row shifts | C implementation, proofs, and benchmarks

0 Upvotes

I’ve released a C implementation for computing G = A Aᵀ when consecutive rows differ from a one-position shift at only a few coordinates.

The part I find most interesting is the arithmetic order. The update replaces all left factors first, then all right factors. Every intermediate accumulator remains a sum of at most n products of bounded original input values.

For inputs A = 2^e X, with integer coefficients bounded by B and n B² ≤ 2^53, this gives exact Gram entries in binary64 under the paper’s exponent and IEEE arithmetic assumptions. The implementation validates the input rather than quantizing it.

On an Apple M4, using single-thread Accelerate and warm repeated inputs, one full-output 768 × 8192 case takes 9.05 ms versus 19.63 ms for SYRK. Validation, allocation and output materialization are included. Smaller cases lose: every tested 192 × 768 case was slower.

The repository includes the paper, C code, Lean formalization, integer-oracle checks and all benchmark results. The formalization covers the mathematical model; the C implementation is tested separately.

https://github.com/LeonardSEO/exact-sparse-gram

I’d be interested in workloads where sparse changes between shifted rows occur naturally. Would this input structure be useful in your work, and which structured baseline would you want compared next?


r/ScientificComputing • • 8h ago

ROADMAP AND LAPTOP SPECIFICATIONS FOR COMPUTATIONAL CHEMISTRY.

Thumbnail
1 Upvotes

Hey guys , Iam Karthik from India . Iam a bsc ( ug) student . Planning for Computational chemistry. I have zero knowledge in coding stuff , Is their any one who could help me by providing a roadmap for Computational chemistry , including all the skills from scratch to advanced . Also suggest a me a good laptop for Computational chemistry


r/ScientificComputing • • 1d ago

I released Numerical Solver for macOS — Windows is coming next!

Thumbnail
gallery
12 Upvotes

I'm pleased to announce that Numerical Solver 1.0 for macOS is now available on the Mac App Store!

The first desktop version focuses on solving algebraic equations, including nonlinear systems.

Some of its features include:

  • Numerical solutions using the Newton–Raphson method.
  • Support for real and complex solutions.
  • Graphical visualization of equations and their intersections.
  • A guided mathematical input interface.
  • Multiple tabs for working on different problems.

My goal is to make numerical computing more accessible, especially for students, engineers, and anyone who needs to solve equations without writing scripts.

I'm also working on the Windows version, which is nearly ready for release!

For those familiar with the mobile version, ODEs and other numerical methods aren't yet included in the desktop versions, but I plan to add them in future updates.

You can read more about the macOS release here:

https://numericalsolver.com/numerical-solver-is-now-available-for-macos/

I'd be interested in hearing your thoughts, particularly about which numerical capabilities you'd find most useful in a desktop application


r/ScientificComputing • • 23h ago

I built a browser-based LAMMPS GUI for molecular dynamics simulations

Thumbnail
1 Upvotes

r/ScientificComputing • • 1d ago

Reducing high-precision verification overhead in mixed-precision bundle adjustment

2 Upvotes

I am developing a C++ photogrammetric bundle adjustment application. A representative project contains 289 cameras and approximately 382,000 3D points, with about 1,747 unknowns remaining after Schur elimination.

The current experimental approach combines FP64 computations with high-precision end corrections using MPFR at 257-bit precision. It also computes covariances, observation redundancies and statistical diagnostics.

The main bottleneck is now the high-precision work: evaluating the original equations, assembling matrices, computing residuals for iterative refinement, and verifying error bounds. The direct FP64 linear solve is relatively cheap. We already reuse factorizations and intermediate calculations and parallelize parts of the assembly.

On a 48-image subset, complete runtime improved from approximately 44 to 29 seconds, but high-precision correction and verification still dominate.

My target is a numerical coordinate error below 10 µm relative to a well-converged high-precision solution, together with reliable covariance and statistical results. Bitwise equality is not required.

Our existing certificate bounds individual linear correction errors, but does not establish an error bound for the final nonlinear solution. Repeating the entire calculation at high precision for validation defeats the performance benefit.

What practical a posteriori error estimator or stopping criterion could bound the final coordinate error while restricting high-precision work to where it is actually necessary?

We currently use a custom solver. I am interested in how comparable accuracy and stopping criteria are handled in Ceres, and whether its approach could reduce our verification overhead.

I would particularly appreciate references or existing implementations applicable to large, potentially ill-conditioned nonlinear least-squares problems.


r/ScientificComputing • • 1d ago

155M N-body pair-evaluations/s (exact gravity, single-threaded, f32).

1 Upvotes

A dual-implementation physics engine (Rust core + managed C# over a C ABI) with bit-identical determinism: Barnes-Hut N-body gravity, SPH fluid, and analytic orbital/SHM/SPH benchmarks at near-zero allocation.

Check it out here on GitHub and give me advice: https://github.com/omaransarivehementlyventstokazakhstan/phi_eng


r/ScientificComputing • • 1d ago

[Project] ViCalc: A touch-typing scientific calculator for Windows with HTML history logging (Python / Open Source)

Thumbnail
youtube.com
1 Upvotes

Hi everyone,

As someone who relies heavily on rapid calculations, I always missed the tactile speed and muscle-memory of physical handheld calculators when working on a PC. Standard desktop calculator apps often force you to reach for the mouse, interrupting your analytical flow.

To address this, I developed ViCalc—a keyboard-driven scientific calculator designed specifically for desktop research, engineering, and scientific workflows.

Since documentation and auditability are crucial in scientific computing, one of the primary features is its automatic HTML history logging.

Key Features for Technical & Scientific Workflows:

  • Structured HTML History Logging: The entire step-by-step calculation history is automatically formatted and saved in clean HTML. This makes it easy to review, archive, or directly embed/paste calculations into technical documentation, research notes, or reports.
  • Full Touch-Typing Control: All functions are directly mapped to the PC keyboard, allowing you to compute multi-step expressions at high speed without touching the mouse.
  • Comprehensive Modes: Supports standard scientific functions, trigonometric calculations, complex arithmetic, and Programmer mode (bitwise operations & Base-N conversions across Hex/Dec/Oct/Bin).
  • Adaptable Interface: Toggle between a standard numpad, scientific layout, or a minimalist mode that hides virtual keys entirely once shortcut mappings are learned.

Technical Details:

  • Language: Python 3
  • License: Open Source (MIT License)

Links:

I’d love to get feedback from the scientific community on how this fits into your day-to-day workflow or any specific features you'd like to see added. How do you currently document and track scratchpad calculations during your work?


r/ScientificComputing • • 2d ago

Computational Physics

Thumbnail
3 Upvotes

r/ScientificComputing • • 3d ago

What’s the incentive for anyone to learn scientific computing anymore?

55 Upvotes

I had asked an experimentalist who studies ice physics to look into claude code for data analysis. 1) Within a week they were able to implement an open cv based end-to-end video analysis pipeline catering to their exact expectations. 2) They have figured out they can vibe code a FE model for their system to that end they have figured out meshing, FEniCSx solver setup and DOLFINx scripting. They are convinced they will never have to collaborate with a computational lab. What are your thoughts on this? Who will enroll in a computational science lab?


r/ScientificComputing • • 3d ago

Why is it so difficult to launch a new project?

3 Upvotes

From italian boinc board: https://www.boincitaly.org/forum/progetti/115511-come-mai-%C3%A8-cos%C3%AC-difficile-lanciare-un-nuovo-progetto.html

Translation:

There are many mathematical conjectures that could potentially be solved using BOINC within just a few years.

Why is nobody in the world interested in solving them?

We have tried to put together a team on our end (we would have three people to manage the project's very small community forum, a long-time cruncher, and a “donor” who could cover the actual hardware costs), but no mathematicians have shown any interest. We contacted around ten universities and received zero replies. We also haven't been able to find developers willing to launch the project (although I understand that, in this case, the issue is money).

Honestly, we thought it would be enough to find:

A computer science department willing to provide a developer, even for a modest fee (who could also have written a thesis on the subject).

A mathematics department willing to do the same.

Why aren't universities interested in solving mathematical conjectures? Isn't this the kind of monumental, encyclopedic achievement that academics would aspire to? Today's technology should make it possible to solve many long-standing open problems.


r/ScientificComputing • • 3d ago

Has anybody tested Argon on the TheoPhysEval suite?

Thumbnail
arxiv.org
5 Upvotes

I'm curious because at this point the traditional benchmarks are pretty meaningless, and this suite is a fantastic real-world use case on problems that have no published solution.


r/ScientificComputing • • 3d ago

How do you approximate fractional-order memory for embedded control with bounded computational cost?

Thumbnail
1 Upvotes

r/ScientificComputing • • 3d ago

Binary black hole inspiral simulations!

2 Upvotes

Hello, I am a black hole enthusiast high school student.

I have conducted research on calculating the eccentricity of the binary black hole inspiral phase using an N-body simulation Python library called REBOUNDx. However, upon completion of the research, I wanted to avoid relying on Python libraries to calculate the physics behind binary black holes. So I studied Newtonian physics and wrote code for the post-Newtonian corrections to make black hole inspiral simulations without the help of physics Python libraries. I have created a README that walks you through the physics behind the inspiral phase, and I hope to soon implement numerical relativity to simulate the merger phase of the binary black holes as well. I would greatly appreciate your feedback to improve my simulation! Specifically:

  1. Are there any flaws in the physics behind my simulation?
  2. Any tips for implementing numerical relativity for the merger phase?

Here is the repo: https://github.com/happyalex98/Binary-black-hole-inspiral-simulation-3.5PN-

Thank you all in advance!


r/ScientificComputing • • 4d ago

Fast GPU and CPU ensembles of ODEs and Monte Carlo samples that each stop at a different time, from plain Python

Post image
8 Upvotes

If you run many independent simulations that end at different times (an event, convergence, a step budget), array libraries make you pay for the slowest sample on every step.

With this project you write the step for one sample as a typed Python function and run a million of them. Samples that finish drop out of the work. You also get the derivatives of your step (forward and reverse mode), and arrays move without copies to and from PyTorch, CuPy, NumPy and Warp.

With a million samples in double precision, each stopping at its own step:

  • on 6 GPUs, 2.5× to 4.2× faster than an NVIDIA Warp kernel and 9.8× to 130× faster than PyTorch with torch.compile;
  • on 4 server CPUs, from level with Numba to 2.3× faster, and 50× to 180× faster than NumPy.

When every sample runs all its steps, it ties with Warp. There is also a benchmark with an adaptive RK7(8) solver.

Install on Linux x86_64 with pip install raptor-eagle raptor-hawk (add [cuda12] or [cuda13] to both for a GPU). It runs on NVIDIA GPUs or on CPU threads. Linux ARM and macOS (CPU) wheels come next.

Personal project; I work at ESA. A start-here notebook (it runs in Colab), all the benchmark files, and how to rerun them: https://amasat01.github.io


r/ScientificComputing • • 4d ago

Simulated chaos in the RCSJ Josephson junction model (MATLAB) – bifurcation diagrams, Poincaré sections & Lyapunov exponents

5 Upvotes

Hi everyone,

For my Computational Physics course I simulated the driven RCSJ model of a Josephson junction to study the transition from regular to chaotic dynamics.

I computed:

Phase portraits

I–V curves with Shapiro steps

Poincaré sections

Bifurcation diagrams

Largest Lyapunov exponent

A 2D regime map over drive parameters (parallelized)

The results clearly show the breakdown of phase-locking into chaos and the reappearance of regular behavior at higher bias currents. Positive Lyapunov exponents confirm genuine chaos in the intermediate regime.

The MATLAB code is fully documented and includes both serial and parallel versions.

I’d appreciate any feedback on the methods or suggestions for further analysis.

Repo link is in the comments.

Thanks!


r/ScientificComputing • • 6d ago

I made a song inspired by computational physics: "Solving the Universe"

Thumbnail
1 Upvotes

r/ScientificComputing • • 7d ago

Has anyone here actually messed with the Science Skills in Google Antigravity?

5 Upvotes

I know this isn’t an ecosystem-specific sub, but I’m curious if anyone here has tried the curated science skills in Google Antigravity, or if most people haven't really touched them yet.

Right now, my main workflow with them has been pulling arXiv preprints directly into the environment to sanity-check domain logic…basically auditing empirical formulas, parameters, and assumptions in my code against current literature rather than relying on generic model heuristics. It’s been surprisingly solid for that, but looking at everything packed into those skills, literature review and paper verification feel like maybe 5% of what’s actually there.

Given how broad scientific computing gets from data wrangling and numerical modeling to chemistry and physical simulations. I feel like I'm barely scratching the surface of what they can do. For anyone who has actually experimented with them, what workflows are you having them handle, and where have you found they fall flat?

Have you used Deepthink or any other ecosystem tools?


r/ScientificComputing • • 7d ago

[R] Dissociating Transient State from Durable Parameter Memory: An Information-Theoretic Audit of Recurrent Substrates.

Thumbnail gallery
0 Upvotes

r/ScientificComputing • • 7d ago

Implementation of Andreas Bjorklund's algorithm for determining hamiltonicity

Thumbnail
3 Upvotes

r/ScientificComputing • • 7d ago

From an AI Math Proof to Real Physics: Does Metallic Screening Break the Universal Triangular Lattice?

Thumbnail
0 Upvotes

r/ScientificComputing • • 7d ago

Open text book on The Triangular Lattice and Universal Optimality based on September OpenAI math claims with a new Rust Solver and some physics implications

Thumbnail
0 Upvotes

r/ScientificComputing • • 8d ago

Planck-Level Discrete Moore Neighborhood with simulated energies

0 Upvotes

r/ScientificComputing • • 8d ago

Monte Carlo on GPU in the browser

Thumbnail
mc.keff.uk
3 Upvotes

Hi r/ScientificComputing, I spent my PhD working on neutron transport solvers. I wanted to see how much of that workflow I could fit into a browser.

So I am building MC, it lets you configure geometry, run neutron transport calculations locally with WebGPU, and inspect flux and reaction rates.

I’d be interested in feedback on the GPU implementation, the physics, and the interface.

https://mc.keff.uk


r/ScientificComputing • • 8d ago

Can anyone help me with my Gaussian Elimination algorithm?

1 Upvotes

why is my Gaussian Elimination algorithm doesn't work, especially the second part, I made a lot more details on why I think it doesn't here https://scicomp.stackexchange.com/questions/45561/gaussian-elimination-2nd-part but I can't get it completely. can anyone help?

import numpy as np

A=np.array([[4,8,12],[3,8,13],[2,9,18]])
b=np.array([4,5,11])

def Gauss_Elimination(A,b):
    n = np.shape(A)[0]

    # 1st Part
    for k in range(n):
        pivot_element=A[k,k]
        # if pivot_element==0: ### I'll deal with this condition later
        for j in range(k+1,n):
            b[j]=b[j]-(A[j,k]/pivot_element)*b[k]
            A[j,:]=A[j,:]-(A[j,k]/pivot_element)*A[k,:]

        # 2nd Part
        x = np.zeros(n)
        x[-1]=b[-1]/A[-1,-1]
        for i in range(n-2,-1,-1):
        x[i]=(b[i]-np.sum(x[i+1]-A[i,i+1]))/A[i,i]
    return A,b, x # not necessary since it's call by reference

Gauss_Elimination(A,b)
print(A,'\n',b)

r/ScientificComputing • • 8d ago

How do you automate experimental data analysis in your materials science lab?

2 Upvotes

I recently graduated with a Physics degree after spending four years researching rare-earth-free permanent magnets, mainly MnBi and MnAl.

During my research, I worked with VSM measurements, M-H and M-T curves, XRD data, and magnetic property calculations. One thing that always bothered me was how much of our data processing and plotting we still did manually.

Since graduating, I've been struggling to find a job, so I've been building a research tool called ElementX to automate magnetometry analysis, visualize experimental results, and organize measurements.

I'm curious how other labs handle this. Do you use Origin, Python scripts, MATLAB, or something else? What parts of experimental data analysis do you wish were easier to automate?

I'd appreciate any suggestions, especially from people regularly working with magnetometry or XRD data.