Wrong return type of symmetricTensorProduct

Hi everyone,

I met a problem with the data processor wrapper symmetricTensorProduct, which calculates the tensor product of a vector with itself (u_iu_j).

There seem to be some problems with the function and here are my revisions.

First, for the 3D vector, the function should return a 3*3 matrix, so the return type of the function should be [code=“cpp”]
auto_ptr<MultiTensorField3D<T, SymmetricTensorImpl<T,nDim>::n>>

 instead of 
std::auto_ptr<MultiTensorField3D<T,nDim> >

We might need to modify both the declaration and the definitions for different overloads:
[li] line 2123 and line 2126 in File src/dataProcessors/dataAnalysisWrapper3D.h
[/li][li] line 4854 and line 4863 in File src/dataProcessors/dataAnalysisWrapper3D.hh

In addition, around the line 4857-4858 of the file src/dataProcessors/dataAnalysisWrapper3D.hh, for the function [code=“cpp”]
std::auto_ptr< MultiTensorField3D<T,SymmetricTensorImpl<T,nDim>::n> > symmetricTensorProduct(
MultiTensorField3D<T,nDim>& A, Box3D domain)
std::auto_ptr<MultiTensorField3D<T,SymmetricTensorImpl<T,nDim>::n> > result =
symmetricTensorProduct(A, *result, domain);
return result;

the template parameter for the function generateMultiTensorField should be <T, SymmetricTensorImpl<T,nDim>::n>> instead of <T,nDim>

Hope this could help in case anyone met the same problem.

With best,

Dear Song,

Thank you very much for this bug fix. It will be included in the next Palabos release.

Best Regards,