diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C index bc3bab534d84c4bfd7558aacb83ad6c5cecef0d5..905a565b0af131b6dcce71557470e1c15a212181 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::Field<Type> > Foam::cyclicACMIFvPatchField<Type>::snGrad } +template<class Type> +void Foam::cyclicACMIFvPatchField<Type>::updateCoeffs() +{ + const scalarField& mask = cyclicACMIPatch_.cyclicACMIPatch().mask(); + + const fvPatchField<Type>& npf = nonOverlapPatchField(); + const_cast<fvPatchField<Type>&>(npf).updateCoeffs(mask); +} + + template<class Type> void Foam::cyclicACMIFvPatchField<Type>::evaluate ( @@ -376,6 +386,20 @@ Foam::cyclicACMIFvPatchField<Type>::gradientBoundaryCoeffs() const } +template<class Type> +void Foam::cyclicACMIFvPatchField<Type>::manipulateMatrix +( + fvMatrix<Type>& matrix +) +{ + // blend contrubutions from the coupled and non-overlap patches + const fvPatchField<Type>& npf = nonOverlapPatchField(); + + const scalarField& mask = cyclicACMIPatch_.cyclicACMIPatch().mask(); + const_cast<fvPatchField<Type>&>(npf).manipulateMatrix(matrix, mask); +} + + template<class Type> void Foam::cyclicACMIFvPatchField<Type>::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 9848505be158b3cf67c5c57a9b350714eedcd363..91f414d32117f5f583db05c7ef3f8b83ed98e7a0 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<Type>& 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<Type>&, + const Field<Type>&, + const scalarField&, + const Pstream::commsTypes commsType + ) const; + //- Return patch-normal gradient virtual tmp<Field<Type> > 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<Field<Type> > 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<Type>&, - const Field<Type>&, - const scalarField&, - const Pstream::commsTypes commsType - ) const; + //- Manipulate matrix + virtual void manipulateMatrix(fvMatrix<Type>& matrix); // Cyclic AMI coupled interface functions