Open germasch opened 5 years ago
Hi Kai!
The testing branch will be best to check out our work. We are meeting later today though, so that might change!
Hey @germasch. Jeff and I have been debugging the code, and we are having an issue of the data growing uncontrollably as time progresses. As far as we can tell, the code looks good, but something is going wrong, and we can't seem to find it.
So if things are just blowing up, it could be as easy as the timestep being too large (you want something like \Delta t / \Delta x ~ 1), but of course it could be some bug in your code, too.
--Kai
On Mon, Apr 8, 2019 at 8:08 PM fisiceoir notifications@github.com wrote:
Hey @germasch https://github.com/germasch. Jeff and I have been debugging the code, and we are having an issue of the data growing uncontrollably as time progresses. As far as we can tell, the code looks good, but something is going wrong, and we can't seem to find it.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fisiceoir/HPC2019-Project1-KdV/issues/10#issuecomment-481052141, or mute the thread https://github.com/notifications/unsubscribe-auth/AKgzRnHovyo4k8ssLyXeDdHQ1X9w0_Ypks5ve9n2gaJpZM4chPC- .
So we have made our timestep to be very small, but that is not really the problem, we think. It looks more like there is some error at the boundary points. I will attach several photos at later and later times.
Those are at times 0, 150, and 300.
And the timestep is about 1e-6 seconds, with dx=0.02
@germasch our main.cpp calls timestep.cpp, which calls rk4.cpp, which calls func.cpp.
We have a 2D array. Each row of our 2d array is an iteration of timestep. The first row is before timestepping (original data), row 1 is after the first call, and so on.
We think updating the values from timestep into our 2d array is correct. We think our rk4 file is correct mathematically, and func.
The boundary problems we are having leads me to believe timestep.cpp is to blame, but I think we took proper measures to make sure we don't get bad values.
main -> updates row of 2d array by calling stepping stepping -> takes input array (2d[i-1]) and updates output array (2d[i]) by calling rk4 for each element of input array rk4 -> calls func and calculates k values func -> given 5 points, outputs updated point
I agree that it looks like a boundary problem (however, it's hard to be sure). Boundary problems usually get worse if you use lower resolution, so that might help to identify it even more clearly, in particular if it's some kind of off-by-one problem. Another thing that might help to track this down is to use a simpler version of the equation you're solving, e.g., just use "c du/dx" which is just a simple wave equation.
--Kai
On Mon, Apr 8, 2019 at 8:43 PM jefflynn1 notifications@github.com wrote:
@germasch https://github.com/germasch our main.cpp calls timestep.cpp, which calls rk4.cpp, which calls func.cpp.
We have a 2D array. Each row of our 2d array is an iteration of timestep. The first row is before timestepping, row 1 is after the first call, and so on.
We think updating the values from timestep into our 2d array is correct. We think our rk4 file is correct mathematically, and func.
The boundary problems we are having leads me to believe timestep.cpp is to blame, but I think we took proper measures to make sure we don't get bad values.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fisiceoir/HPC2019-Project1-KdV/issues/10#issuecomment-481058481, or mute the thread https://github.com/notifications/unsubscribe-auth/AKgzRsbq7jyRXHkDkPOVE094KRveuc7bks5ve-IigaJpZM4chPC- .
@germasch, would you be available to meet after class tomorrow? We implemented a couple of your suggestions, but did not end up fixing the problem.
Actually, I won't have time tomorrow after class, but I'd have time before, or in the morning.
--Kai
On Mon, Apr 8, 2019 at 9:28 PM fisiceoir notifications@github.com wrote:
@germasch https://github.com/germasch, would you be available to meet after class tomorrow? We implemented a couple of your suggestions, but did not end up fixing the problem.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fisiceoir/HPC2019-Project1-KdV/issues/10#issuecomment-481066260, or mute the thread https://github.com/notifications/unsubscribe-auth/AKgzRiTsc5PFpzqsXkCFfuWXeSfB7C9Aks5ve-y8gaJpZM4chPC- .
Hi @germasch , I unfortunately have work until class. I just found out I got another job phone interview today so I won't be in class today. @fisiceoir Do you want to keep working on the project today? I will have some time tonight.
@germasch
We are both still having major issues. Our code is still going unstable, even if we offset the initial sine wave. We have looked at just about every single calculation and process, and it seems like the problem is always starting at the edges. I recoded the cyclic boundary, and still got the same results. I wanted to check that our numerical equation of state was accurate, since that is the only thing that I cannot be totally sure of. Is this equation correct?
It looks correct to me. If the problem starts at the boundary, the points to a boundary issue, still. If you're around, you could try to find me in my office at/after 4pm.
--Kai
On Fri, Apr 12, 2019 at 2:30 PM fisiceoir notifications@github.com wrote:
@germasch https://github.com/germasch
We are both still having major issues. Our code is still going unstable, even if we offset the initial sine wave. We have looked at just about every single calculation and process, and it seems like the problem is always starting at the edges. I recoded the cyclic boundary, and still got the same results. I wanted to check that our numerical equation of state was accurate, since that is the only thing that I cannot be totally sure of. [image: 32qnow] https://user-images.githubusercontent.com/15788315/56058467-776d2b00-5d2f-11e9-9b80-2c1f5e065a99.png Is this equation correct?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fisiceoir/HPC2019-Project1-KdV/issues/10#issuecomment-482677681, or mute the thread https://github.com/notifications/unsubscribe-auth/AKgzRnVwmvjCz7QvWomHvWlmoKN-U341ks5vgNDDgaJpZM4chPC- .
So I'm glad to see you guys are using github issues etc. I see a lot of branches, though, so I didn't really know where to look for a version, if any to comment on. Let me know if there is a draft you'd like to get feedback on.