MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / createPolyBoundary

Function createPolyBoundary

src/conversion/meshReader/createPolyBoundary.C:99–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
98
99void Foam::meshReader::createPolyBoundary()
100{
101 label nBoundaryFaces = 0;
102 label nMissingFaces = 0;
103 label nInterfaces = 0;
104
105 const faceListList& cFaces = cellFaces();
106
107 // determine number of non-patched faces:
108 forAll(cellPolys_, celli)
109 {
110 cell& curCell = cellPolys_[celli];
111
112 forAll(curCell, fI)
113 {
114 if (curCell[fI] < 0)
115 {
116 nMissingFaces++;
117 }
118 }
119 }
120
121 forAll(boundaryIds_, patchi)
122 {
123 nBoundaryFaces += boundaryIds_[patchi].size();
124 }
125
126 Info<< nl
127 << "There are " << nMissingFaces
128 << " faces to be patched and " << nBoundaryFaces
129 << " specified - collect missed boundaries to final patch" << endl;
130
131 patchStarts_.setSize(boundaryIds_.size());
132 patchSizes_.setSize(boundaryIds_.size());
133
134 label nCreatedFaces = nInternalFaces_;
135 label baffleOffset = cFaces.size();
136 interfaces_.setSize(baffleIds_.size());
137 nBoundaryFaces = 0;
138
139 forAll(boundaryIds_, patchi)
140 {
141 const List<cellFaceIdentifier>& idList = boundaryIds_[patchi];
142
143 patchStarts_[patchi] = nCreatedFaces;
144
145 // write each baffle side separately
146 if (patchPhysicalTypes_[patchi] == "baffle")
147 {
148 label count = 0;
149
150 for (label side = 0; side < 2; ++side)
151 {
152 label position = nInterfaces;
153
154 forAll(idList, bndI)
155 {
156 label baffleI = idList[bndI].cell - baffleOffset;

Callers 1

meshReader.CFile · 0.70

Calls 7

addPolyBoundaryFaceFunction · 0.85
forAllFunction · 0.50
sizeMethod · 0.45
setSizeMethod · 0.45
clearMethod · 0.45
insertMethod · 0.45
lastMethod · 0.45

Tested by

no test coverage detected