12 votes

What guidelines should I follow for simulation software projects?

I maintain (and am the main coder of) a simulation software that has been developed for ~8 years and is used by few hundreds people. It all started as a side project during my PhD, and it clearly ...
lr1985's user avatar
  • 677
12 votes
Accepted

What guidelines should I follow for simulation software projects?

"developers lack the skills". Maybe. I think it's much more likely that the developers lack the incentives. Making solid code is difficult and expensive and, in academia, comes with minimal-to-...
Richard's user avatar
  • 3,961
10 votes
Accepted

How should errors be reported in scientific libraries?

I'll give you my perspective, which is encoded in the deal.II project that you reference. First, there are two kinds of error conditions: Errors that can be recovered from, and errors that can not be ...
Wolfgang Bangerth's user avatar
10 votes

How to properly calculate CPU and GPU FLOPS performance?

You can calculate GFLOP rates this way, but the numbers are pretty meaningless on today's hardware: Floating point operations require a variable number of clock cycles. An addition is generally ...
Wolfgang Bangerth's user avatar
10 votes
Accepted

Euler integration of the three-body problem

What you see is a result of Euler integration. One thing you can do is change to a symplectic integration which does not add energy to the system. You can quickly try this out, but moving the update ...
John Alexiou's user avatar
8 votes

What's the fastest software(open source) to solve mixed integer programming problem

If you want to try a bunch of different solvers, give Julia's JuMP modeling framework a try. It lets you write your model as a JuMP model, and then switch out the solvers with one line of code. For ...
Chris Rackauckas's user avatar
8 votes
Accepted

Visualizing the solutions of the Differential equations by varying different parameters

You can try Geogebra (it is free). With SolveODE command and sliders you can do what yo want. For the usage of SolveODE command see. For example by using following command ...
Ömer's user avatar
  • 643
7 votes

Speeding up a linear transform using Python

Assuming that your kernel is somewhat smooth, use low-rank approximation. Here's a naive example: ...
cfh's user avatar
  • 586
6 votes

Extracting system matrices from FEM software

All of the major finite element libraries (such as libMesh; FEniCS; or the project I run, deal.II) provide you with ready access to the system matrix and or any other matrices you need. They typically ...
Wolfgang Bangerth's user avatar
6 votes
Accepted

Best software to do big number calculations quickly

Why not give GMPY2 a try? From the introduction: gmpy2 is a C-coded Python extension module that supports multiple-precision arithmetic. gmpy2 is the successor to the original gmpy module. The gmpy ...
GertVdE's user avatar
  • 6,179
5 votes

How do I write dimensionally agnostic code?

The clear answers if you want to keep Fortran speed are to use a language which has proper code generation like Julia or C++. C++ templates have already been mentioned, so I'll mention Julia's tools ...
Chris Rackauckas's user avatar
5 votes
Accepted

How to solve the transcendental equation: $\tan(x) = \frac{2x}{x^2-1}$

Here is a simple (Matlab) Newton method as a first attempt to help get started. It finds 1087 roots with error below $10^{-11}$. ...
user107904's user avatar
5 votes

Euler integration of the three-body problem

I won't go into the script, but I'd suggest to rely on mathematical libraries, to use/test many other integration schemes (as an example Runge-Kutta schemes), only by changing the call to the ...
basics's user avatar
  • 166
4 votes

Visualizing the solutions of the Differential equations by varying different parameters

You can use DifferentialEquations.jl Online to visualize solutions to differential equations without a hassle. It's built using the Julia suite DifferentialEquations.jl, and the online interface is a ...
Chris Rackauckas's user avatar
4 votes

Pre/Post-processor for an academic finite element solver

Cubit/Trelis for generating meshes (Exodus.II files) and Paraview/Visit usually work well for low order FE codes. The advantage of Exodus.II is that it is a standard and therefore edge/side/face ...
stali's user avatar
  • 1,759
4 votes

Finite volume software packages

Have a look at Pyclaw. This library has been around for quite a while and is fairly robust. It offers: Implementations of several Godunov-type methods and Riemann solvers in 1/2/3D. Adaptive mesh ...
GoHokies's user avatar
  • 2,206
4 votes

Coroutines for ODE solvers

You don't actually need co-routines for this -- you can achieve the same by just using regular callbacks into user code. For example, in the C programming language, the ODE solver routine would have ...
Wolfgang Bangerth's user avatar
4 votes
Accepted

Reference request: C++ and numerical analysis book

You may take a look at Peter Gottschling's Discovering Modern C++, especially chapter 7, where Mario Mulansky (one of the authors of odeint) implements a generic ODE Solver (using Runge-Kutta ...
joni's user avatar
  • 156
3 votes

Any FOSS MATLAB/Octave toolbox for high-speed variable precision arithmetic?

While I do not know of a toolbox which fits the bill, a good open source alternative to MATLAB and Octave which does have a good solution to this problem is Julia. The linear algebra syntax from ...
Chris Rackauckas's user avatar
3 votes

What's the fastest software(open source) to solve mixed integer programming problem

I'd recommend SCIP or HiGHS (www.highs.dev). On the industry standard benchmarks (http://plato.asu.edu/bench.html) their relative performance is similar, but on specific classes of MIPs one may be ...
SparseRunner's user avatar
3 votes

What would be the most helpful way to write code for a paper so that readers can clearly match the results to the code that generates them?

The LaTeX package minted provides very extensive syntax highlighting (based on Pygments) and allows cross-referencing in both directions. You can escape to LaTeX from within the code part (the minted ...
GertVdE's user avatar
  • 6,179
3 votes

Python trust region optimization code that allows ellipsoid-shaped trust regions

Optizelle should be able to handle this. It's open-source and BSD licensed. Specifically, it will solve a trust-region subproblem of the form $$\begin{array}{rcl} \min\limits_{\delta x \in X} &&...
wyer33's user avatar
  • 767
3 votes

Danger of complex arithmetic in scientific computing

You say that the problem with complex arithmetic is that there are different ways to define the scalar product for complex vectors, compared to just one way in the real case. I think the real problem ...
H. Rittich's user avatar
3 votes

Computational science contests. Why arent there any?

I know of one contest to predict crystal structure.
Zythos's user avatar
  • 181
3 votes
Accepted

Most suitable particle-tracking software

Do you wish to model the two-way coupled solid-fluid flows or you wish to carry out PIV or tracking on particle images? If you wish to model the two-way coupled solid-fluid flows, there are numerous ...
BlaB's user avatar
  • 1,157
3 votes

How to solve the transcendental equation: $\tan(x) = \frac{2x}{x^2-1}$

As this is a transcendent equation, finding all roots is not an option. You cannot (in general) find an expression that gives a closed-form for the roots of the equation. So you need to do some ...
GertVdE's user avatar
  • 6,179
3 votes

Software that does naïve or formal simplification of mathematical expressions

What you are looking for is a Computer Algebra System. You should be able to do that in Mathematica, Maple, Maxima or SymPy. Particularly, I show an example in SymPy below. ...
nicoguaro's user avatar
  • 8,500
3 votes

Software for cellular automota

Well Mathematica provides a reasonable amount of intrinsic functionality for working with Cellular Automata. It's not an area of the system I have extensive experience of and I don't know how it ...
High Performance Mark's user avatar
3 votes

Coroutines for ODE solvers

There are integrators which expose a more fine-grained control to the user, e.g., scipy.integrate.ode: ...
Wrzlprmft's user avatar
  • 2,032
3 votes
Accepted

Coroutines for ODE solvers

Not quite a package but the example at the end of the Revised6 Report on the Algorithmic Language Scheme implements a classical Runge-Kutta integrator as a function that returns 'an infinite stream of ...
G. D. McBain's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible