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 ...
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-...
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 ...
9
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 ...
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
...
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:
...
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 ...
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
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 ...
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 ...
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 ...
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 ...
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
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} &&...
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 ...
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
Computational science contests. Why arent there any?
I know of one contest to predict crystal structure.
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 ...
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 ...
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.
...
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 ...
3
votes
Coroutines for ODE solvers
There are integrators which expose a more fine-grained control to the user, e.g., scipy.integrate.ode:
...
3
votes
Accepted
Solution of Coupled Differential equation for a 2d linear flow using RK4 method in python 3
You are implementing the system
$$
\pmatrix{\ddot x_1\\\ddot x_2}
=
\pmatrix{1&1\\-4&2}
\pmatrix{x_1\\x_2}
$$
in its first-order version with $v_k=\dot x_k$. It is not surprising that this ...
3
votes
Euler integration of the three-body problem
Some napkin calculations to see if the "physical reality" is sufficiently different from the results shown:
The total mass $M$ is $30$, with $G=10$ one gets $\mu=GM=300$. For the only weakly ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
software × 198computational-physics × 30
simulation × 13
linear-algebra × 12
python × 11
finite-element × 10
fluid-dynamics × 10
c++ × 10
parallel-computing × 10
optimization × 9
hpc × 9
pde × 8
numerics × 8
software-recommendation × 8
visualization × 7
mesh-generation × 7
libraries × 7
documentation × 7
algorithms × 6
computational-geometry × 6
electromagnetism × 6
matlab × 5
ode × 5
open-source × 5
reproducibility × 5