Bugfix: gradient cacheing

This commit is contained in:
Hrvoje Jasak 2016-01-19 19:55:18 +00:00
parent b4e1b80409
commit 1cd825f9c0
6 changed files with 20 additions and 21 deletions

View file

@ -117,6 +117,8 @@ public:
);
//- Return the gradient of the given field to the gradScheme::grad
// for optional caching
tmp
<
GeometricField
@ -129,7 +131,7 @@ public:
//- Return the BlockLduSystem corresponding to the implicit cell
// limted grad discretization. For block coupled systems.
// limited grad discretization. For block coupled systems.
tmp
<
BlockLduSystem<vector, typename outerProduct<vector, Type>::type>

View file

@ -99,7 +99,7 @@ tmp<volVectorField> cellLimitedGrad<scalar>::calcGrad
{
const fvMesh& mesh = vsf.mesh();
tmp<volVectorField> tGrad = basicGradScheme_().grad(vsf);
tmp<volVectorField> tGrad = basicGradScheme_().grad(vsf, name);
if (k_ < SMALL)
{
@ -237,7 +237,7 @@ tmp<volVectorField> cellLimitedGrad<scalar>::calcGrad
g.internalField() *= limiter;
g.correctBoundaryConditions();
gaussGrad<scalar>::correctBoundaryConditions(vsf, g);
gradScheme<scalar>::correctBoundaryConditions(vsf, g);
return tGrad;
}
@ -252,7 +252,7 @@ tmp<volTensorField> cellLimitedGrad<vector>::calcGrad
{
const fvMesh& mesh = vsf.mesh();
tmp<volTensorField> tGrad = basicGradScheme_().grad(vsf);
tmp<volTensorField> tGrad = basicGradScheme_().grad(vsf, name);
if (k_ < SMALL)
{
@ -400,7 +400,7 @@ tmp<volTensorField> cellLimitedGrad<vector>::calcGrad
}
g.correctBoundaryConditions();
gaussGrad<vector>::correctBoundaryConditions(vsf, g);
gradScheme<vector>::correctBoundaryConditions(vsf, g);
return tGrad;
}

View file

@ -24,7 +24,6 @@ License
\*---------------------------------------------------------------------------*/
#include "cellMDLimitedGrad.H"
#include "gaussGrad.H"
#include "fvMesh.H"
#include "volMesh.H"
#include "surfaceMesh.H"
@ -56,7 +55,7 @@ tmp<volVectorField> cellMDLimitedGrad<scalar>::calcGrad
{
const fvMesh& mesh = vsf.mesh();
tmp<volVectorField> tGrad = basicGradScheme_().grad(vsf);
tmp<volVectorField> tGrad = basicGradScheme_().grad(vsf, name);
if (k_ < SMALL)
{
@ -183,7 +182,7 @@ tmp<volVectorField> cellMDLimitedGrad<scalar>::calcGrad
}
g.correctBoundaryConditions();
gaussGrad<scalar>::correctBoundaryConditions(vsf, g);
gradScheme<scalar>::correctBoundaryConditions(vsf, g);
return tGrad;
}
@ -198,7 +197,7 @@ tmp<volTensorField> cellMDLimitedGrad<vector>::calcGrad
{
const fvMesh& mesh = vsf.mesh();
tmp<volTensorField> tGrad = basicGradScheme_().grad(vsf);
tmp<volTensorField> tGrad = basicGradScheme_().grad(vsf, name);
if (k_ < SMALL)
{
@ -324,7 +323,7 @@ tmp<volTensorField> cellMDLimitedGrad<vector>::calcGrad
}
g.correctBoundaryConditions();
gaussGrad<vector>::correctBoundaryConditions(vsf, g);
gradScheme<vector>::correctBoundaryConditions(vsf, g);
return tGrad;
}

View file

@ -128,7 +128,7 @@ public:
) const;
//- Return the BlockLduSystem corresponding to the implicit face
// limted grad discretization. For block coupled systems.
// limited grad discretization. For block coupled systems.
tmp
<
BlockLduSystem<vector, typename outerProduct<vector, Type>::type>

View file

@ -24,7 +24,6 @@ License
\*---------------------------------------------------------------------------*/
#include "faceLimitedGrad.H"
#include "gaussGrad.H"
#include "fvMesh.H"
#include "volMesh.H"
#include "surfaceMesh.H"
@ -78,7 +77,7 @@ tmp<volVectorField> faceLimitedGrad<scalar>::calcGrad
{
const fvMesh& mesh = vsf.mesh();
tmp<volVectorField> tGrad = basicGradScheme_().grad(vsf);
tmp<volVectorField> tGrad = basicGradScheme_().grad(vsf, name);
if (k_ < SMALL)
{
@ -200,7 +199,7 @@ tmp<volVectorField> faceLimitedGrad<scalar>::calcGrad
g.internalField() *= limiter;
g.correctBoundaryConditions();
gaussGrad<scalar>::correctBoundaryConditions(vsf, g);
gradScheme<scalar>::correctBoundaryConditions(vsf, g);
return tGrad;
}
@ -215,7 +214,7 @@ tmp<volTensorField> faceLimitedGrad<vector>::calcGrad
{
const fvMesh& mesh = vvf.mesh();
tmp<volTensorField> tGrad = basicGradScheme_().grad(vvf);
tmp<volTensorField> tGrad = basicGradScheme_().grad(vvf, name);
if (k_ < SMALL)
{
@ -361,7 +360,7 @@ tmp<volTensorField> faceLimitedGrad<vector>::calcGrad
g.internalField() *= limiter;
g.correctBoundaryConditions();
gaussGrad<vector>::correctBoundaryConditions(vvf, g);
gradScheme<vector>::correctBoundaryConditions(vvf, g);
return tGrad;
}

View file

@ -25,7 +25,6 @@ License
#include "faceMDLimitedGrad.H"
#include "cellMDLimitedGrad.H"
#include "gaussGrad.H"
#include "fvMesh.H"
#include "volMesh.H"
#include "surfaceMesh.H"
@ -58,7 +57,7 @@ tmp<volVectorField> faceMDLimitedGrad<scalar>::calcGrad
{
const fvMesh& mesh = vsf.mesh();
tmp<volVectorField> tGrad = basicGradScheme_().grad(vsf);
tmp<volVectorField> tGrad = basicGradScheme_().grad(vsf, name);
if (k_ < SMALL)
{
@ -182,7 +181,7 @@ tmp<volVectorField> faceMDLimitedGrad<scalar>::calcGrad
}
g.correctBoundaryConditions();
gaussGrad<scalar>::correctBoundaryConditions(vsf, g);
gradScheme<scalar>::correctBoundaryConditions(vsf, g);
return tGrad;
}
@ -197,7 +196,7 @@ tmp<volTensorField> faceMDLimitedGrad<vector>::calcGrad
{
const fvMesh& mesh = vvf.mesh();
tmp<volTensorField> tGrad = basicGradScheme_().grad(vvf);
tmp<volTensorField> tGrad = basicGradScheme_().grad(vvf, name);
if (k_ < SMALL)
{
@ -322,7 +321,7 @@ tmp<volTensorField> faceMDLimitedGrad<vector>::calcGrad
}
g.correctBoundaryConditions();
gaussGrad<vector>::correctBoundaryConditions(vvf, g);
gradScheme<vector>::correctBoundaryConditions(vvf, g);
return tGrad;
}