/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ 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::processorFvPatchField Description Foam::processorFvPatchField SourceFiles processorFvPatchField.C \*---------------------------------------------------------------------------*/ #ifndef processorFvPatchField_H #define processorFvPatchField_H #include "coupledFvPatchField.H" #include "processorLduInterfaceField.H" #include "processorFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { /*---------------------------------------------------------------------------*\ Class processorFvPatch Declaration \*---------------------------------------------------------------------------*/ template class processorFvPatchField : public processorLduInterfaceField, public coupledFvPatchField { // Private data //- Local reference cast into the processor patch const processorFvPatch& procPatch_; public: //- Runtime type information TypeName(processorFvPatch::typeName_()); // Constructors //- Construct from patch and internal field processorFvPatchField ( const fvPatch&, const DimensionedField& ); //- Construct from patch and internal field and patch field processorFvPatchField ( const fvPatch&, const DimensionedField&, const Field& ); //- Construct from patch, internal field and dictionary processorFvPatchField ( const fvPatch&, const DimensionedField&, const dictionary& ); //- Construct by mapping given processorFvPatchField onto a new patch processorFvPatchField ( const processorFvPatchField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy processorFvPatchField(const processorFvPatchField&); //- Construct and return a clone virtual tmp > clone() const { return tmp > ( new processorFvPatchField(*this) ); } //- Construct as copy setting internal field reference processorFvPatchField ( const processorFvPatchField&, const DimensionedField& ); //- Construct and return a clone setting internal field reference virtual tmp > clone ( const DimensionedField& iF ) const { return tmp > ( new processorFvPatchField(*this, iF) ); } // Destructor ~processorFvPatchField(); // Member functions // Access //- Return true if running parallel virtual bool coupled() const { if (Pstream::parRun()) { return true; } else { return false; } } //- Return neighbour field given internal field tmp > patchNeighbourField() const; // Evaluation functions //- Initialise the evaluation of the patch field virtual void initEvaluate(const Pstream::commsTypes commsType); //- Evaluate the patch field virtual void evaluate(const Pstream::commsTypes commsType); //- Return patch-normal gradient virtual tmp > snGrad() const; //- Initialise neighbour matrix update virtual void initInterfaceMatrixUpdate ( const scalarField& psiInternal, scalarField& result, const lduMatrix& m, const scalarField& coeffs, const direction cmpt, const Pstream::commsTypes commsType ) const; //- Update result field based on interface functionality virtual void updateInterfaceMatrix ( const scalarField& psiInternal, scalarField& result, const lduMatrix& m, const scalarField& coeffs, const direction cmpt, const Pstream::commsTypes commsType ) const; //- Processor coupled interface functions //- Return processor number virtual int myProcNo() const { return procPatch_.myProcNo(); } //- Return neigbour processor number virtual int neighbProcNo() const { return procPatch_.neighbProcNo(); } //- Does the patch field perform the transfromation virtual bool doTransform() const { return !(procPatch_.parallel() || pTraits::rank == 0); } //- Return face transformation tensor virtual const tensorField& forwardT() const { return procPatch_.forwardT(); } //- Return rank of component for transform virtual int rank() const { return pTraits::rank; } }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository # include "processorFvPatchField.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif // ************************************************************************* //