34 void referredCell::setConstructionData
37 const label sourceCell
46 forAll(sourceCellVertices, sCV)
48 sourceCellVertices[sCV] = mesh.points()[points[sCV]];
51 vertexPositions_ = referPositions(sourceCellVertices);
58 edgeList sourceCellEdges(edges.size());
60 forAll(sourceCellEdges, sCE)
62 sourceCellEdges[sCE] = mesh.edges()[edges[sCE]];
65 locallyMapEdgeList(points, sourceCellEdges);
80 sourceCellFaces[
f] = mesh.faces()[
faces[
f]];
82 sourceCellFaceCentres[
f] = mesh.faceCentres()[
faces[
f]];
84 sourceCellFaceAreas[
f] = mesh.faceAreas()[
faces[
f]];
87 locallyMapFaceList(points, sourceCellFaces);
89 faceCentres_ = referPositions(sourceCellFaceCentres);
91 faceAreas_ = rotateVectors(sourceCellFaceAreas);
95 void referredCell::locallyMapEdgeList
101 edges_.
setSize(sourceCellEdges.size());
103 forAll(sourceCellEdges, sCE)
105 const edge&
e(sourceCellEdges[sCE]);
107 edges_[sCE].start() =
findIndex(points,
e.start());
113 edges_[sCE].start() == -1
114 || edges_[sCE].
end() == -1
118 <<
"edgeList and points labelList for "
119 <<
"referred cell do not match: "
120 <<
nl <<
"points: " << points
121 <<
nl <<
"egdes: " << sourceCellEdges
128 void referredCell::locallyMapFaceList
134 faces_.
setSize(sourceCellFaces.size());
136 forAll(sourceCellFaces, sCF)
138 const labelList& sourceCellFace(sourceCellFaces[sCF]);
142 localFace.setSize(sourceCellFace.size());
146 localFace[
p] =
findIndex(points, sourceCellFace[
p]);
148 if (localFace[
p] == -1)
151 <<
"edgeList and points labelList for "
152 <<
"referred cell do not match: "
153 <<
nl <<
"points: " << points
154 <<
nl <<
"faces: " << sourceCellFaces
162 vector referredCell::referPosition(
const vector& positionToRefer)
164 return offset_ + (rotation_ & positionToRefer);
170 return offset_ + (rotation_ & positionsToRefer);
174 vector referredCell::rotateVector(
const vector& vectorToRotate)
176 return rotation_ & vectorToRotate;
182 return rotation_ & vectorsToRotate;
202 const label sourceProc,
203 const label sourceCell,
209 sourceProc_(sourceProc),
210 sourceCell_(sourceCell),
214 setConstructionData(mesh, sourceCell);
220 const label sourceProc,
221 const label sourceCell,
232 sourceProc_(sourceProc),
233 sourceCell_(sourceCell),
243 vertexPositions_ = referPositions(vertexPositions);
245 faceCentres_ = referPositions(faceCentres);
247 faceAreas_ = rotateVectors(faceAreas);
254 const label sourceProc,
255 const label sourceCell,
263 sourceProc_(sourceProc),
264 sourceCell_(sourceCell)
274 offset_ = cD - (rotation_ & cS);
281 setConstructionData(mesh, sourceCell);
307 vector newOffset = cD - (newRotation & cS);
309 tensor reReferredRotation = newRotation & rotation_;
311 vector reReferredOffset = newOffset + (newRotation & offset_);
317 rotation_.T() & (vertexPositions_ - offset_),
320 rotation_.T() & (faceCentres_ - offset_),
321 rotation_.T() & (faceAreas_),
328 vector referredCell::referPosition(
const vector& positionToRefer)
const
330 return offset_ + (rotation_ & positionToRefer);
339 return offset_ + (rotation_ & positionsToRefer);
345 return rotation_ & vectorToRotate;
351 return rotation_ & vectorsToRotate;
365 incomingMols[iM].
id(),
368 incomingMols[iM].position()
372 incomingMols[iM].sitePositions()
397 sourceProc_ == procNo
398 && sourceCell_ < nCells
411 >> rC.vertexPositions_
419 is.
check(
"Istream& operator<<(Istream& f, const referredCell& rC");
438 os.
check(
"Ostream& operator<<(Ostream& f, const referredCell& rC");