39 void sammMesh::readBoundary()
44 label lineIndex, sammLabel;
45 label sammRegion, configNumber;
53 patchTypes_.setSize(1000);
54 patchNames_.setSize(1000);
56 fileName boundaryFileName(casePrefix_ +
".bnd");
59 IFstream boundaryFile(boundaryFileName);
67 if (boundaryFile.good())
69 forAll(nPatchFaces, faceLabel)
71 nPatchFaces[faceLabel] = 0;
74 while ((boundaryFile >> lineIndex).good())
79 for (
int i=0; i<4; i++)
81 boundaryFile >> sammLabel;
84 boundaryFile >> sammRegion;
85 boundaryFile >> configNumber;
86 boundaryFile >> patchType;
89 label patchLabel = patchLabels[sammRegion];
93 patchLabels[sammRegion] = patchLabel;
94 patchTypes_[patchLabel] = patchType;
95 patchNames_[patchLabel] = patchType +
name(sammRegion);
99 Info<<
"Samm region " << sammRegion
100 <<
" with type " << patchType
101 <<
" is now Foam patch " << patchLabel <<
endl;
105 nPatchFaces[patchLabel]++;
110 <<
"Setting size of shapePatchList to " << nPatches
113 nPatchFaces.setSize(nPatches);
114 patchTypes_.setSize(nPatches);
115 patchNames_.setSize(nPatches);
120 <<
"Cannot read file "
128 boundary_.setSize(nPatchFaces.size());
129 patchTypes_.setSize(nPatchFaces.size());
130 patchNames_.setSize(nPatchFaces.size());
133 forAll(boundary_, patchLabel)
135 boundary_[patchLabel].setSize(nPatchFaces[patchLabel]);
137 nPatchFaces[patchLabel] = 0;
140 IFstream boundaryFile(boundaryFileName);
142 for (label faceI=0; faceI<nFaces; faceI++)
144 boundaryFile >> lineIndex;
146 for (
int i = 0; i < 4; i++)
148 boundaryFile >> sammLabel;
156 Info<<
"Boundary file not consistent with vertex file\n"
157 <<
"Samm vertex number " << sammLabel
158 <<
" does not exist\n";
163 boundaryFile >> sammRegion;
164 label patchLabel = patchLabels[sammRegion];
166 boundaryFile >> configNumber;
167 boundaryFile >> patchType;
182 boundary_[patchLabel][nPatchFaces[patchLabel]]
183 =
face(pointLabelsTri);
187 boundary_[patchLabel][nPatchFaces[patchLabel]]
192 nPatchFaces[patchLabel]++;
195 forAll(boundary_, patchLabel)
197 word patchType = patchTypes_[patchLabel];
199 if (patchType ==
"SYMP")
201 patchTypes_[patchLabel] = symmetryPolyPatch::typeName;
203 else if (patchType ==
"WALL")
205 patchTypes_[patchLabel] = wallPolyPatch::typeName;
207 else if (patchType ==
"CYCL")
211 patchTypes_[patchLabel] = cyclicPolyPatch::typeName;
215 patchTypes_[patchLabel] = polyPatch::typeName;
218 Info<<
"Foam patch " << patchLabel
219 <<
" is of type " << patchTypes_[patchLabel]
220 <<
" with name " << patchNames_[patchLabel] <<
endl;
226 <<
"No boundary faces in file "
231 patchPhysicalTypes_.setSize(patchTypes_.size());