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
[code="cpp"]
std::auto_ptr<MultiTensorField3D<T,nDim> >
We might need to modify both the declaration and the definitions for different overloads:
[ul]
[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
[/li][/ul]
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 =
generateMultiTensorField<T,SymmetricTensorImpl<T,nDim>::n>(A,domain);
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,
Song