# All Questions

8,555 questions
Filter by
Sorted by
Tagged with
21 views

19 views

### Why this LJ molecular dynamics result doesn't converge?

I am doing a molecular dynamics simulation of Leonard Jones 6-12 potential.But instead of converging to a particular value. It always stays between -5.58 to -5.62. The standard value is -5.517. The ...
10 views

### integrate.solve_ivp bugged

I am trying to solve an ODE with solve_ivp, but I am getting strange errors. Documentation: https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.solve_ivp.html ...
18 views

### Numerical flux and source term in FVM (Burger's like equation)

I'm trying to solve the following equation with FVM $$u_t + f(u)_x = g(u)$$ where $g$ is some smooth function of $u$ and $f(u) = \frac{u^2}{2}$. This is really similar to Burger's equation, except ...
13 views

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 ...
205 views

113 views

### Fast algorithm for computing the similarity between two arrays

Suppose there are two arrays (They have the same length), I want to give a quantitative description about the similarity between them. I define a formula like this, which means we can shuffle them ...
65 views

### Generating Random Orthogonal Matrices in C++

I'm looking for an open-source library for the generation of random n-dimensional orthogonal matrices in C++. In python, it looks like such a function is available in the NumPy package. But I was not ...
28 views

### Numpys tensordot and what is happening mathematically

I've encountered a program where np.tensordot was used, so I tried looking it up but I can't really understand what this function is doing... I feel rather ...
56 views

### Is C++ and Object-Oriented Numeric Computing for Scientists and Engineers by Daoqi Yang still relevant?

I'm looking to learn C++ primarily from a scientific computation perspective. The approach of the textbook seems ideal to me as it covers C++ from first principles with an emphasis on numerical ...
83 views

### Sparse matrix-matrix multiplication using AVX2

I have two sparse general matrices stored in CSR format I need to multiply. Is there any chance to gain performance using AVX2? In general the matrices are big (hundreds of millions of non-zeros and ...
126 views

### How to compute all the eigenvalues of a large sparse matrix using matlab?

In matlab, there are 2 commands named "eig" for full matrices and "eigs" for sparse matrices to compute eigenvalues of a matrix. And eig(A) computes all the eigenvalues of a full matrix and eigs(A) ...
45 views

### Solve the 1D Poisson equation by integrate twice the charge density

Let's say I have a set of data (1-D array) called charge density along the $z$ direction (obtained from DFT calculation), and I want to integrate it twice with respect to $z$ coordinates points (i.e., ...
11 views

### How to detect fraud rows given possible states? [closed]

Suppose we have a database with attributes Player_ID, Source_of_app, Post_install_activity. Post_install_activity includes 4 possible actions (e.g. "install", "lvl_reached_3", "lvl_reached_5", "...
18 views

96 views

### Numerically stable and fast sum of last K elements in sequence

Suppose I have a long, possibly infinite, sequence $x := [x_1, x_2, ...]$, and I want to use it to compute another sequence $y:=[y_1, y_2, ...]$ where each element is the sum of the last K elements of ...
27 views

### Linear advection equation: 1D wave with reflection at boundaries (solid walls)

I recently asked a question about this topic, but too much was unclear to me at the time which yielded poor response. (You can find the previous question here). Anyway, I am now trying to solve the ...
35 views

### Inverse Newton Method for optimization: is this the correct algorithm?

I am trying to implement the algorithm in this article. I have already asked a question before about it here, and I am trying to figure out what I am doing wrong. This time, it's this section of the ...
42 views

### Is there an efficient algorithm for calculation of continued fraction expansion from decimal digits?

Suppose to calculate the continued fraction expansion of $\pi$, the common-sense algorithm would be to take the decimal part, perform inversion, which will give the next term as integer part, and the ...
35 views

### Spectral solver on em-pic

I'm recently studying for the spectral solver to implement EM-PIC code. I read an article and have some questions. Many PIC codes uses spectral solver to overcome numerical artifacts on FDTD. In the ...
38 views

### Is this behaviour normal for a Leonard Jones monte carlo simulation?

I am simulating a Leonard Jones fluid using MC simulation. The code always uses a reduced unit. I want to find the potential energy of the system.Periodic boundary condition implemented . I have ...
65 views