From a0ea2488c6b689e2adac94b0bffd50cb9e6fbc8d Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 13 Sep 2013 12:59:30 +0100 Subject: [PATCH] ENH: ACMI - update non-overlap patch in initEvaluate --- .../cyclicACMI/cyclicACMIFvPatchField.C | 17 ++++++++++++++--- .../cyclicACMI/cyclicACMIFvPatchField.H | 6 ++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C index 905a565b0a..9fa08201ea 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C @@ -294,15 +294,26 @@ void Foam::cyclicACMIFvPatchField::updateCoeffs() } +template +void Foam::cyclicACMIFvPatchField::initEvaluate +( + const Pstream::commsTypes comms +) +{ + // update non-overlap patch + const fvPatchField& npf = nonOverlapPatchField(); + const_cast&>(npf).evaluate(comms); +} + + template void Foam::cyclicACMIFvPatchField::evaluate ( const Pstream::commsTypes comms ) { - // blend contrubutions from the coupled and non-overlap patches + // blend contributions from the coupled and non-overlap patches const fvPatchField& npf = nonOverlapPatchField(); - const_cast&>(npf).evaluate(); coupledFvPatchField::evaluate(comms); const Field& cpf = *this; @@ -392,7 +403,7 @@ void Foam::cyclicACMIFvPatchField::manipulateMatrix fvMatrix& matrix ) { - // blend contrubutions from the coupled and non-overlap patches + // blend contributions from the coupled and non-overlap patches const fvPatchField& npf = nonOverlapPatchField(); const scalarField& mask = cyclicACMIPatch_.cyclicACMIPatch().mask(); diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H index 91f414d321..3a8198a95b 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H @@ -206,6 +206,12 @@ public: //- Update the coefficients associated with the patch field void updateCoeffs(); + //- Initialise the evaluation of the patch field + virtual void initEvaluate + ( + const Pstream::commsTypes commsType + ); + //- Evaluate the patch field virtual void evaluate (