mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into splitCyclic
Conflicts: applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L applications/utilities/mesh/generation/blockMesh/blockMesh.C applications/utilities/mesh/generation/blockMesh/createTopology.C applications/utilities/mesh/generation/snappyHexMesh/Make/options src/OpenFOAM/containers/Lists/ListOps/ListOps.H src/OpenFOAM/containers/Lists/ListOps/ListOpsTemplates.C src/OpenFOAM/containers/Lists/UList/UList.H src/OpenFOAM/containers/Lists/UList/UListI.H src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.C src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.H src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C src/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C src/decompositionAgglomeration/Allwmake src/decompositionAgglomeration/decompositionMethods/Make/files src/decompositionAgglomeration/decompositionMethods/Make/options src/dynamicMesh/attachDetach/attachInterface.C src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.H src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.H src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.H src/dynamicMesh/slidingInterface/coupleSlidingInterface.C src/finiteVolume/Make/files tutorials/channelOodles/channel395/constant/polyMesh/blockMeshDict tutorials/icoFoam/cavity/constant/polyMesh/blockMeshDict wmake/rules/linux64Gcc/c++Opt
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -37,6 +37,9 @@ Usage
|
||||
Write the cell distribution as a labelList for use with 'manual'
|
||||
decomposition method and as a volScalarField for post-processing.
|
||||
|
||||
@param -region regionName \n
|
||||
Decompose named region. Does not check for existence of processor*.
|
||||
|
||||
@param -copyUniform \n
|
||||
Copy any @a uniform directories too.
|
||||
|
||||
@ -83,6 +86,7 @@ Usage
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
# include "addRegionOption.H"
|
||||
argList::validOptions.insert("cellDist", "");
|
||||
argList::validOptions.insert("copyUniform", "");
|
||||
argList::validOptions.insert("fields", "");
|
||||
@ -92,12 +96,23 @@ int main(int argc, char *argv[])
|
||||
|
||||
# include "setRootCase.H"
|
||||
|
||||
bool writeCellDist(args.options().found("cellDist"));
|
||||
bool copyUniform(args.options().found("copyUniform"));
|
||||
bool decomposeFieldsOnly(args.options().found("fields"));
|
||||
bool filterPatches(args.options().found("filterPatches"));
|
||||
bool forceOverwrite(args.options().found("force"));
|
||||
bool ifRequiredDecomposition(args.options().found("ifRequired"));
|
||||
word regionName = fvMesh::defaultRegion;
|
||||
word regionDir = word::null;
|
||||
|
||||
if (args.optionFound("region"))
|
||||
{
|
||||
regionName = args.option("region");
|
||||
regionDir = regionName;
|
||||
Info<< "Decomposing mesh " << regionName << nl << endl;
|
||||
}
|
||||
|
||||
|
||||
bool writeCellDist = args.optionFound("cellDist");
|
||||
bool copyUniform = args.optionFound("copyUniform");
|
||||
bool decomposeFieldsOnly = args.optionFound("fields");
|
||||
bool filterPatches = args.optionFound("filterPatches");
|
||||
bool forceOverwrite = args.optionFound("force");
|
||||
bool ifRequiredDecomposition = args.optionFound("ifRequired");
|
||||
|
||||
# include "createTime.H"
|
||||
|
||||
@ -105,7 +120,17 @@ int main(int argc, char *argv[])
|
||||
|
||||
// determine the existing processor count directly
|
||||
label nProcs = 0;
|
||||
while (dir(runTime.path()/(word("processor") + name(nProcs))))
|
||||
while
|
||||
(
|
||||
isDir
|
||||
(
|
||||
runTime.path()
|
||||
/(word("processor") + name(nProcs))
|
||||
/runTime.constant()
|
||||
/regionDir
|
||||
/polyMesh::meshSubDir
|
||||
)
|
||||
)
|
||||
{
|
||||
++nProcs;
|
||||
}
|
||||
@ -119,6 +144,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
"decomposeParDict",
|
||||
runTime.time().system(),
|
||||
regionDir, // use region if non-standard
|
||||
runTime,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -196,7 +222,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
domainDecomposition::defaultRegion,
|
||||
regionName,
|
||||
runTime.timeName(),
|
||||
runTime
|
||||
)
|
||||
@ -219,7 +245,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
runTime.path()
|
||||
/ mesh.facesInstance()
|
||||
/ polyMesh::defaultRegion
|
||||
/ regionName
|
||||
/ "cellDecomposition"
|
||||
);
|
||||
|
||||
@ -312,7 +338,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
fileNameList cloudDirs
|
||||
(
|
||||
readDir(runTime.timePath()/"lagrangian", fileName::DIRECTORY)
|
||||
readDir(runTime.timePath()/cloud::prefix, fileName::DIRECTORY)
|
||||
);
|
||||
|
||||
// Particles
|
||||
@ -344,7 +370,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
mesh,
|
||||
runTime.timeName(),
|
||||
"lagrangian"/cloudDirs[i]
|
||||
cloud::prefix/cloudDirs[i]
|
||||
);
|
||||
|
||||
IOobject* positionsPtr = sprayObjs.lookup("positions");
|
||||
@ -383,7 +409,12 @@ int main(int argc, char *argv[])
|
||||
|
||||
label i = 0;
|
||||
|
||||
forAllIter(Cloud<indexedParticle>, lagrangianPositions[cloudI], iter)
|
||||
forAllIter
|
||||
(
|
||||
Cloud<indexedParticle>,
|
||||
lagrangianPositions[cloudI],
|
||||
iter
|
||||
)
|
||||
{
|
||||
iter().index() = i++;
|
||||
|
||||
@ -405,7 +436,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (!cellParticles[cloudI][celli])
|
||||
{
|
||||
cellParticles[cloudI][celli] = new SLList<indexedParticle*>();
|
||||
cellParticles[cloudI][celli] = new SLList<indexedParticle*>
|
||||
();
|
||||
}
|
||||
|
||||
cellParticles[cloudI][celli]->append(&iter());
|
||||
@ -418,7 +450,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
mesh,
|
||||
runTime.timeName(),
|
||||
"lagrangian"/cloudDirs[cloudI]
|
||||
cloud::prefix/cloudDirs[cloudI]
|
||||
);
|
||||
|
||||
lagrangianFieldDecomposer::readFields
|
||||
@ -480,7 +512,7 @@ int main(int argc, char *argv[])
|
||||
// Any uniform data to copy/link?
|
||||
fileName uniformDir("uniform");
|
||||
|
||||
if (dir(runTime.timePath()/uniformDir))
|
||||
if (isDir(runTime.timePath()/uniformDir))
|
||||
{
|
||||
Info<< "Detected additional non-decomposed files in "
|
||||
<< runTime.timePath()/uniformDir
|
||||
@ -508,12 +540,22 @@ int main(int argc, char *argv[])
|
||||
|
||||
processorDb.setTime(runTime);
|
||||
|
||||
// remove files remnants that can cause horrible problems
|
||||
// - mut and nut are used to mark the new turbulence models,
|
||||
// their existence prevents old models from being upgraded
|
||||
{
|
||||
fileName timeDir(processorDb.path()/processorDb.timeName());
|
||||
|
||||
rm(timeDir/"mut");
|
||||
rm(timeDir/"nut");
|
||||
}
|
||||
|
||||
// read the mesh
|
||||
fvMesh procMesh
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
fvMesh::defaultRegion,
|
||||
regionName,
|
||||
processorDb.timeName(),
|
||||
processorDb
|
||||
)
|
||||
@ -524,7 +566,7 @@ int main(int argc, char *argv[])
|
||||
IOobject
|
||||
(
|
||||
"cellProcAddressing",
|
||||
"constant",
|
||||
procMesh.facesInstance(),
|
||||
procMesh.meshSubDir,
|
||||
procMesh,
|
||||
IOobject::MUST_READ,
|
||||
@ -537,7 +579,7 @@ int main(int argc, char *argv[])
|
||||
IOobject
|
||||
(
|
||||
"boundaryProcAddressing",
|
||||
"constant",
|
||||
procMesh.facesInstance(),
|
||||
procMesh.meshSubDir,
|
||||
procMesh,
|
||||
IOobject::MUST_READ,
|
||||
@ -561,7 +603,7 @@ int main(int argc, char *argv[])
|
||||
IOobject
|
||||
(
|
||||
"faceProcAddressing",
|
||||
"constant",
|
||||
procMesh.facesInstance(),
|
||||
procMesh.meshSubDir,
|
||||
procMesh,
|
||||
IOobject::MUST_READ,
|
||||
@ -603,7 +645,7 @@ int main(int argc, char *argv[])
|
||||
IOobject
|
||||
(
|
||||
"pointProcAddressing",
|
||||
"constant",
|
||||
procMesh.facesInstance(),
|
||||
procMesh.meshSubDir,
|
||||
procMesh,
|
||||
IOobject::MUST_READ,
|
||||
@ -723,7 +765,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "\nEnd.\n" << endl;
|
||||
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user