diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C index 8188166dc655fe14e9442805680465922b16150d..3a150c6f70792102426a0c851279fe19c0838c66 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C @@ -34,8 +34,7 @@ Foam::fanFvPatchField<Type>::fanFvPatchField const DimensionedField<Type, volMesh>& iF ) : - fixedJumpFvPatchField<Type>(p, iF), - jumpTable_(0) + uniformJumpFvPatchField<Type>(p, iF) {} @@ -48,8 +47,7 @@ Foam::fanFvPatchField<Type>::fanFvPatchField const fvPatchFieldMapper& mapper ) : - fixedJumpFvPatchField<Type>(ptf, p, iF, mapper), - jumpTable_(ptf.jumpTable_().clone().ptr()) + uniformJumpFvPatchField<Type>(ptf, p, iF, mapper) {} @@ -61,8 +59,7 @@ Foam::fanFvPatchField<Type>::fanFvPatchField const dictionary& dict ) : - fixedJumpFvPatchField<Type>(p, iF), - jumpTable_(DataEntry<Type>::New("jumpTable", dict)) + uniformJumpFvPatchField<Type>(p, iF, dict) {} @@ -72,9 +69,7 @@ Foam::fanFvPatchField<Type>::fanFvPatchField const fanFvPatchField<Type>& ptf ) : - cyclicLduInterfaceField(), - fixedJumpFvPatchField<Type>(ptf), - jumpTable_(ptf.jumpTable_().clone().ptr()) + uniformJumpFvPatchField<Type>(ptf) {} @@ -85,23 +80,8 @@ Foam::fanFvPatchField<Type>::fanFvPatchField const DimensionedField<Type, volMesh>& iF ) : - fixedJumpFvPatchField<Type>(ptf, iF), - jumpTable_(ptf.jumpTable_().clone().ptr()) + uniformJumpFvPatchField<Type>(ptf, iF) {} -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - - -template<class Type> -void Foam::fanFvPatchField<Type>::write(Ostream& os) const -{ - fixedJumpFvPatchField<Type>::write(os); - if (this->cyclicPatch().owner()) - { - jumpTable_->writeData(os); - } -} - - // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H index 3eea1382f39400ec5f98a6b1ed4e3109459d87df..463ebeb543602d0a1dd0e4291b626b6ef1101307 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H @@ -83,7 +83,7 @@ SourceFiles #ifndef fanFvPatchField_H #define fanFvPatchField_H -#include "fixedJumpFvPatchField.H" +#include "uniformJumpFvPatchField.H" #include "DataEntry.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -98,13 +98,8 @@ namespace Foam template<class Type> class fanFvPatchField : - public fixedJumpFvPatchField<Type> + public uniformJumpFvPatchField<Type> { - // Private data - - //- Interpolation table - autoPtr<DataEntry<Type> > jumpTable_; - public: @@ -179,10 +174,6 @@ public: //- Update the coefficients associated with the patch field virtual void updateCoeffs(); - - - //- Write - virtual void write(Ostream&) const; }; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C index 1b291d500cc548e71adc183e198c97c364b2822e..1c8e93489266109997ab2f8f8458f06bf4b48d5b 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C @@ -53,8 +53,7 @@ Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField const dictionary& dict ) : - fixedJumpFvPatchField<scalar>(p, iF), - jumpTable_(new DataEntry<scalar>("jumpTable")) + uniformJumpFvPatchField<scalar>(p, iF) { if (this->cyclicPatch().owner()) { @@ -83,7 +82,7 @@ Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField } } - jumpTable_.reset + this->jumpTable_.reset ( new polynomial("jumpTable", coeffs) ); @@ -91,9 +90,14 @@ Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField else { // Generic input constructed from dictionary - jumpTable_ = DataEntry<scalar>::New("jumpTable", dict); + this->jumpTable_ = DataEntry<scalar>::New("jumpTable", dict); } } + else + { + // Generic input constructed from dictionary + this->jumpTable_.reset(new DataEntry<scalar>("jumpTable")); + } if (dict.found("value")) @@ -136,10 +140,10 @@ void Foam::fanFvPatchField<Foam::scalar>::updateCoeffs() Un /= patch().lookupPatchField<volScalarField, scalar>("rho"); } - jump_ = jumpTable_->value(Un); + this->jump_ = this->jumpTable_->value(Un); } - fixedJumpFvPatchField<scalar>::updateCoeffs(); + uniformJumpFvPatchField<scalar>::updateCoeffs(); }