34 void Foam::sammMesh::readCouples()
36 fileName couplesFileName(casePrefix_ +
".cpl");
38 IFstream couplesFile(couplesFileName);
40 if (couplesFile.good())
47 label matchLabel, nEntries, typeFlag;
48 label masterCell, masterFace;
49 label slaveCell, slaveFace;
51 while (!(couplesFile >> matchLabel).eof())
55 couplesFile >> nEntries;
57 couplesFile >> typeFlag;
62 <<
"void sammMesh::readCouples() : " 63 <<
"couple " << matchLabel <<
" is not an integral match. " 64 <<
"Currently not supported" <<
endl;
68 couplesFile >> masterCell >> masterFace;
71 faceList& masterFaces = cellFaces_[masterCell - 1];
90 [cellShapes_[masterCell - 1].model().index()]
95 label nSlavesToRead = nEntries - 1;
98 label slaveToAdd = masterFaces.size();
101 masterFaces.setSize(masterFaces.size() + nSlavesToRead);
103 for (
int i = 0; i < nSlavesToRead; i++)
105 couplesFile >> slaveCell >> slaveFace;
107 masterFaces[slaveToAdd] =
114 [cellShapes_[slaveCell - 1].model().index()]
132 faceList& curFaces = cellFaces_[celli];
134 label zeroSizeFound = 0;
138 if (curFaces[facei].empty())
144 if (zeroSizeFound > 0)
149 curFaces.
setSize(curFaces.size() - zeroSizeFound);
155 if (oldFaces[facei].size())
157 curFaces[nFaces] = oldFaces[facei];
168 <<
"void sammMesh::readCouples() : " 169 <<
"Cannot read file " 171 <<
". No matches defined." #define forAll(list, i)
Loop across all elements in list.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void setSize(const label)
Reset size of List.