Most Popular

1500 questions
11
votes
1 answer

Algorithms for community detection for bipartite graphs?

Are there any algorithms for community detection for bipartite graphs (2-mode networks) implemented in igraph, networkX, R or Python etc.? In particular, is there such an implementation in which one would be able to restrict the detection of…
adamo
  • 211
  • 2
  • 5
11
votes
4 answers

Constructing random divergence-free velocity fields

I am trying to simulate decaying homogeneous isotropic turbulence. As initial condition I want a divergence-free vector-field, i.e, $\mathrm{div} U = 0$. How do I initialize random velocity field in an uniform grid such that above condition is…
verito
  • 129
  • 1
  • 8
11
votes
2 answers

Quality of eigenvalue approximation in Lanczos method

I try to familiarize myself with iterative eigenvalue solvers such as Lanczos. So I tried rewrite it to python directly according to wiki. But it doesn't seem to work. The problem: it approximates quite well the largest eigenvalue $\epsilon_{max}$…
Prokop Hapala
  • 927
  • 10
  • 17
11
votes
1 answer

What is the state of the art algorithm for diagonalizing real symmetric matrices?

There are many methods for diagonalizing matrices, probably the most widely used is the combination of Householder transformations and the QR algorithm. Is there any superior method for diagonalizing (large, non-sparse)real symmetric matrices?…
uLoop
  • 213
  • 2
  • 7
11
votes
2 answers

How do you improve the accuracy of a finite difference method for finding the eigensystem of a singular linear ODE

I am attempting to solve an equation of the type: $ \left( -\tfrac{\partial^2}{\partial x^2} - f\left(x\right) \right) \psi(x) = \lambda \psi(x) $ Where $f(x)$ has a simple pole at $0$, for the smallest $N$ eigenvalues and eigenvectors. The…
Andrew Spott
  • 1,155
  • 1
  • 9
  • 22
11
votes
2 answers

How to interpolate multipoint data to the cell centres of an unstructured mesh?

I have sets of multipoint field data, each point data set relates to a single cell of an unstructured mesh. The goal is to interpolate the data to the cell centre, directly or indirectly, in the most accurate way. If I use Inverse Distance Weighted…
tmaric
  • 1,916
  • 1
  • 11
  • 22
11
votes
3 answers

What is the overhead in sparse matrix multiplication

Does matrix multiplication (both Mat*Mat, and Mat*Vec) scale with number of non-zeros, or with the size of the matrix? Or some combination of the two. What about with shape. For example, I have a 100 x 100 matrix with 100 values in it, or a 1000 x…
Andrew Spott
  • 1,155
  • 1
  • 9
  • 22
11
votes
3 answers

How to implement efficient indexing function for two particle integrals ?

This is a simple symmetry enumeration problem. I give the full background here, but no knowledge of quantum chemistry is needed. The two particle integral $\langle ij|kl\rangle$ is: $$ \langle ij|kl\rangle = \int {\psi_i^*({\bf…
Ondřej Čertík
  • 2,930
  • 18
  • 40
11
votes
1 answer

Optimal transport warping implementation in Matlab

I am implementing the paper "Optimal Mass Transport for Registration and Warping", my goal being to put it online as I just cannot find any eulerian mass transportation code online and this would be interesting at least for the research community in…
WhitAngl
  • 195
  • 11
11
votes
2 answers

Efficiency of using petsc4py vs. c/c++/fortran

How much slower is petsc4py vs c/c++/fortran? I realize it will depend significantly on the code being executed, but what about something simple like a matrix-vector product?
Andrew Spott
  • 1,155
  • 1
  • 9
  • 22
11
votes
1 answer

Increasing V-cycles for constant Coarsest Grid Size and increasing Fine Grid size

Problem statement I implemented geometric multigrid for $-\nabla^{2}=f$ where $f=\frac{3\pi^{2}}{4}sin \frac{\pi x}{2} sin \frac{\pi y}{2} sin \frac{\pi z}{2}$ on $\Omega \in [0,1]$ on a unit cube. Dirichlet boundaries on the left face, bottom face…
Gaurav Saxena
  • 467
  • 2
  • 11
11
votes
5 answers

Integral in log-log space

I'm working with functions which, in general, are much smoother and better behaved in log-log space --- so that's where I perform interpolation/extrapolation, etc, and that works very well. Is there a way to integrate these numerical functions in…
DilithiumMatrix
  • 213
  • 2
  • 7
11
votes
1 answer

Projecting out the null-space of $A$ from $b$ in $Ax=b$

Given the system $$Ax=b,$$ where $A\in\mathbb{R}^{n\times n}$, I read that, in case Jacobi iteration is used as a solver, the method will not converge if $b$ has a non-zero component in the null-space of $A$. So, how could one formally state that,…
usero
  • 1,663
  • 2
  • 14
  • 27
11
votes
2 answers

Use of machine learning in computational fluid dynamics

Background: I have only built one working numeric solution to 2d Navier-Stokes, for a course. It was a solution for lid-driven cavity flow. The course, however, discussed a number of schemas for spatial discretizations and time discretizations. I…
EngrStudent
  • 301
  • 2
  • 11
11
votes
1 answer

How to detect the multiplicity for the eigenvalues?

Suppose A is a general sparse matrix, and I want to compute the eigenvalues. I do not know how to detect the multiplicity for the eigenvalues. As far as I know, for a special case, finding the polynomial roots by companion matrix method, we can…
Willowbrook
  • 601
  • 3
  • 10