aboria / Aboria

Enables computations over a set of particles in N-dimensional space
https://aboria.github.io/Aboria
Other
105 stars 30 forks source link

Bug when Changing Particles Positions #31

Closed JabirSS closed 6 years ago

JabirSS commented 6 years ago

Dear @martinjrobins ,

I am facing a strange bug.

I'm doing the following in my main file:

 //create particles, symbols, etc...

v[a]+=0.5*dt*dvdt[a];
//write vtk
x[a] += 0.5 * dt * v[a];
//write vtk

The first VTK file created above seems fine, however, when examining the second file, I see that the values of dvdt in addition to several other variables have changed drastically ( up to +/- 1.0 e13)! As you can see nothing was done in between aside from shift the positions, so I'm truly puzzled as to why that happened. I have tried so many things to try and find out what is wrong, but no luck so far... I'd greatly appreciate any ideas you might have!

martinjrobins commented 6 years ago

Hi @JabirSS. I can't see anything from the code you have provided, are you able to attach the full code to this issue?

One thing I can think off: when you change the positions, you change the order of the particles in the particle set, so the order in which they are written to the vtk will change (however their ids should stay the same), could that be the issue?

JabirSS commented 6 years ago

Dear @martinjrobins , Thanks for your quick reply, as always! I don't think that's the issue here but I have sent the source file to the email you mention on github.

martinjrobins commented 6 years ago

I haven't gotten this email yet, please try and resend to martin.robinson@cs.ox.ac.uk

JabirSS commented 6 years ago

Hi @martinjrobins,

Seems like the email got blocked because of the attachment!

I dug a little deeper and realized that after all, Aboria had nothing to do with the issue! It seems to be related to my IDE/compiler, as .o files got mixed up. Creating a new project with previously written source files solved the problem.

Sorry to have bothered you with this. Please feel free to delete this report.

martinjrobins commented 6 years ago

no worries, glad you got it sorted.