From 9d3f407fc7417455bae1c8ead90a08bb7c8293f8 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Sun, 25 Sep 2016 16:54:20 +0100 Subject: [PATCH] processorFvPatchField: Reinstate 'value' as an optional entry --- .../processor/processorFvPatchField.C | 64 +++++++++--------- .../processorCyclicFvPatchField.C | 66 +++++++++---------- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C index acd103c212..c428d9499d 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C @@ -67,6 +67,38 @@ Foam::processorFvPatchField::processorFvPatchField {} +template +Foam::processorFvPatchField::processorFvPatchField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + coupledFvPatchField(p, iF, dict, dict.found("value")), + procPatch_(refCast(p)), + sendBuf_(0), + receiveBuf_(0), + outstandingSendRequest_(-1), + outstandingRecvRequest_(-1), + scalarSendBuf_(0), + scalarReceiveBuf_(0) +{ + if (!isA(p)) + { + FatalIOErrorInFunction + ( + dict + ) << "\n patch type '" << p.type() + << "' not constraint type '" << typeName << "'" + << "\n for patch " << p.name() + << " of field " << this->internalField().name() + << " in file " << this->internalField().objectPath() + << exit(FatalIOError); + } +} + + template Foam::processorFvPatchField::processorFvPatchField ( @@ -103,38 +135,6 @@ Foam::processorFvPatchField::processorFvPatchField } -template -Foam::processorFvPatchField::processorFvPatchField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - coupledFvPatchField(p, iF, dict), - procPatch_(refCast(p)), - sendBuf_(0), - receiveBuf_(0), - outstandingSendRequest_(-1), - outstandingRecvRequest_(-1), - scalarSendBuf_(0), - scalarReceiveBuf_(0) -{ - if (!isA(p)) - { - FatalIOErrorInFunction - ( - dict - ) << "\n patch type '" << p.type() - << "' not constraint type '" << typeName << "'" - << "\n for patch " << p.name() - << " of field " << this->internalField().name() - << " in file " << this->internalField().objectPath() - << exit(FatalIOError); - } -} - - template Foam::processorFvPatchField::processorFvPatchField ( diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C index 4da794509c..a2e322b35f 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C @@ -42,6 +42,39 @@ Foam::processorCyclicFvPatchField::processorCyclicFvPatchField {} +template +Foam::processorCyclicFvPatchField::processorCyclicFvPatchField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + processorFvPatchField(p, iF, dict), + procPatch_(refCast(p)) +{ + if (!isType(p)) + { + FatalIOErrorInFunction + ( + dict + ) << "\n patch type '" << p.type() + << "' not constraint type '" << typeName << "'" + << "\n for patch " << p.name() + << " of field " << this->internalField().name() + << " in file " << this->internalField().objectPath() + << exit(FatalIOError); + } + + if (Pstream::defaultCommsType == Pstream::scheduled) + { + WarningInFunction + << "Scheduled communication with split cyclics not supported." + << endl; + } +} + + template Foam::processorCyclicFvPatchField::processorCyclicFvPatchField ( @@ -79,39 +112,6 @@ Foam::processorCyclicFvPatchField::processorCyclicFvPatchField } -template -Foam::processorCyclicFvPatchField::processorCyclicFvPatchField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - processorFvPatchField(p, iF, dict), - procPatch_(refCast(p)) -{ - if (!isType(p)) - { - FatalIOErrorInFunction - ( - dict - ) << "\n patch type '" << p.type() - << "' not constraint type '" << typeName << "'" - << "\n for patch " << p.name() - << " of field " << this->internalField().name() - << " in file " << this->internalField().objectPath() - << exit(FatalIOError); - } - - if (Pstream::defaultCommsType == Pstream::scheduled) - { - WarningInFunction - << "Scheduled communication with split cyclics not supported." - << endl; - } -} - - template Foam::processorCyclicFvPatchField::processorCyclicFvPatchField (