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:
mattijs
2009-08-07 08:19:53 +01:00
9335 changed files with 762380 additions and 594169 deletions

View File

@ -1,5 +1,5 @@
EXE_INC = \
-I$(LIB_SRC)/decompositionAgglomeration/decompositionMethods/lnInclude \
-I$(LIB_SRC)/decompositionMethods/decompositionMethods/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude

View File

@ -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

View File

@ -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;
}

View File

@ -19,11 +19,12 @@ FoamFile
numberOfSubdomains 4;
// preservePatches (inlet);
//- Keep owner and neighbour on same processor for faces in zones:
// preserveFaceZones (heater solid1 solid3);
method simple;
method scotch;
// method hierarchical;
// method simple;
// method metis;
// method manual;
@ -53,13 +54,26 @@ metisCoeffs
*/
}
scotchCoeffs
{
//processorWeights
//(
// 1
// 1
// 1
// 1
//);
//writeGraph true;
//strategy "b";
}
manualCoeffs
{
dataFile "decompositionData";
}
//// Is the case distributred
//// Is the case distributed
//distributed yes;
//// Per slave (so nProcs-1 entries) the directory above the case.
//roots

View File

@ -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
@ -44,35 +44,6 @@ void domainDecomposition::distributeCells()
labelHashSet sameProcFaces;
if (decompositionDict_.found("preservePatches"))
{
wordList pNames(decompositionDict_.lookup("preservePatches"));
Info<< "Keeping owner and neighbour of faces in patches " << pNames
<< " on same processor" << endl;
const polyBoundaryMesh& patches = boundaryMesh();
forAll(pNames, i)
{
label patchI = patches.findPatchID(pNames[i]);
if (patchI == -1)
{
FatalErrorIn("domainDecomposition::distributeCells()")
<< "Unknown preservePatch " << pNames[i]
<< endl << "Valid patches are " << patches.names()
<< exit(FatalError);
}
const polyPatch& pp = patches[patchI];
forAll(pp, i)
{
sameProcFaces.insert(pp.start() + i);
}
}
}
if (decompositionDict_.found("preserveFaceZones"))
{
wordList zNames(decompositionDict_.lookup("preserveFaceZones"));
@ -103,14 +74,6 @@ void domainDecomposition::distributeCells()
}
}
if (sameProcFaces.size() > 0)
{
Info<< "Selected " << sameProcFaces.size()
<< " faces whose owner and neighbour cell should be kept on the"
<< " same processor" << endl;
}
// Construct decomposition method and either do decomposition on
// cell centres or on agglomeration
@ -122,12 +85,16 @@ void domainDecomposition::distributeCells()
*this
);
if (sameProcFaces.size() == 0)
if (sameProcFaces.empty())
{
cellToProc_ = decomposePtr().decompose(cellCentres());
}
else
{
Info<< "Selected " << sameProcFaces.size()
<< " faces whose owner and neighbour cell should be kept on the"
<< " same processor" << endl;
// Faces where owner and neighbour are not 'connected' (= all except
// sameProcFaces)
boolList blockedFace(nFaces(), true);

View File

@ -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
@ -259,13 +259,13 @@ bool domainDecomposition::writeDecomposition()
(
IOobject
(
polyMesh::defaultRegion,
"constant",
this->polyMesh::name(), // region name of undecomposed mesh
pointsInstance(),
processorDb
),
procPoints,
procFaces,
procCells
xferMove(procPoints),
xferMove(procFaces),
xferMove(procCells)
);
// Create processor boundary patches
@ -296,7 +296,7 @@ bool domainDecomposition::writeDecomposition()
(
curPatchSizes.size()
+ curProcessorPatchSizes.size(),
reinterpret_cast<polyPatch*>(NULL)
reinterpret_cast<polyPatch*>(0)
);
label nPatches = 0;
@ -363,7 +363,7 @@ forAll(procPatches, patchI)
// Estimate size
forAll(zonePoints, zoneI)
{
zonePoints[zoneI].setSize(pz[zoneI].size() / nProcs_);
zonePoints[zoneI].setCapacity(pz[zoneI].size() / nProcs_);
}
// Use the pointToZone map to find out the single zone (if any),
@ -432,8 +432,8 @@ forAll(procPatches, patchI)
{
label procSize = fz[zoneI].size() / nProcs_;
zoneFaces[zoneI].setSize(procSize);
zoneFaceFlips[zoneI].setSize(procSize);
zoneFaces[zoneI].setCapacity(procSize);
zoneFaceFlips[zoneI].setCapacity(procSize);
}
// Go through all the zoned faces and find out if they
@ -523,7 +523,7 @@ forAll(procPatches, patchI)
// Estimate size
forAll(zoneCells, zoneI)
{
zoneCells[zoneI].setSize(cz[zoneI].size() / nProcs_);
zoneCells[zoneI].setCapacity(cz[zoneI].size() / nProcs_);
}
forAll (curCellLabels, celli)
@ -629,7 +629,7 @@ forAll(procPatches, patchI)
IOobject
(
"pointProcAddressing",
"constant",
procMesh.facesInstance(),
procMesh.meshSubDir,
procMesh,
IOobject::NO_READ,
@ -644,7 +644,7 @@ forAll(procPatches, patchI)
IOobject
(
"faceProcAddressing",
"constant",
procMesh.facesInstance(),
procMesh.meshSubDir,
procMesh,
IOobject::NO_READ,
@ -659,7 +659,7 @@ forAll(procPatches, patchI)
IOobject
(
"cellProcAddressing",
"constant",
procMesh.facesInstance(),
procMesh.meshSubDir,
procMesh,
IOobject::NO_READ,
@ -674,7 +674,7 @@ forAll(procPatches, patchI)
IOobject
(
"boundaryProcAddressing",
"constant",
procMesh.facesInstance(),
procMesh.meshSubDir,
procMesh,
IOobject::NO_READ,

View File

@ -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

View File

@ -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
@ -56,14 +56,12 @@ processorVolPatchFieldDecomposer
const unallocLabelList& addressingSlice
)
:
addressing_(addressingSlice.size()),
weights_(addressingSlice.size())
directAddressing_(addressingSlice.size())
{
const scalarField& weights = mesh.weights().internalField();
const labelList& own = mesh.faceOwner();
const labelList& neighb = mesh.faceNeighbour();
forAll (addressing_, i)
forAll (directAddressing_, i)
{
// Subtract one to align addressing.
label ai = mag(addressingSlice[i]) - 1;
@ -72,15 +70,18 @@ processorVolPatchFieldDecomposer
{
// This is a regular face. it has been an internal face
// of the original mesh and now it has become a face
// on the parallel boundary
addressing_[i].setSize(2);
weights_[i].setSize(2);
// on the parallel boundary.
// Give face the value of the neighbour.
addressing_[i][0] = own[ai];
addressing_[i][1] = neighb[ai];
weights_[i][0] = weights[ai];
weights_[i][1] = 1.0 - weights[ai];
if (addressingSlice[i] >= 0)
{
// I have the owner so use the neighbour value
directAddressing_[i] = neighb[ai];
}
else
{
directAddressing_[i] = own[ai];
}
}
else
{
@ -89,13 +90,8 @@ processorVolPatchFieldDecomposer
// do the interpolation properly (I would need to look
// up the different (face) list of data), so I will
// just grab the value from the owner cell
//
addressing_[i].setSize(1);
weights_[i].setSize(1);
addressing_[i][0] = own[ai];
weights_[i][0] = 1.0;
directAddressing_[i] = own[ai];
}
}
}

View File

@ -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
@ -96,15 +96,16 @@ public:
};
//- Processor patch field decomposer class
//- Processor patch field decomposer class. Maps either owner or
// neighbour data (no interpolate anymore - processorFvPatchField
// holds neighbour data)
class processorVolPatchFieldDecomposer
:
public fvPatchFieldMapper
{
// Private data
labelListList addressing_;
scalarListList weights_;
labelList directAddressing_;
public:
@ -120,27 +121,23 @@ public:
label size() const
{
return addressing_.size();
return directAddressing_.size();
}
bool direct() const
{
return false;
return true;
}
const labelListList& addressing() const
const unallocLabelList& directAddressing() const
{
return addressing_;
}
const scalarListList& weights() const
{
return weights_;
return directAddressing_;
}
};
//- Processor patch field decomposer class
//- Processor patch field decomposer class. Surface field is assumed
// to have direction (so manipulates sign when mapping)
class processorSurfacePatchFieldDecomposer
:
public fvPatchFieldMapper

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
@ -88,7 +88,7 @@ tmp<IOField<Type> > lagrangianFieldDecomposer::decomposeField
(
field.name(),
procMesh_.time().timeName(),
"lagrangian"/cloudName,
cloud::prefix/cloudName,
procMesh_,
IOobject::NO_READ,
IOobject::NO_WRITE

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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