/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2011-2026 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . Class Foam::coupledFvPatchField Description Abstract base class for coupled patches. SourceFiles coupledFvPatchField.C \*---------------------------------------------------------------------------*/ #ifndef coupledFvPatchField_H #define coupledFvPatchField_H #include "LduInterfaceField.H" #include "fvPatchField.H" #include "coupledFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { /*---------------------------------------------------------------------------*\ Class coupledFvPatch Declaration \*---------------------------------------------------------------------------*/ template class coupledFvPatchField : public LduInterfaceField, public fvPatchField { public: //- Runtime type information TypeName(coupledFvPatch::typeName_()); // Constructors //- Construct from patch and internal field coupledFvPatchField ( const fvPatch&, const DimensionedField& ); //- Construct from patch and internal field and patch field coupledFvPatchField ( const fvPatch&, const DimensionedField&, const Field& ); //- Construct from patch, internal field and dictionary coupledFvPatchField ( const fvPatch&, const DimensionedField&, const dictionary&, const bool valueRequired=true ); //- Construct by mapping the given coupledFvPatchField onto a new patch coupledFvPatchField ( const coupledFvPatchField&, const fvPatch&, const DimensionedField&, const fieldMapper& ); //- Disallow copy without setting internal field reference coupledFvPatchField(const coupledFvPatchField&) = delete; //- Copy constructor setting internal field reference coupledFvPatchField ( const coupledFvPatchField&, const DimensionedField& ); //- Construct and return a clone virtual tmp> clone ( const DimensionedField& ) const = 0; // Member Functions using fvPatchField::patch; using fvPatchField::patchInternalField; using fvPatchField::patchNeighbourField; // Access //- Return true if this patch field is derived from // coupledFvPatchField. virtual bool coupled() const { return true; } //- Return neighbour field of internal field virtual tmp> patchNeighbourField ( const Pstream::commsTypes commsType = Pstream::commsTypes::blocking ) const = 0; // Mapping functions //- Map the given fvPatchField onto this fvPatchField virtual void map(const fvPatchField&, const fieldMapper&); // Evaluation functions //- Return patch-normal gradient virtual tmp> snGrad ( const scalarField& deltaCoeffs ) const; //- Return patch-normal gradient virtual tmp> snGrad() const { NotImplemented; return *this; } //- Initialise the evaluation of the patch field virtual void initEvaluate ( const Pstream::commsTypes commsType ); //- Evaluate the patch field, but don't update the coeffs void evaluateNoUpdateCoeffs(); //- Evaluate the patch field virtual void evaluate ( const Pstream::commsTypes commsType ); //- Return the matrix diagonal coefficients corresponding to the // evaluation of the value of this patchField with given weights virtual tmp> valueInternalCoeffs ( const tmp& ) const; //- Return the matrix source coefficients corresponding to the // evaluation of the value of this patchField with given weights virtual tmp> valueBoundaryCoeffs ( const tmp& ) const; //- Return the matrix diagonal coefficients corresponding to the // evaluation of the gradient of this patchField virtual tmp> gradientInternalCoeffs ( const scalarField& deltaCoeffs ) const; //- Return the matrix diagonal coefficients corresponding to the // evaluation of the gradient of this patchField virtual tmp> gradientInternalCoeffs() const; //- Return the matrix source coefficients corresponding to the // evaluation of the gradient of this patchField virtual tmp> gradientBoundaryCoeffs ( const scalarField& deltaCoeffs ) const; //- Return the matrix source coefficients corresponding to the // evaluation of the gradient of this patchField virtual tmp> gradientBoundaryCoeffs() const; // Coupled interface functionality //- Update result field based on interface functionality virtual void updateInterfaceMatrix ( scalarField& result, const scalarField& psiInternal, const scalarField& coeffs, const direction, const Pstream::commsTypes commsType ) const = 0; //- Update result field based on interface functionality virtual void updateInterfaceMatrix ( Field&, const Field&, const scalarField&, const Pstream::commsTypes commsType ) const = 0; //- Write virtual void write(Ostream&) const; // Member Operators //- Inherit assignment using fvPatchField::operator=; }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository #include "coupledFvPatchField.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif // ************************************************************************* //