Most Popular

1500 questions
20
votes
6 answers

Python vs FORTRAN

Which one is better: FORTRAN or Python? And I guess that in both cases you need Gnuplot, am I right? I'm working on a Windows machine at the moment. I'd like to use it to get numerical solutions for physics-problems, including Monte-Carlo…
Nick
  • 413
  • 1
  • 4
  • 10
19
votes
4 answers

Is there a general-purpose library for structured grid adaptive mesh refinement?

Adaptive mesh refinement (AMR) is a common technique for dealing with the problem of widely varying spatial scales in the numerical solution of PDEs. What general-purpose libraries exist for AMR on structured grids? Ideally I'd like something in…
David Ketcheson
  • 16,522
  • 4
  • 54
  • 105
19
votes
3 answers

Euclidean distance in Octave

I would like to know if there is a quick way to compute the Euclidean distance of two vectors in Octave. It seems that there is no special function for that, so should I just use the formula with sqrt?
Mouna
  • 301
  • 1
  • 2
  • 5
19
votes
3 answers

Problems where Conjugate gradient works much better than GMRES

I am interested in cases where Conjugate gradient works much better than GMRES method. In general, CG is preferable choice in many cases of SPD (symmetric-positive-definite) because it requires less storage and theoretical bound on convergence rate…
arbitUser1401
  • 465
  • 3
  • 12
19
votes
6 answers

What is the best way to do reproducible research if you need proprietary libraries?

Reproducible research in computation aims to make the code needed to generate the results in a computational paper available to other researchers so that they can run this code to reproduce the results in that paper. I'd like to make all of my…
Geoff Oxberry
  • 30,394
  • 9
  • 64
  • 127
19
votes
1 answer

How to derive the Weak Formulation of a Partial Differential Equation for Finite Element Method?

I have taken a basic introduction to Finite Element Method, which did not emphasize a sophisticated understanding of a 'weak formulation'. I understand that with the galerkin method, we multiply both sides of the (elliptical) PDE by a test function…
Paul
  • 12,045
  • 7
  • 56
  • 129
19
votes
5 answers

State of the Mac OS in Scientific Computing and HPC

Back towards the dawn of OS X, there seemed to be a great deal of hubbub, at least in the Mac world (I was nowhere near scientific computing at the time) about the Mac OS as a platform for scientific computing and HPC applications. XGrid came out of…
Fomite
  • 2,383
  • 1
  • 18
  • 25
19
votes
5 answers

What is the advantage of multigrid over domain decomposition preconditioners, and vice versa?

This is mostly aimed for elliptic PDEs over convex domains, so that I can get a good overview of the two methods.
Jungho Lee
  • 219
  • 2
  • 5
19
votes
2 answers

Writing the Poisson equation finite-difference matrix with Neumann boundary conditions

I am interested in solving the Poisson equation using the finite-difference approach. I would like to better understand how to write the matrix equation with Neumann boundary conditions. Would someone review the following, is it correct? The…
boyfarrell
  • 5,409
  • 3
  • 35
  • 67
19
votes
4 answers

Row major versus Column major layout of matrices

In programming dense matrix computations, is there any reason to choose a row-major layout of the over the column-major layout? I know that depending on the layout of the matrix chosen, we need to write the appropriate code to use the cache memories…
smilingbuddha
  • 191
  • 1
  • 3
19
votes
3 answers

Why do we usually not want the eigenvalues of non-symmetric matrices?

I came across this line in a class note I am reading where it discusses finding eigenvalues of matrices. In reality we don't go all the way with Arnoldi. We stop at a decent value of . Then the eigenvalues of are (usually) good approximations to …
CuriousMind
  • 383
  • 2
  • 7
19
votes
1 answer

Catastrophic cancellation in logsum

I'm trying to implement the following function in double-precision floating point with low relative error: $$\mathrm{logsum}(x,y) = \log(\exp(x) + \exp(y))$$ This is used extensively in statistical applications to add probabilities or probability…
Neil Toronto
  • 293
  • 1
  • 6
19
votes
1 answer

Difficulty with Spectral Method using Chebyshev Polynomials

I am having a bit of difficulty in trying to understand a paper. The paper uses spectral method to solve for an eigenvalue that comes from a system of coupled ODEs. I will write out only one equation now, because it is enough to get to the crux of…
tau1777
  • 451
  • 2
  • 5
19
votes
5 answers

Parallel Scientific Computation Software Development Language?

I want to develop a parallel scientific computation software from scratch. I want some thoughts on which language to start. The program involves reading/writing data to txt files and doing heavy computations in parallel, with many LU factorizations…
electrique
  • 343
  • 2
  • 9
19
votes
4 answers

Selecting most scattered points from a set of points

Is there any (efficient) algorithm to select subset of $M$ points from a set of $N$ points ($M < N$) such that they "cover" most area (over all possible subsets of size $M$)? I assume the points are in 2D plane. The naive algorithm is simple, but…
Libor
  • 393
  • 2
  • 12