Unused function in tutorial 2?

At long, long last I finally get back to trying to wrap my head around LBM and Palabos. I’ve been going through the tutorials and I noticed something that I at least couldn’t find any comments on here when searching - hope I’m not asking about something completely obvious here!

In tutorial 2, the void function initializeConstRho (line 50 in the version I downloaded) doesn’t ever seem to get called for anything. I tried commenting it out and the simulation seemed to run fine without it. Does it actually serve some purpose, or is it just some remnant from development?

Hello Amadeus,

it it true that this function is not called so it seems to be there by mistake. You can try and change it so that you initialize the density with a higher value in a subset of the computational domain, and call it in the place of initializeRhoOnDisk to practice.

Best,
Dimitris

Thanks for the reply! Yea, that confirms what I thought, but I’m glad someone more knowledgeable could double check. Otherwise, that’s one of those little things that nags at you and makes you wonder if you’ve misunderstood something.