mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: -no-finite-area, -no-lagrangian options for some parallel utils
This commit is contained in:
@ -351,6 +351,20 @@ int main(int argc, char *argv[])
|
||||
true // Advanced option
|
||||
);
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"no-finite-area",
|
||||
"Suppress finiteArea mesh/field decomposition",
|
||||
true // Advanced option
|
||||
);
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"no-lagrangian",
|
||||
"Suppress lagrangian (cloud) decomposition",
|
||||
true // Advanced option
|
||||
);
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"cellDist",
|
||||
@ -372,11 +386,14 @@ int main(int argc, char *argv[])
|
||||
"fields",
|
||||
"Use existing geometry decomposition and convert fields only"
|
||||
);
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"noSets",
|
||||
"no-sets",
|
||||
"Skip decomposing cellSets, faceSets, pointSets"
|
||||
);
|
||||
argList::addOptionCompat("no-sets", {"noSets", 2106});
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"force",
|
||||
@ -400,9 +417,13 @@ int main(int argc, char *argv[])
|
||||
// Most of these are ignored for dry-run (not triggered anywhere)
|
||||
const bool copyZero = args.found("copyZero");
|
||||
const bool copyUniform = args.found("copyUniform");
|
||||
const bool decomposeSets = !args.found("noSets");
|
||||
const bool decomposeSets = !args.found("no-sets");
|
||||
|
||||
const bool decomposeIfRequired = args.found("ifRequired");
|
||||
|
||||
const bool doFiniteArea = !args.found("no-finite-area");
|
||||
const bool doLagrangian = !args.found("no-lagrangian");
|
||||
|
||||
bool decomposeFieldsOnly = args.found("fields");
|
||||
bool forceOverwrite = args.found("force");
|
||||
|
||||
@ -419,6 +440,15 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!doFiniteArea)
|
||||
{
|
||||
Info<< "Skip decompose of finiteArea mesh/fields" << nl;
|
||||
}
|
||||
if (!doLagrangian)
|
||||
{
|
||||
Info<< "Skip decompose of lagrangian positions/fields" << nl;
|
||||
}
|
||||
|
||||
times = timeSelector::selectIfPresent(runTime, args);
|
||||
}
|
||||
|
||||
@ -792,14 +822,16 @@ int main(int argc, char *argv[])
|
||||
// Construct the Lagrangian fields
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
fileNameList cloudDirs
|
||||
(
|
||||
fileHandler().readDir
|
||||
fileNameList cloudDirs;
|
||||
|
||||
if (doLagrangian)
|
||||
{
|
||||
cloudDirs = fileHandler().readDir
|
||||
(
|
||||
runTime.timePath()/cloud::prefix,
|
||||
fileName::DIRECTORY
|
||||
)
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
// Particles
|
||||
PtrList<Cloud<indexedParticle>> lagrangianPositions
|
||||
@ -1375,7 +1407,11 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
|
||||
if (faMeshBoundaryIOobj.typeHeaderOk<faBoundaryMesh>(true))
|
||||
if
|
||||
(
|
||||
doFiniteArea
|
||||
&& faMeshBoundaryIOobj.typeHeaderOk<faBoundaryMesh>(true)
|
||||
)
|
||||
{
|
||||
Info<< "\nFinite area mesh decomposition" << endl;
|
||||
|
||||
|
||||
@ -101,9 +101,10 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"noFields",
|
||||
"no-fields", // noFields
|
||||
"Skip reconstructing fields"
|
||||
);
|
||||
argList::addOptionCompat("no-fields", {"noFields", 2106});
|
||||
argList::addOption
|
||||
(
|
||||
"lagrangianFields",
|
||||
@ -115,15 +116,18 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"noLagrangian",
|
||||
"no-lagrangian", // noLagrangian
|
||||
"Skip reconstructing lagrangian positions and fields"
|
||||
);
|
||||
argList::addOptionCompat("no-lagrangian", {"noLagrangian", 2106});
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"noSets",
|
||||
"no-sets",
|
||||
"Skip reconstructing cellSets, faceSets, pointSets"
|
||||
);
|
||||
argList::addOptionCompat("no-sets", {"noSets", 2106});
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"newTimes",
|
||||
@ -134,32 +138,54 @@ int main(int argc, char *argv[])
|
||||
#include "createTime.H"
|
||||
|
||||
|
||||
const bool doFields = !args.found("no-fields");
|
||||
wordRes selectedFields;
|
||||
args.readListIfPresent<wordRe>("fields", selectedFields);
|
||||
|
||||
const bool doFields = !args.found("noFields");
|
||||
|
||||
if (!doFields)
|
||||
if (doFields)
|
||||
{
|
||||
Info<< "Skipping reconstructing fields"
|
||||
args.readListIfPresent<wordRe>("fields", selectedFields);
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "Skipping reconstructing fields";
|
||||
if (args.found("fields"))
|
||||
{
|
||||
Info<< ". Ignore -fields option";
|
||||
}
|
||||
Info<< nl << endl;
|
||||
}
|
||||
|
||||
|
||||
const bool doFiniteArea = !args.found("no-finite-area");
|
||||
if (!doFiniteArea)
|
||||
{
|
||||
Info<< "Skipping reconstructing finiteArea mesh/fields"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
|
||||
const bool doLagrangian = !args.found("no-lagrangian");
|
||||
wordRes selectedLagrangianFields;
|
||||
args.readListIfPresent<wordRe>
|
||||
(
|
||||
"lagrangianFields", selectedLagrangianFields
|
||||
);
|
||||
|
||||
const bool doLagrangian = !args.found("noLagrangian");
|
||||
|
||||
if (!doLagrangian)
|
||||
if (doLagrangian)
|
||||
{
|
||||
Info<< "Skipping reconstructing lagrangian positions and fields"
|
||||
<< nl << endl;
|
||||
args.readListIfPresent<wordRe>
|
||||
(
|
||||
"lagrangianFields", selectedLagrangianFields
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "Skipping reconstructing lagrangian positions/fields";
|
||||
if (args.found("lagrangianFields"))
|
||||
{
|
||||
Info<< ". Ignore -lagrangianFields option";
|
||||
}
|
||||
Info<< nl << endl;
|
||||
}
|
||||
|
||||
const bool doReconstructSets = !args.found("noSets");
|
||||
|
||||
const bool doReconstructSets = !args.found("no-sets");
|
||||
|
||||
if (!doReconstructSets)
|
||||
{
|
||||
@ -692,7 +718,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
// If there are any FA fields, reconstruct them
|
||||
|
||||
if
|
||||
if (!doFiniteArea)
|
||||
{
|
||||
}
|
||||
else if
|
||||
(
|
||||
objects.lookupClass(areaScalarField::typeName).size()
|
||||
|| objects.lookupClass(areaVectorField::typeName).size()
|
||||
|
||||
@ -202,11 +202,13 @@ int main(int argc, char *argv[])
|
||||
"Specify single or multiple fields to reconstruct (all by default)."
|
||||
" Eg, 'T' or '(p T U \"alpha.*\")'"
|
||||
);
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"noLagrangian",
|
||||
"no-lagrangian", // noLagrangian
|
||||
"Skip mapping lagrangian positions and fields"
|
||||
);
|
||||
argList::addOptionCompat("no-lagrangian", {"noLagrangian", 2106});
|
||||
|
||||
argList args(argc, argv);
|
||||
#include "foamDlOpenLibs.H"
|
||||
@ -291,7 +293,7 @@ int main(int argc, char *argv[])
|
||||
// Non-mandatory
|
||||
const wordRes selectedFields(args.getList<wordRe>("fields", false));
|
||||
|
||||
const bool noLagrangian = args.found("noLagrangian");
|
||||
const bool noLagrangian = args.found("no-lagrangian");
|
||||
|
||||
#include "createTimes.H"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user