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 ...
  • 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-...
  • 3,586
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 ...
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 ...
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 ...
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 ...
  • 643
8 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 ...
7 votes
Accepted

Using computational libraries on a machine without root access

Almost everything you can build and install in your own space. With GNU autotools, you can do something like ./configure --prefix=/path/to/your/work/space ... and ...
  • 10.9k
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: ...
  • 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 ...
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 ...
  • 6,109
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 ...
5 votes

Can other running processes harm the performance of my simulation?

If you just want the computational results and aren't running benchmarking tests then this isn't a serious problem. If you're trying to benchmark the performance of the code and get repeatable run ...
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}$. ...
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 ...
  • 151
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 ...
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 ...
  • 1,779
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 ...
  • 2,116
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 ...
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 ...
  • 156
3 votes
Accepted

Can other running processes harm the performance of my simulation?

I am assuming that your computer is multi-core. In that case your operating system will probably delegate those background processes to one of the cores not being used by your simulation. If your ...
  • 1,859
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 ...
3 votes

What are some tips on developing a problem-specific ODE solver?

I assume you have already verified that your system is stiff? Otherwise you might be paying a significant performance penalty for using an implicit solver. The next thing I suggest is to gather more ...
  • 5,844
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} &&...
  • 717
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 ...
  • 6,109
3 votes
Accepted

Help on writing sofware: general guidelines, in particular separation of computation and visualization

My first question is, when it comes to writing the software what is the best practice for the separation of these steps? Should a program do all of these steps or is it better to divide the steps ...
3 votes

Computational science contests. Why arent there any?

I know of one contest to predict crystal structure.
  • 181
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 ...
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 ...
  • 1,137
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 ...
  • 6,109

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