90 int main(
int argc,
char *argv[])
102 runTimeExtruded.constant(),
110 const word sourceType(dict.lookup(
"constructFrom"));
114 if (sourceType ==
"patch")
116 fileName sourceCasePath(dict.lookup(
"sourceCase"));
120 word patchName(dict.lookup(
"sourcePatch"));
122 Info<<
"Extruding patch " << patchName
123 <<
" on mesh " << sourceCasePath <<
nl
139 <<
"Cannot find patch " << patchName
140 <<
" in the source mesh.\n"
149 fileName surfName(runTime.path()/patchName +
".sMesh");
150 Info<<
"Writing patch as surfaceMesh to "
151 << surfName <<
nl <<
endl;
156 else if (sourceType ==
"surface")
159 fileName surfName(dict.lookup(
"surface"));
161 Info<<
"Extruding surfaceMesh read from file " << surfName <<
nl
168 Info<<
"Read patch from file " << surfName <<
nl
174 <<
"Illegal 'constructFrom' specification. Should either be "
178 Switch flipNormals(dict.lookup(
"flipNormals"));
187 faces[i] = fMesh()[i].reverseFace();
189 fMesh.reset(
new faceMesh(faces, fMesh().localPoints()));
193 Info<<
"Extruding patch with :" <<
nl
194 <<
" points : " << fMesh().points().size() <<
nl
195 <<
" faces : " << fMesh().size() <<
nl
196 <<
" normals[0] : " << fMesh().faceNormals()[0]
205 runTimeExtruded.constant(),
214 const vector span = bb.span();
215 const scalar mergeDim = 1
E-4 * bb.minDim();
217 Info<<
"Mesh bounding box : " << bb <<
nl
218 <<
" with span : " << span <<
nl
219 <<
"Merge distance : " << mergeDim <<
nl
224 const label origPatchID = patches.
findPatchID(
"originalPatch");
225 const label otherPatchID = patches.
findPatchID(
"otherSide");
227 if (origPatchID == -1 || otherPatchID == -1)
230 <<
"Cannot find patch originalPatch or otherSide." <<
nl
238 Info<<
"Collapsing edges < " << mergeDim <<
" ..." <<
nl <<
endl;
248 const edge&
e = edges[edgeI];
250 scalar
d = e.
mag(points);
254 Info<<
"Merging edge " << e <<
" since length " << d
255 <<
" << " << mergeDim <<
nl;
258 collapser.collapseEdge(edgeI, e[0]);
265 bool anyChange = collapser.setRefinement(meshMod);
276 if (map().hasMotionPoints())
287 Switch mergeFaces(dict.lookup(
"mergeFaces"));
290 Info<<
"Assuming full 360 degree axisymmetric case;"
291 <<
" stitching faces on patches "
292 << patches[origPatchID].
name() <<
" and "
293 << patches[otherPatchID].
name() <<
" together ..." <<
nl <<
endl;
299 labelList isf(patches[origPatchID].size());
303 isf[i] = patches[origPatchID].start() + i;
306 const word cutZoneName(
"originalCutFaceZone");
333 patches[origPatchID].
name(),
334 patches[otherPatchID].
name()