@李东岳 李老师,又出现了之前的问题:
lnInclude/ParticleCollector.C: In member function ‘virtual void Foam::ParticleCollector<CloudType>::postMove(Foam::ParticleCollector<CloudType>::parcelType&, Foam::label, Foam::scalar, const point&, bool&)’:
lnInclude/ParticleCollector.C:750:31: error: ‘const volScalarField {aka const class Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}’ has no member named ‘internalFieldRef’
scalar& PPC = summass.internalFieldRef() [cellIp];
^
lnInclude/ParticleCollector.C: In member function ‘virtual void Foam::ParticleCollector<CloudType>::postMove(Foam::ParticleCollector<CloudType>::parcelType&, Foam::label, Foam::scalar, const point&, bool&)’:
lnInclude/ParticleCollector.C:750:31: error: ‘const volScalarField {aka const class Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}’ has no member named ‘internalFieldRef’
scalar& PPC = summass.internalFieldRef() [cellIp];
我用grep查了一下,有些函数中用的是internalField()而查不到internalFieldRef(),但如果采用
scalar& PPC = summass.internalField() [cellIp]
错误如下
lnInclude/ParticleCollector.C:750:53: error: binding ‘const double’ to reference of type ‘Foam::scalar& {aka double&}’ discards qualifiers
scalar& PPC = summass.internalField()[cellIp];