diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C index 8188166dc6..3a150c6f70 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::fanFvPatchField const DimensionedField& iF ) : - fixedJumpFvPatchField(p, iF), - jumpTable_(0) + uniformJumpFvPatchField(p, iF) {} @@ -48,8 +47,7 @@ Foam::fanFvPatchField::fanFvPatchField const fvPatchFieldMapper& mapper ) : - fixedJumpFvPatchField(ptf, p, iF, mapper), - jumpTable_(ptf.jumpTable_().clone().ptr()) + uniformJumpFvPatchField(ptf, p, iF, mapper) {} @@ -61,8 +59,7 @@ Foam::fanFvPatchField::fanFvPatchField const dictionary& dict ) : - fixedJumpFvPatchField(p, iF), - jumpTable_(DataEntry::New("jumpTable", dict)) + uniformJumpFvPatchField(p, iF, dict) {} @@ -72,9 +69,7 @@ Foam::fanFvPatchField::fanFvPatchField const fanFvPatchField& ptf ) : - cyclicLduInterfaceField(), - fixedJumpFvPatchField(ptf), - jumpTable_(ptf.jumpTable_().clone().ptr()) + uniformJumpFvPatchField(ptf) {} @@ -85,23 +80,8 @@ Foam::fanFvPatchField::fanFvPatchField const DimensionedField& iF ) : - fixedJumpFvPatchField(ptf, iF), - jumpTable_(ptf.jumpTable_().clone().ptr()) + uniformJumpFvPatchField(ptf, iF) {} -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - - -template -void Foam::fanFvPatchField::write(Ostream& os) const -{ - fixedJumpFvPatchField::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 3eea1382f3..463ebeb543 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 fanFvPatchField : - public fixedJumpFvPatchField + public uniformJumpFvPatchField { - // Private data - - //- Interpolation table - autoPtr > 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 1b291d500c..1c8e934892 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::fanFvPatchField const dictionary& dict ) : - fixedJumpFvPatchField(p, iF), - jumpTable_(new DataEntry("jumpTable")) + uniformJumpFvPatchField(p, iF) { if (this->cyclicPatch().owner()) { @@ -83,7 +82,7 @@ Foam::fanFvPatchField::fanFvPatchField } } - jumpTable_.reset + this->jumpTable_.reset ( new polynomial("jumpTable", coeffs) ); @@ -91,9 +90,14 @@ Foam::fanFvPatchField::fanFvPatchField else { // Generic input constructed from dictionary - jumpTable_ = DataEntry::New("jumpTable", dict); + this->jumpTable_ = DataEntry::New("jumpTable", dict); } } + else + { + // Generic input constructed from dictionary + this->jumpTable_.reset(new DataEntry("jumpTable")); + } if (dict.found("value")) @@ -136,10 +140,10 @@ void Foam::fanFvPatchField::updateCoeffs() Un /= patch().lookupPatchField("rho"); } - jump_ = jumpTable_->value(Un); + this->jump_ = this->jumpTable_->value(Un); } - fixedJumpFvPatchField::updateCoeffs(); + uniformJumpFvPatchField::updateCoeffs(); }