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,6 +155,23 @@ void Foam::duplicatePoints::setRefinement
|
|||||||
zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)];
|
zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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
|
meshMod.modifyFace
|
||||||
(
|
(
|
||||||
newFace, // modified face
|
newFace, // modified face
|
||||||
@ -167,6 +184,7 @@ void Foam::duplicatePoints::setRefinement
|
|||||||
zoneFlip // face flip in zone
|
zoneFlip // face flip in zone
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
|
|||||||
@ -43,15 +43,22 @@ class minEqOpFace
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void operator()( face& x, const face& y ) const
|
void operator()(face& x, const face& y) const
|
||||||
{
|
{
|
||||||
|
if (x.size() > 0)
|
||||||
|
{
|
||||||
|
label j = 0;
|
||||||
forAll(x, i)
|
forAll(x, i)
|
||||||
{
|
{
|
||||||
x[i] = min(x[i], y[i]);
|
x[i] = min(x[i], y[j]);
|
||||||
|
|
||||||
|
j = y.rcIndex(j);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Dummy transform for faces. Used in synchronisation
|
// Dummy transform for faces. Used in synchronisation
|
||||||
void transformList
|
void transformList
|
||||||
(
|
(
|
||||||
@ -120,7 +127,7 @@ void Foam::localPointRegion::countPointRegions
|
|||||||
|
|
||||||
forAllConstIter(Map<label>, candidateFace, iter)
|
forAllConstIter(Map<label>, candidateFace, iter)
|
||||||
{
|
{
|
||||||
label faceI = iter();
|
label faceI = iter.key();
|
||||||
|
|
||||||
if (!mesh.isInternalFace(faceI))
|
if (!mesh.isInternalFace(faceI))
|
||||||
{
|
{
|
||||||
@ -174,6 +181,29 @@ void Foam::localPointRegion::countPointRegions
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
minPointRegion.clear();
|
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
|
// Transfer to member data
|
||||||
pointRegions.shrink();
|
pointRegions.shrink();
|
||||||
pointRegions_.setSize(pointRegions.size());
|
pointRegions_.setSize(pointRegions.size());
|
||||||
@ -285,7 +315,7 @@ void Foam::localPointRegion::calcPointRegions
|
|||||||
faceList minRegion(mesh.nFaces());
|
faceList minRegion(mesh.nFaces());
|
||||||
forAllConstIter(Map<label>, candidateFace, iter)
|
forAllConstIter(Map<label>, candidateFace, iter)
|
||||||
{
|
{
|
||||||
label faceI = iter();
|
label faceI = iter.key();
|
||||||
const face& f = mesh.faces()[faceI];
|
const face& f = mesh.faces()[faceI];
|
||||||
|
|
||||||
if (mesh.isInternalFace(faceI))
|
if (mesh.isInternalFace(faceI))
|
||||||
|
|||||||
Reference in New Issue
Block a user