90 int main(
int argc,
char *argv[])
106 scalar scaleFactor = 1.0;
111 scalar twoDThickness = -1;
114 Info<<
"Reading 2D case by extruding points by " << twoDThickness
115 <<
" in z direction." <<
nl <<
endl;
134 plot3dFile >> nblock;
137 Info<<
"Reading " << nblock <<
" blocks" <<
endl;
146 if (twoDThickness > 0)
149 plot3dFile >> nx >> ny;
154 plot3dFile >> nx >> ny >> nz;
157 Info<<
"block " << blockI <<
" nx:" << nx
158 <<
" ny:" << ny <<
" nz:" << nz <<
endl;
160 blocks.set(blockI,
new hexBlock(nx, ny, nz));
164 Info<<
"Reading block points" <<
endl;
170 Info<<
"block " << blockI <<
":" <<
nl;
171 blocks[blockI].readPoints(readBlank, twoDThickness, plot3dFile);
172 sumPoints += blocks[blockI].nBlockPoints();
173 nMeshCells += blocks[blockI].nBlockCells();
182 const pointField& blockPoints = blocks[blockI].points();
183 blockOffsets[blockI] = sumPoints;
186 points[sumPoints++] = blockPoints[i];
204 Info<<
"Merged points within " << SMALL <<
" distance. Merged from "
205 << oldToNew.
size() <<
" down to " << newPoints.
size()
206 <<
" points." <<
endl;
209 if (scaleFactor > 1.0 + SMALL || scaleFactor < 1.0 - SMALL)
211 newPoints *= scaleFactor;
220 label nCreatedCells = 0;
226 forAll (curBlockCells, blockCellI)
228 labelList cellPoints(curBlockCells[blockCellI].size());
230 forAll (cellPoints, pointI)
235 curBlockCells[blockCellI][pointI]
236 + blockOffsets[blockI]
247 Info<<
"Creating boundary patches" <<
endl;