diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C index 67bc7f96dbcd2a033becd28596419fd2c3270d93..db6849d26746be1dbdd6a5ffe56feed4e8dde12b 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C @@ -77,7 +77,6 @@ jumpCyclicFvPatchField<Type>::jumpCyclicFvPatchField const jumpCyclicFvPatchField<Type>& ptf ) : - cyclicLduInterfaceField(), cyclicFvPatchField<Type>(ptf) {} @@ -105,12 +104,11 @@ tmp<Field<Type> > jumpCyclicFvPatchField<Type>::patchNeighbourField() const tmp<Field<Type> > tpnf(new Field<Type>(this->size())); Field<Type>& pnf = tpnf(); - tmp<Field<Type> > tjf = jump(); + Field<Type> jf(this->jump()); if (!this->cyclicPatch().owner()) { - tjf = -tjf; + jf *= -1.0; } - const Field<Type>& jf = tjf(); if (this->doTransform()) { @@ -152,12 +150,12 @@ void jumpCyclicFvPatchField<Type>::updateInterfaceMatrix // for AMG solve - only apply jump to finest level if (psiInternal.size() == this->internalField().size()) { - tmp<Field<scalar> > tjf = jump()().component(cmpt); + Field<scalar> jf(this->jump()().component(cmpt)); + if (!this->cyclicPatch().owner()) { - tjf = -tjf; + jf *= -1.0; } - const Field<scalar>& jf = tjf(); forAll(*this, facei) { @@ -201,12 +199,12 @@ void jumpCyclicFvPatchField<Type>::updateInterfaceMatrix // for AMG solve - only apply jump to finest level if (psiInternal.size() == this->internalField().size()) { - tmp<Field<Type> > tjf = jump(); + Field<Type> jf(this->jump()); + if (!this->cyclicPatch().owner()) { - tjf = -tjf; + jf *= -1.0; } - const Field<Type>& jf = tjf(); forAll(*this, facei) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C index 1c8e93489266109997ab2f8f8458f06bf4b48d5b..668d43483de22fd7e282f9d999bea437d36ee6a3 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C @@ -95,11 +95,10 @@ Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField } else { - // Generic input constructed from dictionary + // Dummy jump table this->jumpTable_.reset(new DataEntry<scalar>("jumpTable")); } - if (dict.found("value")) { fvPatchScalarField::operator= diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C index eb997abf365e11a954afce3fc65ee13f645b6a75..e58270ec638df26b663319261278f6661d3f9b12 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C @@ -72,7 +72,6 @@ Foam::fixedJumpFvPatchField<Type>::fixedJumpFvPatchField const fixedJumpFvPatchField<Type>& ptf ) : - cyclicLduInterfaceField(), jumpCyclicFvPatchField<Type>(ptf), jump_(ptf.jump_) {} diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C index 88e75781415a900cec40d906281e07db994eb439..c4ee64eaa842271da8e38d9c61b2e13121019ee9 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C @@ -109,9 +109,9 @@ Foam::tmp<Foam::Field<Type> > Foam::uniformJumpFvPatchField<Type>::jump() const { if (this->cyclicPatch().owner()) { - Type j = jumpTable_->value(this->db().time().value()); + const Type value = jumpTable_->value(this->db().time().value()); - return tmp<Field<Type> >(new Field<Type>(this->size(), j)); + return tmp<Field<Type> >(new Field<Type>(this->patch().size(), value)); } else { @@ -134,7 +134,6 @@ void Foam::uniformJumpFvPatchField<Type>::write(Ostream& os) const { jumpTable_->writeData(os); } - this->writeEntry("value", os); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.C index cb9ff6cd901488524a46d53fe322cdbf67519e40..a3e1fe659190cf604f8749567e9be9e22a21d501 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.C @@ -132,7 +132,6 @@ void Foam::uniformJumpAMIFvPatchField<Type>::write(Ostream& os) const { jumpTable_->writeData(os); } - this->writeEntry("value", os); }