Most Popular

1500 questions
15
votes
2 answers

Is there any way to do "double preconditioning"

Question: Suppose that you have two different (factored) preconditioners for a symmetric positive definite matrix $A$: $$A \approx B^TB$$ and $$A \approx C^TC,$$ where the inverses of the factors $B, B^T, C, C^T$ are easy to apply. When is it…
Nick Alger
  • 3,143
  • 15
  • 25
15
votes
3 answers

Citable references for software best practices

I'm currently writing up my PhD thesis. I spent a significant fraction of my PhD cleaning up and extending existing scientific code, applying software engineering best practices which were previously not used, and would like to write about this in…
user1915639
  • 273
  • 1
  • 5
15
votes
1 answer

Comparing Jacobi and Gauss-Seidel methods for nonlinear iterations

It is well known that for certain linear systems Jacobi and Gauss-Seidel iterative methods have the same convergence behavior, e.g. Stein-Rosenberg Theorem. I am wondering if similar results exist for nonlinear iterations, where at step $k$ the…
hchen
  • 151
  • 1
  • 4
15
votes
3 answers

How to deal with curved boundary condition when using finite difference method?

I'm trying to learn about numerically solving PDE by myself. I've been beginning with finite difference method(FDM) for some time because I heard that FDM is the fundament of numerous numerical methods for PDE. So far I've got some basic…
xzczd
  • 348
  • 4
  • 20
14
votes
3 answers

Are HDF5 files suitable for git revision control?

I am not familiar with the file format used in HDF5, but I am wondering if HDF5 files are suitable for revision control with git (or for example Mercurial or Subversion)? I guess what I mean is: are HDF5 files suitable for line-based diff'ing or…
Thomas Arildsen
  • 321
  • 2
  • 6
14
votes
4 answers

Any recommendations for unit-testing frameworks compatible with code/libraries that use MPI?

Usually, I write serial code, and when I do, I write unit tests with some xUnit-style testing framework (MATLAB xUnit, PyUnit/nose, or Google's C++ testing framework). Based on a cursory Google search, I haven't seen much on how practitioners unit…
Geoff Oxberry
  • 30,394
  • 9
  • 64
  • 127
14
votes
0 answers

Operator Splitting methods for DAEs

After doing some research, I've found that most of the literature on operator splitting methods (e.g. Strang Splitting, Fractional Step, etc.) are specifically designed for a standard problem type of the form: $$u'=(A+B)u.$$ In my application, I…
Paul
  • 12,045
  • 7
  • 56
  • 129
14
votes
3 answers

Comparison of iteration methods: number of iterations vs. cpu time

I am comparing two iterative methods for inverting random square matrices. Since the matrices are random, every test case takes both different amounts of iterations and different elapsed times. My question is, on top of mean CPU time, is the mean…
Srijan
  • 365
  • 1
  • 10
14
votes
1 answer

Scientific computing with Python with modern GPUs with double precision

Has anyone here used double precision scientific computing with new generation (e.g. K20) GPUs through Python? I know that this technology is rapidly evolving, but what is the best way to do this currently? GPU is out of scope for the popular…
clipper
  • 516
  • 3
  • 6
14
votes
4 answers

Difference between Nodes and CPUs when running software on a cluster?

I'm looking into moving some computations of mine to a data center to get more computation power. In the context of this process, I am getting confused by the differentiation of a computation node and a CPU. Apparently some commercial software…
seb
  • 994
  • 1
  • 9
  • 22
14
votes
5 answers

Meshing 3D surface data in python

I have a dataset of 3-dimensional points for which I'd like to construct a mesh, using python. All the software I've seen requires that you provide the edges. Is there a program in python which takes as the input a set of points in 3D and output a…
Imp
  • 141
  • 1
  • 1
  • 3
14
votes
1 answer

Can the advection equation with variable velocity be conservative?

I am trying to understand the advection equation with variable velocity coefficient a bit better. In particular I don't understand how the equation can be conservative. The advection equation, $$ \frac{\partial u}{\partial t} +…
boyfarrell
  • 5,409
  • 3
  • 35
  • 67
14
votes
1 answer

Is there a multigrid algorithm that solves Neumann problems and has a convergence rate independent of the number of levels?

Multigrid methods usually solve Dirichlet problems on levels (e.g. point Jacobi or Gauss-Seidel). When using continuous finite element methods, it is much less expensive to assemble small Neumann problems than to assemble small Dirichlet problems.…
Jed Brown
  • 25,650
  • 3
  • 72
  • 130
14
votes
1 answer

How does density functional theory scale with system size?

Theoretically, how does the time to do a density functional theory (DFT) calculation scale with the number of electrons? I'm interested in "typical" DFT implementations such as VASP, ABINIT, etc., not O(N) codes.
Max Radin
  • 365
  • 1
  • 3
  • 10
14
votes
3 answers

How to express this complicated expression using numpy slices

I wish to implement the following expression in Python: $$ x_i = \sum_{j=1}^{i-1}k_{i-j,j}a_{i-j}a_j, $$ where $x$ and $y$ are numpy arrays of size $n$, and $k$ is a numpy array of size $n\times n$. The size $n$ might be up to about 10000, and the…
N. Virgo
  • 1,223
  • 1
  • 10
  • 23