BUG: Corrected wrong cloud source field type

This commit is contained in:
andy
2010-10-25 12:31:30 +01:00
parent ebd90fcc55
commit 0946ab5d1c

View File

@ -69,9 +69,9 @@ template<class ParcelType>
inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> > inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
Foam::ReactingCloud<ParcelType>::Srho(const label i) const Foam::ReactingCloud<ParcelType>::Srho(const label i) const
{ {
tmp<volScalarField> tRhoi tmp<DimensionedField<scalar, volMesh> > tRhoi
( (
new volScalarField new DimensionedField<scalar, volMesh>
( (
IOobject IOobject
( (
@ -94,16 +94,16 @@ Foam::ReactingCloud<ParcelType>::Srho(const label i) const
if (this->solution().sourceActive()) if (this->solution().sourceActive())
{ {
scalarField& rhoi = tRhoi().internalField(); scalarField& rhoi = tRhoi();
rhoi = rhoTrans_[i]/(this->db().time().deltaT()*this->mesh().V()); rhoi = rhoTrans_[i]/(this->db().time().deltaT()*this->mesh().V());
return tRhoi; return tRhoi;
} }
else else
{ {
return tmp<volScalarField> return tmp<DimensionedField<scalar, volMesh> >
( (
new volScalarField new DimensionedField<scalar, volMesh>
( (
IOobject IOobject
( (
@ -151,7 +151,7 @@ Foam::ReactingCloud<ParcelType>::Srho() const
if (this->solution().sourceActive()) if (this->solution().sourceActive())
{ {
scalarField& sourceField = trhoTrans().field(); scalarField& sourceField = trhoTrans();
forAll(rhoTrans_, i) forAll(rhoTrans_, i)
{ {
sourceField += rhoTrans_[i]; sourceField += rhoTrans_[i];