How to write a fieldScalar with Palabos?

Dear community,

I am in this moment write a class for calculation of strain strength as

template<typename T, template class Descriptor>
auto_ptr<MultiScalarField2D > computeShearstrength(MultiBlockLattice2D<T,DESCRIPTOR>& lattice,
Box2D domain, plint component)
{
std::auto_ptr<MultiScalarField2D > density = *computeDensity(lattice);
std::auto_ptr<MultiTensorField2D<T,3> > shear = *computeStrainRate(*computeVelocity(lattice));
std::auto_ptr<MultiScalarField2D > result = extractComponent(*shear, domain, component);
std::auto_ptr<MultiScalarField2D > strain = multiply((T)0.5, *multiply(*density,*result) );
}

but when I like to write this fieldScalar as a matrix It doesn’t work,

successiveStrainUp << setprecision(16) <<
computeShearstrength(lattice, profileTapUp, 1)
<< endl;

I dont understand how to write a FieldScalar with palabos, can someone help me with this aspect.

Thanks for your time.