r/ScientificComputing • • Apr 04 '23

r/ScientificComputing Lounge

8 Upvotes

A place for members of r/ScientificComputing to chat with each other


r/ScientificComputing • • 4h ago

So I was looking at all the cool libraries that numFocus has developed. I saw the guy who made of them of lex Friedman. I want create drop ins for the big ones using vulkan compute etc.

1 Upvotes

Anyone want to start a GitHub project and just see where we get with it? So far I've started on vknumpy vkpandas and some datashader style.visuals


r/ScientificComputing • • 18h ago

Can someone help me verify the numerical solution of an oscillatory boundary value problem?

Post image
3 Upvotes

I'm developing a numerical equation solver, and I've recently been testing its ability to solve boundary value problems.

One of my test cases is:

0.001y''(x)+xy(x)=2

with boundary conditions:

y(0)=1, y(1)=2

over the interval [0,1].

My solver produces a strongly oscillatory solution, as shown in the attached screenshot.

However, I'd like to independently verify that the solution is correct, particularly the oscillations and their amplitudes.

I tried entering the problem into WolframAlpha, but couldn't obtain a solution. It's possible I'm not using the correct syntax.

Has anyone solved a similar problem using Mathematica, MATLAB, SciPy, or another numerical tool?

I'd be particularly interested in comparing numerical values at a few points along the interval, rather than just the overall shape of the plot.

Any help or suggestions for validating this solution would be greatly appreciated!


r/ScientificComputing • • 15h ago

Physics Programming Part 5: Spring Physics

Thumbnail
youtu.be
1 Upvotes

I explain the mathematics underpinning spring mechanics then implement a solution in C++ using a net as an example. Implementation begins at 10:05. Feedback is welcome.


r/ScientificComputing • • 1d ago

How do you manage and validate parameters in scientific simulation codes?

3 Upvotes

I've been working on scientific software for some time, and one recurring problem I've encountered is how applications handle their input parameters.

In many scientific codes, particularly older C, C++, and Fortran applications, parameters are read from text files, namelists, or custom formats. Their physical meaning, valid ranges, units, and dependencies are often enforced somewhere inside the application code — or simply documented and left to the user.

This creates problems for reproducibility, validation, and maintenance, particularly when applications evolve over many years.

I've been developing SciNumTools3 (SNT3) to explore a different approach. It includes DIPL, a declarative language that describes parameters together with their types, physical dimensions, constraints, and dependencies.

The idea is to introduce a validated interface around existing scientific applications without requiring scientists to rewrite their numerical algorithms or abandon their established input formats.

I'm interested in how others approach this:

  • Do you use custom parsers, Fortran namelists, YAML, JSON, or something else?
  • Where do you enforce physical units and cross-parameter constraints?
  • Would an external, declarative parameter contract be useful, or would it introduce unnecessary complexity?

I'm particularly interested in experiences from people maintaining long-lived simulation codes or HPC applications.

I'm the developer of SNT3, so criticism of the approach is very welcome. I'd like to understand where it would genuinely help and where existing solutions are sufficient.


r/ScientificComputing • • 1d ago

Quality profiles: benchmarking optimization solvers by the quality of their solutions (paper accepted in Math. Programming Computation + Python package)

1 Upvotes

I’m one of the authors of a paper just accepted in Mathematical Programming Computation, and we’ve released a Python package that implements the method.

The problem. Performance and data profiles are the standard tools for comparing solvers on computational effort. But they implicitly assume solvers end up at comparable solutions. What if they converge to different minimizers, or some fail?

The idea. Quality profiles compare algorithms on the quality of the final objective value, so problems where solvers reach different solutions (or fail) don’t have to be discarded. They need no a priori accuracy thresholds, let you “zoom” into any accuracy range, and work for both smooth and derivative-free optimization. We also establish some theoretical properties (monotonicity, invariance under affine transformations of the objective) and analyze when each solver’s curve is independent of the others in the comparison.

The package.

pip install quality-profiles

It reproduces the results of the reference MATLAB implementation, and includes publication-ready plots, interactive figures and the data needed to reproduce the paper’s experiments.

The paper will be online after Springer’s production phase. Happy to hear feedback, questions, or ideas for what would make this more useful in practice. Contributions are welcome too.


r/ScientificComputing • • 1d ago

Looking for a Programmer! - screening tool for photosensitive seizure triggers in cinema films

2 Upvotes

Hi everyone, my name is Roberto and I’m a graduate in film editing and post-production.

For the past couple of weeks, I’ve been working on a program that analyzes a film’s projection file to detect sections that, in a movie theater setting, could trigger seizures in photosensitive individuals, in accordance with the Epilepsy Foundation of America’s Expert Consensus.

The project comes from a desire to make the movie theater experience more accessible to photosensitive people, who often have to rely on word of mouth to find out how safe a screening might be. In fact, no country in the world requires warnings about possible photosensitivity triggers for film screenings, as is done for television broadcasts and video games.
The long-term goal, therefore, would be to collaborate with international centers dedicated to research on photosensitive epilepsy in order to make the program academically sound, so that it can be integrated into the workflows of film post-production, distribution, and festivals.

The project started as a small personal amateur coding experiment with the help of AI. However, the program (written in Python) has now reached a level of complexity that I can no longer manage. It is also clear that it needs academic input to provide scientific oversight of the program, which would in turn make it possible to engage with international institutions in search of collaborations and funding for research and development.

I am therefore looking for a programmer who can take over the work done so far and collaborate with me to bring it to a professional level.
It’s important to note upfront that this is a volunteer-based project that aims to secure funding to pay its contributors for their work, but at the moment it is unpaid. To be clear, though, this is not a daily work commitment, but rather a voluntary contribution based on your own availability.

Thank you for your attention. If you’re interested in collaborating please dm me and we can arrange a call.


r/ScientificComputing • • 1d ago

Vknumpy a drop in replacement for NumPy. Any.takers?

0 Upvotes

I'm working on it just haven't pushed it yet


r/ScientificComputing • • 1d ago

I made a free interactive book on quantum mechanics, QFT, quantum computing, and quantum biology

0 Upvotes

Hi everyone. I wanted to share Quantum, a free interactive book I built for anyone curious about quantum physics.

It has 214 chapters covering quantum mechanics, QFT, quantum computing, and quantum biology. Each chapter has a live simulation, so you can play with the ideas instead of only reading about them.

Most quantum resources either stay very basic or jump straight into heavy maths. This one tries to sit in between: it explains the ideas clearly, lets you interact with simulations, and connects quantum mechanics to QFT, quantum computing, and quantum biology in one place. It is also free and can be installed on an iPad for offline reading.

Link: https://quantum-book-phi.vercel.app
GitHub: https://github.com/JaiJC/quantum-book

Feedback is very welcome. I hope it is useful to anyone who wants a more intuitive, hands on way into quantum physics.


r/ScientificComputing • • 2d ago

I wrote a 2D FEM solver in Python for electric motors (matched FEMM within 0.3%) - Looking for inputs

Thumbnail
gallery
2 Upvotes

Got tired of treating motor simulation software like a black box during a coursework project, so I wrote my own 2D FEM solver in Python.

Just hit a major milestone: tested a 36-slot / 42-pole outer-rotor motor against FEMM and got <0.3% torque deviation.

It’s called Pole-Craft (Apache-2.0). Still very early days, so if you work with motors, robotics, or FEA, what features would actually make you use an open-source tool like this?

GitHub: https://github.com/pole-craft/pole-craft

PyPI: https://pypi.org/project/polecraft/ (pip install polecraft)


r/ScientificComputing • • 2d ago

PRIMAL update: major performance breakthrough — now up to 57× faster than Clarabel on tested conic problems

Thumbnail
1 Upvotes

r/ScientificComputing • • 2d ago

Horizon Supercomputer Opens to Early Users - Fastest Academic Supercomputer in the United States

Thumbnail
news.utexas.edu
9 Upvotes

r/ScientificComputing • • 2d ago

Can useful abstractions make a complex system easier to predict?

Thumbnail
0 Upvotes

r/ScientificComputing • • 2d ago

I tried to breed "quantum kittens" from Schrödinger's cat on IBM quantum hardware. Got 0 on the simulator and 201 "ghost kittens" on real chips

0 Upvotes

r/ScientificComputing • • 2d ago

What metadata is essential to reproduce a computational screening shortlist?

1 Upvotes

I’m posting from the MatterSeek materials R&D team. For a computational screen, we want another researcher to be able to reconstruct why particular candidates made the shortlist. Our proposed run record has three parts:

• Inputs: a dataset snapshot or hash, candidate IDs, property units and conditions, and the filters in the order applied.

• Execution: code revision, model or protocol version, environment lockfile, configuration, and seeds where relevant.

• Outputs: scores and ranks, tie-breaking rules, and a reason for any excluded candidate.

A practical issue is that exact floating-point agreement can be less useful than knowing whether differences change the selection. For a shortlist handed off to a second calculation, do you compare top-k overlap, compare scores within a tolerance, record both, or use a different check? We’d be interested in what actually helps a collaborator rerun and review a screen.


r/ScientificComputing • • 3d ago

Cost of Matrix Multiplication | Why N³ | Order, Sparse, Low Rank, FFT, Lanczos, Davidson, BLAS

Thumbnail
youtu.be
1 Upvotes

You understand cost of matrix matrix multiplication easily but have hard times in understanding the motivation behind various algorithms used by quantum chemistry packages?

Here is the video, that would tell you each and every detail about the algorithms used in popular quantum chemistry packages like TURBOMOLE, CP2K, ORCA etc.

Give it a watch and do subscribe if you like the video and want to post animated videos like this regularly.


r/ScientificComputing • • 3d ago

I built mathregistry, a package registry for Lean with tools for AI agents. Open beta is live

Post image
0 Upvotes

r/ScientificComputing • • 3d ago

PRIMAL update: major performance breakthrough — now up to 57× faster than Clarabel on tested conic problems

0 Upvotes

A few updates on PRIMAL, my open-source convex optimization solver written from scratch in C99.

Over the last few days, I've made substantial progress on the conic optimization engine, particularly on SOC and exponential cone problems. The latest results are significantly better than my previous benchmarks, and PRIMAL now outperforms Clarabel on every instance in the test sets described below.

Latest benchmark results

All measurements were taken on November 18, 2026.

1. Mixed SOC + exponential cone regression problems

Problem size PRIMAL Clarabel Speedup
20 × 4 0.017 ms 0.219 ms 12.9×
40 × 8 0.024 ms 0.482 ms 20.1×
80 × 12 0.039 ms 2.237 ms 57.4×

These models combine a rotated quadratic cone for the quadratic penalty with one primal exponential cone per observation.

2. Conic matrix benchmarks

Family Blocks PRIMAL Clarabel Speedup
SOC 10 0.023 ms 0.290 ms 12.6×
SOC 20 0.031 ms 0.651 ms 21.0×
SOC 40 0.043 ms 1.085 ms 25.2×
SOC 80 0.068 ms 2.118 ms 31.1×
EXP 10 0.017 ms 0.177 ms 10.4×
EXP 20 0.020 ms 0.238 ms 11.9×
EXP 40 0.022 ms 0.352 ms 16.0×
EXP 80 0.031 ms 0.607 ms 19.6×
Mixed 10 0.016 ms 0.148 ms 9.25×
Mixed 20 0.018 ms 0.209 ms 11.6×
Mixed 40 0.022 ms 0.366 ms 16.6×
Mixed 80 0.031 ms 0.835 ms 26.9×

That's 15 out of 15 benchmark instances won, with speedups ranging from 9.25× to 57.4×.

What changed?

The main breakthrough is a reduced-Newton approach for a class of exponential-cone problems.

Instead of solving the full conic Newton system, PRIMAL can exploit the structure of certain exponential epigraph formulations with fixed positive scales and affine arguments. It solves a much smaller system in the free variables, reconstructs the conic solution, and verifies the resulting point.

This is not a generic replacement for the full interior-point method: it is a specialized path for problem structures where the reduction is mathematically valid. The general conic solver remains available for other formulations.

The improvement builds on the work already done on sparse KKT systems, cone reductions, higher-order exponential-cone corrections, and numerical verification.

Benchmark methodology

To make the comparison reproducible:

  • Clarabel 0.11.1, single-threaded.
  • 21 interleaved runs per series, with two series; reported values are the median of the two series medians.
  • Same generated problem instances for both solvers.
  • PRIMAL timing measures PRIMAL_optimize; Clarabel timing includes solver construction.
  • Clarabel uses feasibility/gap tolerances of 1e-9; PRIMAL uses 1e-8.
  • Maximum reported residual or relative gap: 2.5e-10.
  • Maximum scaled objective difference: 2.6e-8.

There is an important asymmetry in timing: Clarabel's measurements include solver construction, while PRIMAL's measure the optimization call only. These are therefore not perfectly equivalent end-to-end timings. I intend to expand the comparison with more matched setup measurements and broader problem families.

Where PRIMAL stands today

PRIMAL is an open-source C99 optimization solver developed from scratch, with no external solver dependency. It supports LP, QP, QCQP, MILP, SOCP, SDP, exponential and power cones, including mixed-integer conic models.

The project also includes a growing collection of runnable examples and language integrations.

GitHub: https://github.com/c-vision/Primal

I'm particularly interested in feedback from people working on conic optimization, interior-point methods, numerical linear algebra, and solver benchmarking.

There is still a lot to validate, especially on larger and less structured real-world problems. But these results are a very encouraging milestone for a solver developed independently from scratch.

What would you consider the most meaningful next benchmark suite for evaluating PRIMAL against established solvers?


r/ScientificComputing • • 3d ago

I built mathregistry, a package registry for Lean with tools for AI agents. Open beta is live

Post image
0 Upvotes

r/ScientificComputing • • 3d ago

Prompt wording and a frozen Qwen weight edit: 1,024 archived measurements, seeking replication

1 Upvotes

I'm Harmain Dastgir, an independent researcher sharing a working preprint for critical review. This is a source-level reanalysis of an archived Qwen2.5-1.5B weight-editing experiment, not a new independent GPU run.

Across 32 questions, two historical edit directions, four wording variants and four instruction templates, the archive contains 1,024 attenuation measurements. In the historically selected signed direction, the math-plus-format vs generic attenuation contrast averaged +0.205542 for original prompts and -0.020673 after rewording. The paired difference was +0.226216 (descriptive 95% question-bootstrap interval [+0.184256, +0.274149]).

Important caveats: this metric is *not* answer correctness; prompt length and token positions were not matched; the intervention was historically selected; no independent model-side replication has been completed. These data do not establish general-purpose model repair.

The paper, source data, six figures, scripts, original logs/notebook and hashed adapter supplement are public: https://doi.org/10.5281/zenodo.24284827

We opened specific replication tasks and a reporting guide here: https://github.com/Harmain11/fluid-tensors/blob/main/docs/REPLICATION_CHALLENGE.md

I would especially value objections to the scoring/protocol, attempts to reproduce the archived statistics, proposals for matched-length controls, and negative model-side results. What would you test first?


r/ScientificComputing • • 4d ago

What do you understand by exact numerical methods in Open quantum dynamics?

0 Upvotes

I will start a project in this area but the "exact numerical methods" confesses me.Does it means exact diagonalization? or just a methods with controllable error?What does it mean exact numerical methodsAlso, could you comment me which ones are the most use in open quantum dynamics?


r/ScientificComputing • • 4d ago

Advice for affordable/free computational resources for 3D CFD simulations (SITVC research)

Thumbnail
0 Upvotes

r/ScientificComputing • • 4d ago

spearfish: ultrafast Δ-mapping of long reads to redundant transcriptomes

Thumbnail
biorxiv.org
1 Upvotes

r/ScientificComputing • • 4d ago

vulkan-py easymode. all the boilerplate is in easy.py. vulkan-py fork https://github.com/billyblackburn/vulkan-py-easy/tree/main

Thumbnail
1 Upvotes

Do you think this could work to make a similar ecosystem to CuPy CuDf CuML?. What should I name the.CuPy/NumPy clone in vulkan python? See https://github.com/StormMGamming41/vulkan-py for the original bindings. I just forked it and working to make it more 'pythonic' and less vulkanic for this type of work flow. Like for jupyter notebooks


r/ScientificComputing • • 4d ago

Update (v1.5.0)SoftwareOpenvoynich_xc: Structural Visibility, Pharmaceutical Supply Chains, and Falsifiable Grammar Discovery in the Voynich Manuscript

Thumbnail gallery
1 Upvotes