49Foam::duplicatePoints::duplicatePoints(
const polyMesh&
mesh)
78 const label pointi = iter.key();
79 const label localI = iter.val();
80 const labelList& regions = pointRegions[localI];
83 duplicates_[localI][0] = pointi;
84 for (label i = 1; i < regions.
size(); i++)
86 duplicates_[localI][i] = meshMod.
addPoint
114 const label facei = iter.key();
115 const label localI = iter.val();
118 const face& fRegion = faceRegions[localI];
119 const face&
f = mesh_.faces()[facei];
124 label pointi =
f[fp];
128 if (iter != meshPointMap.
end())
134 const labelList& regions = pointRegions[iter()];
135 const labelList& dupPoints = duplicates_[iter()];
138 label index = regions.
find(fRegion[fp]);
140 newFace[fp] = dupPoints[index];
144 newFace[fp] = pointi;
149 label zoneID = mesh_.faceZones().whichZone(facei);
150 bool zoneFlip =
false;
153 const faceZone& fZone = mesh_.faceZones()[zoneID];
154 zoneFlip = fZone.flipMap()[fZone.whichFace(facei)];
158 if (mesh_.isInternalFace(facei))
164 mesh_.faceOwner()[facei],
165 mesh_.faceNeighbour()[facei],
178 mesh_.faceOwner()[facei],
193 OFstream str(mesh_.time().path()/
"duplicatedPoints.obj");
196 const label localI = iter.val();
197 const labelList& dups = duplicates_[localI];
211 forAll(duplicates_, masterI)
iterator find(const Key &key)
Find and return an iterator set at the hashed entry.
label size() const noexcept
The number of elements in table.
iterator end() noexcept
iterator to signal the end (for any HashTable)
void setSize(label n)
Alias for resize().
A HashTable to objects of type <T> with a label key.
typename parent_type::const_iterator const_iterator
Output to file stream as an OSstream, normally using std::ofstream for the actual output.
void size(const label n)
Older name for setAddressableSize.
label find(const T &val) const
Find index of the first occurrence of the value.
void setRefinement(const localPointRegion ®ionSide, polyTopoChange &)
Play commands into polyTopoChange to duplicate points. Gets.
void updateMesh(const mapPolyMesh &)
Force recalculation of locally stored data on topological change.
A subset of mesh faces organised as a primitive patch.
label whichFace(const label meshFaceID) const
The local index of the given mesh face, -1 if not in the zone.
const boolList & flipMap() const noexcept
Return face flip map.
A face is a list of labels corresponding to mesh vertices.
Takes mesh with 'baffles' (= boundary faces sharing points). Determines for selected points on bounda...
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const labelList & reversePointMap() const noexcept
Reverse point map.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
virtual const pointField & points() const
Return raw points.
Direct mesh changes based on v1.3 polyTopoChange syntax.
label addPoint(const point &pt, const label masterPointID, const label zoneID, const bool inCell)
Add point. Return new point label.
void modifyFace(const face &f, const label facei, const label own, const label nei, const bool flipFaceFlux, const label patchID, const label zoneID, const bool zoneFlip, const bool multiZone=false)
Modify vertices or cell of face.
const DynamicList< point > & points() const
Points. Shrunk after constructing mesh (or calling of compact()).
Determines the 'side' for every face and connected to a singly-connected (through edges) region of fa...
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const polyBoundaryMesh & patches
Namespace for handling debugging switches.
void inplaceRenumber(const labelUList &oldToNew, IntListType &input)
Inplace renumber the values within a list.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
List< face > faceList
List of faces.
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.