AnjaMiehe |
September 25, 2013 05:12 |
Problem using transform(..)
Hello there,
I want to rotate a volSymmTensorField A. The transformation matrix (trans) is set up successfully.
works well, as long as I only use it this way. Using Info<< to write it out shows me, that everything is as it should be.
However, I am not allowed to assign the value to a new tensor Field, no matter if symmetric or not.
Code:
B = transform(trans, A)
does not compile. The error says
Code:
error: no match for 'operator=' in 'PermInv = Foam::transform(const tensorField&, const Foam::Field<Type>&) [with Type = Foam::SymmTensor<double>, Foam::tensorField = Foam::Field<Foam::Tensor<double> >]((*(const Foam::Field<Foam::SymmTensor<double> >*)(& PermInv.Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>::<anonymous>.Foam::DimensionedField<Foam::SymmTensor<double>, Foam::volMesh>::<anonymous>)))'
UEqn.H:46:45: note: candidates are:
/opt/openfoam211/src/OpenFOAM/lnInclude/GeometricField.C:1083:6: note: void Foam::GeometricField<Type, PatchField, GeoMesh>::operator=(const Foam::GeometricField<Type, PatchField, GeoMesh>&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam211/src/OpenFOAM/lnInclude/GeometricField.C:1083:6: note: no known conversion for argument 1 from 'Foam::tmp<Foam::Field<Foam::SymmTensor<double> > >' to 'const Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>&'
/opt/openfoam211/src/OpenFOAM/lnInclude/GeometricField.C:1108:6: note: void Foam::GeometricField<Type, PatchField, GeoMesh>::operator=(const Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam211/src/OpenFOAM/lnInclude/GeometricField.C:1108:6: note: no known conversion for argument 1 from 'Foam::tmp<Foam::Field<Foam::SymmTensor<double> > >' to 'const Foam::tmp<Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> >&'
/opt/openfoam211/src/OpenFOAM/lnInclude/GeometricField.C:1144:6: note: void Foam::GeometricField<Type, PatchField, GeoMesh>::operator=(const Foam::dimensioned<Form>&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam211/src/OpenFOAM/lnInclude/GeometricField.C:1144:6: note: no known conversion for argument 1 from 'Foam::tmp<Foam::Field<Foam::SymmTensor<double> > >' to 'const Foam::dimensioned<Foam::SymmTensor<double> >&'
With constant tensors (not volFields) like in Test-tensor, everything works.
Any help will be very much appreciated.
Thanks in advance, Regards, Anja
|