Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

New answers tagged

2 votes

Numerically solving the Advection-diffusion equation with no-flux boundary condition leads to violation of mass conservation

For $\alpha, \beta = \mathrm{const}$ you can rewrite your equation $$ \frac{\partial C}{\partial t}=\alpha\frac{\partial^2 C}{\partial x^2}+\beta \frac{\partial C}{\partial x}, \qquad (1), $$ to $$ \...
ConvexHull's user avatar
  • 1,335
2 votes

BSplines from scipy not defined on whole range of the knots

The reason your answer differs is because of spline boundary conditions. Consider the spline $B_{j,1}$. To compute this we need $B_{j,0}$, $B_{j+1,0}$, and $\omega_{j,1}$ and $\omega_{j+1,1}$. $$ B_{j,...
helloworld922's user avatar
1 vote

Auto differentiation with JAX in python and ForwardDiff.jl in Julia give matrices with different values but same structure. Are the results right?

Are you sure the implementations of the function that you wish to differentiate return the same results both in Julia and Python? That seems the first place to look for bugs.
Federico Poloni's user avatar

Top 50 recent answers are included