diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C index bc3bab534d..905a565b0a 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C @@ -284,6 +284,16 @@ Foam::tmp > Foam::cyclicACMIFvPatchField::snGrad } +template +void Foam::cyclicACMIFvPatchField::updateCoeffs() +{ + const scalarField& mask = cyclicACMIPatch_.cyclicACMIPatch().mask(); + + const fvPatchField& npf = nonOverlapPatchField(); + const_cast&>(npf).updateCoeffs(mask); +} + + template void Foam::cyclicACMIFvPatchField::evaluate ( @@ -376,6 +386,20 @@ Foam::cyclicACMIFvPatchField::gradientBoundaryCoeffs() const } +template +void Foam::cyclicACMIFvPatchField::manipulateMatrix +( + fvMatrix& matrix +) +{ + // blend contrubutions from the coupled and non-overlap patches + const fvPatchField& npf = nonOverlapPatchField(); + + const scalarField& mask = cyclicACMIPatch_.cyclicACMIPatch().mask(); + const_cast&>(npf).manipulateMatrix(matrix, mask); +} + + template void Foam::cyclicACMIFvPatchField::write(Ostream& os) const { diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H index 9848505be1..91f414d321 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H @@ -178,12 +178,34 @@ public: //- Return reference to non-overlapping patchField const fvPatchField& nonOverlapPatchField() const; + //- Update result field based on interface functionality + virtual void updateInterfaceMatrix + ( + scalarField& result, + const scalarField& psiInternal, + const scalarField& coeffs, + const direction cmpt, + const Pstream::commsTypes commsType + ) const; + + //- Update result field based on interface functionality + virtual void updateInterfaceMatrix + ( + Field&, + const Field&, + const scalarField&, + const Pstream::commsTypes commsType + ) const; + //- Return patch-normal gradient virtual tmp > snGrad ( const scalarField& deltaCoeffs ) const; + //- Update the coefficients associated with the patch field + void updateCoeffs(); + //- Evaluate the patch field virtual void evaluate ( @@ -226,24 +248,8 @@ public: // evaluation of the gradient of this patchField virtual tmp > gradientBoundaryCoeffs() const; - //- Update result field based on interface functionality - virtual void updateInterfaceMatrix - ( - scalarField& result, - const scalarField& psiInternal, - const scalarField& coeffs, - const direction cmpt, - const Pstream::commsTypes commsType - ) const; - - //- Update result field based on interface functionality - virtual void updateInterfaceMatrix - ( - Field&, - const Field&, - const scalarField&, - const Pstream::commsTypes commsType - ) const; + //- Manipulate matrix + virtual void manipulateMatrix(fvMatrix& matrix); // Cyclic AMI coupled interface functions