Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -34,12 +34,7 @@
|
||||
{
|
||||
pZones.addResistance(UEqn());
|
||||
|
||||
eqnResidual = solve
|
||||
(
|
||||
UEqn() == -fvc::grad(p)
|
||||
). initialResidual();
|
||||
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
|
||||
trAU = 1.0/UEqn().A();
|
||||
trAU().rename("rAU");
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
// check convergence
|
||||
|
||||
if (maxResidual < convergenceCriterion)
|
||||
{
|
||||
Info<< "reached convergence criterion: " << convergenceCriterion << endl;
|
||||
runTime.writeAndEnd();
|
||||
Info<< "latestTime = " << runTime.timeName() << endl;
|
||||
}
|
||||
|
||||
@ -13,8 +13,7 @@
|
||||
|
||||
hEqn.relax();
|
||||
|
||||
eqnResidual = hEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
hEqn.solve();
|
||||
|
||||
thermo.correct();
|
||||
}
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
// initialize values for convergence checks
|
||||
|
||||
scalar eqnResidual = 1, maxResidual = 0;
|
||||
scalar convergenceCriterion = 0;
|
||||
|
||||
simple.readIfPresent("convergence", convergenceCriterion);
|
||||
|
||||
@ -29,8 +29,7 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
// retain the residual from the first iteration
|
||||
if (nonOrth == 0)
|
||||
{
|
||||
eqnResidual = tpEqn().solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
tpEqn().solve();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -54,7 +54,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readSIMPLEControls.H"
|
||||
#include "initConvergenceCheck.H"
|
||||
|
||||
p.storePrevIter();
|
||||
rho.storePrevIter();
|
||||
@ -72,8 +71,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
|
||||
#include "convergenceCheck.H"
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
@ -8,9 +8,4 @@
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
eqnResidual = solve
|
||||
(
|
||||
UEqn() == -fvc::grad(p)
|
||||
).initialResidual();
|
||||
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
// check convergence
|
||||
|
||||
if (maxResidual < convergenceCriterion)
|
||||
{
|
||||
Info<< "reached convergence criterion: " << convergenceCriterion << endl;
|
||||
runTime.writeAndEnd();
|
||||
Info<< "latestTime = " << runTime.timeName() << endl;
|
||||
}
|
||||
|
||||
@ -11,8 +11,7 @@
|
||||
|
||||
hEqn.relax();
|
||||
|
||||
eqnResidual = hEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
hEqn.solve();
|
||||
|
||||
thermo.correct();
|
||||
}
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
// initialize values for convergence checks
|
||||
|
||||
scalar eqnResidual = 1, maxResidual = 0;
|
||||
scalar convergenceCriterion = 0;
|
||||
|
||||
simple.readIfPresent("convergence", convergenceCriterion);
|
||||
|
||||
@ -33,8 +33,7 @@ if (transonic)
|
||||
// Retain the residual from the first iteration
|
||||
if (nonOrth == 0)
|
||||
{
|
||||
eqnResidual = pEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
pEqn.solve();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -64,8 +63,7 @@ else
|
||||
// Retain the residual from the first iteration
|
||||
if (nonOrth == 0)
|
||||
{
|
||||
eqnResidual = pEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
pEqn.solve();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -53,7 +53,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readSIMPLEControls.H"
|
||||
#include "initConvergenceCheck.H"
|
||||
|
||||
p.storePrevIter();
|
||||
rho.storePrevIter();
|
||||
@ -72,8 +71,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
|
||||
#include "convergenceCheck.H"
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
@ -8,9 +8,4 @@
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
eqnResidual = solve
|
||||
(
|
||||
UEqn() == -fvc::grad(p)
|
||||
).initialResidual();
|
||||
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
|
||||
@ -11,8 +11,7 @@
|
||||
|
||||
hEqn.relax();
|
||||
|
||||
eqnResidual = hEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
hEqn.solve();
|
||||
|
||||
thermo.correct();
|
||||
|
||||
|
||||
@ -41,8 +41,7 @@ if (transonic)
|
||||
// Retain the residual from the first iteration
|
||||
if (nonOrth == 0)
|
||||
{
|
||||
eqnResidual = pEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
pEqn.solve();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -75,8 +74,7 @@ else
|
||||
// Retain the residual from the first iteration
|
||||
if (nonOrth == 0)
|
||||
{
|
||||
eqnResidual = pEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
pEqn.solve();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -55,7 +55,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readSIMPLEControls.H"
|
||||
#include "initConvergenceCheck.H"
|
||||
|
||||
p.storePrevIter();
|
||||
|
||||
@ -78,8 +77,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
|
||||
#include "convergenceCheck.H"
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
@ -14,8 +14,7 @@
|
||||
|
||||
TEqn.relax();
|
||||
|
||||
eqnResidual = TEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
TEqn.solve();
|
||||
|
||||
rhok = 1.0 - beta*(T - TRef);
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
eqnResidual = solve
|
||||
solve
|
||||
(
|
||||
UEqn()
|
||||
==
|
||||
@ -19,6 +19,4 @@
|
||||
- fvc::snGrad(p)*mesh.magSf()
|
||||
)
|
||||
)
|
||||
).initialResidual();
|
||||
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
);
|
||||
|
||||
@ -69,7 +69,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readSIMPLEControls.H"
|
||||
#include "initConvergenceCheck.H"
|
||||
|
||||
p.storePrevIter();
|
||||
|
||||
@ -87,8 +86,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
|
||||
#include "convergenceCheck.H"
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
// check convergence
|
||||
|
||||
if (maxResidual < convergenceCriterion)
|
||||
{
|
||||
Info<< "reached convergence criterion: " << convergenceCriterion << endl;
|
||||
runTime.writeAndEnd();
|
||||
Info<< "latestTime = " << runTime.timeName() << endl;
|
||||
}
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
// initialize values for convergence checks
|
||||
|
||||
scalar eqnResidual = 1, maxResidual = 0;
|
||||
scalar convergenceCriterion = 0;
|
||||
|
||||
simple.readIfPresent("convergence", convergenceCriterion);
|
||||
|
||||
@ -24,8 +24,7 @@
|
||||
// retain the residual from the first iteration
|
||||
if (nonOrth == 0)
|
||||
{
|
||||
eqnResidual = pEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
pEqn.solve();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
eqnResidual = solve
|
||||
solve
|
||||
(
|
||||
UEqn()
|
||||
==
|
||||
@ -17,6 +17,4 @@
|
||||
fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
- fvc::snGrad(p)*mesh.magSf()
|
||||
)
|
||||
).initialResidual();
|
||||
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
);
|
||||
|
||||
@ -54,7 +54,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readSIMPLEControls.H"
|
||||
#include "initConvergenceCheck.H"
|
||||
|
||||
p.storePrevIter();
|
||||
rho.storePrevIter();
|
||||
@ -73,8 +72,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
|
||||
#include "convergenceCheck.H"
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
// check convergence
|
||||
|
||||
if (maxResidual < convergenceCriterion)
|
||||
{
|
||||
Info<< "reached convergence criterion: " << convergenceCriterion << endl;
|
||||
runTime.writeAndEnd();
|
||||
Info<< "latestTime = " << runTime.timeName() << endl;
|
||||
}
|
||||
|
||||
@ -11,8 +11,7 @@
|
||||
|
||||
hEqn.relax();
|
||||
|
||||
eqnResidual = hEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
hEqn.solve();
|
||||
|
||||
thermo.correct();
|
||||
}
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
// initialize values for convergence checks
|
||||
|
||||
scalar eqnResidual = 1, maxResidual = 0;
|
||||
scalar convergenceCriterion = 0;
|
||||
|
||||
simple.readIfPresent("convergence", convergenceCriterion);
|
||||
|
||||
@ -26,8 +26,7 @@
|
||||
// retain the residual from the first iteration
|
||||
if (nonOrth == 0)
|
||||
{
|
||||
eqnResidual = pEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
pEqn.solve();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -57,7 +57,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readSIMPLEControls.H"
|
||||
#include "initConvergenceCheck.H"
|
||||
|
||||
p.storePrevIter();
|
||||
rho.storePrevIter();
|
||||
@ -76,8 +75,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
|
||||
#include "convergenceCheck.H"
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
@ -12,8 +12,7 @@
|
||||
|
||||
hEqn.relax();
|
||||
|
||||
eqnResidual = hEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
hEqn.solve();
|
||||
|
||||
thermo.correct();
|
||||
|
||||
|
||||
@ -64,9 +64,7 @@ int main(int argc, char *argv[])
|
||||
<< fluidRegions[i].name() << endl;
|
||||
#include "setRegionFluidFields.H"
|
||||
#include "readFluidMultiRegionSIMPLEControls.H"
|
||||
#include "initConvergenceCheck.H"
|
||||
#include "solveFluid.H"
|
||||
#include "convergenceCheck.H"
|
||||
}
|
||||
|
||||
forAll(solidRegions, i)
|
||||
@ -75,9 +73,7 @@ int main(int argc, char *argv[])
|
||||
<< solidRegions[i].name() << endl;
|
||||
#include "setRegionSolidFields.H"
|
||||
#include "readSolidMultiRegionSIMPLEControls.H"
|
||||
#include "initConvergenceCheck.H"
|
||||
#include "solveSolid.H"
|
||||
#include "convergenceCheck.H"
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
eqnResidual = solve
|
||||
solve
|
||||
(
|
||||
UEqn()
|
||||
==
|
||||
@ -16,6 +16,4 @@
|
||||
fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
- fvc::snGrad(p)*mesh.magSf()
|
||||
)
|
||||
).initialResidual();
|
||||
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
);
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
// check convergence
|
||||
Info<< "maxResidual: " << maxResidual
|
||||
<< " convergence criterion: " << convergenceCriterion
|
||||
<< endl;
|
||||
|
||||
if (maxResidual < convergenceCriterion)
|
||||
{
|
||||
Info<< "reached convergence criterion: " << convergenceCriterion << endl;
|
||||
runTime.writeAndEnd();
|
||||
Info<< "latestTime = " << runTime.timeName() << endl;
|
||||
}
|
||||
|
||||
@ -11,8 +11,7 @@
|
||||
|
||||
hEqn.relax();
|
||||
|
||||
eqnResidual = hEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
hEqn.solve();
|
||||
|
||||
thermo.correct();
|
||||
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
// initialize values for convergence checks
|
||||
|
||||
scalar eqnResidual = 1, maxResidual = 0;
|
||||
scalar convergenceCriterion = 0;
|
||||
|
||||
simple.readIfPresent("convergence", convergenceCriterion);
|
||||
|
||||
@ -29,8 +29,7 @@
|
||||
// retain the residual from the first iteration
|
||||
if (nonOrth == 0)
|
||||
{
|
||||
eqnResidual = pEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
pEqn.solve();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -6,9 +6,7 @@
|
||||
-fvm::laplacian(K, T)
|
||||
);
|
||||
tEqn.relax();
|
||||
eqnResidual = tEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
|
||||
tEqn.solve();
|
||||
}
|
||||
|
||||
Info<< "Min/max T:" << min(T).value() << ' '
|
||||
|
||||
@ -34,12 +34,7 @@
|
||||
{
|
||||
pZones.addResistance(UEqn());
|
||||
|
||||
eqnResidual = solve
|
||||
(
|
||||
UEqn() == -fvc::grad(p)
|
||||
). initialResidual();
|
||||
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
|
||||
trAU = 1.0/UEqn().A();
|
||||
trAU().rename("rAU");
|
||||
|
||||
@ -28,8 +28,7 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
// retain the residual from the first iteration
|
||||
if (nonOrth == 0)
|
||||
{
|
||||
eqnResidual = tpEqn().solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
tpEqn().solve();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -54,7 +54,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readSIMPLEControls.H"
|
||||
#include "initConvergenceCheck.H"
|
||||
|
||||
p.storePrevIter();
|
||||
|
||||
@ -71,8 +70,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
|
||||
#include "convergenceCheck.H"
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
@ -8,9 +8,4 @@
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
eqnResidual = solve
|
||||
(
|
||||
UEqn() == -fvc::grad(p)
|
||||
).initialResidual();
|
||||
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
// check convergence
|
||||
|
||||
if (maxResidual < convergenceCriterion)
|
||||
{
|
||||
Info<< "reached convergence criterion: " << convergenceCriterion << endl;
|
||||
runTime.writeAndEnd();
|
||||
Info<< "latestTime = " << runTime.timeName() << endl;
|
||||
}
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
// initialize values for convergence checks
|
||||
|
||||
scalar eqnResidual = 1, maxResidual = 0;
|
||||
scalar convergenceCriterion = 0;
|
||||
|
||||
simple.readIfPresent("convergence", convergenceCriterion);
|
||||
|
||||
@ -18,8 +18,7 @@
|
||||
// retain the residual from the first iteration
|
||||
if (nonOrth == 0)
|
||||
{
|
||||
eqnResidual = pEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
pEqn.solve();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -52,7 +52,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readSIMPLEControls.H"
|
||||
#include "initConvergenceCheck.H"
|
||||
|
||||
p.storePrevIter();
|
||||
|
||||
@ -69,8 +68,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
|
||||
#include "convergenceCheck.H"
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
@ -102,6 +102,7 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
solverPerformance()
|
||||
:
|
||||
initialResidual_(0),
|
||||
@ -111,7 +112,7 @@ public:
|
||||
singular_(false)
|
||||
{}
|
||||
|
||||
|
||||
//- Construct from components
|
||||
solverPerformance
|
||||
(
|
||||
const word& solverName,
|
||||
@ -132,6 +133,9 @@ public:
|
||||
singular_(singular)
|
||||
{}
|
||||
|
||||
//- Construct from Istream
|
||||
solverPerformance(Istream&);
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
@ -204,6 +208,11 @@ public:
|
||||
|
||||
//- Print summary of solver performance
|
||||
void print() const;
|
||||
|
||||
|
||||
// Ostream Operator
|
||||
|
||||
friend Ostream& operator<<(Ostream&, const solverPerformance&);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -30,6 +30,20 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::lduMatrix::solverPerformance::solverPerformance(Istream& is)
|
||||
{
|
||||
is.readBeginList("lduMatrix::solverPerformance");
|
||||
is >> solverName_
|
||||
>> fieldName_
|
||||
>> initialResidual_
|
||||
>> finalResidual_
|
||||
>> noIterations_
|
||||
>> converged_
|
||||
>> singular_;
|
||||
is.readEndList("lduMatrix::solverPerformance");
|
||||
}
|
||||
|
||||
|
||||
bool Foam::lduMatrix::solverPerformance::checkConvergence
|
||||
(
|
||||
const scalar Tolerance,
|
||||
@ -104,4 +118,23 @@ void Foam::lduMatrix::solverPerformance::print() const
|
||||
}
|
||||
|
||||
|
||||
Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const Foam::lduMatrix::solverPerformance& sp
|
||||
)
|
||||
{
|
||||
os << token::BEGIN_LIST
|
||||
<< sp.solverName_ << token::SPACE
|
||||
<< sp.fieldName_ << token::SPACE
|
||||
<< sp.initialResidual_ << token::SPACE
|
||||
<< sp.finalResidual_ << token::SPACE
|
||||
<< sp.noIterations_ << token::SPACE
|
||||
<< sp.converged_ << token::SPACE
|
||||
<< sp.singular_ << token::SPACE
|
||||
<< token::END_LIST;
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -262,6 +262,7 @@ $(multivariateSchemes)/limitedCubic/multivariateLimitedCubic.C
|
||||
|
||||
finiteVolume/fv/fv.C
|
||||
finiteVolume/fvSchemes/fvSchemes.C
|
||||
finiteVolume/fvData/fvData.C
|
||||
|
||||
ddtSchemes = finiteVolume/ddtSchemes
|
||||
$(ddtSchemes)/ddtScheme/ddtSchemes.C
|
||||
|
||||
72
src/finiteVolume/finiteVolume/fvData/fvData.C
Normal file
72
src/finiteVolume/finiteVolume/fvData/fvData.C
Normal file
@ -0,0 +1,72 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvData.H"
|
||||
#include "Time.H"
|
||||
#include "lduMatrix.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
int Foam::fvData::debug(Foam::debug::debugSwitch("fvData", false));
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::fvData::fvData(const objectRegistry& obr)
|
||||
:
|
||||
IOdictionary
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"fvData",
|
||||
obr.time().system(),
|
||||
obr,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
)
|
||||
{
|
||||
set("solverPerformance", dictionary());
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
const Foam::dictionary& Foam::fvData::solverPerformanceDict() const
|
||||
{
|
||||
return subDict("solverPerformance");
|
||||
}
|
||||
|
||||
|
||||
void Foam::fvData::setSolverPerformance
|
||||
(
|
||||
const word& name,
|
||||
const lduMatrix::solverPerformance& sp
|
||||
) const
|
||||
{
|
||||
const_cast<dictionary&>(solverPerformanceDict()).set(name, sp);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
103
src/finiteVolume/finiteVolume/fvData/fvData.H
Normal file
103
src/finiteVolume/finiteVolume/fvData/fvData.H
Normal file
@ -0,0 +1,103 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::fvData
|
||||
|
||||
Description
|
||||
Database for finite volume solution data, solver performance and
|
||||
other reduced data. fvMesh is derived from fvData so that all fields have
|
||||
access to the fvData from the mesh reference they hold.
|
||||
|
||||
SourceFiles
|
||||
fvData.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef fvData_H
|
||||
#define fvData_H
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "lduMatrix.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class fvData Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class fvData
|
||||
:
|
||||
public IOdictionary
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
fvData(const fvData&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const fvData&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Debug switch
|
||||
static int debug;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct for objectRegistry
|
||||
fvData(const objectRegistry& obr);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Return the dictionary of solver performance data
|
||||
// which includes initial and final residuals for convergence
|
||||
// checking
|
||||
const dictionary& solverPerformanceDict() const;
|
||||
|
||||
//- Add/set the solverPerformance entry for the named field
|
||||
void setSolverPerformance
|
||||
(
|
||||
const word& name,
|
||||
const lduMatrix::solverPerformance&
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -164,6 +164,8 @@ Foam::lduMatrix::solverPerformance Foam::fvMatrix<Type>::solve
|
||||
|
||||
psi.correctBoundaryConditions();
|
||||
|
||||
psi.mesh().setSolverPerformance(psi.name(), solverPerfVec);
|
||||
|
||||
return solverPerfVec;
|
||||
}
|
||||
|
||||
@ -175,6 +177,7 @@ Foam::fvMatrix<Type>::solver()
|
||||
return solver(psi_.mesh().solverDict(psi_.name()));
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::lduMatrix::solverPerformance Foam::fvMatrix<Type>::fvSolver::solve()
|
||||
{
|
||||
|
||||
@ -123,6 +123,8 @@ Foam::lduMatrix::solverPerformance Foam::fvMatrix<Foam::scalar>::fvSolver::solve
|
||||
|
||||
psi.correctBoundaryConditions();
|
||||
|
||||
psi.mesh().setSolverPerformance(psi.name(), solverPerf);
|
||||
|
||||
return solverPerf;
|
||||
}
|
||||
|
||||
@ -166,6 +168,8 @@ Foam::lduMatrix::solverPerformance Foam::fvMatrix<Foam::scalar>::solve
|
||||
|
||||
psi.correctBoundaryConditions();
|
||||
|
||||
psi.mesh().setSolverPerformance(psi.name(), solverPerf);
|
||||
|
||||
return solverPerf;
|
||||
}
|
||||
|
||||
|
||||
@ -151,6 +151,9 @@ Foam::fvMesh::fvMesh(const IOobject& io)
|
||||
:
|
||||
polyMesh(io),
|
||||
surfaceInterpolation(*this),
|
||||
fvSchemes(static_cast<const objectRegistry&>(*this)),
|
||||
fvSolution(static_cast<const objectRegistry&>(*this)),
|
||||
fvData(static_cast<const objectRegistry&>(*this)),
|
||||
boundary_(*this, boundaryMesh()),
|
||||
lduPtr_(NULL),
|
||||
curTimeIndex_(time().timeIndex()),
|
||||
@ -243,6 +246,9 @@ Foam::fvMesh::fvMesh
|
||||
:
|
||||
polyMesh(io, points, faces, allOwner, allNeighbour, syncPar),
|
||||
surfaceInterpolation(*this),
|
||||
fvSchemes(static_cast<const objectRegistry&>(*this)),
|
||||
fvSolution(static_cast<const objectRegistry&>(*this)),
|
||||
fvData(static_cast<const objectRegistry&>(*this)),
|
||||
boundary_(*this),
|
||||
lduPtr_(NULL),
|
||||
curTimeIndex_(time().timeIndex()),
|
||||
@ -273,6 +279,9 @@ Foam::fvMesh::fvMesh
|
||||
:
|
||||
polyMesh(io, points, faces, cells, syncPar),
|
||||
surfaceInterpolation(*this),
|
||||
fvSchemes(static_cast<const objectRegistry&>(*this)),
|
||||
fvSolution(static_cast<const objectRegistry&>(*this)),
|
||||
fvData(static_cast<const objectRegistry&>(*this)),
|
||||
boundary_(*this),
|
||||
lduPtr_(NULL),
|
||||
curTimeIndex_(time().timeIndex()),
|
||||
|
||||
@ -52,6 +52,9 @@ SourceFiles
|
||||
#include "primitiveMesh.H"
|
||||
#include "fvBoundaryMesh.H"
|
||||
#include "surfaceInterpolation.H"
|
||||
#include "fvSchemes.H"
|
||||
#include "fvSolution.H"
|
||||
#include "fvData.H"
|
||||
#include "DimensionedField.H"
|
||||
#include "volFieldsFwd.H"
|
||||
#include "surfaceFieldsFwd.H"
|
||||
@ -77,7 +80,10 @@ class fvMesh
|
||||
:
|
||||
public polyMesh,
|
||||
public lduMesh,
|
||||
public surfaceInterpolation
|
||||
public surfaceInterpolation,
|
||||
public fvSchemes,
|
||||
public fvSolution,
|
||||
public fvData
|
||||
{
|
||||
// Private data
|
||||
|
||||
|
||||
@ -57,8 +57,6 @@ void surfaceInterpolation::clearOut()
|
||||
|
||||
surfaceInterpolation::surfaceInterpolation(const fvMesh& fvm)
|
||||
:
|
||||
fvSchemes(static_cast<const objectRegistry&>(fvm)),
|
||||
fvSolution(static_cast<const objectRegistry&>(fvm)),
|
||||
mesh_(fvm),
|
||||
weightingFactors_(NULL),
|
||||
differenceFactors_(NULL),
|
||||
|
||||
@ -37,8 +37,6 @@ SourceFiles
|
||||
|
||||
#include "tmp.H"
|
||||
#include "scalar.H"
|
||||
#include "fvSchemes.H"
|
||||
#include "fvSolution.H"
|
||||
#include "volFieldsFwd.H"
|
||||
#include "surfaceFieldsFwd.H"
|
||||
#include "className.H"
|
||||
@ -53,9 +51,6 @@ namespace Foam
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class surfaceInterpolation
|
||||
:
|
||||
public fvSchemes,
|
||||
public fvSolution
|
||||
{
|
||||
// Private data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user