BUG: Corrected construction of inperolation objects in trackData

This commit is contained in:
andy
2010-10-21 16:28:57 +01:00
parent 7d50517713
commit 3f069da2ee
4 changed files with 16 additions and 5 deletions

View File

@ -122,7 +122,7 @@ public:
ReactingCloud<ParcelType>& cloud_; ReactingCloud<ParcelType>& cloud_;
//- Interpolator for continuous phase pressure field //- Interpolator for continuous phase pressure field
const interpolation<scalar>& pInterp_; autoPtr<interpolation<scalar> > pInterp_;
public: public:

View File

@ -170,7 +170,7 @@ template<class ParcelType>
inline const Foam::interpolation<Foam::scalar>& inline const Foam::interpolation<Foam::scalar>&
Foam::ReactingParcel<ParcelType>::trackData::pInterp() const Foam::ReactingParcel<ParcelType>::trackData::pInterp() const
{ {
return pInterp_; return pInterp_();
} }

View File

@ -138,7 +138,7 @@ public:
//- Reference to the cloud containing this particle //- Reference to the cloud containing this particle
ThermoCloud<ParcelType>& cloud_; ThermoCloud<ParcelType>& cloud_;
//- Local copy of specific heat field //- Local copy of carrier specific heat field
// Cp not stored on acrrier thermo, but returned as tmp<...> // Cp not stored on acrrier thermo, but returned as tmp<...>
const volScalarField Cp_; const volScalarField Cp_;
@ -149,7 +149,7 @@ public:
autoPtr<interpolation<scalar> > TInterp_; autoPtr<interpolation<scalar> > TInterp_;
//- Specific heat capacity field interpolator //- Specific heat capacity field interpolator
const interpolation<scalar>& CpInterp_; autoPtr<interpolation<scalar> > CpInterp_;
public: public:
@ -170,6 +170,9 @@ public:
//- Return access to the owner cloud //- Return access to the owner cloud
inline ThermoCloud<ParcelType>& cloud(); inline ThermoCloud<ParcelType>& cloud();
//- Return access to the locally stored carrier Cp field
inline const volScalarField& Cp() const;
//- Return const access to the interpolator for continuous //- Return const access to the interpolator for continuous
// phase temperature field // phase temperature field
inline const interpolation<scalar>& TInterp() const; inline const interpolation<scalar>& TInterp() const;

View File

@ -202,6 +202,14 @@ Foam::ThermoParcel<ParcelType>::trackData::cloud()
} }
template<class ParcelType>
inline const Foam::volScalarField&
Foam::ThermoParcel<ParcelType>::trackData::Cp() const
{
return Cp_;
}
template<class ParcelType> template<class ParcelType>
inline const Foam::interpolation<Foam::scalar>& inline const Foam::interpolation<Foam::scalar>&
Foam::ThermoParcel<ParcelType>::trackData::TInterp() const Foam::ThermoParcel<ParcelType>::trackData::TInterp() const
@ -214,7 +222,7 @@ template<class ParcelType>
inline const Foam::interpolation<Foam::scalar>& inline const Foam::interpolation<Foam::scalar>&
Foam::ThermoParcel<ParcelType>::trackData::CpInterp() const Foam::ThermoParcel<ParcelType>::trackData::CpInterp() const
{ {
return CpInterp_; return CpInterp_();
} }