mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
debug; neighbour truncated
This commit is contained in:
@ -207,7 +207,20 @@ void Foam::attachDetach::attachInterface
|
||||
mesh.faceZones()[modifiedFaceZone].whichFace(curFaceID)
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
label patchID = mesh.boundaryMesh().whichPatch(curFaceID);
|
||||
label neiCell;
|
||||
if (patchID == -1)
|
||||
{
|
||||
neiCell = nei[curFaceID];
|
||||
}
|
||||
else
|
||||
{
|
||||
neiCell = -1;
|
||||
}
|
||||
|
||||
|
||||
// Modify the face
|
||||
ref.setAction
|
||||
(
|
||||
@ -216,9 +229,9 @@ void Foam::attachDetach::attachInterface
|
||||
newFace, // modified face
|
||||
curFaceID, // label of face being modified
|
||||
own[curFaceID], // owner
|
||||
nei[curFaceID], // neighbour
|
||||
neiCell, // neighbour
|
||||
false, // face flip
|
||||
mesh.boundaryMesh().whichPatch(curFaceID),// patch for face
|
||||
patchID, // patch for face
|
||||
false, // remove from zone
|
||||
modifiedFaceZone, // zone for face
|
||||
modifiedFaceZoneFlip // face flip in zone
|
||||
|
||||
@ -73,6 +73,37 @@ void Foam::attachDetach::detachInterface
|
||||
const polyMesh& mesh = topoChanger().mesh();
|
||||
const faceZoneMesh& zoneMesh = mesh.faceZones();
|
||||
|
||||
// Check that zone is in increasing order (needed since adding faces
|
||||
// in same order - otherwise polyTopoChange face ordering will mess up
|
||||
// correspondence)
|
||||
if (debug)
|
||||
{
|
||||
const labelList& faceLabels = zoneMesh[faceZoneID_.index()];
|
||||
if (faceLabels.size() > 0)
|
||||
{
|
||||
for (label i = 1; i < faceLabels.size(); i++)
|
||||
{
|
||||
if (faceLabels[i] <= faceLabels[i-1])
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"attachDetach::detachInterface"
|
||||
"(polyTopoChange&) const"
|
||||
) << "faceZone " << zoneMesh[faceZoneID_.index()].name()
|
||||
<< " does not have mesh face labels in"
|
||||
<< " increasing order." << endl
|
||||
<< "Face label " << faceLabels[i]
|
||||
<< " at position " << i
|
||||
<< " is smaller than the previous value "
|
||||
<< faceLabels[i-1]
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
const primitiveFacePatch& masterFaceLayer = zoneMesh[faceZoneID_.index()]();
|
||||
const pointField& points = mesh.points();
|
||||
const labelListList& meshEdgeFaces = mesh.edgeFaces();
|
||||
@ -109,14 +140,11 @@ void Foam::attachDetach::detachInterface
|
||||
|
||||
if (edgeIsInternal)
|
||||
{
|
||||
// Pout<< "Internal edge found: (" << mp[zoneLocalEdges[curEdgeID].start()] << " " << mp[zoneLocalEdges[curEdgeID].end()] << ")" << endl;
|
||||
const edge& e = zoneLocalEdges[curEdgeID];
|
||||
|
||||
// Reset the point creation
|
||||
addedPoints[zoneLocalEdges[curEdgeID].start()] =
|
||||
mp[zoneLocalEdges[curEdgeID].start()];
|
||||
|
||||
addedPoints[zoneLocalEdges[curEdgeID].end()] =
|
||||
mp[zoneLocalEdges[curEdgeID].end()];
|
||||
addedPoints[e.start()] = mp[e.start()];
|
||||
addedPoints[e.end()] = mp[e.end()];
|
||||
}
|
||||
}
|
||||
// Pout << "addedPoints before point creation: " << addedPoints << endl;
|
||||
@ -137,7 +165,10 @@ void Foam::attachDetach::detachInterface
|
||||
true // supports a cell
|
||||
)
|
||||
);
|
||||
// Pout << "Adding point " << points[mp[pointI]] << " for original point " << mp[pointI] << endl;
|
||||
//Pout<< "Adding point " << addedPoints[pointI]
|
||||
// << " coord1:" << points[mp[pointI]]
|
||||
// << " coord2:" << masterFaceLayer.localPoints()[pointI]
|
||||
// << " for original point " << mp[pointI] << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -185,6 +216,7 @@ void Foam::attachDetach::detachInterface
|
||||
);
|
||||
|
||||
// Add renumbered face into the slave patch
|
||||
//label addedFaceI =
|
||||
ref.setAction
|
||||
(
|
||||
polyAddFace
|
||||
@ -201,7 +233,15 @@ void Foam::attachDetach::detachInterface
|
||||
false // zone flip
|
||||
)
|
||||
);
|
||||
// Pout << "Flip. Modifying face: " << faces[curFaceID].reverseFace() << " next to cell: " << nei[curFaceID] << " and adding face: " << newFace << " next to cell: " << own[curFaceID] << endl;
|
||||
//{
|
||||
// pointField newPts(ref.points());
|
||||
//Pout<< "Flip. Modifying face: " << ref.faces()[curFaceID]
|
||||
// << " fc:" << ref.faces()[curFaceID].centre(newPts)
|
||||
// << " next to cell: " << nei[curFaceID]
|
||||
// << " and adding face: " << newFace
|
||||
// << " fc:" << ref.faces()[addedFaceI].centre(newPts)
|
||||
// << " next to cell: " << own[curFaceID] << endl;
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -223,6 +263,7 @@ void Foam::attachDetach::detachInterface
|
||||
);
|
||||
|
||||
// Add renumbered face into the slave patch
|
||||
//label addedFaceI =
|
||||
ref.setAction
|
||||
(
|
||||
polyAddFace
|
||||
@ -239,7 +280,15 @@ void Foam::attachDetach::detachInterface
|
||||
false // face flip in zone
|
||||
)
|
||||
);
|
||||
// Pout << "No flip. Modifying face: " << faces[curFaceID] << " next to cell: " << own[curFaceID] << " and adding face: " << newFace << " next to cell: " << nei[curFaceID] << endl;
|
||||
//{
|
||||
// pointField newPts(ref.points());
|
||||
//Pout<< "No flip. Modifying face: " << ref.faces()[curFaceID]
|
||||
// << " fc:" << ref.faces()[curFaceID].centre(newPts)
|
||||
// << " next to cell: " << own[curFaceID]
|
||||
// << " and adding face: " << newFace
|
||||
// << " fc:" << ref.faces()[addedFaceI].centre(newPts)
|
||||
// << " next to cell: " << nei[curFaceID] << endl;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user