52 void Foam::cyclicPointPatch::initGeometry()
54 transformPairs_.setSize(0);
58 void Foam::cyclicPointPatch::calcGeometry()
60 const edgeList&
cp = cyclicPolyPatch_.coupledPoints();
61 const labelList& mp = cyclicPolyPatch_.meshPoints();
64 if (!boundaryMesh().
mesh().globalData().nGlobalPoints())
66 nonGlobalPatchPoints_.
setSize(mp.size());
67 forAll(nonGlobalPatchPoints_, i)
69 nonGlobalPatchPoints_[i] = i;
72 meshPoints_ = cyclicPolyPatch_.meshPoints();
79 boundaryMesh().globalPatch().meshPoints();
81 nonGlobalPatchPoints_.
setSize(mp.size());
82 meshPoints_.setSize(mp.size());
86 label noFiltPoints = 0;
90 label curP = mp[pointI];
94 forAll (sharedPoints, sharedI)
96 if (sharedPoints[sharedI] == curP)
105 pointMap[pointI] = noFiltPoints;
106 nonGlobalPatchPoints_[noFiltPoints] = pointI;
107 meshPoints_[noFiltPoints] = curP;
112 nonGlobalPatchPoints_.setSize(noFiltPoints);
113 meshPoints_.setSize(noFiltPoints);
116 transformPairs_.setSize(cp.size());
118 label noFiltPointPairs = 0;
122 if (pointMap[cp[i][0]] != -1 && pointMap[cp[i][1]] != -1)
124 transformPairs_[noFiltPointPairs][0] = pointMap[cp[i][0]];
125 transformPairs_[noFiltPointPairs][1] = pointMap[cp[i][1]];
128 else if (pointMap[cp[i][0]] == -1 && pointMap[cp[i][1]] != -1)
131 <<
"Point " << cp[i][0] <<
"of point-pair " << i
132 <<
" is a global point but the other point "
133 << cp[i][1] <<
" is not"
136 else if (pointMap[cp[i][0]] != -1 && pointMap[cp[i][1]] == -1)
139 <<
"Point " << cp[i][1] <<
"of point-pair " << i
140 <<
" is a global point but the other point "
141 << cp[i][0] <<
" is not"
146 transformPairs_.setSize(noFiltPointPairs);
151 void cyclicPointPatch::initMovePoints(
const pointField&)
155 void cyclicPointPatch::movePoints(
const pointField&)
159 void cyclicPointPatch::initUpdateMesh()
162 cyclicPointPatch::initGeometry();
166 void cyclicPointPatch::updateMesh()
169 cyclicPointPatch::calcGeometry();
175 cyclicPointPatch::cyclicPointPatch
182 cyclicPolyPatch_(refCast<const cyclicPolyPatch>(patch))
196 return transformPairs_;