diff --git a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C index 221e03712..859760628 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C @@ -158,12 +158,6 @@ Foam::fv::gradScheme::grad solution::cachePrintMessage("Recalculating", name, vsf); tmp tgGrad = calcGrad(vsf, name); - // Note: in order for the patchNeighbourField to be - // correct on coupled boundaries, - // correctBoundaryConditions needs to be called. The call - // shall be moved into the library fvc operators - tgGrad().correctBoundaryConditions(); - solution::cachePrintMessage("Storing", name, vsf); regIOobject::store(tgGrad.ptr()); GradFieldType& gGrad = const_cast diff --git a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellLimitedGrad/cellLimitedGrads.C b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellLimitedGrad/cellLimitedGrads.C index ffff6fcc9..a001c65d0 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellLimitedGrad/cellLimitedGrads.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellLimitedGrad/cellLimitedGrads.C @@ -100,7 +100,7 @@ tmp cellLimitedGrad::calcGrad { const fvMesh& mesh = vsf.mesh(); - tmp tGrad = basicGradScheme_().grad(vsf); + tmp tGrad = basicGradScheme_().calcGrad(vsf, name); if (k_ < SMALL) { @@ -253,7 +253,7 @@ tmp cellLimitedGrad::calcGrad { const fvMesh& mesh = vsf.mesh(); - tmp tGrad = basicGradScheme_().grad(vsf); + tmp tGrad = basicGradScheme_().calcGrad(vsf, name); if (k_ < SMALL) { @@ -428,6 +428,7 @@ tmp > cellLimitedGrad::fvmGrad // Calculate current gradient for explicit limiting // In fvm::grad the current gradient may be cached + // Using cached gradient? Check. HJ, 4/Jun/2016 tmp tGrad = basicGradScheme_().grad(vsf); const volVectorField& g = tGrad(); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceLimitedGrad/faceLimitedGrads.C b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceLimitedGrad/faceLimitedGrads.C index 1ed5b3d36..ef4ab2936 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceLimitedGrad/faceLimitedGrads.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceLimitedGrad/faceLimitedGrads.C @@ -387,6 +387,7 @@ tmp > faceLimitedGrad::fvmGrad BlockLduSystem& bs = tbs(); // Calculate current gradient for explicit limiting + // Using cached gradient? Check. HJ, 4/Jun/2016 tmp tGrad = basicGradScheme_().grad(vsf); const volVectorField& g = tGrad(); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceMDLimitedGrad/faceMDLimitedGrads.C b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceMDLimitedGrad/faceMDLimitedGrads.C index a03ea1d74..66eb60fbb 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceMDLimitedGrad/faceMDLimitedGrads.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceMDLimitedGrad/faceMDLimitedGrads.C @@ -57,7 +57,7 @@ tmp faceMDLimitedGrad::calcGrad { const fvMesh& mesh = vsf.mesh(); - tmp tGrad = basicGradScheme_().grad(vsf, name); + tmp tGrad = basicGradScheme_().calcGrad(vsf, name); if (k_ < SMALL) { @@ -196,7 +196,7 @@ tmp faceMDLimitedGrad::calcGrad { const fvMesh& mesh = vvf.mesh(); - tmp tGrad = basicGradScheme_().grad(vvf, name); + tmp tGrad = basicGradScheme_().calcGrad(vvf, name); if (k_ < SMALL) { diff --git a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/limitedGrad/LimitedGrad.C b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/limitedGrad/LimitedGrad.C index 3092c9231..9d2da704b 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/limitedGrad/LimitedGrad.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/limitedGrad/LimitedGrad.C @@ -232,7 +232,7 @@ LimitedGrad::gradientField ) const { // Get base gradient - tmp tGrad = basicGradScheme_().grad(vf, name); + tmp tGrad = basicGradScheme_().calcGrad(vf, name); GeoGradFieldType& gradVf = tGrad(); // Apply the limiter @@ -263,6 +263,7 @@ LimitedGrad::gradientMatrix GradMatrixType& bs = tbs(); // Calculate limiter. Using explicit gradient + // Using cached gradient? Check. HJ, 4/Jun/2016 GeoFieldType limitField ( this->limiter diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/correctedSnGrad/correctedSnGrad.C b/src/finiteVolume/finiteVolume/snGradSchemes/correctedSnGrad/correctedSnGrad.C index a346307b0..3c2e83a34 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/correctedSnGrad/correctedSnGrad.C +++ b/src/finiteVolume/finiteVolume/snGradSchemes/correctedSnGrad/correctedSnGrad.C @@ -30,6 +30,7 @@ Description #include "volFields.H" #include "surfaceFields.H" #include "linear.H" +#include "surfaceInterpolate.H" #include "fvcGrad.H" #include "gaussGrad.H" @@ -61,17 +62,8 @@ Foam::fv::correctedSnGrad::fullGradCorrection { const fvMesh& mesh = this->mesh(); - // construct GeometricField tmp > tssf = - mesh.correctionVectors() - & linear::type>(mesh).interpolate - ( - gradScheme::New - ( - mesh, - mesh.schemesDict().gradScheme("grad(" + vf.name() + ')') - )().grad(vf, "grad(" + vf.name() + ')') - ); + mesh.correctionVectors() & fvc::interpolate(fvc::grad(vf)); tssf().rename("snGradCorr(" + vf.name() + ')'); return tssf;