Hi friend,
I have a trouble
Hi friend,
I have a trouble which I want to modify the U. I mean I want to keep the initial U to a new variable and after solver, I like to add this quatity to U again. But there are some errors. Could you please help me. volScalarField Uin = UEqn.A(); ... U += Uin; Errors: icoFoam.C:120: error: no match for ˜operator+=U in ˜U += Uin" /home/liu/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/GeometricField.C:1238: note: candidates are: void Foam::GeometricField<type,>::operator+=(const Foam::GeometricField<type,>&) [with Type = Foam::vector, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh] /home/liu/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/GeometricField.C:1238: note: void Foam::GeometricField<type,>::operator+=(const Foam::tmp<foam::geometricfield<type,> >&) [with Type = Foam::vector, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh] /home/liu/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/GeometricField.C:1238: note: void Foam::GeometricField<type,>::operator+=(const Foam::dimensioned<type>&) [with Type = Foam::vector, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh] make: *** [Make/linuxGcc4Opt/icoFoam.o] Error 1 |
In your code:
volScalarFiel
In your code:
volScalarField Uin = ... in createFields.H: volVectorField U(..) You are trying to assign one (field of scalars) to the other (field of vectors)? |
Hi Mattijs Janssens:
Thanks
Hi Mattijs Janssens:
Thanks. I mean that I want to keep my initial U to Uin and then add this Uin to new U (after end of the iteration). But the U is the vector. So I am not sure where define them and how to operating. Could you please give some help? Thanks a lot. Guoxiang |
All times are GMT -4. The time now is 08:10. |