Compare commits

..

1 Commits

Author SHA1 Message Date
775d0b277b ENH: improve OpenFOAM I/O for std::vector container
- input: added support (similar to DynamicList)
- output: redirect through UList output, which enables binary etc

- these changes enable support for broadcast and other parallel IO
  for std::vector

ENH: support SubList of std::vector (entire length)

- allows a 'glue' layer for re-casting std::vector to UList etc
2023-09-27 20:52:49 +02:00
1227 changed files with 11724 additions and 37832 deletions

View File

@ -49,7 +49,7 @@
<!-- <!--
Providing details of your set-up can help us identify any issues, e.g. Providing details of your set-up can help us identify any issues, e.g.
OpenFOAM version : v2312|v2306|v2212|v2206|v2112 etc OpenFOAM version : v2306|v2212|v2206|v2112|v2106 etc
Operating system : ubuntu|openSUSE|centos etc Operating system : ubuntu|openSUSE|centos etc
Hardware info : any info that may help? Hardware info : any info that may help?
Compiler : gcc|intel|clang etc Compiler : gcc|intel|clang etc

3
.gitmodules vendored
View File

@ -17,6 +17,3 @@
[submodule "external-solver"] [submodule "external-solver"]
path = modules/external-solver path = modules/external-solver
url = https://develop.openfoam.com/Modules/external-solver.git url = https://develop.openfoam.com/Modules/external-solver.git
[submodule "turbulence-community"]
path = modules/turbulence-community
url = https://gitlab.com/openfoam/community/tc-turbulence/turbulence-community.git

View File

@ -33,7 +33,6 @@ It is likely incomplete...
- Alexander Kabat vel Job - Alexander Kabat vel Job
- Thilo Knacke - Thilo Knacke
- Shannon Leakey - Shannon Leakey
- Sergey Lesnik
- Tommaso Lucchini - Tommaso Lucchini
- Graham Macpherson - Graham Macpherson
- Alexey Matveichev - Alexey Matveichev
@ -60,7 +59,6 @@ It is likely incomplete...
- Vuko Vukcevic - Vuko Vukcevic
- Yi Wang - Yi Wang
- Norbert Weber - Norbert Weber
- Gregor Weiss
- Volker Weissmann - Volker Weissmann
- Henry Weller - Henry Weller
- Niklas Wikstrom - Niklas Wikstrom

View File

@ -1,2 +1,2 @@
api=2310 api=2307
patch=0 patch=0

View File

@ -40,9 +40,9 @@ Violations of the Trademark are monitored, and will be duly prosecuted.
If OpenFOAM has already been compiled on your system, simply source If OpenFOAM has already been compiled on your system, simply source
the appropriate `etc/bashrc` or `etc/cshrc` file and get started. the appropriate `etc/bashrc` or `etc/cshrc` file and get started.
For example, for the OpenFOAM-v2312 version: For example, for the OpenFOAM-v2306 version:
``` ```
source /installation/path/OpenFOAM-v2312/etc/bashrc source /installation/path/OpenFOAM-v2306/etc/bashrc
``` ```
## Compiling OpenFOAM ## Compiling OpenFOAM
@ -127,8 +127,8 @@ These 3rd-party sources are normally located in a directory parallel
to the OpenFOAM directory. For example, to the OpenFOAM directory. For example,
``` ```
/path/parent /path/parent
|-- OpenFOAM-v2312 |-- OpenFOAM-v2306
\-- ThirdParty-v2312 \-- ThirdParty-v2306
``` ```
There are, however, many cases where this simple convention is inadequate: There are, however, many cases where this simple convention is inadequate:
@ -136,7 +136,7 @@ There are, however, many cases where this simple convention is inadequate:
operating system or cluster installation provides it) operating system or cluster installation provides it)
* When we have changed the OpenFOAM directory name to some arbitrary * When we have changed the OpenFOAM directory name to some arbitrary
directory name, e.g. openfoam-sandbox2312, etc.. directory name, e.g. openfoam-sandbox2306, etc..
* When we would like any additional 3rd party software to be located * When we would like any additional 3rd party software to be located
inside of the OpenFOAM directory to ensure that the installation is inside of the OpenFOAM directory to ensure that the installation is
@ -156,9 +156,9 @@ when locating the ThirdParty directory with the following precedence:
2. PREFIX/ThirdParty-VERSION 2. PREFIX/ThirdParty-VERSION
* this corresponds to the traditional approach * this corresponds to the traditional approach
3. PREFIX/ThirdParty-vAPI 3. PREFIX/ThirdParty-vAPI
* allows for an updated value of VERSION, *eg*, `v2312-myCustom`, * allows for an updated value of VERSION, *eg*, `v2306-myCustom`,
without requiring a renamed ThirdParty. The API value would still without requiring a renamed ThirdParty. The API value would still
be `2312` and the original `ThirdParty-v2312/` would be found. be `2306` and the original `ThirdParty-v2306/` would be found.
4. PREFIX/ThirdParty-API 4. PREFIX/ThirdParty-API
* same as the previous example, but using an unadorned API value. * same as the previous example, but using an unadorned API value.
5. PREFIX/ThirdParty-common 5. PREFIX/ThirdParty-common
@ -213,4 +213,4 @@ ThirdParty directory will contain either an `Allwmake` file or a
- [Governance](http://www.openfoam.com/governance/), [Governance Projects](https://www.openfoam.com/governance/projects) - [Governance](http://www.openfoam.com/governance/), [Governance Projects](https://www.openfoam.com/governance/projects)
- [Contacting OpenCFD](http://www.openfoam.com/contact/) - [Contacting OpenCFD](http://www.openfoam.com/contact/)
Copyright 2016-2023 OpenCFD Ltd Copyright 2016-2022 OpenCFD Ltd

View File

@ -118,7 +118,7 @@ int main(int argc, char *argv[])
fvm::laplacian(rAUf, p) == fvc::div(phiHbyA) fvm::laplacian(rAUf, p) == fvc::div(phiHbyA)
); );
pEqn.solve(p.select(piso.finalInnerIter())); pEqn.solve(mesh.solver(p.select(piso.finalInnerIter())));
phi = phiHbyA - pEqn.flux(); phi = phiHbyA - pEqn.flux();

View File

@ -27,7 +27,7 @@ if (pimple.transonic())
betav*fvOptions(psi, p, rho.name()) betav*fvOptions(psi, p, rho.name())
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
@ -57,7 +57,7 @@ else
betav*fvOptions(psi, p, rho.name()) betav*fvOptions(psi, p, rho.name())
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -30,7 +30,7 @@ if (pimple.transonic())
fvOptions(psi, p, rho.name()) fvOptions(psi, p, rho.name())
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
@ -66,7 +66,7 @@ else
fvOptions(psi, p, rho.name()) fvOptions(psi, p, rho.name())
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -35,7 +35,7 @@ if (pimple.transonic())
fvOptions(psi, p, rho.name()) fvOptions(psi, p, rho.name())
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
@ -71,7 +71,7 @@ else
fvOptions(psi, p, rho.name()) fvOptions(psi, p, rho.name())
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -29,7 +29,7 @@ if (pimple.transonic())
fvOptions(psi, p, rho.name()) fvOptions(psi, p, rho.name())
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
@ -64,7 +64,7 @@ else
fvOptions(psi, p, rho.name()) fvOptions(psi, p, rho.name())
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -6,7 +6,7 @@
solve solve
( (
fvm::ddt(rho, Yi) - chemistry.RR(specieI), fvm::ddt(rho, Yi) - chemistry.RR(specieI),
"Yi" mesh.solver("Yi")
); );
} }
} }

View File

@ -35,7 +35,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
fvOptions.constrain(YiEqn); fvOptions.constrain(YiEqn);
YiEqn.solve("Yi"); YiEqn.solve(mesh.solver("Yi"));
fvOptions.correct(Yi); fvOptions.correct(Yi);

View File

@ -36,7 +36,7 @@ while (pimple.correctNonOrthogonal())
+ fvOptions(psi, p_rgh, rho.name()) + fvOptions(psi, p_rgh, rho.name())
); );
p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter())); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -34,7 +34,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
fvOptions.constrain(YiEqn); fvOptions.constrain(YiEqn);
YiEqn.solve("Yi"); YiEqn.solve(mesh.solver("Yi"));
fvOptions.correct(Yi); fvOptions.correct(Yi);

View File

@ -37,7 +37,7 @@ if (pimple.transonic())
fvOptions(psi, p, rho.name()) fvOptions(psi, p, rho.name())
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
@ -72,7 +72,7 @@ else
fvOptions(psi, p, rho.name()) fvOptions(psi, p, rho.name())
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -49,7 +49,7 @@ if (pimple.transonic())
fvOptions(psi, p, rho.name()) fvOptions(psi, p, rho.name())
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
@ -89,7 +89,7 @@ else
fvOptions(psi, p, rho.name()) fvOptions(psi, p, rho.name())
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -41,7 +41,7 @@ while (pimple.correctNonOrthogonal())
- fvm::laplacian(rhorAUf, p_rgh) - fvm::laplacian(rhorAUf, p_rgh)
); );
p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter())); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -63,7 +63,7 @@
fvOptions(psi, p, rho.name()) fvOptions(psi, p, rho.name())
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
// Rhie & Chow interpolation (part 2) // Rhie & Chow interpolation (part 2)
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())

View File

@ -72,7 +72,7 @@ if (mesh.changing())
divrhoU() divrhoU()
); );
pcorrEqn.solve(pcorr.select(pimple.finalInnerIter())); pcorrEqn.solve(mesh.solver(pcorr.select(pimple.finalInnerIter())));
//Bypass virtual layer //Bypass virtual layer
//mesh.fvMesh::solve(pcorrEqn, d); //mesh.fvMesh::solve(pcorrEqn, d);

View File

@ -56,7 +56,7 @@ if (pimple.transonic())
// Relax the pressure equation to ensure diagonal-dominance // Relax the pressure equation to ensure diagonal-dominance
pEqn.relax(); pEqn.relax();
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
@ -78,7 +78,7 @@ else
{ {
fvScalarMatrix pEqn(pDDtEqn - fvm::laplacian(rhorAUf, p)); fvScalarMatrix pEqn(pDDtEqn - fvm::laplacian(rhorAUf, p));
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -54,7 +54,7 @@ if (pimple.transonic())
// Relax the pressure equation to ensure diagonal-dominance // Relax the pressure equation to ensure diagonal-dominance
pEqn.relax(); pEqn.relax();
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
@ -76,7 +76,7 @@ else
{ {
fvScalarMatrix pEqn(pDDtEqn - fvm::laplacian(rhorAUf, p)); fvScalarMatrix pEqn(pDDtEqn - fvm::laplacian(rhorAUf, p));
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -65,7 +65,7 @@ if (pimple.transonic())
// Relax the pressure equation to ensure diagonal-dominance // Relax the pressure equation to ensure diagonal-dominance
pEqn.relax(); pEqn.relax();
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
@ -90,7 +90,7 @@ else
{ {
fvScalarMatrix pEqn(pDDtEqn - fvm::laplacian(rhorAtU, p)); fvScalarMatrix pEqn(pDDtEqn - fvm::laplacian(rhorAtU, p));
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -127,7 +127,7 @@ int main(int argc, char *argv[])
); );
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
pEqn.solve(p.select(piso.finalInnerIter())); pEqn.solve(mesh.solver(p.select(piso.finalInnerIter())));
if (piso.finalNonOrthogonalIter()) if (piso.finalNonOrthogonalIter())
{ {
@ -167,7 +167,7 @@ int main(int argc, char *argv[])
fvm::laplacian(rABf, pB) == fvc::div(phiB) fvm::laplacian(rABf, pB) == fvc::div(phiB)
); );
pBEqn.solve(pB.select(bpiso.finalInnerIter())); pBEqn.solve(mesh.solver(pB.select(bpiso.finalInnerIter())));
if (bpiso.finalNonOrthogonalIter()) if (bpiso.finalNonOrthogonalIter())
{ {

View File

@ -5,7 +5,7 @@
( (
"h", "h",
runTime.timeName(), runTime.timeName(),
aMesh.thisDb(), mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
@ -20,7 +20,7 @@
( (
"Us", "Us",
runTime.timeName(), runTime.timeName(),
aMesh.thisDb(), mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
@ -34,7 +34,7 @@
( (
"phis", "phis",
runTime.timeName(), runTime.timeName(),
aMesh.thisDb(), mesh,
IOobject::READ_IF_PRESENT, IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
@ -48,7 +48,7 @@
( (
"phi2s", "phi2s",
runTime.timeName(), runTime.timeName(),
aMesh.thisDb(), mesh,
IOobject::READ_IF_PRESENT, IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
@ -67,7 +67,7 @@
( (
"Sm", "Sm",
runTime.timeName(), runTime.timeName(),
aMesh.thisDb(), mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
@ -82,7 +82,7 @@
( (
"Sd", "Sd",
runTime.timeName(), runTime.timeName(),
aMesh.thisDb(), mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
@ -96,7 +96,7 @@
( (
"Sg", "Sg",
runTime.timeName(), runTime.timeName(),
aMesh.thisDb(), mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
@ -112,7 +112,7 @@
( (
"ps", "ps",
runTime.timeName(), runTime.timeName(),
aMesh.thisDb(), mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
@ -134,7 +134,7 @@
( (
"manningField", "manningField",
runTime.timeName(), runTime.timeName(),
aMesh.thisDb(), mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
@ -147,7 +147,7 @@
( (
"frictionFactor", "frictionFactor",
runTime.timeName(), runTime.timeName(),
aMesh.thisDb(), mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),

View File

@ -7,7 +7,7 @@ volVectorField U
( (
"U", "U",
runTime.timeName(), runTime.timeName(),
mesh.thisDb(), mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
@ -22,7 +22,7 @@ volScalarField H
( (
"H", "H",
runTime.timeName(), runTime.timeName(),
mesh.thisDb(), mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),

View File

@ -5,7 +5,7 @@ areaScalarField Cs
( (
"Cs", "Cs",
runTime.timeName(), runTime.timeName(),
aMesh.thisDb(), mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
@ -26,7 +26,7 @@ areaVectorField Us
( (
"Us", "Us",
runTime.timeName(), runTime.timeName(),
aMesh.thisDb(), mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
@ -58,7 +58,7 @@ edgeScalarField phis
( (
"phis", "phis",
runTime.timeName(), runTime.timeName(),
aMesh.thisDb(), mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),

View File

@ -0,0 +1,2 @@
// Create Finite Area mesh
faMesh aMesh(mesh);

View File

@ -7,7 +7,7 @@
( (
"Cvf", "Cvf",
runTime.timeName(), runTime.timeName(),
mesh.thisDb(), mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
@ -24,7 +24,7 @@
( (
"U", "U",
runTime.timeName(), runTime.timeName(),
mesh.thisDb(), mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),

View File

@ -5,7 +5,7 @@ areaScalarField Cs
( (
"Cs", "Cs",
runTime.timeName(), runTime.timeName(),
aMesh.thisDb(), mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
@ -37,7 +37,7 @@ areaVectorField Us
( (
"Us", "Us",
runTime.timeName(), runTime.timeName(),
aMesh.thisDb(), mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
@ -51,7 +51,7 @@ edgeScalarField phis
( (
"phis", "phis",
runTime.timeName(), runTime.timeName(),
aMesh.thisDb(), mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),

View File

@ -0,0 +1,2 @@
// Create Finite Area mesh
faMesh aMesh(mesh);

View File

@ -7,7 +7,7 @@
( (
"Cvf", "Cvf",
runTime.timeName(), runTime.timeName(),
mesh.thisDb(), mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
@ -24,7 +24,7 @@
( (
"U", "U",
runTime.timeName(), runTime.timeName(),
mesh.thisDb(), mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),

View File

@ -27,7 +27,7 @@
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter())); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -72,7 +72,7 @@ if (mesh.changing())
divrhoU() divrhoU()
); );
//pcorrEqn.solve(pcorr.select(pimple.finalInnerIter())); //pcorrEqn.solve(mesh.solver(pcorr.select(pimple.finalInnerIter())));
//Bypass virtual layer //Bypass virtual layer
const dictionary& d = mesh.solver const dictionary& d = mesh.solver
( (

View File

@ -50,7 +50,7 @@ while (pimple.correctNonOrthogonal())
- fvm::laplacian(rhorAUf, p_rgh) - fvm::laplacian(rhorAUf, p_rgh)
); );
p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter())); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -52,7 +52,7 @@ while (pimple.correctNonOrthogonal())
compressible ? getRefCellValue(p_rgh, pRefCell) : pRefValue compressible ? getRefCellValue(p_rgh, pRefCell) : pRefValue
); );
p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter())); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -1,6 +1,6 @@
if (finalIter) if (finalIter)
{ {
mesh.data().setFinalIteration(true); mesh.data::add("finalIteration", true);
} }
if (frozenFlow) if (frozenFlow)
@ -35,5 +35,5 @@ else
if (finalIter) if (finalIter)
{ {
mesh.data().setFinalIteration(false); mesh.data::remove("finalIteration");
} }

View File

@ -1,6 +1,6 @@
if (finalIter) if (finalIter)
{ {
mesh.data().setFinalIteration(true); mesh.data::add("finalIteration", true);
} }
{ {
@ -22,7 +22,7 @@ if (finalIter)
fvOptions.constrain(hEqn); fvOptions.constrain(hEqn);
hEqn.solve(h.select(finalIter)); hEqn.solve(mesh.solver(h.select(finalIter)));
fvOptions.correct(h); fvOptions.correct(h);
} }
@ -35,5 +35,5 @@ if (finalIter)
if (finalIter) if (finalIter)
{ {
mesh.data().setFinalIteration(false); mesh.data::remove("finalIteration");
} }

View File

@ -33,7 +33,7 @@
} }
else else
{ {
EEqn.solve(he.select(finalIter)); EEqn.solve(mesh.solver(he.select(finalIter)));
fvOptions.correct(he); fvOptions.correct(he);
thermo.correct(); thermo.correct();

View File

@ -28,7 +28,7 @@
- fvc::snGrad(p_rgh) - fvc::snGrad(p_rgh)
)*mesh.magSf() )*mesh.magSf()
), ),
U.select(finalIter) mesh.solver(U.select(finalIter))
); );
fvOptions.correct(U); fvOptions.correct(U);

View File

@ -44,7 +44,7 @@ if (Y.size())
fvOptions.constrain(YiEqn); fvOptions.constrain(YiEqn);
YiEqn.solve("Yi"); YiEqn.solve(mesh.solver("Yi"));
fvOptions.correct(Yi); fvOptions.correct(Yi);

View File

@ -52,12 +52,15 @@ constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF);
p_rghEqn.solve p_rghEqn.solve
( (
p_rgh.select mesh.solver
( (
p_rgh.select
( (
oCorr == nOuterCorr-1 (
&& corr == nCorr-1 oCorr == nOuterCorr-1
&& nonOrth == nNonOrthCorr && corr == nCorr-1
&& nonOrth == nNonOrthCorr
)
) )
) )
); );

View File

@ -1,6 +1,6 @@
if (finalIter) if (finalIter)
{ {
mesh.data().setFinalIteration(true); mesh.data::add("finalIteration", true);
} }
if (frozenFlow) if (frozenFlow)
@ -36,5 +36,5 @@ else
if (finalIter) if (finalIter)
{ {
mesh.data().setFinalIteration(false); mesh.data::remove("finalIteration");
} }

View File

@ -1,8 +1,6 @@
bool coupled = false; fvSolution solutionDict(runTime);
{
fvSolution solutionDict(runTime); bool coupled(solutionDict.getOrDefault("coupledEnergyField", false));
solutionDict.readIfPresent("coupledEnergyField", coupled);
}
autoPtr<fvMatrix<scalar>> fvMatrixAssemblyPtr; autoPtr<fvMatrix<scalar>> fvMatrixAssemblyPtr;

View File

@ -25,10 +25,10 @@
if (finalIter) if (finalIter)
{ {
mesh.data().setFinalIteration(true); mesh.data::add("finalIteration", true);
} }
hEqn.solve(h.select(finalIter)); hEqn.solve(mesh.solver(h.select(finalIter)));
fvOptions.correct(h); fvOptions.correct(h);
@ -39,7 +39,7 @@
if (finalIter) if (finalIter)
{ {
mesh.data().setFinalIteration(false); mesh.data::remove("finalIteration");
} }
} }
} }

View File

@ -141,7 +141,7 @@ int main(int argc, char *argv[])
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
pEqn.solve(p.select(piso.finalInnerIter())); pEqn.solve(mesh.solver(p.select(piso.finalInnerIter())));
if (piso.finalNonOrthogonalIter()) if (piso.finalNonOrthogonalIter())
{ {

View File

@ -114,7 +114,7 @@ int main(int argc, char *argv[])
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
pEqn.solve(p.select(piso.finalInnerIter())); pEqn.solve(mesh.solver(p.select(piso.finalInnerIter())));
if (piso.finalNonOrthogonalIter()) if (piso.finalNonOrthogonalIter())
{ {

View File

@ -40,7 +40,7 @@ while (pimple.correctNonOrthogonal())
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -32,7 +32,7 @@ while (pimple.correctNonOrthogonal())
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -45,7 +45,7 @@ while (pimple.correctNonOrthogonal())
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -26,7 +26,7 @@ while (piso.correctNonOrthogonal())
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
pEqn.solve(p.select(piso.finalInnerIter())); pEqn.solve(mesh.solver(p.select(piso.finalInnerIter())));
if (piso.finalNonOrthogonalIter()) if (piso.finalNonOrthogonalIter())
{ {

View File

@ -6,7 +6,6 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -106,9 +105,6 @@ int main(int argc, char *argv[])
#include "CourantNo.H" #include "CourantNo.H"
// Update settings from the control dictionary
piso.read();
// Pressure-velocity PISO corrector // Pressure-velocity PISO corrector
{ {
#include "UEqn.H" #include "UEqn.H"

View File

@ -135,7 +135,7 @@ int main(int argc, char *argv[])
- fvm::laplacian(ghrAUf, h) - fvm::laplacian(ghrAUf, h)
); );
hEqn.solve(h.select(pimple.finalInnerIter())); hEqn.solve(mesh.solver(h.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -34,7 +34,7 @@
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -32,7 +32,7 @@
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -36,7 +36,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
fvOptions.constrain(YiEqn); fvOptions.constrain(YiEqn);
YiEqn.solve("Yi"); YiEqn.solve(mesh.solver("Yi"));
fvOptions.correct(Yi); fvOptions.correct(Yi);

View File

@ -33,7 +33,7 @@ if (pimple.transonic())
+ fvOptions(psi, p, rho.name()) + fvOptions(psi, p, rho.name())
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
@ -69,7 +69,7 @@ else
+ fvOptions(psi, p, rho.name()) + fvOptions(psi, p, rho.name())
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -34,7 +34,7 @@ while (pimple.correctNonOrthogonal())
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -37,7 +37,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
fvOptions.constrain(YEqn); fvOptions.constrain(YEqn);
YEqn.solve("Yi"); YEqn.solve(mesh.solver("Yi"));
fvOptions.correct(Yi); fvOptions.correct(Yi);

View File

@ -47,7 +47,7 @@ while (pimple.correctNonOrthogonal())
- fvm::laplacian(rhorAUf, p_rgh) - fvm::laplacian(rhorAUf, p_rgh)
); );
p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter())); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -34,7 +34,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
fvOptions.constrain(YEqn); fvOptions.constrain(YEqn);
YEqn.solve("Yi"); YEqn.solve(mesh.solver("Yi"));
fvOptions.correct(Yi); fvOptions.correct(Yi);

View File

@ -34,7 +34,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
fvOptions.constrain(YEqn); fvOptions.constrain(YEqn);
YEqn.solve("Yi"); YEqn.solve(mesh.solver("Yi"));
fvOptions.correct(Yi); fvOptions.correct(Yi);

View File

@ -35,7 +35,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
fvOptions.constrain(YEqn); fvOptions.constrain(YEqn);
YEqn.solve("Yi"); YEqn.solve(mesh.solver("Yi"));
fvOptions.correct(Yi); fvOptions.correct(Yi);

View File

@ -41,7 +41,7 @@ if (pimple.transonic())
+ fvOptions(psi, p, rho.name()) + fvOptions(psi, p, rho.name())
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
@ -77,7 +77,7 @@ else
+ fvOptions(psi, p, rho.name()) + fvOptions(psi, p, rho.name())
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -42,7 +42,7 @@ if (pimple.transonic())
+ fvOptions(psi, p, rho.name()) + fvOptions(psi, p, rho.name())
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
@ -77,7 +77,7 @@ else
+ fvOptions(psi, p, rho.name()) + fvOptions(psi, p, rho.name())
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -38,7 +38,7 @@
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter())); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -36,7 +36,7 @@
- fvm::laplacian(rhorAUf, p) - fvm::laplacian(rhorAUf, p)
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -33,7 +33,7 @@
- fvm::laplacian(rhorAUf, p) - fvm::laplacian(rhorAUf, p)
); );
pEqn.solve(p.select(pimple.finalInnerIter())); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -99,7 +99,7 @@
+ (max(alpha2, scalar(0))/rho2)*p_rghEqnComp2() + (max(alpha2, scalar(0))/rho2)*p_rghEqnComp2()
) )
+ p_rghEqnIncomp, + p_rghEqnIncomp,
p_rgh.select(pimple.finalInnerIter()) mesh.solver(p_rgh.select(pimple.finalInnerIter()))
); );
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())

View File

@ -108,7 +108,7 @@
solve solve
( (
p_rghEqnComp1() + p_rghEqnComp2() + p_rghEqnIncomp, p_rghEqnComp1() + p_rghEqnComp2() + p_rghEqnIncomp,
p_rgh.select(pimple.finalInnerIter()) mesh.solver(p_rgh.select(pimple.finalInnerIter()))
); );
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())

View File

@ -124,7 +124,7 @@
solve solve
( (
p_rghEqnComp1() + p_rghEqnComp2() + p_rghEqnIncomp, p_rghEqnComp1() + p_rghEqnComp2() + p_rghEqnIncomp,
p_rgh.select(pimple.finalInnerIter()) mesh.solver(p_rgh.select(pimple.finalInnerIter()))
); );
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())

View File

@ -110,7 +110,7 @@
solve solve
( (
p_rghEqnComp1() + p_rghEqnComp2() + p_rghEqnIncomp, p_rghEqnComp1() + p_rghEqnComp2() + p_rghEqnIncomp,
p_rgh.select(pimple.finalInnerIter()) mesh.solver(p_rgh.select(pimple.finalInnerIter()))
); );
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())

View File

@ -108,7 +108,7 @@
solve solve
( (
p_rghEqnComp1() + p_rghEqnComp2() + p_rghEqnIncomp, p_rghEqnComp1() + p_rghEqnComp2() + p_rghEqnIncomp,
p_rgh.select(pimple.finalInnerIter()) mesh.solver(p_rgh.select(pimple.finalInnerIter()))
); );
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())

View File

@ -80,7 +80,7 @@
( (
p_rghEqnComp p_rghEqnComp
+ p_rghEqnIncomp, + p_rghEqnIncomp,
p_rgh.select(pimple.finalInnerIter()) mesh.solver(p_rgh.select(pimple.finalInnerIter()))
); );
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())

View File

@ -54,7 +54,7 @@
- fvm::laplacian(turbulence->nut(), alpha1) - fvm::laplacian(turbulence->nut(), alpha1)
); );
alpha1Eqn.solve("alpha1Diffusion"); alpha1Eqn.solve(mesh.solver("alpha1Diffusion"));
alphaPhi += alpha1Eqn.flux(); alphaPhi += alpha1Eqn.flux();
alpha2 = 1.0 - alpha1; alpha2 = 1.0 - alpha1;

View File

@ -32,7 +32,7 @@
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter())); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -329,7 +329,7 @@ Foam::radiation::laserDTRM::laserDTRM(const volScalarField& T)
: :
radiationModel(typeName, T), radiationModel(typeName, T),
mode_(powerDistNames_.get("mode", *this)), mode_(powerDistNames_.get("mode", *this)),
DTRMCloud_(mesh_, Foam::zero{}, "DTRMCloud"), // Empty cloud DTRMCloud_(mesh_, "DTRMCloud", IDLList<DTRMParticle>()),
nParticles_(0), nParticles_(0),
ndTheta_(get<label>("nTheta")), ndTheta_(get<label>("nTheta")),
ndr_(get<label>("nr")), ndr_(get<label>("nr")),
@ -427,7 +427,7 @@ Foam::radiation::laserDTRM::laserDTRM
: :
radiationModel(typeName, dict, T), radiationModel(typeName, dict, T),
mode_(powerDistNames_.get("mode", *this)), mode_(powerDistNames_.get("mode", *this)),
DTRMCloud_(mesh_, Foam::zero{}, "DTRMCloud"), // Empty cloud DTRMCloud_(mesh_, "DTRMCloud", IDLList<DTRMParticle>()),
nParticles_(0), nParticles_(0),
ndTheta_(get<label>("nTheta")), ndTheta_(get<label>("nTheta")),
ndr_(get<label>("nr")), ndr_(get<label>("nr")),

View File

@ -56,7 +56,7 @@
p_rghEqn.setReference(pRefCell, pRefValue); p_rghEqn.setReference(pRefCell, pRefValue);
p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter())); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -39,7 +39,7 @@
p_rghEqn.setReference(pRefCell, pRefValue); p_rghEqn.setReference(pRefCell, pRefValue);
p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter())); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -40,7 +40,7 @@
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter())); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -47,7 +47,7 @@
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter())); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -44,7 +44,7 @@
p_rghEqn.setReference(pRefCell, pRefValue); p_rghEqn.setReference(pRefCell, pRefValue);
p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter())); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -45,7 +45,7 @@
//p_rghEqn.setReference(pRefCell, pRefValue); //p_rghEqn.setReference(pRefCell, pRefValue);
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter())); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -38,7 +38,7 @@
p_rghEqn.setReference(pRefCell, pRefValue); p_rghEqn.setReference(pRefCell, pRefValue);
p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter())); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -223,7 +223,7 @@
// + (alpha2/rho2)*pEqnComp2() // + (alpha2/rho2)*pEqnComp2()
// ) + // ) +
pEqnIncomp, pEqnIncomp,
p_rgh.select(pimple.finalInnerIter()) mesh.solver(p_rgh.select(pimple.finalInnerIter()))
); );
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())

View File

@ -30,7 +30,7 @@ while (pimple.correctNonOrthogonal())
p_ghEqn.setReference(p_ghRefCell, p_ghRefValue); p_ghEqn.setReference(p_ghRefCell, p_ghRefValue);
p_ghEqn.solve(p_gh.select(pimple.finalInnerIter())); p_ghEqn.solve(mesh.solver(p_gh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -37,7 +37,7 @@
p_ghEqn.setReference(p_ghRefCell, p_ghRefValue); p_ghEqn.setReference(p_ghRefCell, p_ghRefValue);
p_ghEqn.solve(p_gh.select(pimple.finalInnerIter())); p_ghEqn.solve(mesh.solver(p_gh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -24,7 +24,7 @@
); );
YiEqn.relax(); YiEqn.relax();
YiEqn.solve("Yi"); YiEqn.solve(mesh.solver("Yi"));
} }
} }
} }

View File

@ -370,7 +370,11 @@ while (pimple.correct())
} }
} }
pEqn.solve(p_rgh.select(pimple.finalInnerIter())); solve
(
pEqn,
mesh.solver(p_rgh.select(pimple.finalInnerIter()))
);
} }
// Correct fluxes and velocities on last non-orthogonal iteration // Correct fluxes and velocities on last non-orthogonal iteration

View File

@ -358,7 +358,11 @@ while (pimple.correct())
} }
} }
pEqn.solve(p_rgh.select(pimple.finalInnerIter())); solve
(
pEqn,
mesh.solver(p_rgh.select(pimple.finalInnerIter()))
);
} }
// Correct fluxes and velocities on last non-orthogonal iteration // Correct fluxes and velocities on last non-orthogonal iteration

View File

@ -20,7 +20,7 @@
); );
Y1iEqn.relax(); Y1iEqn.relax();
Y1iEqn.solve("Yi"); Y1iEqn.solve(mesh.solver("Yi"));
} }
} }
@ -39,7 +39,7 @@
); );
Y2iEqn.relax(); Y2iEqn.relax();
Y2iEqn.solve("Yi"); Y2iEqn.solve(mesh.solver("Yi"));
} }
} }
} }

View File

@ -341,7 +341,11 @@ while (pimple.correct())
pEqn += pEqnComp2(); pEqn += pEqnComp2();
} }
pEqn.solve(p_rgh.select(pimple.finalInnerIter())); solve
(
pEqn,
mesh.solver(p_rgh.select(pimple.finalInnerIter()))
);
} }
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())

View File

@ -29,7 +29,7 @@
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter())); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -312,7 +312,7 @@ while (pimple.correct())
solve solve
( (
pEqnComp1() + pEqnComp2() + pEqnIncomp, pEqnComp1() + pEqnComp2() + pEqnIncomp,
p_rgh.select(pimple.finalInnerIter()) mesh.solver(p_rgh.select(pimple.finalInnerIter()))
); );
// Correct fluxes and velocities on last non-orthogonal iteration // Correct fluxes and velocities on last non-orthogonal iteration

View File

@ -291,7 +291,7 @@ while (pimple.correct())
solve solve
( (
pEqnComp1() + pEqnComp2() + pEqnIncomp, pEqnComp1() + pEqnComp2() + pEqnIncomp,
p_rgh.select(pimple.finalInnerIter()) mesh.solver(p_rgh.select(pimple.finalInnerIter()))
); );
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())

View File

@ -34,6 +34,7 @@ Description
#include "argList.H" #include "argList.H"
#include "ListOps.H" #include "ListOps.H"
#include "CircularBuffer.H" #include "CircularBuffer.H"
#include "StringStream.H"
#include "FlatOutput.H" #include "FlatOutput.H"
using namespace Foam; using namespace Foam;
@ -78,7 +79,7 @@ int main(int argc, char *argv[])
Info<< buf1[-12] << nl; Info<< buf1[-12] << nl;
Info<< "contains: " << buf1.contains(40) << nl; Info<< "found: " << buf1.found(40) << nl;
buf1.push_uniq(100); report(buf1); buf1.push_uniq(100); report(buf1);
buf1 = Zero; report(buf1); buf1 = Zero; report(buf1);

View File

@ -24,10 +24,9 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application Application
Test-Circulator Test-circulator
Description Description
Tests for Circulator and ConstCirculator
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View File

@ -1,3 +1,3 @@
Test-CompactListList.cxx Test-CompactListList.C
EXE = $(FOAM_USER_APPBIN)/Test-CompactListList EXE = $(FOAM_USER_APPBIN)/Test-CompactListList

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2022-2023 OpenCFD Ltd. Copyright (C) 2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -35,11 +35,9 @@ Description
#include "CompactListList.H" #include "CompactListList.H"
#include "IndirectList.H" #include "IndirectList.H"
#include "IOstreams.H" #include "IOstreams.H"
#include "SpanStream.H" #include "StringStream.H"
#include "faceList.H" #include "faceList.H"
#include <iterator> // for back_inserter
using namespace Foam; using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -128,20 +126,20 @@ int main(int argc, char *argv[])
{ {
// IO // IO
OCharStream ostr; OStringStream ostr;
ostr << cll4; ostr << cll4;
ISpanStream istr(ostr.view()); IStringStream istr(ostr.str());
CompactListList<label> cll5(istr); CompactListList<label> cll5(istr);
Info<< "cll5 = " << cll5 << endl; Info<< "cll5 = " << cll5 << endl;
} }
{ {
// IO // IO
cll4.clear(); cll4.clear();
OCharStream ostr; OStringStream ostr;
ostr << cll4; ostr << cll4;
ISpanStream istr(ostr.view()); IStringStream istr(ostr.str());
CompactListList<label> cll5(istr); CompactListList<label> cll5(istr);
Info<< "cll5 = " << cll5 << endl; Info<< "cll5 = " << cll5 << endl;
} }
@ -163,25 +161,6 @@ int main(int argc, char *argv[])
faceList fcs2 = compactFcs.unpack<face>(); faceList fcs2 = compactFcs.unpack<face>();
Info<< "deserialized:" << fcs2 << endl; Info<< "deserialized:" << fcs2 << endl;
// Unpack some faces
DynamicList<face> extracted(compactFcs.size());
compactFcs.copy_unpack<face>
(
std::back_inserter(extracted),
2, 2
);
Info<< "copy_unpack 1: " << extracted << nl;
compactFcs.copy_unpack<face>
(
std::back_inserter(extracted)
// labelRange(2, 1)
);
Info<< "copy_unpack 2: " << extracted << nl;
// From some faces // From some faces
IndirectList<face> subfaces(fcs, labelList({2, 4, 1})); IndirectList<face> subfaces(fcs, labelList({2, 4, 1}));
@ -192,8 +171,7 @@ int main(int argc, char *argv[])
CompactListList<label>::pack(subfaces) CompactListList<label>::pack(subfaces)
); );
Info<< "compact faces:" << subCompact << endl; Info<< "compact faces:" << subCompact << endl;
Info<< "matrix content:" << nl; Info<< "deserialized:" << subCompact.unpack() << endl;
subCompact.writeMatrix(Info) << endl;
} }
return 0; return 0;

View File

@ -25,10 +25,8 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application Application
Test-DLList
Description Description
Tests for doubly-linked lists
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View File

@ -25,10 +25,8 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application Application
Test-Dictionary
Description Description
Tests for Dictionary (not dictionary)
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

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