diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencil.H index 17b225a890..dee4ee411c 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencil.H @@ -69,13 +69,22 @@ public: // Member Functions //- Sum surface field contributions to create cell values - template - static tmp > weightedSum + template + static + tmp + < + GeometricField + < + typename outerProduct::type, + fvPatchField, + volMesh + > + > weightedSum ( const mapDistribute& map, const labelListList& stencil, const GeometricField& fld, - const List >& stencilWeights + const List >& stencilWeights ); }; diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencilTemplates.C index b9307adad7..1bb2bc41cc 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencilTemplates.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencilTemplates.C @@ -27,25 +27,36 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template -Foam::tmp > -Foam::extendedCellToCellStencil::weightedSum +template +Foam::tmp +< + Foam::GeometricField + < + typename Foam::outerProduct::type, + Foam::fvPatchField, + Foam::volMesh + > +> Foam::extendedCellToCellStencil::weightedSum ( const mapDistribute& map, const labelListList& stencil, const GeometricField& fld, - const List >& stencilWeights + const List >& stencilWeights ) { + typedef typename outerProduct::type WeightedType; + typedef GeometricField + WeightedFieldType; + const fvMesh& mesh = fld.mesh(); // Collect internal and boundary values List > stencilFld; collectData(map, stencil, fld, stencilFld); - tmp > tsfCorr + tmp twf ( - new GeometricField + new WeightedFieldType ( IOobject ( @@ -62,23 +73,23 @@ Foam::extendedCellToCellStencil::weightedSum ) ) ); - GeometricField& sf = tsfCorr(); + WeightedFieldType& wf = twf(); // cells - forAll(sf, cellI) + forAll(wf, cellI) { const List& stField = stencilFld[cellI]; - const List& stWeight = stencilWeights[cellI]; + const List& stWeight = stencilWeights[cellI]; forAll(stField, i) { - sf[cellI] += stField[i]*stWeight[i]; + wf[cellI] += stWeight[i]*stField[i]; } } // Boundaries values? - return tsfCorr; + return twf; } diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.H index e2cc865ce4..b210dc643d 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.H @@ -116,11 +116,19 @@ public: } //- Sum vol field contributions to create cell values - template - tmp > weightedSum + template + tmp + < + GeometricField + < + typename outerProduct::type, + fvPatchField, + volMesh + > + > weightedSum ( const GeometricField& fld, - const List >& stencilWeights + const List >& stencilWeights ) const { return weightedSum @@ -131,7 +139,6 @@ public: stencilWeights ); } - }; diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C index cf9fb29236..7818666137 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C @@ -26,6 +26,7 @@ License #include "fieldValueDelta.H" #include "ListOps.H" #include "Time.H" +#include "volFields.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -38,16 +39,15 @@ namespace Foam template<> const char* - NamedEnum::names[] = + NamedEnum::names[] = { "add", "subtract", "min", - "max", - "average" + "max" }; - const NamedEnum + const NamedEnum fieldValues::fieldValueDelta::operationTypeNames_; } @@ -159,7 +159,7 @@ void Foam::fieldValues::fieldValueDelta::write() if (log_) { - Info<< type() << " " << name_ << " output:" << endl; + Info<< type() << " output:" << endl; } bool found = false; @@ -180,8 +180,10 @@ void Foam::fieldValues::fieldValueDelta::write() { Info<< " none" << endl; } - - Info<< endl; + else + { + Info<< endl; + } } }