Getting information about density at specific lattice cells

Hello everybody,

I am currently trying to understand palabos. I did the tutorials and now i am trying to extract information about macroscopic variables. I can get information about the velocity of a specific cell by using

Array<T,2> velocity;
lattice.get(x, y).computeVelocity(velocity);

as described in the tutorial. How can I get information about the density in the same way? When I try the equivalent form


my compiler complains (no matching function for … computeDensity). But on the other hand i can use “computeDensity(lattice)” to compute the average density.
Does someone know how to calculate density for a specific lattice cell or do you know any examples where this is done?

thanks in advance,


The syntax is:

T density = cell.get(iX,iY).computeDensity();

Thank you for replying so fast.

If i use

T density = cell.get(iX,iY).computeDensity();

as you suggest, it does not work out but if I use “lattice.get” instead it works fine.

T density = lattice.get(iX,iY).computeDensity();

As far as I think it gives me the right value for an arbitrary cell on the lattice (compared to the results in the vtk-file).