Live data from Hacker News

Poisson's Equation

mattferraro.dev

11–20 of 167 posts

Re: Poisson's Equation

#11
post #4

Great post, one nitpick -- I wouldn't say that a matrix is a "sparsely defined" function, but rather a function defined on a finite grid. It might also be worth pointing out that same approach works for any graph, not just a grid.

Also, what's confusing is that algebra usually uses matrices to describe linear functions from n-dimensional to m-dimensional vector spaces. Matrix has n rows, m columns, you give it an n-dim vector and after matrix multiplication you get back an m-dim vector.

The author uses a matrix quite differently. You give it two integer coordinates i and j and it gives you the value at position (i, j) back. That's a valid use, but not quite what you'd expect in a math-oriented article.

Re: Poisson's Equation

#12
post #7
post #5

Earlier quoted context omitted.

At the end the author mentions there are a large number of methods available for solving. Also mentions there are a much larger set of applications that those discussed.

Sure! But it's a bit surprising that they do not use the language-provided linear solver and write simply f=A\b

Wait, how does this work? I'm really rusty, what would the f, A and b correspond to here?

Re: Poisson's Equation

#13
post #9

Sorry but can there be more context to why it is a powerful tool?

This is a typical issue with HN posts. Some poor soul wrote a somewhat competent and maybe even lengthy blog post / article about something they really care about and are knowledgeable about. It may be directed at a specific audience, or maybe just screaming into the void to record down some insight they had for themselves to read again later, or similar. And they use a more-than-necessary general title like "the bes…

Just to point out, it seems like the author themselves submitted the story to HN. Still I agree with your reasoning, but I think slight clickbaity titles do get clicks which is why we keep seeing them.

Re: Poisson's Equation

#14
post #7

Earlier quoted context omitted.

Sure! But it's a bit surprising that they do not use the language-provided linear solver and write simply f=A\b

Wait, how does this work? I'm really rusty, what would the f, A and b correspond to here?

It's the common way to solve a linear system in octave, matlab and julia.

You have an invertible square matrix A, a vector b of the same dimension, and you want to find a vector x such that "A*x=b". Then you write "x=A\b", which is like "x=A^(-1)*b" but does not get to compute the full inverse matrix (which is useless).

Re: Poisson's Equation

#16
post #9

Sorry but can there be more context to why it is a powerful tool?

This is a typical issue with HN posts. Some poor soul wrote a somewhat competent and maybe even lengthy blog post / article about something they really care about and are knowledgeable about. It may be directed at a specific audience, or maybe just screaming into the void to record down some insight they had for themselves to read again later, or similar. And they use a more-than-necessary general title like "the bes…

I'd rather have more submissions like this on the HN frontpage than the slew of entrepreneurship advice (good or bad), programming-languages-du-jour and disguised content marketing.

Anyway, the premise that "everything I see has to appeal to me" would best stay on YouTube where it originated.

Re: Poisson's Equation

#17

Sorry but can there be more context to why it is a powerful tool?

Apropos of nothing, some of my first programming lessons were FORTRAN programs from my dads old engineering textbooks. The book’s graphics showed them being handwritten on graph paper and even showed the punch cards they would ultimately be put on.

One of the most impressive programs solved Laplaces equation for heat flow in a pipe. They used some mysterious plotting library that put ASCII art to draw contour lines and output directly to a line printer. I thought it was the coolest thing ever, but it was hard for a high school kid to understand.

Over the years I’ve thought of writing that program in a modern language, but it was never worth the time and effort to go over that FORTRAN program in detail. Numerical methods are too often explained from the point of view of mathematicians and engineers, and not computer programmers.

The blog post here is 1000x more readable and much higher quality and does a lot to demystify the subject. I especially like his progression from simple brute force methods to more efficient solutions…which is the natural way to learn. His comment about “Laplace’s equation just means every point is the average of its neighbours” is perfect.

Believe or it not I was in need of just such a tutorial … for something I’ve been thinking about at work. His article really hit the spot and I’m grateful for it.

Re: Poisson's Equation

#18

Earlier quoted context omitted.

Wait, how does this work? I'm really rusty, what would the f, A and b correspond to here?

It's the common way to solve a linear system in octave, matlab and julia. You have an invertible square matrix A, a vector b of the same dimension, and you want to find a vector x such that "A*x=b". Then you write "x=A\b", which is like "x=A^(-1)*b" but does not get to compute the full inverse matrix (which is useless).

Don’t forget APL. I can’t say for sure but I imagine this \ operator came from there.

Re: Poisson's Equation

#19
post #9

Earlier quoted context omitted.

This is a typical issue with HN posts. Some poor soul wrote a somewhat competent and maybe even lengthy blog post / article about something they really care about and are knowledgeable about. It may be directed at a specific audience, or maybe just screaming into the void to record down some insight they had for themselves to read again later, or similar. And they use a more-than-necessary general title like "the bes…

I'd rather have more submissions like this on the HN frontpage than the slew of entrepreneurship advice (good or bad), programming-languages-du-jour and disguised content marketing. Anyway, the premise that "everything I see has to appeal to me" would best stay on YouTube where it originated.

There should exist a subreddit for exactly these type of articles which are in depth. Who know article like this may want someone to learn something entirely different than their domain and then they end up applying it in their domain in a whole new way.

Re: Poisson's Equation

#20

Sorry but can there be more context to why it is a powerful tool?

It is easier to study from a theoretical point of view (easier that the heat or the wave equation: [1], Ch. 2), and it's easier to implement a solving method. When you are learning the finite element method, this is one of the first examples that people use to test if they got the right implementation.

Now, I wonder if the author regards it important in his particular area (aerospace engineering), I'm new to the field so I don't see how. Right now I'm reading a book [0] on models to solve problems concerning aerospace applications and they mostly use a simplified form of the Navier-Stokes equations together with some elasticity assumptions.

[0] Fluid Structure Interacion, Morand-Ohayon.

[1] Partial Differential Equations, Evans.

Post reply on HN