Most Popular

1500 questions
12
votes
2 answers

Gradient descent and conjugate gradient descent

For a project, I have to implement these two methods and compare how they perform on different functions. It looks like the conjugate gradient method is meant to solve systems of linear equations of the for $$ A\mathbf{x} = \mathbf{b} $$ Where $A$…
Philipp
  • 223
  • 1
  • 2
  • 7
12
votes
3 answers

Choice of step size using ODEs in matlab

Hey there and thanks for giving time to look at my question. This is a updated version of my question which I posted earlier in physics.stackexchange.com I'm currently studying a 2D exciton spinor Bose-Einstein Condensate and am curious about the…
user4388
12
votes
1 answer

Using fixed point iteration to decouple a system of pde's

Suppose I had a boundary value problem: $$\frac{d^2u}{dx^2} + \frac{dv}{dx}=f \text{ in } \Omega$$ $$\frac{du}{dx} +\frac{d^2v}{dx^2} =g \text{ in } \Omega$$ $$u=h \text{ in } \partial\Omega$$ My goal is to decompose the solution of this coupled…
Paul
  • 12,045
  • 7
  • 56
  • 129
12
votes
1 answer

Replacing Mathematica's QuasiMonteCarlo integration in C++

I have a Mathematica program which performs some integrals in 3 or 4 dimensions using the QuasiMonteCarlo method. The problem is, it takes an annoyingly long time to run, to the point where some of these calculations can't complete in the maximum…
David Z
  • 3,383
  • 2
  • 27
  • 34
12
votes
3 answers

Confusion about compressed sensing problem

I read some references including this. I am kind of confused what optimization problem compressed sensing builds and tries to solve. Is it $$\begin{array}{ll} \text{minimize} & \|x\|_1\\ \text{subject to} &…
Tim
  • 1,281
  • 1
  • 12
  • 27
12
votes
4 answers

Scalability of Fast Fourier Transform (FFT)

To use the Fast Fourier Transform (FFT) on uniformly sampled data, e.g. in connection with PDE solvers, it is well known that the FFT is an $\mathcal{O}(n\log(n)$) algorithm. How well do the FFT scale when processed in parallel for $n\to\infty$…
Allan P. Engsig-Karup
  • 3,226
  • 19
  • 31
12
votes
6 answers

Finite differences on domains with irregular boundaries

Can anybody help me to find the books on numerical solutions(finite difference and Crank–Nicolson methods) of Poisson and diffusion equations including examples on irregular geometry, such as a domain consisting of the area between a rectangle and a…
liona
  • 269
  • 3
  • 7
12
votes
3 answers

Numerically stable explicit solution of small linear system

I have an inhomogeneous linear system $$ Ax=b $$ where $A$ is a real $n\times n$ matrix with $n\leq 4$. The nullspace of $A$ is guaranteed to be of zero dimension so the equation has a unique inverse $x=A^{-1} b$. Since the result enters the…
highsciguy
  • 1,119
  • 9
  • 16
12
votes
1 answer

Dirichlet-Neumann boundary condition solution becomes unstable - Pressure Correction Method

I am simulating incompressible flow over a cylinder at Reynold number of 500. I am solving navier stokes equation using pressure correction method. My solution becomes unstable after certain time (approximately 5s). I have tried refining my mesh,…
illusion
12
votes
4 answers

Parallel (GPU) algorithms for asynchronous cellular automata

I have a collection of computational models that could be described as asynchronous cellular automata. These models resemble the Ising model, but are slightly more complicated. It seems as if such models would benefit from being run on a GPU rather…
N. Virgo
  • 1,223
  • 1
  • 10
  • 23
12
votes
5 answers

Repeatedly solving $\mathbf{A} \mathbf{x} = \mathbf{b}$ with same $\mathbf{A}$, different $\mathbf{b}$

I am using MATLAB to solve a problem that involves solving $\mathbf{A} \mathbf{x}=\mathbf{b}$ at every timestep, where $\mathbf{b}$ changes with time. Right now, I am accomplishing this using MATLAB's mldivide: x = A\b I have the flexibility to…
Doubt
  • 423
  • 4
  • 10
12
votes
3 answers

Sparse linear solver for many right-hand sides

I need to solve the same sparse linear system (300x300 to 1000x1000) with many right hand sides (300 to 1000). In addition to this first problem, I would also like to solve different systems, but with the same non-zero elements (just different…
nat chouf
  • 353
  • 2
  • 10
12
votes
1 answer

cholesky factorization of block matrices

I have a block matrix (either 2x2 blocks or 3x3 blocks) which is the covariance matrix for a joint space of two or three multivariate normal variables. ie C = [Cxx Cxy; Cxy' Cyy]; I need to compute the cholesky factorisation of this matrix (C), as…
robince
  • 223
  • 2
  • 5
12
votes
1 answer

How exactly does the *full* multigrid algorithm run?

So I understand (or at least I believe I do) how a V-cycle runs. I've written in Matlab the 1-D, recursive version of a V-cycle. However, when I ran my code for FMG, my solution wasn't converging. I believe my trouble lies in my understanding of the…
TheRealFakeNews
  • 593
  • 1
  • 4
  • 16
12
votes
2 answers

C++ library for nonlinear constrained minimization

I am currently trying to solve nonlinear constrained minimization problem as implemented in matlab "fmincon" function. My expectations are, minimize(fun1,x0,uB,lB,fun2) where x0 is initial state, fun1 is function that needs to be minimized, uB are…
Peter Kottas
  • 121
  • 1
  • 2
  • 3