Skip to main content
7 events
when toggle format what by license comment
Nov 2, 2016 at 18:48 comment added P. G. @LorenzoFabbri (I messed up my previous comment...) If your instructor wanted you to use this grid, it's probably a mistake.
Nov 2, 2016 at 18:42 comment added P. G. @LorenzoFabbri You can easily check if your solution is correct by using the analytical solution to your problem. If your instructor
Nov 2, 2016 at 12:21 comment added Steve @LorenzoFabbri Your points lie outside $(0,1)$? Well your PDE is defined on $(0,1)$ with BCs on $0$ and $1$, so not having your spatial points in this range doesn't makes sense to me. See my edit answer for a link to non-uniform finite difference operators
Nov 2, 2016 at 11:43 comment added wrong_path I think I am able to do that with uniform grids (I do not know how to check if the solution is correct), but the problem is only with non-uniform grids. The points are outside the range $0,1$. I am using only n = 4; k = 0:n; x = 1 - 0.5*cos(pi*k/n); as in the notes written by the instructor.
Nov 2, 2016 at 10:32 comment added P. G. Try to do it with the uniform grid first to understand how to solve the problem in general. To use a non-uniform grid you have to do a transformation of your derivative between your grid and a reference grid, in which you are calculating the derivative.
Nov 2, 2016 at 10:02 comment added wrong_path Thank you for the reply. The problem is that I have to use a non-homogeneous grid so I was trying to do that from the beginning! Thanks. I did mistake with the derivation now it is correct!
Nov 1, 2016 at 21:44 history answered P. G. CC BY-SA 3.0