Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
andy
2011-11-16 12:37:24 +00:00
13 changed files with 184 additions and 17 deletions

View File

@ -77,6 +77,18 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io)
zoneID_(-1),
pointIDs_()
{
if (undisplacedPoints_.size() != nPoints())
{
FatalIOErrorIn
(
"solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject&)",
dynamicMeshCoeffs_
) << "Read " << undisplacedPoints_.size()
<< " undisplaced points from " << undisplacedPoints_.objectPath()
<< " but the current mesh has " << nPoints()
<< exit(FatalError);
}
word cellZoneName =
dynamicMeshCoeffs_.lookupOrDefault<word>("cellZone", "none");

View File

@ -650,6 +650,9 @@ void Foam::addPatchCellLayer::calcSidePatch
// ------------------------------------------------------
const labelListList& edgeFaces = pp.edgeFaces();
DynamicList<label> dynMeshEdgeFaces;
forAll(edgeFaces, edgeI)
{
if (edgeFaces[edgeI].size() == 1 && sidePatchID[edgeI] == -1)
@ -660,7 +663,11 @@ void Foam::addPatchCellLayer::calcSidePatch
// Pick up any boundary face on this edge and use its properties
label meshEdgeI = meshEdges[edgeI];
const labelList& meshFaces = mesh.edgeFaces()[meshEdgeI];
const labelList& meshFaces = mesh.edgeFaces
(
meshEdgeI,
dynMeshEdgeFaces
);
forAll(meshFaces, k)
{
@ -716,7 +723,11 @@ void Foam::addPatchCellLayer::calcSidePatch
// Pick up any boundary face on this edge and use its properties
label meshEdgeI = meshEdges[edgeI];
const labelList& meshFaces = mesh.edgeFaces()[meshEdgeI];
const labelList& meshFaces = mesh.edgeFaces
(
meshEdgeI,
dynMeshEdgeFaces
);
forAll(meshFaces, k)
{

View File

@ -330,7 +330,6 @@ void Foam::cellDistFuncs::correctBoundaryPointCells
{
// Correct all (non-visited) cells with point on wall
const labelListList& pointCells = mesh().pointCells();
const vectorField& cellCentres = mesh().cellCentres();
forAll(mesh().boundaryMesh(), patchI)
@ -346,7 +345,7 @@ void Foam::cellDistFuncs::correctBoundaryPointCells
{
label vertI = meshPoints[meshPointI];
const labelList& neighbours = pointCells[vertI];
const labelList& neighbours = mesh().pointCells(vertI);
forAll(neighbours, neighbourI)
{

View File

@ -136,8 +136,21 @@ cellZoneSet::~cellZoneSet()
void cellZoneSet::invert(const label maxLen)
{
// Count
label n = 0;
for (label cellI = 0; cellI < maxLen; cellI++)
{
if (!found(cellI))
{
n++;
}
}
// Fill
addressing_.setSize(n);
n = 0;
for (label cellI = 0; cellI < maxLen; cellI++)
{
if (!found(cellI))
@ -146,7 +159,7 @@ void cellZoneSet::invert(const label maxLen)
n++;
}
}
addressing_.setSize(n);
updateSet();
}

View File

@ -141,8 +141,22 @@ faceZoneSet::~faceZoneSet()
void faceZoneSet::invert(const label maxLen)
{
// Count
label n = 0;
for (label faceI = 0; faceI < maxLen; faceI++)
{
if (!found(faceI))
{
n++;
}
}
// Fill
addressing_.setSize(n);
flipMap_.setSize(n);
n = 0;
for (label faceI = 0; faceI < maxLen; faceI++)
{
if (!found(faceI))
@ -152,8 +166,6 @@ void faceZoneSet::invert(const label maxLen)
n++;
}
}
addressing_.setSize(n);
flipMap_.setSize(n);
updateSet();
}

View File

@ -138,8 +138,21 @@ pointZoneSet::~pointZoneSet()
void pointZoneSet::invert(const label maxLen)
{
// Count
label n = 0;
for (label pointI = 0; pointI < maxLen; pointI++)
{
if (!found(pointI))
{
n++;
}
}
// Fill
addressing_.setSize(n);
n = 0;
for (label pointI = 0; pointI < maxLen; pointI++)
{
if (!found(pointI))
@ -148,7 +161,6 @@ void pointZoneSet::invert(const label maxLen)
n++;
}
}
addressing_.setSize(n);
updateSet();
}