Skip to content
Snippets Groups Projects
Commit 1b9980a5 authored by Mattijs Janssens's avatar Mattijs Janssens
Browse files

did not handle internal faces correctly

parent 4f041874
Branches
Tags
No related merge requests found
...@@ -155,17 +155,35 @@ void Foam::duplicatePoints::setRefinement ...@@ -155,17 +155,35 @@ void Foam::duplicatePoints::setRefinement
zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)];
} }
meshMod.modifyFace
( if (mesh_.isInternalFace(faceI))
newFace, // modified face {
faceI, // label of face being modified meshMod.modifyFace
mesh_.faceOwner()[faceI], // owner (
-1, // neighbour newFace, // modified face
false, // face flip faceI, // label of face being modified
patches.whichPatch(faceI), // patch for face mesh_.faceOwner()[faceI], // owner
zoneID, // zone for face mesh_.faceNeighbour()[faceI], // neighbour
zoneFlip // face flip in zone 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 ...@@ -43,15 +43,22 @@ class minEqOpFace
{ {
public: 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 // Dummy transform for faces. Used in synchronisation
void transformList void transformList
( (
...@@ -120,7 +127,7 @@ void Foam::localPointRegion::countPointRegions ...@@ -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 ...@@ -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 ...@@ -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))
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment