fvMesh: fvSchemes and fvSolution are now demand-driven

fvMesh is no longer derived from fvSchemes and fvSolution, these are now
demand-driven and accessed by the member functions schemes() and solution()
respectively.  This means that the system/fvSchemes and system/fvSolution files
are no longer required during fvMesh constructions simplifying the mesh
generation and manipulation phase; theses files are read on the first call of
their access functions.

The fvSchemes member function names have also been simplified taking advantage
of the context in which they are called, for example

    mesh.ddtScheme(fieldName) -> mesh.schemes().ddt(fieldName)
This commit is contained in:
Henry Weller
2022-03-23 16:23:55 +00:00
parent acd5528557
commit ddbf2d7853
122 changed files with 418 additions and 296 deletions

View File

@ -30,6 +30,6 @@ volVectorField U
#include "createPhi.H"
mesh.setFluxRequired(p.name());
mesh.schemes().setFluxRequired(p.name());
#include "readTurbulenceProperties.H"

View File

@ -1,6 +1,6 @@
const dictionary& potentialFlow
(
mesh.solutionDict().subDict("potentialFlow")
mesh.solution().dict().subDict("potentialFlow")
);
const int nNonOrthCorr

View File

@ -111,6 +111,6 @@ setRefCell
PhiRefCell,
PhiRefValue
);
mesh.setFluxRequired(Phi.name());
mesh.schemes().setFluxRequired(Phi.name());
#include "createMRF.H"

View File

@ -5,7 +5,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
mesh,
fields,
phi,
mesh.divScheme("div(phi,ft_b_ha_hau)")
mesh.schemes().div("div(phi,ft_b_ha_hau)")
)
);

View File

@ -43,7 +43,7 @@ volVectorField U
#include "compressibleCreatePhi.H"
mesh.setFluxRequired(p.name());
mesh.schemes().setFluxRequired(p.name());
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::RASModel> turbulence

View File

@ -44,7 +44,7 @@ volVectorField U
#include "compressibleCreatePhi.H"
mesh.setFluxRequired(p.name());
mesh.schemes().setFluxRequired(p.name());
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::momentumTransportModel> turbulence

View File

@ -5,7 +5,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
mesh,
fields,
phi,
mesh.divScheme("div(phi,ft_b_ha_hau)")
mesh.schemes().div("div(phi,ft_b_ha_hau)")
)
);

View File

@ -5,7 +5,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
mesh,
fields,
phi,
mesh.divScheme("div(phi,Yi_h)")
mesh.schemes().div("div(phi,Yi_h)")
)
);

View File

@ -39,7 +39,7 @@ volScalarField& p = thermo.p();
#include "compressibleCreatePhi.H"
mesh.setFluxRequired(p.name());
mesh.schemes().setFluxRequired(p.name());
Info << "Creating turbulence model.\n" << nl;
autoPtr<compressible::momentumTransportModel> turbulence
@ -94,7 +94,7 @@ pressureReference pressureReference
thermo.incompressible()
);
mesh.setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(p_rgh.name());
hydrostaticInitialisation
(

View File

@ -40,7 +40,7 @@ volScalarField& p = thermo.p();
pressureReference pressureReference(p, pimple.dict(), false);
mesh.setFluxRequired(p.name());
mesh.schemes().setFluxRequired(p.name());
Info << "Creating turbulence model.\n" << nl;

View File

@ -1,5 +1,5 @@
word fluxScheme("Kurganov");
if (mesh.schemesDict().readIfPresent("fluxScheme", fluxScheme))
if (mesh.schemes().dict().readIfPresent("fluxScheme", fluxScheme))
{
if ((fluxScheme == "Tadmor") || (fluxScheme == "Kurganov"))
{

View File

@ -47,7 +47,7 @@ pressureReference pressureReference
thermo.incompressible()
);
mesh.setFluxRequired(p.name());
mesh.schemes().setFluxRequired(p.name());
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::momentumTransportModel> turbulence

View File

@ -95,7 +95,7 @@ if (pimple.transonic())
}
else
{
if (mesh.steady())
if (mesh.schemes().steady())
{
adjustMass = adjustPhi(phiHbyA, U, p);
}
@ -133,7 +133,7 @@ else
}
}
if (mesh.steady())
if (mesh.schemes().steady())
{
#include "incompressible/continuityErrs.H"
}
@ -161,7 +161,7 @@ U.correctBoundaryConditions();
fvConstraints.constrain(U);
K = 0.5*magSqr(U);
if (mesh.steady())
if (mesh.schemes().steady())
{
fvConstraints.constrain(p);
}
@ -175,7 +175,7 @@ if (adjustMass && !thermo.incompressible())
p.correctBoundaryConditions();
}
if (mesh.steady() || pimple.simpleRho() || adjustMass)
if (mesh.schemes().steady() || pimple.simpleRho() || adjustMass)
{
rho = thermo.rho();
}
@ -183,7 +183,7 @@ if (mesh.steady() || pimple.simpleRho() || adjustMass)
// Correct rhoUf if the mesh is moving
fvc::correctRhoUf(rhoUf, rho, U, phi);
if (mesh.steady() || pimple.simpleRho())
if (mesh.schemes().steady() || pimple.simpleRho())
{
rho.relax();
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -138,7 +138,7 @@ int main(int argc, char *argv[])
if
(
!mesh.steady()
!mesh.schemes().steady()
&& !pimple.simpleRho()
&& pimple.firstPimpleIter()
)
@ -164,7 +164,7 @@ int main(int argc, char *argv[])
}
}
if (!mesh.steady())
if (!mesh.schemes().steady())
{
rho = thermo.rho();
}

View File

@ -45,7 +45,7 @@ pressureReference pressureReference
thermo.incompressible()
);
mesh.setFluxRequired(p.name());
mesh.schemes().setFluxRequired(p.name());
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::momentumTransportModel> turbulence

View File

@ -111,5 +111,5 @@ DBU.name() = "DBU";
pressureReference pressureReference(p, piso.dict());
mesh.setFluxRequired(p.name());
mesh.setFluxRequired(pB.name());
mesh.schemes().setFluxRequired(p.name());
mesh.schemes().setFluxRequired(pB.name());

View File

@ -1,3 +1,3 @@
const dictionary& Bpiso = mesh.solutionDict().subDict("BPISO");
const dictionary& Bpiso = mesh.solution().dict().subDict("BPISO");
const int nBcorr = Bpiso.lookupOrDefault<int>("nCorrectors", 1);

View File

@ -84,7 +84,7 @@ pressureReference pressureReference
thermo.incompressible()
);
mesh.setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(p_rgh.name());
hydrostaticInitialisation
(

View File

@ -23,7 +23,7 @@ surfaceScalarField phiHbyA
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
bool adjustMass = mesh.steady() && adjustPhi(phiHbyA, U, p_rgh);
bool adjustMass = mesh.schemes().steady() && adjustPhi(phiHbyA, U, p_rgh);
const surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
@ -97,7 +97,7 @@ else
phi = phiHbyA + p_rghEqn.flux();
if (mesh.steady())
if (mesh.schemes().steady())
{
#include "incompressible/continuityErrs.H"
}
@ -131,7 +131,7 @@ U.correctBoundaryConditions();
fvConstraints.constrain(U);
K = 0.5*magSqr(U);
if (mesh.steady())
if (mesh.schemes().steady())
{
if (fvConstraints.constrain(p))
{
@ -150,12 +150,12 @@ if (adjustMass && !thermo.incompressible())
p_rgh.correctBoundaryConditions();
}
if (mesh.steady() || pimple.simpleRho() || adjustMass)
if (mesh.schemes().steady() || pimple.simpleRho() || adjustMass)
{
rho = thermo.rho();
}
if (mesh.steady() || pimple.simpleRho())
if (mesh.schemes().steady() || pimple.simpleRho())
{
rho.relax();
}

View File

@ -7,7 +7,7 @@ if (Y.size())
mesh,
fields,
phi,
mesh.divScheme("div(phi,Yi_h)")
mesh.schemes().div("div(phi,Yi_h)")
)
);
}

View File

@ -214,7 +214,7 @@ forAll(fluidRegions, i)
)
);
fluidRegions[i].setFluxRequired(p_rghFluid[i].name());
fluidRegions[i].schemes().setFluxRequired(p_rghFluid[i].name());
initialMassFluid[i] = fvc::domainIntegrate(rhoFluid[i]).value();

View File

@ -20,7 +20,7 @@ else
{
if (Ecorr == 0)
{
if (!mesh.steady() && pimples.firstPimpleIter())
if (!mesh.schemes().steady() && pimples.firstPimpleIter())
{
#include "rhoEqn.H"
}
@ -61,7 +61,7 @@ else
thermophysicalTransport.correct();
}
if (!mesh.steady() && pimples.finalPimpleIter())
if (!mesh.schemes().steady() && pimples.finalPimpleIter())
{
rho = thermo.rho();
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -55,7 +55,7 @@ int main(int argc, char *argv[])
Info<< "\nEvolving thermodynamics\n" << endl;
if (mesh.solutionDict().found("SIMPLE"))
if (mesh.solution().dict().found("SIMPLE"))
{
simpleControl simple(mesh);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -97,7 +97,7 @@ int main(int argc, char *argv[])
// mesh.relaxationFactor("alpha")
// *(lambda*max(Ua & U, zeroSensitivity) - alpha);
alpha +=
mesh.fieldRelaxationFactor("alpha")
mesh.solution().fieldRelaxationFactor("alpha")
*(min(max(alpha + lambda*(Ua & U), zeroAlpha), alphaMax) - alpha);
zeroCells(alpha, inletCells);

View File

@ -31,7 +31,7 @@ volVectorField U
pressureReference pressureReference(p, simple.dict());
mesh.setFluxRequired(p.name());
mesh.schemes().setFluxRequired(p.name());
Info<< "Reading field pa\n" << endl;
@ -74,7 +74,7 @@ setRefCell
paRefCell,
paRefValue
);
mesh.setFluxRequired(pa.name());
mesh.schemes().setFluxRequired(pa.name());
autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));

View File

@ -54,5 +54,5 @@ volVectorField U
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
mesh.setFluxRequired(p.name());
setRefCell(p, mesh.solution().dict().subDict("PISO"), pRefCell, pRefValue);
mesh.schemes().setFluxRequired(p.name());

View File

@ -41,7 +41,7 @@ surfaceScalarField phi
);
pressureReference pressureReference(p, pimple.dict());
mesh.setFluxRequired(p.name());
mesh.schemes().setFluxRequired(p.name());
Info<< "Creating SRF model\n" << endl;
autoPtr<SRF::SRFModel> SRF

View File

@ -32,7 +32,7 @@ volVectorField U
pressureReference pressureReference(p, pimple.dict());
mesh.setFluxRequired(p.name());
mesh.schemes().setFluxRequired(p.name());
autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));

View File

@ -31,7 +31,7 @@ volVectorField U
pressureReference pressureReference(p, piso.dict());
mesh.setFluxRequired(p.name());
mesh.schemes().setFluxRequired(p.name());
autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));

View File

@ -76,4 +76,4 @@ hTotal.write();
Info<< "Creating Coriolis Force" << endl;
const dimensionedVector F("F", ((2.0*Omega) & gHat)*gHat);
mesh.setFluxRequired(h.name());
mesh.schemes().setFluxRequired(h.name());

View File

@ -42,7 +42,7 @@ surfaceScalarField phi
pressureReference pressureReference(p, simple.dict());
mesh.setFluxRequired(p.name());
mesh.schemes().setFluxRequired(p.name());
Info<< "Creating SRF model\n" << endl;
autoPtr<SRF::SRFModel> SRF(SRF::SRFModel::New(Urel));

View File

@ -30,7 +30,7 @@ volVectorField U
pressureReference pressureReference(p, simple.dict());
mesh.setFluxRequired(p.name());
mesh.schemes().setFluxRequired(p.name());
autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));

View File

@ -61,7 +61,7 @@ surfaceScalarField phic
pressureReference pressureReference(p, pimple.dict());
mesh.setFluxRequired(p.name());
mesh.schemes().setFluxRequired(p.name());
Info<< "Creating turbulence model\n" << endl;
@ -127,7 +127,7 @@ parcelCloudList clouds(rhoc, Uc, muc, g);
// Particle fraction upper limit
scalar alphacMin
(
1 - mesh.solverDict(alphac.name()).lookup<scalar>("max")
1 - mesh.solution().solverDict(alphac.name()).lookup<scalar>("max")
);
// Update alphac from the particle locations

View File

@ -22,7 +22,7 @@ correctUphiBCs(U, phi, true);
surfaceScalarField rhof(fvc::interpolate(rho, "div(phi,rho)"));
dimensionedScalar rAUf("rAUf", dimTime, 1.0);
mesh.setFluxRequired(pcorr.name());
mesh.schemes().setFluxRequired(pcorr.name());
while (pimple.correctNonOrthogonal())
{

View File

@ -43,7 +43,7 @@ volVectorField U
#include "createPhi.H"
mesh.setFluxRequired(p.name());
mesh.schemes().setFluxRequired(p.name());
// Mass flux (corrected by rhoEqn.H)
surfaceScalarField rhoPhi
@ -86,8 +86,8 @@ rho == max
rhoMin
);
mesh.setFluxRequired(p.name());
mesh.setFluxRequired(rho.name());
mesh.schemes().setFluxRequired(p.name());
mesh.schemes().setFluxRequired(rho.name());
// Create incompressible turbulence model
autoPtr<incompressible::momentumTransportModel> turbulence

View File

@ -48,8 +48,8 @@ dimensionedScalar pMin
mixture
);
mesh.setFluxRequired(p_rgh.name());
mesh.setFluxRequired(alpha1.name());
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(alpha1.name());
#include "readGravitationalAcceleration.H"

View File

@ -332,7 +332,7 @@ void Foam::compressibleMultiphaseMixture::solve()
{
const Time& runTime = mesh_.time();
const dictionary& alphaControls = mesh_.solverDict("alpha");
const dictionary& alphaControls = mesh_.solution().solverDict("alpha");
label nAlphaSubCycles(alphaControls.lookup<label>("nAlphaSubCycles"));
scalar cAlpha(alphaControls.lookup<scalar>("cAlpha"));

View File

@ -35,7 +35,7 @@ const volScalarField& rho = mixture.rho();
dimensionedScalar pMin("pMin", dimPressure, mixture);
mesh.setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(p_rgh.name());
#include "readGravitationalAcceleration.H"

View File

@ -1,4 +1,4 @@
const dictionary& alphaControls = mesh.solverDict(alpha1.name());
const dictionary& alphaControls = mesh.solution().solverDict(alpha1.name());
label nAlphaCorr(alphaControls.lookup<label>("nAlphaCorr"));

View File

@ -103,8 +103,8 @@ if (p_rgh.needReference())
p_rgh = p - rho*gh;
}
mesh.setFluxRequired(p_rgh.name());
mesh.setFluxRequired(alpha1.name());
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(alpha1.name());
// MULES Correction
tmp<surfaceScalarField> talphaPhiCorr0;

View File

@ -87,10 +87,10 @@ if (p_rgh.needReference())
p_rgh = p - rho*gh;
}
mesh.setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(p_rgh.name());
volScalarField& alpha1(mixture.alpha1());
mesh.setFluxRequired(alpha1.name());
mesh.schemes().setFluxRequired(alpha1.name());
#include "createAlphaFluxes.H"

View File

@ -1,4 +1,4 @@
const dictionary& alphaControls = mesh.solverDict(alpha1.name());
const dictionary& alphaControls = mesh.solution().solverDict(alpha1.name());
label nAlphaCorr(alphaControls.lookup<label>("nAlphaCorr"));

View File

@ -113,8 +113,8 @@ if (p_rgh.needReference())
p_rgh = p - rho*gh;
}
mesh.setFluxRequired(p_rgh.name());
mesh.setFluxRequired(alpha2.name());
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(alpha2.name());
#include "createMRF.H"
#include "createFvModels.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -154,7 +154,7 @@ Foam::threePhaseInterfaceProperties::threePhaseInterfaceProperties
mixture_(mixture),
cAlpha_
(
mixture.U().mesh().solverDict
mixture.U().mesh().solution().solverDict
(
mixture_.alpha1().name()
).lookup<scalar>("cAlpha")

View File

@ -62,7 +62,7 @@ if (p_rgh.needReference() && fluid.incompressible())
p_rgh = p - fluid.rho()*gh;
mesh.setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(p_rgh.name());
PtrList<volScalarField> rAUs;
PtrList<surfaceScalarField> rAUfs;

View File

@ -836,7 +836,7 @@ bool Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::
implicitPhasePressure(const phaseModel& phase) const
{
return
this->mesh_.solverDict(phase.volScalarField::name()).
this->mesh_.solution().solverDict(phase.volScalarField::name()).
template lookupOrDefault<Switch>
(
"implicitPhasePressure",

View File

@ -609,7 +609,7 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctInterfaceThermo()
<< endl;
const scalar dmdtfRelax =
this->mesh().fieldRelaxationFactor(dmdtf.member());
this->mesh().solution().fieldRelaxationFactor(dmdtf.member());
dmdtf = (1 - dmdtfRelax)*dmdtf + dmdtfRelax*dmdtfNew;

View File

@ -28,6 +28,7 @@ License
#include "sinteringModel.H"
#include "fvm.H"
#include "fvcDdt.H"
#include "fvcDiv.H"
#include "mixedFvPatchField.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -204,8 +205,8 @@ void Foam::diameterModels::shapeModels::fractal::correct()
fvScalarMatrix kappaEqn
(
fvm::ddt(alpha, fi, kappa_)
+ fvm::div(fAlphaPhi, kappa_)
fvm::ddt(alpha, fi, kappa_) + fvm::div(fAlphaPhi, kappa_)
- fvm::Sp(fvc::ddt(alpha, fi) + fvc::div(fAlphaPhi), kappa_)
==
- sinteringModel_->R()
+ Su_

View File

@ -224,7 +224,8 @@ void Foam::diameterModels::velocityGroup::correct()
if
(
phase().mesh().solverDict(popBalName_).lookupOrDefault<Switch>
phase().mesh().solution().solverDict(popBalName_)
.lookupOrDefault<Switch>
(
"scale",
true

View File

@ -335,7 +335,7 @@ Foam::phaseSystem::phaseSystem
forAll(phases(), phasei)
{
const volScalarField& alphai = phases()[phasei];
mesh_.setFluxRequired(alphai.name());
mesh_.schemes().setFluxRequired(alphai.name());
}
}

View File

@ -47,7 +47,7 @@ void Foam::phaseSystem::solve
const PtrList<surfaceScalarField>& rAUfs
)
{
const dictionary& alphaControls = mesh_.solverDict("alpha");
const dictionary& alphaControls = mesh_.solution().solverDict("alpha");
const label nAlphaSubCycles(alphaControls.lookup<label>("nAlphaSubCycles"));
const label nAlphaCorr(alphaControls.lookup<label>("nAlphaCorr"));

View File

@ -33,6 +33,7 @@ License
#include "surfaceTensionModel.H"
#include "fvm.H"
#include "fvcDdt.H"
#include "fvcDiv.H"
#include "shapeModel.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -1036,7 +1037,7 @@ void Foam::diameterModels::populationBalanceModel::solve()
{
const label nCorr = this->nCorr();
const scalar tolerance =
mesh_.solverDict(name_).lookup<scalar>("tolerance");
mesh_.solution().solverDict(name_).lookup<scalar>("tolerance");
if (nCorr > 0)
{
@ -1070,8 +1071,8 @@ void Foam::diameterModels::populationBalanceModel::solve()
fvScalarMatrix sizeGroupEqn
(
fvm::ddt(alpha, fi)
+ fvm::div(phase.alphaPhi(), fi)
fvm::ddt(alpha, fi) + fvm::div(phase.alphaPhi(), fi)
- fvm::Sp(fvc::ddt(alpha) + fvc::div(phase.alphaPhi()), fi)
==
Su_[i]
- fvm::Sp(Sp_[i], fi)

View File

@ -29,7 +29,7 @@ inline Foam::label
Foam::diameterModels::populationBalanceModel::sourceUpdateInterval() const
{
return
mesh_.solverDict(name_)
mesh_.solution().solverDict(name_)
.lookupOrDefault<label>("sourceUpdateInterval", 1);
}
@ -59,7 +59,7 @@ Foam::diameterModels::populationBalanceModel::dict() const
inline Foam::label Foam::diameterModels::populationBalanceModel::nCorr() const
{
return mesh_.solverDict(name_).lookup<label>("nCorr");
return mesh_.solution().solverDict(name_).lookup<label>("nCorr");
}
@ -67,7 +67,7 @@ inline Foam::Switch
Foam::diameterModels::populationBalanceModel::solveOnFinalIterOnly() const
{
return
mesh_.solverDict(name_).lookupOrDefault<bool>
mesh_.solution().solverDict(name_).lookupOrDefault<bool>
(
"solveOnFinalIterOnly",
false

View File

@ -83,7 +83,7 @@ if (p_rgh.needReference())
p_rgh = p - rho*gh;
}
mesh.setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(p_rgh.name());
#include "createMRF.H"
#include "createFvModels.H"

View File

@ -303,7 +303,7 @@ void Foam::multiphaseMixture::solve()
volScalarField& alpha = phases_.first();
const dictionary& alphaControls = mesh_.solverDict("alpha");
const dictionary& alphaControls = mesh_.solution().solverDict("alpha");
label nAlphaSubCycles(alphaControls.lookup<label>("nAlphaSubCycles"));
scalar cAlpha(alphaControls.lookup<scalar>("cAlpha"));

View File

@ -73,7 +73,7 @@ p_gh = p - (g & mesh.C());
pressureReference pressureReference(p_gh, pimple.dict());
mesh.setFluxRequired(p_gh.name());
mesh.schemes().setFluxRequired(p_gh.name());
#include "createMRF.H"
#include "createFvModels.H"

View File

@ -1,3 +1,3 @@
const dictionary& alphaControls = mesh.solverDict(alpha1.name());
const dictionary& alphaControls = mesh.solution().solverDict(alpha1.name());
label nAlphaSubCycles(alphaControls.lookup<label>("nAlphaSubCycles"));

View File

@ -102,5 +102,5 @@ if (p_rgh.needReference())
p_rgh = p - rho*gh;
}
mesh.setFluxRequired(p_rgh.name());
mesh.setFluxRequired(alpha1.name());
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(alpha1.name());

View File

@ -1,3 +1,4 @@
const dictionary& stressControl = mesh.solutionDict().subDict("stressAnalysis");
const dictionary& stressControl =
mesh.solution().dict().subDict("stressAnalysis");
Switch compactNormalStress(stressControl.lookup("compactNormalStress"));

View File

@ -51,7 +51,7 @@ else
divSigmaExp -= fvc::div((2*mu + lambda)*fvc::grad(D), "div(sigmaD)");
}
mesh.setFluxRequired(D.name());
mesh.schemes().setFluxRequired(D.name());
#include "createFvModels.H"
#include "createFvConstraints.H"

View File

@ -1,6 +1,6 @@
{
const dictionary& stressControl =
mesh.solutionDict().subDict("stressAnalysis");
mesh.solution().dict().subDict("stressAnalysis");
nCorr = stressControl.lookupOrDefault<int>("nCorrectors", 1);
convergenceTolerance = stressControl.lookup<scalar>("D");

View File

@ -1,5 +1,5 @@
const scalar accFac
(
mesh.solutionDict().subDict("stressAnalysis")
mesh.solution().dict().subDict("stressAnalysis")
.lookup<scalar>("accelerationFactor")
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -112,18 +112,6 @@ int main(int argc, char *argv[])
mesh
)
);
// For convenience create any fv* files
if (!exists(scMesh().fvSolution::objectPath()))
{
mkDir(scMesh().fvSolution::path());
ln("../fvSolution", scMesh().fvSolution::objectPath());
}
if (!exists(scMesh().fvSchemes::objectPath()))
{
mkDir(scMesh().fvSolution::path());
ln("../fvSchemes", scMesh().fvSchemes::objectPath());
}
forAll(timeDirs, timeI)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -521,6 +521,25 @@ dimensioned<Type> DimensionedField<Type, GeoMesh>::weightedAverage
}
template<class Type, class GeoMesh>
void DimensionedField<Type, GeoMesh>::reset
(
const DimensionedField<Type, GeoMesh>& df
)
{
// Check for assignment to self
if (this == &df)
{
FatalErrorInFunction
<< "attempted assignment to self"
<< abort(FatalError);
}
dimensions_ = df.dimensions();
Field<Type>::operator=(df);
}
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class Type, class GeoMesh>

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -325,6 +325,10 @@ public:
const tmp<DimensionedField<scalar, GeoMesh>>&
) const;
//- Reset the field contents to the given field
// Used for mesh to mesh mapping
void reset(const DimensionedField<Type, GeoMesh>&);
// Write

View File

@ -977,8 +977,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::~GeometricField()
{
this->db().cacheTemporaryObject(*this);
deleteDemandDrivenData(field0Ptr_);
deleteDemandDrivenData(fieldPrevIterPtr_);
clearOldTimes();
}
@ -1159,6 +1158,14 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::prevIter() const
}
template<class Type, template<class> class PatchField, class GeoMesh>
void Foam::GeometricField<Type, PatchField, GeoMesh>::clearOldTimes()
{
deleteDemandDrivenData(field0Ptr_);
deleteDemandDrivenData(fieldPrevIterPtr_);
}
template<class Type, template<class> class PatchField, class GeoMesh>
void Foam::GeometricField<Type, PatchField, GeoMesh>::
correctBoundaryConditions()
@ -1169,6 +1176,21 @@ correctBoundaryConditions()
}
template<class Type, template<class> class PatchField, class GeoMesh>
void Foam::GeometricField<Type, PatchField, GeoMesh>::reset
(
const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf
)
{
const GeometricField<Type, PatchField, GeoMesh>& gf = tgf();
Internal::reset(gf);
boundaryField_ == gf.boundaryField();
tgf.clear();
}
template<class Type, template<class> class PatchField, class GeoMesh>
bool Foam::GeometricField<Type, PatchField, GeoMesh>::needReference() const
{
@ -1215,14 +1237,20 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::relax()
"finalIteration",
false
)
&& this->mesh().relaxField(this->name() + "Final")
&& this->mesh().solution().relaxField(this->name() + "Final")
)
{
relax(this->mesh().fieldRelaxationFactor(this->name() + "Final"));
relax
(
this->mesh().solution().fieldRelaxationFactor
(
this->name() + "Final"
)
);
}
else if (this->mesh().relaxField(this->name()))
else if (this->mesh().solution().relaxField(this->name()))
{
relax(this->mesh().fieldRelaxationFactor(this->name()));
relax(this->mesh().solution().fieldRelaxationFactor(this->name()));
}
}

View File

@ -420,9 +420,16 @@ public:
//- Return previous iteration field
const GeometricField<Type, PatchField, GeoMesh>& prevIter() const;
//- Delete old time and previous iteration fields
void clearOldTimes();
//- Correct boundary field
void correctBoundaryConditions();
//- Reset the field contents to the given field
// Used for mesh to mesh mapping
void reset(const tmp<GeometricField<Type, PatchField, GeoMesh>>&);
//- Does the field need a reference level for solution
bool needReference() const;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -155,7 +155,7 @@ Foam::solution::solution
|| (readOpt() == IOobject::READ_IF_PRESENT && headerOk())
)
{
read(solutionDict());
read(dict());
}
}
@ -326,7 +326,7 @@ Foam::scalar Foam::solution::equationRelaxationFactor(const word& name) const
}
const Foam::dictionary& Foam::solution::solutionDict() const
const Foam::dictionary& Foam::solution::dict() const
{
if (found("select"))
{
@ -354,7 +354,7 @@ bool Foam::solution::read()
{
if (regIOobject::read())
{
read(solutionDict());
read(dict());
return true;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -134,7 +134,7 @@ public:
//- Return the selected sub-dictionary of solvers if the "select"
// keyword is given, otherwise return the complete dictionary
const dictionary& solutionDict() const;
const dictionary& dict() const;
//- Return the solver controls dictionary for the given field
const dictionary& solverDict(const word& name) const;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -90,7 +90,7 @@ void Foam::CorrectPhi
fvc::makeAbsolute(phi, U);
}
mesh.setFluxRequired(pcorr.name());
mesh.schemes().setFluxRequired(pcorr.name());
while (pcorrControl.correctNonOrthogonal())
{
@ -157,7 +157,7 @@ void Foam::CorrectPhi
pcorrTypes
);
mesh.setFluxRequired(pcorr.name());
mesh.schemes().setFluxRequired(pcorr.name());
while (pcorrControl.correctNonOrthogonal())
{

View File

@ -109,7 +109,7 @@ void Foam::SRFFreestreamVelocityFvPatchVectorField::updateCoeffs()
word ddtScheme
(
this->internalField().mesh()
.ddtScheme(this->internalField().name())
.schemes().ddt(this->internalField().name())
);
if (ddtScheme == fv::steadyStateDdtScheme<scalar>::typeName)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,14 +50,16 @@ Foam::pimpleControl::pimpleControl(fvMesh& mesh, const word& algorithmName)
}
Info<< nl << algorithmName << ": Operating solver in "
<< (mesh.steady() ? "steady-state" : mesh.transient() ? "transient" :
<< (mesh.schemes().steady()
? "steady-state"
: mesh.schemes().transient() ? "transient" :
"mixed steady-state/transient") << " mode with " << nCorrPimple_
<< " outer corrector" << (nCorrPimple_ == 1 ? "" : "s") << nl;
if (nCorrPimple_ == 1)
{
Info<< algorithmName << ": Operating solver in "
<< (mesh.steady() ? "SIMPLE" : "PISO") << " mode" << nl;
<< (mesh.schemes().steady() ? "SIMPLE" : "PISO") << " mode" << nl;
}
Info<< nl << endl;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -87,8 +87,8 @@ Foam::pimpleMultiRegionControl::pimpleMultiRegionControl
new pimpleNoLoopControl(pimpleMeshes[i], algorithmName, *this)
);
allSteady = allSteady && pimpleMeshes[i].steady();
allTransient = allTransient && pimpleMeshes[i].transient();
allSteady = allSteady && pimpleMeshes[i].schemes().steady();
allTransient = allTransient && pimpleMeshes[i].schemes().transient();
}
forAll(solidMeshes, i)
@ -98,8 +98,8 @@ Foam::pimpleMultiRegionControl::pimpleMultiRegionControl
new solidNoLoopControl(solidMeshes[i], algorithmName, *this)
);
allSteady = allSteady && solidMeshes[i].steady();
allTransient = allTransient && solidMeshes[i].transient();
allSteady = allSteady && solidMeshes[i].schemes().steady();
allTransient = allTransient && solidMeshes[i].schemes().transient();
}
read();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -84,7 +84,7 @@ bool Foam::pimpleNoLoopControl::read()
dict().lookupOrDefaultBackwardsCompatible<bool>
(
{"simpleRho", "SIMPLErho"},
mesh().steady()
mesh().schemes().steady()
);
turbOnFinalIterOnly_ =

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -57,7 +57,7 @@ Foam::singleRegionSolutionControl::~singleRegionSolutionControl()
const Foam::dictionary& Foam::singleRegionSolutionControl::dict() const
{
return mesh_.solutionDict().subDict(algorithmName());
return mesh_.solution().dict().subDict(algorithmName());
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -41,7 +41,7 @@ void Foam::singleRegionSolutionControl::storePrevIterTypeFields() const
size_t prevIterField = fName.find("PrevIter");
if (prevIterField == word::npos && mesh_.relaxField(fName))
if (prevIterField == word::npos && mesh_.solution().relaxField(fName))
{
fld.storePrevIter();
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -180,7 +180,7 @@ void Foam::advectiveFvPatchField<Type>::updateCoeffs()
word ddtScheme
(
mesh.ddtScheme(this->internalField().name())
mesh.schemes().ddt(this->internalField().name())
);
scalar deltaT = this->db().time().deltaTValue();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -137,7 +137,7 @@ void Foam::waveSurfacePressureFvPatchScalarField::updateCoeffs()
vectorField& zetap = zeta.boundaryFieldRef()[patchi];
// Lookup d/dt scheme from database for zeta
const word ddtSchemeName(zeta.mesh().ddtScheme(zeta.name()));
const word ddtSchemeName(zeta.mesh().schemes().ddt(zeta.name()));
ddtSchemeType ddtScheme(ddtSchemeTypeNames_[ddtSchemeName]);
// Retrieve the flux field from the database

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -37,7 +37,7 @@ Foam::word Foam::fv::localEulerDdt::rSubDeltaTName("rSubDeltaT");
bool Foam::fv::localEulerDdt::enabled(const fvMesh& mesh)
{
return
word(mesh.ddtScheme("default"))
word(mesh.schemes().ddt("default"))
== fv::localEulerDdtScheme<scalar>::typeName;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -322,7 +322,7 @@ Foam::fvSchemes::fvSchemes(const objectRegistry& obr)
|| (readOpt() == IOobject::READ_IF_PRESENT && headerOk())
)
{
read(schemesDict());
read(dict());
}
}
@ -336,7 +336,7 @@ bool Foam::fvSchemes::read()
// Clear current settings except fluxRequired
clear();
read(schemesDict());
read(dict());
return true;
}
@ -347,7 +347,7 @@ bool Foam::fvSchemes::read()
}
const Foam::dictionary& Foam::fvSchemes::schemesDict() const
const Foam::dictionary& Foam::fvSchemes::dict() const
{
if (found("select"))
{
@ -360,7 +360,7 @@ const Foam::dictionary& Foam::fvSchemes::schemesDict() const
}
Foam::ITstream& Foam::fvSchemes::ddtScheme(const word& name) const
Foam::ITstream& Foam::fvSchemes::ddt(const word& name) const
{
if (debug)
{
@ -379,7 +379,7 @@ Foam::ITstream& Foam::fvSchemes::ddtScheme(const word& name) const
}
Foam::ITstream& Foam::fvSchemes::d2dt2Scheme(const word& name) const
Foam::ITstream& Foam::fvSchemes::d2dt2(const word& name) const
{
if (debug)
{
@ -398,7 +398,7 @@ Foam::ITstream& Foam::fvSchemes::d2dt2Scheme(const word& name) const
}
Foam::ITstream& Foam::fvSchemes::interpolationScheme(const word& name) const
Foam::ITstream& Foam::fvSchemes::interpolation(const word& name) const
{
if (debug)
{
@ -421,7 +421,7 @@ Foam::ITstream& Foam::fvSchemes::interpolationScheme(const word& name) const
}
Foam::ITstream& Foam::fvSchemes::divScheme(const word& name) const
Foam::ITstream& Foam::fvSchemes::div(const word& name) const
{
if (debug)
{
@ -440,7 +440,7 @@ Foam::ITstream& Foam::fvSchemes::divScheme(const word& name) const
}
Foam::ITstream& Foam::fvSchemes::gradScheme(const word& name) const
Foam::ITstream& Foam::fvSchemes::grad(const word& name) const
{
if (debug)
{
@ -459,7 +459,7 @@ Foam::ITstream& Foam::fvSchemes::gradScheme(const word& name) const
}
Foam::ITstream& Foam::fvSchemes::snGradScheme(const word& name) const
Foam::ITstream& Foam::fvSchemes::snGrad(const word& name) const
{
if (debug)
{
@ -478,7 +478,7 @@ Foam::ITstream& Foam::fvSchemes::snGradScheme(const word& name) const
}
Foam::ITstream& Foam::fvSchemes::laplacianScheme(const word& name) const
Foam::ITstream& Foam::fvSchemes::laplacian(const word& name) const
{
if (debug)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -111,21 +111,21 @@ public:
// Access
const dictionary& schemesDict() const;
const dictionary& dict() const;
ITstream& ddtScheme(const word& name) const;
ITstream& ddt(const word& name) const;
ITstream& d2dt2Scheme(const word& name) const;
ITstream& d2dt2(const word& name) const;
ITstream& interpolationScheme(const word& name) const;
ITstream& interpolation(const word& name) const;
ITstream& divScheme(const word& name) const;
ITstream& div(const word& name) const;
ITstream& gradScheme(const word& name) const;
ITstream& grad(const word& name) const;
ITstream& snGradScheme(const word& name) const;
ITstream& snGrad(const word& name) const;
ITstream& laplacianScheme(const word& name) const;
ITstream& laplacian(const word& name) const;
void setFluxRequired(const word& name) const;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,7 +49,7 @@ d2dt2
return fv::d2dt2Scheme<Type>::New
(
vf.mesh(),
vf.mesh().ddtScheme("d2dt2(" + vf.name() + ')')
vf.mesh().schemes().ddt("d2dt2(" + vf.name() + ')')
).ref().fvcD2dt2(vf);
}
@ -65,7 +65,7 @@ d2dt2
return fv::d2dt2Scheme<Type>::New
(
vf.mesh(),
vf.mesh().ddtScheme("d2dt2(" + rho.name() + ',' + vf.name() + ')')
vf.mesh().schemes().ddt("d2dt2(" + rho.name() + ',' + vf.name() + ')')
).ref().fvcD2dt2(rho, vf);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,7 +50,7 @@ ddt
return fv::ddtScheme<Type>::New
(
mesh,
mesh.ddtScheme("ddt(" + dt.name() + ')')
mesh.schemes().ddt("ddt(" + dt.name() + ')')
).ref().fvcDdt(dt);
}
@ -65,7 +65,7 @@ ddt
return fv::ddtScheme<Type>::New
(
vf.mesh(),
vf.mesh().ddtScheme("ddt(" + vf.name() + ')')
vf.mesh().schemes().ddt("ddt(" + vf.name() + ')')
).ref().fvcDdt(vf);
}
@ -81,7 +81,7 @@ ddt
return fv::ddtScheme<Type>::New
(
vf.mesh(),
vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
vf.mesh().schemes().ddt("ddt(" + rho.name() + ',' + vf.name() + ')')
).ref().fvcDdt(rho, vf);
}
@ -97,7 +97,7 @@ ddt
return fv::ddtScheme<Type>::New
(
vf.mesh(),
vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
vf.mesh().schemes().ddt("ddt(" + rho.name() + ',' + vf.name() + ')')
).ref().fvcDdt(rho, vf);
}
@ -114,7 +114,7 @@ ddt
return fv::ddtScheme<Type>::New
(
vf.mesh(),
vf.mesh().ddtScheme
vf.mesh().schemes().ddt
(
"ddt("
+ alpha.name() + ','
@ -135,7 +135,7 @@ ddt
return fv::ddtScheme<Type>::New
(
sf.mesh(),
sf.mesh().ddtScheme("ddt(" + sf.name() + ')')
sf.mesh().schemes().ddt("ddt(" + sf.name() + ')')
).ref().fvcDdt(sf);
}
@ -175,7 +175,7 @@ ddtCorr
return fv::ddtScheme<Type>::New
(
U.mesh(),
U.mesh().ddtScheme("ddt(" + U.name() + ')')
U.mesh().schemes().ddt("ddt(" + U.name() + ')')
).ref().fvcDdtUfCorr(U, Uf);
}
@ -196,7 +196,7 @@ ddtCorr
return fv::ddtScheme<Type>::New
(
U.mesh(),
U.mesh().ddtScheme("ddt(" + U.name() + ')')
U.mesh().schemes().ddt("ddt(" + U.name() + ')')
).ref().fvcDdtPhiCorr(U, phi);
}
@ -238,7 +238,7 @@ ddtCorr
return fv::ddtScheme<Type>::New
(
U.mesh(),
U.mesh().ddtScheme("ddt(" + U.name() + ')')
U.mesh().schemes().ddt("ddt(" + U.name() + ')')
).ref().fvcDdtUfCorr(rho, U, Uf);
}
@ -260,7 +260,7 @@ ddtCorr
return fv::ddtScheme<Type>::New
(
U.mesh(),
U.mesh().ddtScheme("ddt(" + rho.name() + ',' + U.name() + ')')
U.mesh().schemes().ddt("ddt(" + rho.name() + ',' + U.name() + ')')
).ref().fvcDdtPhiCorr(rho, U, phi);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -85,7 +85,7 @@ div
{
return fv::divScheme<Type>::New
(
vf.mesh(), vf.mesh().divScheme(name)
vf.mesh(), vf.mesh().schemes().div(name)
).ref().fvcDiv(vf);
}
@ -163,7 +163,7 @@ div
(
vf.mesh(),
flux,
vf.mesh().divScheme(name)
vf.mesh().schemes().div(name)
).ref().fvcDiv(flux, vf);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -66,7 +66,7 @@ flux
const word& name
)
{
return fvc::flux(phi, vf, vf.mesh().divScheme(name));
return fvc::flux(phi, vf, vf.mesh().schemes().div(name));
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -97,7 +97,7 @@ grad
return fv::gradScheme<Type>::New
(
vf.mesh(),
vf.mesh().gradScheme(name)
vf.mesh().schemes().grad(name)
)().grad(vf, name);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,7 +50,7 @@ laplacian
return fv::laplacianScheme<Type, scalar>::New
(
vf.mesh(),
vf.mesh().laplacianScheme(name)
vf.mesh().schemes().laplacian(name)
).ref().fvcLaplacian(vf);
}
@ -201,7 +201,7 @@ laplacian
return fv::laplacianScheme<Type, GType>::New
(
vf.mesh(),
vf.mesh().laplacianScheme(name)
vf.mesh().schemes().laplacian(name)
).ref().fvcLaplacian(gamma, vf);
}
@ -343,7 +343,7 @@ laplacian
return fv::laplacianScheme<Type, GType>::New
(
vf.mesh(),
vf.mesh().laplacianScheme(name)
vf.mesh().schemes().laplacian(name)
).ref().fvcLaplacian(gamma, vf);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -38,7 +38,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::fvc::meshPhi
return fv::ddtScheme<vector>::New
(
vf.mesh(),
vf.mesh().ddtScheme("ddt(" + vf.name() + ')')
vf.mesh().schemes().ddt("ddt(" + vf.name() + ')')
).ref().meshPhi(vf);
}
@ -52,7 +52,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::fvc::meshPhi
return fv::ddtScheme<vector>::New
(
vf.mesh(),
vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
vf.mesh().schemes().ddt("ddt(" + rho.name() + ',' + vf.name() + ')')
).ref().meshPhi(vf);
}
@ -66,7 +66,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::fvc::meshPhi
return fv::ddtScheme<vector>::New
(
vf.mesh(),
vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
vf.mesh().schemes().ddt("ddt(" + rho.name() + ',' + vf.name() + ')')
).ref().meshPhi(vf);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,7 +50,7 @@ snGrad
return fv::snGradScheme<Type>::New
(
vf.mesh(),
vf.mesh().snGradScheme(name)
vf.mesh().schemes().snGrad(name)
)().snGrad(vf);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,7 +50,7 @@ d2dt2
return fv::d2dt2Scheme<Type>::New
(
vf.mesh(),
vf.mesh().d2dt2Scheme("d2dt2(" + vf.name() + ')')
vf.mesh().schemes().d2dt2("d2dt2(" + vf.name() + ')')
).ref().fvmD2dt2(vf);
}
@ -66,7 +66,7 @@ d2dt2
return fv::d2dt2Scheme<Type>::New
(
vf.mesh(),
vf.mesh().d2dt2Scheme("d2dt2(" + rho.name() + ',' + vf.name() + ')')
vf.mesh().schemes().d2dt2("d2dt2(" + rho.name() + ',' + vf.name() + ')')
).ref().fvmD2dt2(rho, vf);
}
@ -82,7 +82,7 @@ d2dt2
return fv::d2dt2Scheme<Type>::New
(
vf.mesh(),
vf.mesh().d2dt2Scheme("d2dt2(" + rho.name() + ',' + vf.name() + ')')
vf.mesh().schemes().d2dt2("d2dt2(" + rho.name() + ',' + vf.name() + ')')
).ref().fvmD2dt2(rho, vf);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,7 +50,7 @@ ddt
return fv::ddtScheme<Type>::New
(
vf.mesh(),
vf.mesh().ddtScheme("ddt(" + vf.name() + ')')
vf.mesh().schemes().ddt("ddt(" + vf.name() + ')')
).ref().fvmDdt(vf);
}
@ -78,7 +78,7 @@ ddt
return fv::ddtScheme<Type>::New
(
vf.mesh(),
vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
vf.mesh().schemes().ddt("ddt(" + rho.name() + ',' + vf.name() + ')')
).ref().fvmDdt(rho, vf);
}
@ -94,7 +94,7 @@ ddt
return fv::ddtScheme<Type>::New
(
vf.mesh(),
vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
vf.mesh().schemes().ddt("ddt(" + rho.name() + ',' + vf.name() + ')')
).ref().fvmDdt(rho, vf);
}
@ -111,7 +111,7 @@ ddt
return fv::ddtScheme<Type>::New
(
vf.mesh(),
vf.mesh().ddtScheme
vf.mesh().schemes().ddt
(
"ddt("
+ alpha.name() + ','

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,7 +53,7 @@ div
(
vf.mesh(),
flux,
vf.mesh().divScheme(name)
vf.mesh().schemes().div(name)
)().fvmDiv(flux, vf);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -215,7 +215,7 @@ laplacian
return fv::laplacianScheme<Type, GType>::New
(
vf.mesh(),
vf.mesh().laplacianScheme(name)
vf.mesh().schemes().laplacian(name)
).ref().fvmLaplacian(gamma, vf);
}
@ -280,7 +280,7 @@ laplacian
return fv::laplacianScheme<Type, GType>::New
(
vf.mesh(),
vf.mesh().laplacianScheme(name)
vf.mesh().schemes().laplacian(name)
).ref().fvmLaplacian(gamma, vf);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -99,7 +99,7 @@ Foam::fv::gradScheme<Type>::grad
typedef typename outerProduct<vector, Type>::type GradType;
typedef GeometricField<GradType, fvPatchField, volMesh> GradFieldType;
if (!this->mesh().changing() && this->mesh().cache(name))
if (!this->mesh().changing() && this->mesh().solution().cache(name))
{
if (!mesh().objectRegistry::template foundObject<GradFieldType>(name))
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -182,7 +182,7 @@ gaussLaplacianScheme<Type, GType>::fvmLaplacian
fvm.source() -= mesh.V()*fvc::div(tfaceFluxCorrection())().primitiveField();
if (mesh.fluxRequired(vf.name()))
if (mesh.schemes().fluxRequired(vf.name()))
{
fvm.faceFluxCorrectionPtr() = tfaceFluxCorrection.ptr();
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -57,7 +57,7 @@ Foam::fv::gaussLaplacianScheme<Foam::Type, Foam::scalar>::fvmLaplacian \
\
if (this->tsnGradScheme_().corrected()) \
{ \
if (mesh.fluxRequired(vf.name())) \
if (mesh.schemes().fluxRequired(vf.name())) \
{ \
fvm.faceFluxCorrectionPtr() = new \
GeometricField<Type, fvsPatchField, surfaceMesh> \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,7 +56,7 @@ Foam::fv::correctedSnGrad<Type>::fullGradCorrection
gradScheme<Type>::New
(
mesh,
mesh.gradScheme("grad(" + vf.name() + ')')
mesh.schemes().grad("grad(" + vf.name() + ')')
)().grad(vf, "grad(" + vf.name() + ')')
);
tssf.ref().rename("snGradCorr(" + vf.name() + ')');

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -675,14 +675,20 @@ void Foam::fvMatrix<Type>::relax()
(
psi_.mesh().data::template lookupOrDefault<bool>
("finalIteration", false)
&& psi_.mesh().relaxEquation(psi_.name() + "Final")
&& psi_.mesh().solution().relaxEquation(psi_.name() + "Final")
)
{
relax(psi_.mesh().equationRelaxationFactor(psi_.name() + "Final"));
relax
(
psi_.mesh().solution().equationRelaxationFactor
(
psi_.name() + "Final"
)
);
}
else if (psi_.mesh().relaxEquation(psi_.name()))
else if (psi_.mesh().solution().relaxEquation(psi_.name()))
{
relax(psi_.mesh().equationRelaxationFactor(psi_.name()));
relax(psi_.mesh().solution().equationRelaxationFactor(psi_.name()));
}
}
@ -855,7 +861,7 @@ Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
Foam::fvMatrix<Type>::
flux() const
{
if (!psi_.mesh().fluxRequired(psi_.name()))
if (!psi_.mesh().schemes().fluxRequired(psi_.name()))
{
FatalErrorInFunction
<< "flux requested but " << psi_.name()

View File

@ -282,11 +282,11 @@ Foam::fvMatrix<Type>::solver()
{
return solver
(
psi_.mesh().solverDict
psi_.mesh().solution().solverDict
(
psi_.select
(
!psi_.mesh().steady()
!psi_.mesh().schemes().steady()
&& psi_.mesh().data::template lookupOrDefault<bool>
("finalIteration", false)
)
@ -300,11 +300,11 @@ Foam::SolverPerformance<Type> Foam::fvMatrix<Type>::fvSolver::solve()
{
return solve
(
fvMat_.psi_.mesh().solverDict
fvMat_.psi_.mesh().solution().solverDict
(
fvMat_.psi_.select
(
!fvMat_.psi_.mesh().steady()
!fvMat_.psi_.mesh().schemes().steady()
&& fvMat_.psi_.mesh().data::template lookupOrDefault<bool>
("finalIteration", false)
)
@ -318,9 +318,9 @@ Foam::SolverPerformance<Type> Foam::fvMatrix<Type>::solve(const word& name)
{
return solve
(
psi_.mesh().solverDict
psi_.mesh().solution().solverDict
(
!psi_.mesh().steady()
!psi_.mesh().schemes().steady()
&& psi_.mesh().data::template lookupOrDefault<bool>
("finalIteration", false)
? word(name + "Final")
@ -335,11 +335,11 @@ Foam::SolverPerformance<Type> Foam::fvMatrix<Type>::solve()
{
return solve
(
psi_.mesh().solverDict
psi_.mesh().solution().solverDict
(
psi_.select
(
!psi_.mesh().steady()
!psi_.mesh().schemes().steady()
&& psi_.mesh().data::template lookupOrDefault<bool>
(
"finalIteration",

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -215,7 +215,7 @@ void Foam::MULES::limiterCorr
const fvMesh& mesh = psi.mesh();
const dictionary& MULEScontrols = mesh.solverDict(psi.name());
const dictionary& MULEScontrols = mesh.solution().solverDict(psi.name());
const label nLimiterIter
(

Some files were not shown because too many files have changed in this diff Show More