diff --git a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C index 4d08364389a89d226e35220d25902354857d0138..1a0aacd03039f349486cc1a29a8cbc5cc84dc3b3 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C @@ -104,16 +104,6 @@ Foam::coupledFvPatchField<Type>::coupledFvPatchField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template<class Type> -Foam::tmp<Foam::Field<Type> > Foam::coupledFvPatchField<Type>::snGrad() const -{ - notImplemented("coupledFvPatchField<Type>::snGrad()"); - return - this->patch().deltaCoeffs() - *(this->patchNeighbourField() - this->patchInternalField()); -} - - template<class Type> Foam::tmp<Foam::Field<Type> > Foam::coupledFvPatchField<Type>::snGrad ( diff --git a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H index aa6610709fd8925154cff3d5b65fd11a83748ff6..4a443c6f115205304d6323c329f3b8edaf64a49c 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H @@ -145,7 +145,14 @@ public: ) const; //- Return patch-normal gradient - virtual tmp<Field<Type> > snGrad() const; + virtual tmp<Field<Type> > snGrad() const + { + notImplemented + ( + type() + "::coupledFvPatchField<Type>::snGrad()" + ); + return *this; + } //- Initialise the evaluation of the patch field virtual void initEvaluate diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C index d36da92ef362d3458dece311f13ccd69b26e2bcb..3a0f7fd1b4cc30404a2a55b955d6d935145a09d7 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,15 +28,10 @@ License #include "demandDrivenData.H" #include "transformField.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class Type> -processorCyclicFvPatchField<Type>::processorCyclicFvPatchField +Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField ( const fvPatch& p, const DimensionedField<Type, volMesh>& iF @@ -48,7 +43,7 @@ processorCyclicFvPatchField<Type>::processorCyclicFvPatchField template<class Type> -processorCyclicFvPatchField<Type>::processorCyclicFvPatchField +Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField ( const fvPatch& p, const DimensionedField<Type, volMesh>& iF, @@ -63,7 +58,7 @@ processorCyclicFvPatchField<Type>::processorCyclicFvPatchField // Construct by mapping given processorCyclicFvPatchField<Type> template<class Type> -processorCyclicFvPatchField<Type>::processorCyclicFvPatchField +Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField ( const processorCyclicFvPatchField<Type>& ptf, const fvPatch& p, @@ -97,7 +92,7 @@ processorCyclicFvPatchField<Type>::processorCyclicFvPatchField template<class Type> -processorCyclicFvPatchField<Type>::processorCyclicFvPatchField +Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField ( const fvPatch& p, const DimensionedField<Type, volMesh>& iF, @@ -144,7 +139,7 @@ processorCyclicFvPatchField<Type>::processorCyclicFvPatchField template<class Type> -processorCyclicFvPatchField<Type>::processorCyclicFvPatchField +Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField ( const processorCyclicFvPatchField<Type>& ptf ) @@ -157,7 +152,7 @@ processorCyclicFvPatchField<Type>::processorCyclicFvPatchField template<class Type> -processorCyclicFvPatchField<Type>::processorCyclicFvPatchField +Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField ( const processorCyclicFvPatchField<Type>& ptf, const DimensionedField<Type, volMesh>& iF @@ -172,107 +167,8 @@ processorCyclicFvPatchField<Type>::processorCyclicFvPatchField // * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * // template<class Type> -processorCyclicFvPatchField<Type>::~processorCyclicFvPatchField() +Foam::processorCyclicFvPatchField<Type>::~processorCyclicFvPatchField() {} -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -//template<class Type> -//tmp<Field<Type> > -//processorCyclicFvPatchField<Type>::patchNeighbourField() const -//{ -// return *this; -//} -// -// -//template<class Type> -//void processorCyclicFvPatchField<Type>::initEvaluate -//( -// const Pstream::commsTypes commsType -//) -//{ -// if (Pstream::parRun()) -// { -// procPatch_.compressedSend(commsType, this->patchInternalField()()); -// } -//} -// -// -//template<class Type> -//void processorCyclicFvPatchField<Type>::evaluate -//( -// const Pstream::commsTypes commsType -//) -//{ -// if (Pstream::parRun()) -// { -// procPatch_.compressedReceive<Type>(commsType, *this); -// -// if (doTransform()) -// { -// transform(*this, procPatch_.forwardT(), *this); -// } -// } -//} -// -// -//template<class Type> -//tmp<Field<Type> > processorCyclicFvPatchField<Type>::snGrad() const -//{ -// return this->patch().deltaCoeffs()*(*this - this->patchInternalField()); -//} -// -// -//template<class Type> -//void processorCyclicFvPatchField<Type>::initInterfaceMatrixUpdate -//( -// scalarField&, -// const scalarField& psiInternal, -// const scalarField&, -// const direction, -// const Pstream::commsTypes commsType -//) const -//{ -// procPatch_.compressedSend -// ( -// commsType, -// this->patch().patchInternalField(psiInternal)() -// ); -//} -// -// -//template<class Type> -//void processorCyclicFvPatchField<Type>::updateInterfaceMatrix -//( -// scalarField& result, -// const scalarField&, -// const scalarField& coeffs, -// const direction cmpt, -// const Pstream::commsTypes commsType -//) const -//{ -// scalarField pnf -// ( -// procPatch_.compressedReceive<scalar>(commsType, this->size())() -// ); -// -// // Transform according to the transformation tensor -// transformCoupleField(pnf, cmpt); -// -// // Multiply the field by coefficients and add into the result -// -// const labelUList& faceCells = this->patch().faceCells(); -// -// forAll(faceCells, elemI) -// { -// result[faceCells[elemI]] -= coeffs[elemI]*pnf[elemI]; -// } -//} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C index 5635b348be99f4a300bb1417ef2fac4f7b6a97f9..f5622451cbf45706cc3c7569aff24b2ea9bb2d1b 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C @@ -173,20 +173,10 @@ void Foam::fvPatchField<Type>::check(const fvPatchField<Type>& ptf) const } -template<class Type> -Foam::tmp<Foam::Field<Type> > Foam::fvPatchField<Type>::snGrad -( - const scalarField& deltaCoeffs -) const -{ - return deltaCoeffs*(*this - patchInternalField()); -} - - template<class Type> Foam::tmp<Foam::Field<Type> > Foam::fvPatchField<Type>::snGrad() const { - return this->snGrad(patch_.deltaCoeffs()); + return patch_.deltaCoeffs()*(*this - patchInternalField()); } diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H index 0167133a0361de3ace42cc03c69450915f00497e..6047f1e4af794e10a5abbcc8e89176c337a90cf6 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H @@ -347,13 +347,21 @@ public: // Evaluation functions //- Return patch-normal gradient + virtual tmp<Field<Type> > snGrad() const; + + //- Return patch-normal gradient for coupled-patches + // using the deltaCoeffs provided virtual tmp<Field<Type> > snGrad ( const scalarField& deltaCoeffs - ) const; - - //- Return patch-normal gradient - virtual tmp<Field<Type> > snGrad() const; + ) const + { + notImplemented + ( + type() + "::snGrad(const scalarField& deltaCoeffs)" + ); + return *this; + } //- Update the coefficients associated with the patch field // Sets Updated to true @@ -421,6 +429,15 @@ public: //- Return the matrix diagonal coefficients corresponding to the // evaluation of the gradient of this patchField + virtual tmp<Field<Type> > gradientInternalCoeffs() const + { + notImplemented(type() + "::gradientInternalCoeffs()"); + return *this; + } + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the gradient of this coupled patchField + // using the deltaCoeffs provided virtual tmp<Field<Type> > gradientInternalCoeffs ( const scalarField& deltaCoeffs @@ -434,16 +451,17 @@ public: return *this; } - //- Return the matrix diagonal coefficients corresponding to the + //- Return the matrix source coefficients corresponding to the // evaluation of the gradient of this patchField - virtual tmp<Field<Type> > gradientInternalCoeffs() const + virtual tmp<Field<Type> > gradientBoundaryCoeffs() const { - notImplemented(type() + "::gradientInternalCoeffs()"); + notImplemented(type() + "::gradientBoundaryCoeffs()"); return *this; } //- Return the matrix source coefficients corresponding to the - // evaluation of the gradient of this patchField + // evaluation of the gradient of this coupled patchField + // using the deltaCoeffs provided virtual tmp<Field<Type> > gradientBoundaryCoeffs ( const scalarField& deltaCoeffs @@ -457,14 +475,6 @@ public: return *this; } - //- Return the matrix source coefficients corresponding to the - // evaluation of the gradient of this patchField - virtual tmp<Field<Type> > gradientBoundaryCoeffs() const - { - notImplemented(type() + "::gradientBoundaryCoeffs()"); - return *this; - } - //- Manipulate matrix virtual void manipulateMatrix(fvMatrix<Type>& matrix);