How to use the class "computeDensity"?

Hi all,

I’ve tried to use the following line of code but it didn’t compile.

lattice.get(someX,someY,someZ).computeDensity(someVariable)

What I’m trying to do with the above code is accessing the cell and sum up the distribution functions of the cell and spit out the density value to “someVariable”.
Could anyone tell me what is wrong with this approach?

In addition, I found out that I can get the density of cells over the entire domain by simply doing this

*computeDensity(lattice)

which can be useful later for me with one condition.
I need to store the computed values in a vector to be used for a third-party library but I have no idea how to convert MultiScalarFieldXD to a vector.

Any help would be greatly appreciated

Thanks in advance,
hjung