# All Questions

8,916 questions
Filter by
Sorted by
Tagged with
22 views

### Error analysis of Modified Lentz's method

In Numerical Recipes, the authors state: There is at present no rigorous analysis of error propagation in Lentz’s algorithm. This statement is now ~15 years old, so I wonder has this gap in the ...
51 views

### How to use cumtrapz correctly?

I have tried to do a trapeze integration with f(x)=x^2, where I know how the antiderivative looks like, so F(x) = (1/3)x^3 Here's my code, just like I tried: ...
46 views

### Some formulations of domain coupling lead to saddle point problems. Is this merely an artifact?

Background I wanted to learn how to couple FEM and BEM (for the Poisson equation), because I wanted to better understand how open boundary conditions look like. Therefore I worked through the relevant ...
23 views

### How to connect two cylinders to form a knee in Comsol Multiphysics?

I have this I want it to be single bended wire. How to accomplish?
88 views

535 views

### Split-step Fourier method applied on Schrodinger equation

I'm trying to solve a Schrodinger equation of the form $i\frac{\partial}{\partial t}\psi=-\frac{\partial^2}{\partial x^2}\psi + (V(x)+\alpha|\psi|^2)\psi$ using the split-step Fourier method ...
81 views

### Compute Nullspace of Sparse Matrix

I am computing the nullspace of a sparse rectangular $m$ x $n$ matrix $A$, where $m$ << $n$. I do this by computing the QR decomposition of $A^T$ and extract the $n-m$ right-most columns of the ...
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 ...
82 views

### Is the matrix exponential and the Jordan canonical form actually useful for solving differential equations?

All of my yearlong graduate-level Linear Algebra course notes from my professor—an algebraist/representation theorist—shows his love for the exponential map $e^A$ and the Jordan canonical form—and one ...
9k views

### Are there any embarrassingly parallel tasks that require a CPU rather than GPU?

I am looking for tasks that are unsuitable for GPUs gain significant speedup as more CPU nodes are added don't require large data transfer or inter-thread communication between nodes. Do any ...
51 views

### Applying the result of Cuthill-McKee in SciPy (followup)

This is a followup to Applying the result of Cuthill-McKee in SciPy , where I'm not sure the answer given is correct. It's also 4 years old, so I'm trying a new question. The question is still ...
64 views

64 views

### Dealing neighbor list in NVT Monte Carlo (MC) simulation

I'm making a NVT Monte Carlo (MC) simulation code with only short range interaction. I found many MC tutorial codes (usually Lennard-Jones system) in online. However, most of them are doing energy ...
35 views

### Numerical calculation of the Berry connection

I'm doing some numerical calculations involving Hermitian matrices, and derivatives of the eigenvectors. Essentially, I have an n x n, Hermitian matrix H(x), which is dependent on some continuous ...
88 views

### Accurately Computing a Positive Vector in the Nullspace of a Matrix

I'm sure this question has been asked before yet after many hours of searching I am unable to find a definitive answer. The problem at hand is solving the linear system: $$A \mathbf{x} = \mathbf{0}$$ ...
127 views

### Red flags for numerical computing?

I've learnt the hard way that you should avoid: computing small numbers as the difference of two large numbers evaluating chaotic functions with imprecise inputs. Are there any other red flags a ...
95 views

Abstract I have the next equation to find a force, for my problem: $$U=-\int \vec{m}\small{(x)}\times \vec{B}(x)dV$$ $$\vec{F}=-\nabla U$$ Considering 3-dimensional space with x,y,z coordinates, ...
15 views

### How to multiply 2 decision variables and a matrix using python

So, basically our agenda is to assign tour guides to tour groups based on this equation and that will be done by these 2 decision variables z(u,g) and y(g,p) where z(u,g) will be 1 if tour guide 'u' ...
26 views