# All Questions

8,917 questions
Filter by
Sorted by
Tagged with
126k views

### Recommendations for a usable, fast C++ matrix library?

Does anyone have recommendations on a usable, fast C++ matrix library? What I mean by usable is the following: Matrix objects have an intuitive interface (ex.: I can use rows and columns while ...
9k views

### Is it worthwhile to write unit tests for scientific research codes?

I am strongly convinced of the value of using tests that verify a complete program (e.g. convergence tests), including an automated set of regression tests. After reading some programming books, I've ...
22k views

### What kinds of problems lend themselves well to GPU computing?

So I've got a decent head for what problems I work with are best one in serial, and which can be managed in parallel. But right now, I don't have much of an idea of what's best handled by CPU-based ...
96k views

### Is there a high quality nonlinear programming solver for Python?

I have several challenging non-convex global optimization problems to solve. Currently I use MATLAB's Optimization Toolbox (specifically, fmincon() with algorithm=<...
18k views

### How much better are Fortran compilers really?

This question is an extension of two discussions that came up recently in the replies to "C++ vs Fortran for HPC". And it is a bit more of a challenge than a question... One of the most often-heard ...
13k views

### What are some good strategies for improving the serial performance of my code?

I work in computational science, and as a result, I spend a non-trivial amount of my time trying to increase the scientific throughput of many codes, as well as understanding the efficiency of these ...
35k views

### C++ vs Fortran for HPC

In my computational science PhD program, we are working almost exclusively in C++ and Fortran. It seems like some professors prefer one over the other. I am wondering which one is 'better' or if one ...
31k views

### How do I take the FFT of unevenly spaced data?

The Fast Fourier Transform algorithm computes a Fourier decomposition under the assumption that its input points are equally spaced in the time domain, $t_k = kT$. What if they're not? Is there ...
9k views

### How mature is the “Julia” scientific computing language project?

I'm considering learning a new language to use for numerical/simulation modelling projects, as a (partial) replacement for the C++ and Python that I currently use. I came across Julia, which sounds ...
3k views

### Is it common not to use libraries for standard numerical algorithms, and why?

A lot of numerical algorithms (integration, differentiation, interpolation, special functions, etc.) are available in scientific computation libraries like GSL. But I often see code with "hand-rolled" ...
6k views

### What core skills should every computational scientist have? [closed]

Every scientist needs to know a bit about statistics: what correlation means, what a confidence interval is, and so on. Similarly, every scientist ought to know a bit about computing: the question is, ...
33k views

### What are the conceptual differences between the finite element and finite volume method?

There is an obvious difference between finite difference and the finite volume method (moving from point definition of the equations to integral averages over cells). But I find FEM and FVM to be very ...
7k views

### What guidelines should I follow when choosing a sparse linear system solver?

Sparse linear systems turn up with increasing frequency in applications. One has a lot of routines to choose from for solving these systems. At the highest level, there is a watershed between direct (...
2k views

### What are good ways to document scientific software?

Many times, when I've inherited or encountered scientific code written by other people (or occasionally, even my own work), I've noticed that documentation is either sparse or nonexistent. If I'm ...
9k views

### What are criteria to choose between finite-differences and finite-elements

I am used to thinking of finite-differences as a special case of finite-elements, on a very constrained grid. So what are the conditions on how to choose between Finite Difference Method (FDM) and ...
12k views

### Is it a good idea to use vector<vector<double>> to form a matrix class for high performance scientific computing code?

Is it a good idea to use vector<vector<double>> (using std) to form a matrix class for high performance scientific computing code? If the answer is no. ...
22k views

### What makes Fortran fast?

Fortran has a special place in numerical programming. You can certainly make good and fast software in other languages, but Fortran keeps performing very well despite its age. Moreover, it's easier to ...
8k views

### Functional Programming and Scientific Computing

I apologize if this is a vague question, but here goes: Over the past few years, functional programming has received a lot of attention in the Software Engineering community. Many have started using ...
8k views

### Why is division so much more complex than other arithmetic operations?

I recently encountered a case where I needed an integer division operation on a chip that lacked one (ARM Cortex-A8). While trying to research why that must be, I found out that in general division ...
5k views

### Is algorithmic analysis by flop-counting obsolete?

In my numerical analysis courses, I learned to analyze the efficiency of algorithms by counting the number of floating-point operations (flops) they require, relative to the size of the problem. For ...
19k views

### Which software and workflow is recommend for publication of scientific data and graphs?

Which software provides a good workflow from simple plotting of a few datapoints up to the creation of publication level graphics with detailed styles, mathematical typesetting and "professional ...
84k views

### Parallelizing a for-loop in Python

Are there any tools in Python that are like Matlab's parfor? I found this thread, but it's four years old. I thought maybe someone here might have more recent experience. Here's an example of the ...
2k views

### Where can one obtain good data sets/test problems for testing algorithms/routines?

In evaluating the quality of a piece of software you are about to use (whether it's something you wrote or a canned package) in computational work, it is often a good idea to see how well it works on ...
1k views

### How to link code to publications

Scholarly papers in scientific computing (and many other fields, nowadays) typically involve some amount of code or even whole software packages that were written specifically for that paper or were ...
1k views

### Scientific standards for numerical errors

In my field of research the specification of experimental errors is commonly accepted and publications which fail to provide them are highly criticized. At the same time I often find that results of ...
4k views

### What's the state of the art in parallel ODE methods?

I'm currently looking into parallel methods for ODE integration. There is a lot of new and old literature out there describing a wide range of approaches, but I haven't found any recent surveys or ...
2k views

### Venues for publishing papers that emphasize software

Software is a fundamental part of computational science, and is increasingly recognized as an essential part of the scientific record. Given the value of using existing and well-tested code, it seems ...
31k views

### How does the MATLAB backslash operator solve $Ax=b$ for square matrices?

I was comparing a few of my codes to "stock" MATLAB codes. I am surprised at the results. I ran a sample code (Sparse Matrix) ...
2k views

### What programming paradigms should I be investing in if I want my code to run on petascale machines in the future?

It's pretty clear from a survey of the top500 that the industry is trending towards an exponential increase in processing cores. The largest supercomputers all use MPI for communication between nodes,...
6k views

### Is it possible to have a career in SciComp without contributing to arms research?

I am at an international conference (ICIAM2019) about numerical methods and am surprised by the prevalence of applications directly relatable to arms research. examples: One award winner holds his ...
2k views

### Symbolic software packages for Matrix expressions?

We know that $\mathbf A$ is symmetric and positive-definite. We know that $\mathbf B$ is orthogonal: Question: is $\mathbf B \cdot\mathbf A \cdot\mathbf B^\top$ symmetric and positive-definite? ...
9k views

### Good examples of “two is easy, three is hard” in computational sciences

I recently encountered a formulation of the meta-phenomenon: "two is easy, three is hard" (phrased this way by Federico Poloni), which can be described, as follows: When a certain problem is ...
5k views

### Are there simple ways to numerically solve the time-dependent Schrödinger equation?

I would like to run some simple simulations of scattering of wavepackets off of simple potentials in one dimension. Are there simple ways to numerically solve the one-dimensional TDSE for a single ...
3k views

### What attributes make a figure “professional-quality”?

I've heard people say that plots produced by ORIGIN tend to look polished and "professional," whereas plots produced by Mathematica do not. However, most plot-creation programs are quite configurable ...
14k views

### CUDA vs OpenCL as of late 2013

How do CUDA and OpenCL compare to each other as of late 2013 from a programmer's perspective? My group is thinking about trying to make use of GPU computing. Would we be limiting ourself ...
8k views

### Mathematical Libraries for OpenCL?

I am looking for information from anyone that has tried to use OpenCL in their scientific code. Has anyone tried (recently) ViennaCL? If so, how does it compare to cusp? What about OCLTools? Does it ...
890 views

### How do I make sure that the results of my simulations and the results in my paper are always in sync?

In one of my papers, I list some numerical results in addition to some figures. What I'd like to do is make sure that the numerical results in my paper always agree with the code. Right now, I just ...
119k views

### What is the simplest way to do a user-local install of a python package?

I don't want to deal with virtualenv for a local Python installation, I just want to install a few packages locally without dealing with the PYTHONPATH environment ...
12k views

### why is A*v+B*v faster than (A+B)*v?

$A$ and $B$ are $n \times n$ matrices and $v$ is a vector with $n$ elements. $Av$ has $\approx 2n^2$ flops and $A+B$ has $n^2$ flops. Following this logic, $(A+B)v$ should be faster than $Av+Bv$. Yet,...
14k views

### How to choose a method for solving linear equations

To my knowledge, there are 4 ways to solving a system of linear equations (correct me if there are more): If the system matrix is a full-rank square matrix, you can use Cramer’s Rule; Compute the ...
5k views

### Strange oscillation when solving the advection equation by finite-difference with fully closed Neumann boundary conditions (reflection at boundaries)

I am trying to solving the advection equation but have a strange oscillation appearing in the solution when the wave reflects from the boundaries. If anybody has seen this artefact before I would be ...
12k views

### Performance differences between ATLAS and MKL?

ATLAS is a free BLAS/LAPACK replacement that tunes itself to the machine when compiled. MKL is the commercial library shipped by Intel. Are these two libraries comparable when it comes to performance, ...
2k views

### What tools or approaches are available to speed up code written in Python?

Background: I think I might want to port some code that calculates matrix exponential-vector products using a Krylov subspace method from MATLAB to Python. (Specifically, Jitse Niesen's expmvp ...
5k views

### Modern resources for learning FEM

I need to get started using Finite Element Methods. I am about to start reading Numerical solutions of partial differential equations by the finite element method by Claes Johnson, but it's dated 1987....
2k views

### Why is local conservation important when solving PDEs?

Engineers often insist on using locally conservative methods such as finite volume, conservative finite difference, or discontinuous Galerkin methods for solving PDEs. What can go wrong when using a ...
2k views

### Scientific workflow management system

Can anyone recommend me a good workflow management system (WMS), preferably in Python? So far I have been using GNU Make, but it introduces a layer of complexity that I want to avoid. A good WMS ...
9k views

### When should log1p and expm1 be used?

I have a simple question that is really hard to Google (besides the canonical What Every Computer Scientist Should Know About Floating-Point Arithmetic paper). When should functions such as ...
4k views

### What does “symplectic” mean in reference to numerical integrators, and does SciPy's odeint use them?

In this comment I wrote: ...default SciPy integrator, which I'm assuming only uses symplectic methods. in which I am refering to SciPy's odeint, which uses ...