lattice.getNx() returns different value when called in a data processor

Hi!

I have written a data processor and I noticed that, when I call lattice.getNx() in this data processor the returned value is different from the number of grid points in my simulation.

In my current example I have 200x200 grid points. lattice.getNx() in the main() program returns the correct 200.
When called in the data processor it return 202.

Why is that so? How do I get the correct value?

Here is a part of my functional:

[code=“cpp”]
class SetBoundaryForceFunctional2D : public BoxProcessingFunctional2D_L<T, Descriptor> {
public:
virtual void process(Box2D domain, BlockLattice2D<T,Descriptor>& lattice)
{
T r0 = 0.18lattice.getNx();

}
virtual SetBoundaryForceFunctional2D<T, Descriptor>
clone() const {
return new SetBoundaryForceFunctional2D(*this);
}
virtual void getTypeOfModification(std::vectormodif::ModifT& modified) const {
modified[0] = modif::staticVariables;
}