1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "meshCutAndRemove.H"
28 #include "polyTopoChange.H"
29 #include "polyAddFace.H"
30 #include "polyAddPoint.H"
31 #include "polyRemovePoint.H"
32 #include "polyRemoveFace.H"
33 #include "polyModifyFace.H"
35 #include "mapPolyMesh.H"
36 #include "meshTools.H"
38 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
40 defineTypeNameAndDebug(Foam::meshCutAndRemove, 0);
42 // * * * * * * * * * * * * * Private Static Functions * * * * * * * * * * * //
44 // Returns -1 or index in elems1 of first shared element.
45 Foam::label Foam::meshCutAndRemove::firstCommon
47 const labelList& elems1,
48 const labelList& elems2
53 label index1 = findIndex(elems2, elems1[elemI]);
64 // Check if twoCuts at two consecutive position in cuts.
65 bool Foam::meshCutAndRemove::isIn
71 label index = findIndex(cuts, twoCuts[0]);
80 cuts[cuts.fcIndex(index)] == twoCuts[1]
81 || cuts[cuts.rcIndex(index)] == twoCuts[1]
86 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
88 // Returns the cell in cellLabels that is cut. Or -1.
89 Foam::label Foam::meshCutAndRemove::findCutCell
92 const labelList& cellLabels
95 forAll(cellLabels, labelI)
97 label cellI = cellLabels[labelI];
99 if (cuts.cellLoops()[cellI].size())
108 //- Returns first pointI in pointLabels that uses an internal
109 // face. Used to find point to inflate cell/face from (has to be
110 // connected to internal face). Returns -1 (so inflate from nothing) if
112 Foam::label Foam::meshCutAndRemove::findInternalFacePoint
114 const labelList& pointLabels
117 forAll(pointLabels, labelI)
119 label pointI = pointLabels[labelI];
121 const labelList& pFaces = mesh().pointFaces()[pointI];
123 forAll(pFaces, pFaceI)
125 label faceI = pFaces[pFaceI];
127 if (mesh().isInternalFace(faceI))
134 if (pointLabels.empty())
138 "meshCutAndRemove::findInternalFacePoint(const labelList&)"
140 << "Empty pointLabels" << abort(FatalError);
147 // Find point on face that is part of original mesh and that is point connected
149 Foam::label Foam::meshCutAndRemove::findPatchFacePoint
152 const label exposedPatchI
155 const labelListList& pointFaces = mesh().pointFaces();
156 const polyBoundaryMesh& patches = mesh().boundaryMesh();
160 label pointI = f[fp];
162 if (pointI < mesh().nPoints())
164 const labelList& pFaces = pointFaces[pointI];
168 if (patches.whichPatch(pFaces[i]) == exposedPatchI)
179 // Get new owner and neighbour of face. Checks anchor points to see if
180 // cells have been removed.
181 void Foam::meshCutAndRemove::faceCells
183 const cellCuts& cuts,
184 const label exposedPatchI,
191 const labelListList& anchorPts = cuts.cellAnchorPoints();
192 const labelListList& cellLoops = cuts.cellLoops();
194 const face& f = mesh().faces()[faceI];
196 own = mesh().faceOwner()[faceI];
198 if (cellLoops[own].size() && firstCommon(f, anchorPts[own]) == -1)
200 // owner has been split and this is the removed part.
206 if (mesh().isInternalFace(faceI))
208 nei = mesh().faceNeighbour()[faceI];
210 if (cellLoops[nei].size() && firstCommon(f, anchorPts[nei]) == -1)
216 patchID = mesh().boundaryMesh().whichPatch(faceI);
218 if (patchID == -1 && (own == -1 || nei == -1))
220 // Face was internal but becomes external
221 patchID = exposedPatchI;
226 void Foam::meshCutAndRemove::getZoneInfo
233 zoneID = mesh().faceZones().whichZone(faceI);
239 const faceZone& fZone = mesh().faceZones()[zoneID];
241 zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)];
246 // Adds a face from point.
247 void Foam::meshCutAndRemove::addFace
249 polyTopoChange& meshMod,
251 const label masterPointI,
261 getZoneInfo(faceI, zoneID, zoneFlip);
263 if ((nei == -1) || (own != -1 && own < nei))
268 Pout<< "Adding face " << newFace
269 << " with new owner:" << own
270 << " with new neighbour:" << nei
271 << " patchID:" << patchID
272 << " anchor:" << masterPointI
273 << " zoneID:" << zoneID
274 << " zoneFlip:" << zoneFlip
285 masterPointI, // master point
287 -1, // master face for addition
289 patchID, // patch for face
290 zoneID, // zone for face
291 zoneFlip // face zone flip
297 // Reverse owner/neighbour
300 Pout<< "Adding (reversed) face " << newFace.reverseFace()
301 << " with new owner:" << nei
302 << " with new neighbour:" << own
303 << " patchID:" << patchID
304 << " anchor:" << masterPointI
305 << " zoneID:" << zoneID
306 << " zoneFlip:" << zoneFlip
314 newFace.reverseFace(), // face
317 masterPointI, // master point
319 -1, // master face for addition
321 patchID, // patch for face
322 zoneID, // zone for face
323 zoneFlip // face zone flip
330 // Modifies existing faceI for either new owner/neighbour or new face points.
331 void Foam::meshCutAndRemove::modFace
333 polyTopoChange& meshMod,
344 getZoneInfo(faceI, zoneID, zoneFlip);
348 (own != mesh().faceOwner()[faceI])
350 mesh().isInternalFace(faceI)
351 && (nei != mesh().faceNeighbour()[faceI])
353 || (newFace != mesh().faces()[faceI])
358 Pout<< "Modifying face " << faceI
359 << " old vertices:" << mesh().faces()[faceI]
360 << " new vertices:" << newFace
361 << " new owner:" << own
362 << " new neighbour:" << nei
363 << " new patch:" << patchID
364 << " new zoneID:" << zoneID
365 << " new zoneFlip:" << zoneFlip
369 if ((nei == -1) || (own != -1 && own < nei))
375 newFace, // modified face
376 faceI, // label of face being modified
380 patchID, // patch for face
381 false, // remove from zone
382 zoneID, // zone for face
383 zoneFlip // face flip in zone
393 newFace.reverseFace(), // modified face
394 faceI, // label of face being modified
398 patchID, // patch for face
399 false, // remove from zone
400 zoneID, // zone for face
401 zoneFlip // face flip in zone
409 // Copies face starting from startFp up to and including endFp.
410 void Foam::meshCutAndRemove::copyFace
424 newFace[newFp++] = f[fp];
426 fp = (fp + 1) % f.size();
428 newFace[newFp] = f[fp];
432 // Actually split face in two along splitEdge v0, v1 (the two vertices in new
433 // vertex numbering). Generates faces in same ordering
434 // as original face. Replaces cutEdges by the points introduced on them
436 void Foam::meshCutAndRemove::splitFace
446 // Check if we find any new vertex which is part of the splitEdge.
447 label startFp = findIndex(f, v0);
453 "meshCutAndRemove::splitFace"
454 ", const face&, const label, const label, face&, face&)"
455 ) << "Cannot find vertex (new numbering) " << v0
457 << abort(FatalError);
460 label endFp = findIndex(f, v1);
466 "meshCutAndRemove::splitFace("
467 ", const face&, const label, const label, face&, face&)"
468 ) << "Cannot find vertex (new numbering) " << v1
470 << abort(FatalError);
474 f0.setSize((endFp + 1 + f.size() - startFp) % f.size());
475 f1.setSize(f.size() - f0.size() + 2);
477 copyFace(f, startFp, endFp, f0);
478 copyFace(f, endFp, startFp, f1);
482 // Adds additional vertices (from edge cutting) to face. Used for faces which
483 // are not split but still might use edge that has been cut.
484 Foam::face Foam::meshCutAndRemove::addEdgeCutsToFace(const label faceI) const
486 const face& f = mesh().faces()[faceI];
488 face newFace(2 * f.size());
494 // Duplicate face vertex.
495 newFace[newFp++] = f[fp];
497 // Check if edge has been cut.
498 label fp1 = f.fcIndex(fp);
500 HashTable<label, edge, Hash<edge> >::const_iterator fnd =
501 addedPoints_.find(edge(f[fp], f[fp1]));
503 if (fnd != addedPoints_.end())
505 // edge has been cut. Introduce new vertex.
506 newFace[newFp++] = fnd();
510 newFace.setSize(newFp);
516 // Walk loop (loop of cuts) across circumference of cellI. Returns face in
518 // Note: tricky bit is that it can use existing edges which have been split.
519 Foam::face Foam::meshCutAndRemove::loopToFace
522 const labelList& loop
525 face newFace(2*loop.size());
531 label cut = loop[fp];
535 label edgeI = getEdge(cut);
537 const edge& e = mesh().edges()[edgeI];
539 label vertI = addedPoints_[e];
541 newFace[newFaceI++] = vertI;
546 label vertI = getVertex(cut);
548 newFace[newFaceI++] = vertI;
550 label nextCut = loop[loop.fcIndex(fp)];
552 if (!isEdge(nextCut))
554 // From vertex to vertex -> cross cut only if no existing edge.
555 label nextVertI = getVertex(nextCut);
557 label edgeI = meshTools::findEdge(mesh(), vertI, nextVertI);
561 // Existing edge. Insert split-edge point if any.
562 HashTable<label, edge, Hash<edge> >::const_iterator fnd =
563 addedPoints_.find(mesh().edges()[edgeI]);
565 if (fnd != addedPoints_.end())
567 newFace[newFaceI++] = fnd();
573 newFace.setSize(newFaceI);
579 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
581 // Construct from components
582 Foam::meshCutAndRemove::meshCutAndRemove(const polyMesh& mesh)
590 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
592 void Foam::meshCutAndRemove::setRefinement
594 const label exposedPatchI,
595 const cellCuts& cuts,
596 const labelList& cutPatch,
597 polyTopoChange& meshMod
600 // Clear and size maps here since mesh size will change.
602 addedFaces_.resize(cuts.nLoops());
604 addedPoints_.clear();
605 addedPoints_.resize(cuts.nLoops());
607 if (cuts.nLoops() == 0)
612 const labelListList& anchorPts = cuts.cellAnchorPoints();
613 const labelListList& cellLoops = cuts.cellLoops();
614 const polyBoundaryMesh& patches = mesh().boundaryMesh();
616 if (exposedPatchI < 0 || exposedPatchI >= patches.size())
620 "meshCutAndRemove::setRefinement("
621 ", const label, const cellCuts&, const labelList&"
623 ) << "Illegal exposed patch " << exposedPatchI
624 << abort(FatalError);
629 // Add new points along cut edges.
632 forAll(cuts.edgeIsCut(), edgeI)
634 if (cuts.edgeIsCut()[edgeI])
636 const edge& e = mesh().edges()[edgeI];
638 // Check if there is any cell using this edge.
639 if (debug && findCutCell(cuts, mesh().edgeCells()[edgeI]) == -1)
643 "meshCutAndRemove::setRefinement("
644 ", const label, const cellCuts&, const labelList&"
646 ) << "Problem: cut edge but none of the cells using it is\n"
647 << "edge:" << edgeI << " verts:" << e
648 << abort(FatalError);
651 // One of the edge end points should be master point of nbCellI.
652 label masterPointI = e.start();
654 const point& v0 = mesh().points()[e.start()];
655 const point& v1 = mesh().points()[e.end()];
657 scalar weight = cuts.edgeWeight()[edgeI];
659 point newPt = weight*v1 + (1.0-weight)*v0;
667 masterPointI, // master point
668 -1, // zone for point
669 true // supports a cell
673 // Store on (hash of) edge.
674 addedPoints_.insert(e, addedPointI);
678 Pout<< "Added point " << addedPointI
680 << masterPointI << " of edge " << edgeI
681 << " vertices " << e << endl;
688 // Remove all points that will not be used anymore
691 boolList usedPoint(mesh().nPoints(), false);
693 forAll(cellLoops, cellI)
695 const labelList& loop = cellLoops[cellI];
699 // Cell is cut. Uses only anchor points and loop itself.
702 label cut = loop[fp];
706 usedPoint[getVertex(cut)] = true;
710 const labelList& anchors = anchorPts[cellI];
714 usedPoint[anchors[i]] = true;
719 // Cell is not cut so use all its points
720 const labelList& cPoints = mesh().cellPoints()[cellI];
724 usedPoint[cPoints[i]] = true;
731 const Map<edge>& faceSplitCut = cuts.faceSplitCut();
733 forAllConstIter(Map<edge>, faceSplitCut, iter)
735 const edge& fCut = iter();
743 label pointI = getVertex(cut);
745 if (!usedPoint[pointI])
749 "meshCutAndRemove::setRefinement("
750 ", const label, const cellCuts&, const labelList&"
752 ) << "Problem: faceSplitCut not used by any loop"
753 << " or cell anchor point"
754 << "face:" << iter.key() << " point:" << pointI
755 << " coord:" << mesh().points()[pointI]
756 << abort(FatalError);
762 forAll(cuts.pointIsCut(), pointI)
764 if (cuts.pointIsCut()[pointI])
766 if (!usedPoint[pointI])
770 "meshCutAndRemove::setRefinement("
771 ", const label, const cellCuts&, const labelList&"
773 ) << "Problem: point is marked as cut but"
774 << " not used by any loop"
775 << " or cell anchor point"
776 << "point:" << pointI
777 << " coord:" << mesh().points()[pointI]
778 << abort(FatalError);
784 // Remove unused points.
785 forAll(usedPoint, pointI)
787 if (!usedPoint[pointI])
789 meshMod.setAction(polyRemovePoint(pointI));
793 Pout<< "Removing unused point " << pointI << endl;
801 // For all cut cells add an internal or external face
804 forAll(cellLoops, cellI)
806 const labelList& loop = cellLoops[cellI];
810 if (cutPatch[cellI] < 0 || cutPatch[cellI] >= patches.size())
814 "meshCutAndRemove::setRefinement("
815 ", const label, const cellCuts&, const labelList&"
817 ) << "Illegal patch " << cutPatch[cellI]
818 << " provided for cut cell " << cellI
819 << abort(FatalError);
823 // Convert loop (=list of cuts) into proper face.
824 // cellCuts sets orientation is towards anchor side so reverse.
826 face newFace(loopToFace(cellI, loop));
830 // Pick any anchor point on cell
831 label masterPointI = findPatchFacePoint(newFace, exposedPatchI);
841 masterPointI, // master point
843 -1, // master face for addition
845 cutPatch[cellI], // patch for face
847 false // face zone flip
851 addedFaces_.insert(cellI, addedFaceI);
855 Pout<< "Added splitting face " << newFace << " index:"
856 << addedFaceI << " from masterPoint:" << masterPointI
857 << " to owner " << cellI << " with anchors:"
861 // Gets edgeweights of loop
862 scalarField weights(loop.size());
870 ? cuts.edgeWeight()[getEdge(cut)]
874 writeCuts(Pout, loop, weights);
882 // Modify faces to use only anchorpoints and loop points
883 // (so throw away part without anchorpoints)
887 // Maintain whether face has been updated (for -split edges
888 // -new owner/neighbour)
889 boolList faceUptodate(mesh().nFaces(), false);
891 const Map<edge>& faceSplitCuts = cuts.faceSplitCut();
893 forAllConstIter(Map<edge>, faceSplitCuts, iter)
895 label faceI = iter.key();
897 // Renumber face to include split edges.
898 face newFace(addEdgeCutsToFace(faceI));
900 // Edge splitting the face. Convert edge to new vertex numbering.
901 const edge& splitEdge = iter();
903 label cut0 = splitEdge[0];
908 label edgeI = getEdge(cut0);
909 v0 = addedPoints_[mesh().edges()[edgeI]];
913 v0 = getVertex(cut0);
916 label cut1 = splitEdge[1];
920 label edgeI = getEdge(cut1);
921 v1 = addedPoints_[mesh().edges()[edgeI]];
925 v1 = getVertex(cut1);
928 // Split face along the elements of the splitEdge.
930 splitFace(newFace, v0, v1, f0, f1);
932 label own = mesh().faceOwner()[faceI];
936 if (mesh().isInternalFace(faceI))
938 nei = mesh().faceNeighbour()[faceI];
943 Pout<< "Split face " << mesh().faces()[faceI]
944 << " own:" << own << " nei:" << nei
946 << " and f1:" << f1 << endl;
950 // Check which cell using face uses anchorPoints (so is kept)
951 // and which one doesn't (gets removed)
953 // Bit tricky. We have to know whether this faceSplit splits owner/
954 // neighbour or both. Even if cell is cut we have to make sure this is
955 // the one that cuts it (this face cut might not be the one splitting
957 // The face f gets split into two parts, f0 and f1.
958 // Each of these can have a different owner and or neighbour.
960 const face& f = mesh().faces()[faceI];
965 if (cellLoops[own].empty())
967 // Owner side is not split so keep both halves.
971 else if (isIn(splitEdge, cellLoops[own]))
973 // Owner is cut by this splitCut. See which of f0, f1 gets
974 // preserved and becomes owner, and which gets removed.
975 if (firstCommon(f0, anchorPts[own]) != -1)
977 // f0 preserved so f1 gets deleted
989 // Owner not cut by this splitCut but by another.
990 // Check on original face whether
992 if (firstCommon(f, anchorPts[own]) != -1)
994 // both f0 and f1 owner side preserved
1000 // both f0 and f1 owner side removed
1012 if (cellLoops[nei].empty())
1017 else if (isIn(splitEdge, cellLoops[nei]))
1019 // Neighbour is cut by this splitCut. So anchor part of it
1020 // gets kept, non-anchor bit gets removed. See which of f0, f1
1021 // connects to which part.
1023 if (firstCommon(f0, anchorPts[nei]) != -1)
1036 // neighbour not cut by this splitCut. Check on original face
1037 // whether use anchorPts.
1039 if (firstCommon(f, anchorPts[nei]) != -1)
1046 // both f0 and f1 on neighbour side removed
1056 Pout<< "f0 own:" << f0Own << " nei:" << f0Nei
1057 << " f1 own:" << f1Own << " nei:" << f1Nei
1062 // If faces were internal but now become external set a patch.
1063 // If they were external already keep the patch.
1064 label patchID = patches.whichPatch(faceI);
1068 patchID = exposedPatchI;
1072 // Do as much as possible by modifying faceI. Delay any remove
1073 // face. Keep track of whether faceI has been used.
1075 bool modifiedFaceI = false;
1081 // f0 becomes external face (note:modFace will reverse face)
1082 modFace(meshMod, faceI, f0, f0Own, f0Nei, patchID);
1083 modifiedFaceI = true;
1090 // f0 becomes external face
1091 modFace(meshMod, faceI, f0, f0Own, f0Nei, patchID);
1092 modifiedFaceI = true;
1096 // f0 stays internal face.
1097 modFace(meshMod, faceI, f0, f0Own, f0Nei, -1);
1098 modifiedFaceI = true;
1103 // f1 is added face (if at all)
1113 // f1 becomes external face (note:modFace will reverse face)
1116 modFace(meshMod, faceI, f1, f1Own, f1Nei, patchID);
1117 modifiedFaceI = true;
1121 label masterPointI = findPatchFacePoint(f1, patchID);
1126 faceI, // face for zone info
1127 masterPointI, // inflation point
1128 f1, // vertices of face
1131 patchID // patch for new face
1140 // f1 becomes external face
1143 modFace(meshMod, faceI, f1, f1Own, f1Nei, patchID);
1144 modifiedFaceI = true;
1148 label masterPointI = findPatchFacePoint(f1, patchID);
1164 // f1 is internal face.
1167 modFace(meshMod, faceI, f1, f1Own, f1Nei, -1);
1168 modifiedFaceI = true;
1172 label masterPointI = findPatchFacePoint(f1, -1);
1174 addFace(meshMod, faceI, masterPointI, f1, f1Own, f1Nei, -1);
1179 if (f0Own == -1 && f0Nei == -1 && !modifiedFaceI)
1181 meshMod.setAction(polyRemoveFace(faceI));
1185 Pout<< "Removed face " << faceI << endl;
1189 faceUptodate[faceI] = true;
1194 // Faces that have not been split but just appended to. Are guaranteed
1195 // to be reachable from an edgeCut.
1198 const boolList& edgeIsCut = cuts.edgeIsCut();
1200 forAll(edgeIsCut, edgeI)
1202 if (edgeIsCut[edgeI])
1204 const labelList& eFaces = mesh().edgeFaces()[edgeI];
1208 label faceI = eFaces[i];
1210 if (!faceUptodate[faceI])
1212 // So the face has not been split itself (i.e. its owner
1213 // or neighbour have not been split) so it only
1214 // borders by edge a cell which has been split.
1216 // Get (new or original) owner and neighbour of faceI
1217 label own, nei, patchID;
1218 faceCells(cuts, exposedPatchI, faceI, own, nei, patchID);
1221 if (own == -1 && nei == -1)
1223 meshMod.setAction(polyRemoveFace(faceI));
1227 Pout<< "Removed face " << faceI << endl;
1232 // Renumber face to include split edges.
1233 face newFace(addEdgeCutsToFace(faceI));
1237 Pout<< "Added edge cuts to face " << faceI
1238 << " f:" << mesh().faces()[faceI]
1239 << " newFace:" << newFace << endl;
1253 faceUptodate[faceI] = true;
1261 // Remove any faces on the non-anchor side of a split cell.
1262 // Note: could loop through all cut cells only and check their faces but
1263 // looping over all faces is cleaner and probably faster for dense
1266 const faceList& faces = mesh().faces();
1268 forAll(faces, faceI)
1270 if (!faceUptodate[faceI])
1272 // Get (new or original) owner and neighbour of faceI
1273 label own, nei, patchID;
1274 faceCells(cuts, exposedPatchI, faceI, own, nei, patchID);
1276 if (own == -1 && nei == -1)
1278 meshMod.setAction(polyRemoveFace(faceI));
1282 Pout<< "Removed face " << faceI << endl;
1287 modFace(meshMod, faceI, faces[faceI], own, nei, patchID);
1290 faceUptodate[faceI] = true;
1296 Pout<< "meshCutAndRemove:" << nl
1297 << " cells split:" << cuts.nLoops() << nl
1298 << " faces added:" << addedFaces_.size() << nl
1299 << " points added on edges:" << addedPoints_.size() << nl
1305 void Foam::meshCutAndRemove::updateMesh(const mapPolyMesh& map)
1307 // Update stored labels for mesh change.
1309 Map<label> newAddedFaces(addedFaces_.size());
1311 forAllConstIter(Map<label>, addedFaces_, iter)
1313 label cellI = iter.key();
1314 label newCellI = map.reverseCellMap()[cellI];
1316 label addedFaceI = iter();
1318 label newAddedFaceI = map.reverseFaceMap()[addedFaceI];
1320 if ((newCellI >= 0) && (newAddedFaceI >= 0))
1325 && (newCellI != cellI || newAddedFaceI != addedFaceI)
1328 Pout<< "meshCutAndRemove::updateMesh :"
1329 << " updating addedFace for cell " << cellI
1330 << " from " << addedFaceI
1331 << " to " << newAddedFaceI
1334 newAddedFaces.insert(newCellI, newAddedFaceI);
1339 addedFaces_.transfer(newAddedFaces);
1343 HashTable<label, edge, Hash<edge> > newAddedPoints(addedPoints_.size());
1347 HashTable<label, edge, Hash<edge> >::const_iterator iter =
1348 addedPoints_.begin();
1349 iter != addedPoints_.end();
1353 const edge& e = iter.key();
1355 label newStart = map.reversePointMap()[e.start()];
1357 label newEnd = map.reversePointMap()[e.end()];
1359 label addedPointI = iter();
1361 label newAddedPointI = map.reversePointMap()[addedPointI];
1363 if ((newStart >= 0) && (newEnd >= 0) && (newAddedPointI >= 0))
1365 edge newE = edge(newStart, newEnd);
1370 && (e != newE || newAddedPointI != addedPointI)
1373 Pout<< "meshCutAndRemove::updateMesh :"
1374 << " updating addedPoints for edge " << e
1375 << " from " << addedPointI
1376 << " to " << newAddedPointI
1380 newAddedPoints.insert(newE, newAddedPointI);
1385 addedPoints_.transfer(newAddedPoints);
1390 // ************************************************************************* //