Re:Accelerate Python code by importing Taichi
by xkevio on Thursday September 08, 2022 @08:15PM
(#32773788)
I think you might have gotten your symbols mixed up a litte.
From what I understand, just \nabla(f) describes the gradient of a function f -- meaning all the first order partial derivatives (of a certain point) in a vector.
\nabla * f describes the divergence of the function f -- meaning a scalar field of the quantity of the vector field's sources at each point.
\nabla * \nabla(f), divergence of gradient, then describes the Laplace operator. Also written as \nabla^2(f) or \Delta(f) -- note that it's an uppercase delta.
Re:Accelerate Python code by importing Taichi
by soVeryTired on Friday September 09, 2022 @05:37AM
(#32777253)
You’re absolutely right - how embarrassing! It’s been a few years since I’ve touched this stuff.
Re:Accelerate Python code by importing Taichi
by jesuslop on Friday September 09, 2022 @08:26AM
(#32778282)
Glitch apart, thanks for expanding, that was what I meant.
Re:Accelerate Python code by importing Taichi
by qorrect on Friday September 09, 2022 @09:26AM
(#32778928)
How can I get these \nabla s to render, is there a plugin or something ?
Re:Accelerate Python code by importing Taichi
by xkevio on Friday September 09, 2022 @06:31PM
(#32785683)
HN doesn't support LaTeX in comments sadly, so I am just writing it out as you would before rendering it with LaTeX.
Maybe there are add-ons that detect valid LaTeX math symbols and convert them whenever possible but as-is you can't get it to render within the comments.
Re:Accelerate Python code by importing Taichi
by soVeryTired on Friday September 09, 2022 @07:31PM
(#32786122)
Yeah, it’s a brain-render unfortunately. Once you’ve written enough latex you work pretty comfortably with just the text for communication.
Then the diffusive part says
du(x, t)/dt = \nabla_x u(x, t).
The \nabla term is the laplacian: a multivariate form of the second derivative.
The equation says that a short time from now, u(x, t) will change in proportion to the average value of u, calculated over a small ball surrounding the point x, minus the value of u at the point x itself.
If there's less "stuff" in the points that neighbour x than at x itself, the function will decrease over time. Similarly if there's more stuff at the neighbours of x, u(x, t) will increase. This is the basis of diffusive behaviour.
(Edit: I think the equation in the article is wrong, unless I've misunderstood something: they have a delta (first derivative) when they should have a nabla (laplacian))