Backport setReference from vanilla 3.0.1
This commit is contained in:
parent
4d67ffd82f
commit
42c61d36a3
15 changed files with 46 additions and 16 deletions
|
@ -34,7 +34,9 @@
|
|||
fvc::makeAbsolute(phi, U);
|
||||
}
|
||||
|
||||
for(int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++)
|
||||
mesh.setFluxRequired(pcorr.name());
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
(
|
||||
|
|
|
@ -24,7 +24,9 @@
|
|||
pcorrTypes
|
||||
);
|
||||
|
||||
phi = (fvc::interpolate(U) & mesh.Sf());
|
||||
phi = fvc::interpolate(U) & mesh.Sf();
|
||||
|
||||
mesh.setFluxRequired(pcorr.name());
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
|
|
|
@ -24,7 +24,9 @@
|
|||
pcorrTypes
|
||||
);
|
||||
|
||||
phi = (fvc::interpolate(U) & mesh.Sf());
|
||||
phi = fvc::interpolate(U) & mesh.Sf();
|
||||
|
||||
mesh.setFluxRequired(pcorr.name());
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
immersedBoundaryAdjustPhi(phi, U);
|
||||
adjustPhi(phi, U, pcorr);
|
||||
|
||||
mesh.setFluxRequired(pcorr.name());
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
|
|
|
@ -34,7 +34,9 @@
|
|||
fvc::makeAbsolute(phi, U);
|
||||
}
|
||||
|
||||
for(int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++)
|
||||
mesh.setFluxRequired(pcorr.name());
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
(
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
pcorrTypes
|
||||
);
|
||||
|
||||
mesh.setFluxRequired(pcorr.name());
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
|
|
|
@ -53,3 +53,4 @@
|
|||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
for (label i = 0; i < p.boundaryField().size(); i++)
|
||||
for (label i=0; i<p.boundaryField().size(); i++)
|
||||
{
|
||||
if (p.boundaryField()[i].fixesValue())
|
||||
{
|
||||
|
@ -26,7 +26,7 @@
|
|||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("pcorr", p.dimensions(), 0),
|
||||
dimensionedScalar("pcorr", p.dimensions(), 0.0),
|
||||
pcorrTypes
|
||||
);
|
||||
|
||||
|
@ -35,7 +35,9 @@
|
|||
|
||||
adjustPhi(phi, U, pcorr);
|
||||
|
||||
for(int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++)
|
||||
mesh.setFluxRequired(pcorr.name());
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
(
|
||||
|
@ -53,6 +55,6 @@
|
|||
// Fluxes are corrected to absolute velocity and further corrected
|
||||
// later. HJ, 6/Feb/2009
|
||||
}
|
||||
|
||||
# include "continuityErrs.H"
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
|
||||
adjustPhi(phi, U, pcorr);
|
||||
|
||||
mesh.setFluxRequired(pcorr.name());
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
|
@ -57,5 +59,5 @@
|
|||
}
|
||||
}
|
||||
|
||||
#include "continuityErrs.H"
|
||||
# include "continuityErrs.H"
|
||||
}
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
|
||||
adjustPhi(phi, U, pcorr);
|
||||
|
||||
mesh.setFluxRequired(pcorr.name());
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
|
||||
adjustPhi(phi, U, pcorr);
|
||||
|
||||
mesh.setFluxRequired(pcorr.name());
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
|
||||
adjustPhi(phi, U, pcorr);
|
||||
|
||||
mesh.setFluxRequired(pcorr.name());
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
|
|
|
@ -572,6 +572,17 @@ Foam::ITstream& Foam::fvSchemes::laplacianScheme(const word& name) const
|
|||
}
|
||||
|
||||
|
||||
void Foam::fvSchemes::setFluxRequired(const word& name) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "Setting fluxRequired for " << name << endl;
|
||||
}
|
||||
|
||||
fluxRequired_.add(name, true, true);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::fvSchemes::fluxRequired(const word& name) const
|
||||
{
|
||||
if (debug)
|
||||
|
|
|
@ -76,7 +76,7 @@ class fvSchemes
|
|||
dictionary laplacianSchemes_;
|
||||
ITstream defaultLaplacianScheme_;
|
||||
|
||||
dictionary fluxRequired_;
|
||||
mutable dictionary fluxRequired_;
|
||||
bool defaultFluxRequired_;
|
||||
|
||||
dictionary cacheFields_;
|
||||
|
@ -126,6 +126,8 @@ public:
|
|||
|
||||
ITstream& laplacianScheme(const word& name) const;
|
||||
|
||||
void setFluxRequired(const word& name) const;
|
||||
|
||||
bool fluxRequired(const word& name) const;
|
||||
|
||||
bool cache(const word& name) const;
|
||||
|
|
|
@ -49,10 +49,4 @@ snGradSchemes
|
|||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
Reference in a new issue