mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
did not handle internal faces correctly
This commit is contained in:
@ -155,17 +155,35 @@ void Foam::duplicatePoints::setRefinement
|
||||
zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)];
|
||||
}
|
||||
|
||||
meshMod.modifyFace
|
||||
(
|
||||
newFace, // modified face
|
||||
faceI, // label of face being modified
|
||||
mesh_.faceOwner()[faceI], // owner
|
||||
-1, // neighbour
|
||||
false, // face flip
|
||||
patches.whichPatch(faceI), // patch for face
|
||||
zoneID, // zone for face
|
||||
zoneFlip // face flip in zone
|
||||
);
|
||||
|
||||
if (mesh_.isInternalFace(faceI))
|
||||
{
|
||||
meshMod.modifyFace
|
||||
(
|
||||
newFace, // modified face
|
||||
faceI, // label of face being modified
|
||||
mesh_.faceOwner()[faceI], // owner
|
||||
mesh_.faceNeighbour()[faceI], // neighbour
|
||||
false, // face flip
|
||||
-1, // patch for face
|
||||
zoneID, // zone for face
|
||||
zoneFlip // face flip in zone
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
meshMod.modifyFace
|
||||
(
|
||||
newFace, // modified face
|
||||
faceI, // label of face being modified
|
||||
mesh_.faceOwner()[faceI], // owner
|
||||
-1, // neighbour
|
||||
false, // face flip
|
||||
patches.whichPatch(faceI), // patch for face
|
||||
zoneID, // zone for face
|
||||
zoneFlip // face flip in zone
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -43,15 +43,22 @@ class minEqOpFace
|
||||
{
|
||||
public:
|
||||
|
||||
void operator()( face& x, const face& y ) const
|
||||
void operator()(face& x, const face& y) const
|
||||
{
|
||||
forAll(x, i)
|
||||
if (x.size() > 0)
|
||||
{
|
||||
x[i] = min(x[i], y[i]);
|
||||
label j = 0;
|
||||
forAll(x, i)
|
||||
{
|
||||
x[i] = min(x[i], y[j]);
|
||||
|
||||
j = y.rcIndex(j);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// Dummy transform for faces. Used in synchronisation
|
||||
void transformList
|
||||
(
|
||||
@ -120,7 +127,7 @@ void Foam::localPointRegion::countPointRegions
|
||||
|
||||
forAllConstIter(Map<label>, candidateFace, iter)
|
||||
{
|
||||
label faceI = iter();
|
||||
label faceI = iter.key();
|
||||
|
||||
if (!mesh.isInternalFace(faceI))
|
||||
{
|
||||
@ -174,6 +181,29 @@ void Foam::localPointRegion::countPointRegions
|
||||
}
|
||||
}
|
||||
minPointRegion.clear();
|
||||
|
||||
// Add internal faces that use any duplicated point. Can only have one
|
||||
// region!
|
||||
forAllConstIter(Map<label>, candidateFace, iter)
|
||||
{
|
||||
label faceI = iter.key();
|
||||
|
||||
if (mesh.isInternalFace(faceI))
|
||||
{
|
||||
const face& f = mesh.faces()[faceI];
|
||||
|
||||
forAll(f, fp)
|
||||
{
|
||||
if (meshPointMap_.found(f[fp]))
|
||||
{
|
||||
label meshFaceMapI = meshFaceMap_.size();
|
||||
meshFaceMap_.insert(faceI, meshFaceMapI);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Transfer to member data
|
||||
pointRegions.shrink();
|
||||
pointRegions_.setSize(pointRegions.size());
|
||||
@ -285,7 +315,7 @@ void Foam::localPointRegion::calcPointRegions
|
||||
faceList minRegion(mesh.nFaces());
|
||||
forAllConstIter(Map<label>, candidateFace, iter)
|
||||
{
|
||||
label faceI = iter();
|
||||
label faceI = iter.key();
|
||||
const face& f = mesh.faces()[faceI];
|
||||
|
||||
if (mesh.isInternalFace(faceI))
|
||||
|
||||
Reference in New Issue
Block a user