mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
added region option
This commit is contained in:
@ -83,6 +83,7 @@ Usage
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
|
# include "addRegionOption.H"
|
||||||
argList::validOptions.insert("cellDist", "");
|
argList::validOptions.insert("cellDist", "");
|
||||||
argList::validOptions.insert("copyUniform", "");
|
argList::validOptions.insert("copyUniform", "");
|
||||||
argList::validOptions.insert("fields", "");
|
argList::validOptions.insert("fields", "");
|
||||||
@ -92,6 +93,16 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
|
word regionName = fvMesh::defaultRegion;
|
||||||
|
|
||||||
|
if (args.options().found("region"))
|
||||||
|
{
|
||||||
|
regionName = args.options()["region"];
|
||||||
|
|
||||||
|
Info<< "Decomposing mesh " << regionName << nl << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool writeCellDist(args.options().found("cellDist"));
|
bool writeCellDist(args.options().found("cellDist"));
|
||||||
bool copyUniform(args.options().found("copyUniform"));
|
bool copyUniform(args.options().found("copyUniform"));
|
||||||
bool decomposeFieldsOnly(args.options().found("fields"));
|
bool decomposeFieldsOnly(args.options().found("fields"));
|
||||||
@ -119,6 +130,7 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
"decomposeParDict",
|
"decomposeParDict",
|
||||||
runTime.time().system(),
|
runTime.time().system(),
|
||||||
|
regionName,
|
||||||
runTime,
|
runTime,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
@ -196,7 +208,7 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
domainDecomposition::defaultRegion,
|
regionName,
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
runTime
|
runTime
|
||||||
)
|
)
|
||||||
@ -219,7 +231,7 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
runTime.path()
|
runTime.path()
|
||||||
/ mesh.facesInstance()
|
/ mesh.facesInstance()
|
||||||
/ polyMesh::defaultRegion
|
/ regionName
|
||||||
/ "cellDecomposition"
|
/ "cellDecomposition"
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -383,7 +395,12 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
|
|
||||||
forAllIter(Cloud<indexedParticle>, lagrangianPositions[cloudI], iter)
|
forAllIter
|
||||||
|
(
|
||||||
|
Cloud<indexedParticle>,
|
||||||
|
lagrangianPositions[cloudI],
|
||||||
|
iter
|
||||||
|
)
|
||||||
{
|
{
|
||||||
iter().index() = i++;
|
iter().index() = i++;
|
||||||
|
|
||||||
@ -405,7 +422,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (!cellParticles[cloudI][celli])
|
if (!cellParticles[cloudI][celli])
|
||||||
{
|
{
|
||||||
cellParticles[cloudI][celli] = new SLList<indexedParticle*>();
|
cellParticles[cloudI][celli] = new SLList<indexedParticle*>
|
||||||
|
();
|
||||||
}
|
}
|
||||||
|
|
||||||
cellParticles[cloudI][celli]->append(&iter());
|
cellParticles[cloudI][celli]->append(&iter());
|
||||||
@ -513,7 +531,7 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
fvMesh::defaultRegion,
|
regionName,
|
||||||
processorDb.timeName(),
|
processorDb.timeName(),
|
||||||
processorDb
|
processorDb
|
||||||
)
|
)
|
||||||
|
|||||||
@ -268,7 +268,7 @@ bool domainDecomposition::writeDecomposition()
|
|||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
polyMesh::defaultRegion,
|
this->polyMesh::name(), // region name of undecomposed mesh
|
||||||
"constant",
|
"constant",
|
||||||
processorDb
|
processorDb
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user