cfx4ToFoam.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Application
25  cfx4ToFoam
26 
27 Description
28  Converts a CFX 4 mesh to OpenFOAM format.
29 
30 \*---------------------------------------------------------------------------*/
31 
32 #include "argList.H"
33 #include "Time.H"
34 #include "IFstream.H"
35 #include "hexBlock.H"
36 #include "polyMesh.H"
37 #include "wallPolyPatch.H"
38 #include "symmetryPolyPatch.H"
39 #include "preservePatchTypes.H"
40 #include "cellShape.H"
41 #include "cellModeller.H"
42 
43 using namespace Foam;
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 int main(int argc, char *argv[])
48 {
50  argList::validArgs.append("CFX geom file");
52  (
53  "scale",
54  "factor",
55  "geometry scaling factor - default is 1"
56  );
57 
58  argList args(argc, argv);
59 
60  if (!args.check())
61  {
62  FatalError.exit();
63  }
64 
65  const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
66 
67  #include "createTime.H"
68 
69  IFstream cfxFile(args[1]);
70 
71  // Read the cfx information using a fixed format reader.
72  // Comments in the file are in C++ style, so the stream parser will remove
73  // them with no intervention
74  label nblock, npatch, nglue, nelem, npoint;
75 
76  cfxFile >> nblock >> npatch >> nglue >> nelem >> npoint;
77 
78  Info<< "Reading blocks" << endl;
79 
80  PtrList<hexBlock> blocks(nblock);
81 
82  {
83  word blockName;
84  label nx, ny, nz;
85 
86  forAll(blocks, blockI)
87  {
88  cfxFile >> blockName;
89  cfxFile >> nx >> ny >> nz;
90 
91  blocks.set(blockI, new hexBlock(nx, ny, nz));
92  }
93  }
94 
95  Info<< "Reading patch definitions" << endl;
96 
97  wordList cfxPatchTypes(npatch);
98  wordList cfxPatchNames(npatch);
99  labelList patchMasterBlocks(npatch);
100  labelList patchDirections(npatch);
101  labelListList patchRanges(npatch);
102 
103  {
104  label no, blkNo, patchLabel;
105 
106  forAll(cfxPatchTypes, patchi)
107  {
108  // Grab patch type and name
109  cfxFile >> cfxPatchTypes[patchi] >> cfxPatchNames[patchi] >> no;
110 
111  // Grab patch range
112  patchRanges[patchi].setSize(6);
113  labelList& curRange = patchRanges[patchi];
114 
115  forAll(curRange, rI)
116  {
117  cfxFile >> curRange[rI];
118  }
119 
120  // Grab patch direction and master block ID
121  // Note: direc is the direction, from the cfx manual
122  // 0 = solid (3-D patch),
123  // 1 = high i, 2 = high j, 3 = high k
124  // 4 = low i, 5 = low j, 6 = low k
125  cfxFile >> patchDirections[patchi] >> blkNo >> patchLabel;
126 
127  patchMasterBlocks[patchi] = blkNo - 1;
128  }
129  }
130 
131  Info<< "Reading block glueing information" << endl;
132 
133  labelList glueMasterPatches(nglue, -1);
134  labelList glueSlavePatches(nglue, -1);
135 
136  {
137  label masterPatch, slavePatch;
138  label dirIndex1, dirIndex2, dirIndex3, joinNumber;
139 
140  for (label glueI = 0; glueI < nglue; glueI++)
141  {
142  cfxFile >> masterPatch >> slavePatch;
143  cfxFile >> dirIndex1 >> dirIndex2 >> dirIndex3 >> joinNumber;
144 
145  glueMasterPatches[glueI] = masterPatch - 1;
146  glueSlavePatches[glueI] = slavePatch - 1;
147  }
148  }
149 
150  Info<< "Reading block points" << endl;
151 
152  forAll(blocks, blockI)
153  {
154  Info<< "block " << blockI << " is a ";
155  blocks[blockI].readPoints(cfxFile);
156  }
157 
158  Info<< "Calculating block offsets" << endl;
159 
160  labelList blockOffsets(nblock, -1);
161 
162  blockOffsets[0] = 0;
163 
164  label nMeshPoints = blocks[0].nBlockPoints();
165  label nMeshCells = blocks[0].nBlockCells();
166 
167  for (label blockI = 1; blockI < nblock; blockI++)
168  {
169  nMeshPoints += blocks[blockI].nBlockPoints();
170  nMeshCells += blocks[blockI].nBlockCells();
171 
172  blockOffsets[blockI] =
173  blockOffsets[blockI - 1]
174  + blocks[blockI - 1].nBlockPoints();
175  }
176 
177  Info<< "Assembling patches" << endl;
178 
179  faceListList rawPatches(npatch);
180 
181  forAll(rawPatches, patchi)
182  {
183  const word& patchType = cfxPatchTypes[patchi];
184 
185  // reject volume patches
186  if
187  (
188  patchType == "POROUS" || patchType == "SOLID"
189  || patchType == "SOLCON" || patchType == "USER3D"
190  )
191  {
192  patchMasterBlocks[patchi] = -1;
193  rawPatches[patchi].setSize(0);
194  }
195  else
196  {
197  // read and create a 2-D patch
198  rawPatches[patchi] =
199  blocks[patchMasterBlocks[patchi]].patchFaces
200  (
201  patchDirections[patchi],
202  patchRanges[patchi]
203  );
204 
205  }
206  }
207 
208  Info<< "Merging points ";
209 
210  labelList pointMergeList(nMeshPoints, -1);
211 
212  // In order to ensure robust merging, it is necessary to traverse
213  // the patch glueing list until the pointMergeList stops changing.
214  //
215 
216  // For efficiency, create merge pairs in the first pass
217  labelListListList glueMergePairs(glueMasterPatches.size());
218 
219  forAll(glueMasterPatches, glueI)
220  {
221  const label masterPatch = glueMasterPatches[glueI];
222  const label slavePatch = glueSlavePatches[glueI];
223 
224  const label blockPlabel = patchMasterBlocks[masterPatch];
225  const label blockNlabel = patchMasterBlocks[slavePatch];
226 
227  const pointField& blockPpoints = blocks[blockPlabel].points();
228  const pointField& blockNpoints = blocks[blockNlabel].points();
229 
230  const faceList& blockPFaces = rawPatches[masterPatch];
231  const faceList& blockNFaces = rawPatches[slavePatch];
232 
233  labelListList& curPairs = glueMergePairs[glueI];
234  curPairs.setSize(blockPFaces.size());
235 
236  if (blockPFaces.size() != blockNFaces.size())
237  {
239  << "Inconsistent number of faces for glue pair "
240  << glueI << " between blocks " << blockPlabel + 1
241  << " and " << blockNlabel + 1
242  << abort(FatalError);
243  }
244 
245  // Calculate sqr of the merge tolerance as 1/10th of the min
246  // sqr point to point distance on the block face. This is an
247  // N^2 algorithm, sorry but I cannot quickly come up with
248  // something better.
249 
250  scalar sqrMergeTol = GREAT;
251 
252  forAll(blockPFaces, blockPFaceLabel)
253  {
254  const labelList& blockPFacePoints =
255  blockPFaces[blockPFaceLabel];
256 
257  forAll(blockPFacePoints, blockPFacePointi)
258  {
259  forAll(blockPFacePoints, blockPFacePointi2)
260  {
261  if (blockPFacePointi != blockPFacePointi2)
262  {
263  sqrMergeTol =
264  min
265  (
266  sqrMergeTol,
267  magSqr
268  (
269  blockPpoints
270  [blockPFacePoints[blockPFacePointi]]
271  - blockPpoints
272  [blockPFacePoints[blockPFacePointi2]]
273  )
274  );
275  }
276  }
277  }
278  }
279 
280  sqrMergeTol /= 10.0;
281 
282  bool found = false;
283 
284  // N-squared point search over all points of all faces of
285  // master block over all point of all faces of slave block
286  forAll(blockPFaces, blockPFaceLabel)
287  {
288  const labelList& blockPFacePoints =
289  blockPFaces[blockPFaceLabel];
290 
291  labelList& cp = curPairs[blockPFaceLabel];
292  cp.setSize(blockPFacePoints.size());
293 
294  forAll(blockPFacePoints, blockPFacePointi)
295  {
296  found = false;
297 
298  forAll(blockNFaces, blockNFaceLabel)
299  {
300  const labelList& blockNFacePoints =
301  blockNFaces[blockNFaceLabel];
302 
303  forAll(blockNFacePoints, blockNFacePointi)
304  {
305  if
306  (
307  magSqr
308  (
309  blockPpoints
310  [blockPFacePoints[blockPFacePointi]]
311  - blockNpoints
312  [blockNFacePoints[blockNFacePointi]]
313  )
314  < sqrMergeTol
315  )
316  {
317  // Found a new pair
318  found = true;
319 
320  cp[blockPFacePointi] =
321  blockNFacePoints[blockNFacePointi];
322 
323  label PpointLabel =
324  blockPFacePoints[blockPFacePointi]
325  + blockOffsets[blockPlabel];
326 
327  label NpointLabel =
328  blockNFacePoints[blockNFacePointi]
329  + blockOffsets[blockNlabel];
330 
331  label minPN = min(PpointLabel, NpointLabel);
332 
333  if (pointMergeList[PpointLabel] != -1)
334  {
335  minPN = min(minPN, pointMergeList[PpointLabel]);
336  }
337 
338  if (pointMergeList[NpointLabel] != -1)
339  {
340  minPN = min(minPN, pointMergeList[NpointLabel]);
341  }
342 
343  pointMergeList[PpointLabel]
344  = pointMergeList[NpointLabel]
345  = minPN;
346 
347  break;
348  }
349  }
350  if (found) break;
351  }
352  }
353  }
354  }
355 
356 
357  bool changedPointMerge = false;
358  label nPasses = 0;
359 
360  do
361  {
362  changedPointMerge = false;
363  nPasses++;
364 
365  forAll(glueMasterPatches, glueI)
366  {
367  const label masterPatch = glueMasterPatches[glueI];
368  const label slavePatch = glueSlavePatches[glueI];
369 
370  const label blockPlabel = patchMasterBlocks[masterPatch];
371  const label blockNlabel = patchMasterBlocks[slavePatch];
372 
373  const faceList& blockPFaces = rawPatches[masterPatch];
374 
375  const labelListList& curPairs = glueMergePairs[glueI];
376 
377  forAll(blockPFaces, blockPFaceLabel)
378  {
379  const labelList& blockPFacePoints =
380  blockPFaces[blockPFaceLabel];
381 
382  const labelList& cp = curPairs[blockPFaceLabel];
383 
384  forAll(cp, blockPFacePointi)
385  {
386  label PpointLabel =
387  blockPFacePoints[blockPFacePointi]
388  + blockOffsets[blockPlabel];
389 
390  label NpointLabel =
391  cp[blockPFacePointi]
392  + blockOffsets[blockNlabel];
393 
394  if
395  (
396  pointMergeList[PpointLabel]
397  != pointMergeList[NpointLabel]
398  )
399  {
400  changedPointMerge = true;
401 
402  pointMergeList[PpointLabel]
403  = pointMergeList[NpointLabel]
404  = min
405  (
406  pointMergeList[PpointLabel],
407  pointMergeList[NpointLabel]
408  );
409  }
410  }
411  }
412  }
413  Info<< "." << flush;
414  }
415  while (changedPointMerge && nPasses < 8);
416  Info<< endl;
417 
418  if (changedPointMerge == true)
419  {
421  << "Point merging failed after max number of passes."
422  << abort(FatalError);
423  }
424 
425 
426  forAll(glueMasterPatches, glueI)
427  {
428  const label masterPatch = glueMasterPatches[glueI];
429  const label slavePatch = glueSlavePatches[glueI];
430 
431  const label blockPlabel = patchMasterBlocks[masterPatch];
432  const label blockNlabel = patchMasterBlocks[slavePatch];
433 
434  const faceList& blockPFaces = rawPatches[masterPatch];
435  const faceList& blockNFaces = rawPatches[slavePatch];
436 
437 
438  forAll(blockPFaces, blockPFaceLabel)
439  {
440  const labelList& blockPFacePoints
441  = blockPFaces[blockPFaceLabel];
442 
443  forAll(blockPFacePoints, blockPFacePointi)
444  {
445  label PpointLabel =
446  blockPFacePoints[blockPFacePointi]
447  + blockOffsets[blockPlabel];
448 
449  if (pointMergeList[PpointLabel] == -1)
450  {
452  << "Unable to merge point " << blockPFacePointi
453  << " of face " << blockPFaceLabel
454  << " of block " << blockPlabel
455  << abort(FatalError);
456  }
457  }
458  }
459 
460  forAll(blockNFaces, blockNFaceLabel)
461  {
462  const labelList& blockNFacePoints
463  = blockNFaces[blockNFaceLabel];
464 
465  forAll(blockNFacePoints, blockNFacePointi)
466  {
467  label NpointLabel =
468  blockNFacePoints[blockNFacePointi]
469  + blockOffsets[blockNlabel];
470 
471  if (pointMergeList[NpointLabel] == -1)
472  {
474  << "Unable to merge point " << blockNFacePointi
475  << " of face " << blockNFaceLabel
476  << " of block " << blockNlabel
477  << abort(FatalError);
478  }
479  }
480  }
481  }
482 
483 
484  // sort merge list to return new point label (in new shorter list)
485  // given old point label
486  label nNewPoints = 0;
487 
488  forAll(pointMergeList, pointLabel)
489  {
490  if (pointMergeList[pointLabel] > pointLabel)
491  {
493  << "ouch" << abort(FatalError);
494  }
495 
496  if
497  (
498  (pointMergeList[pointLabel] == -1)
499  || pointMergeList[pointLabel] == pointLabel
500  )
501  {
502  pointMergeList[pointLabel] = nNewPoints;
503  nNewPoints++;
504  }
505  else
506  {
507  pointMergeList[pointLabel] =
508  pointMergeList[pointMergeList[pointLabel]];
509  }
510  }
511 
512  nMeshPoints = nNewPoints;
513 
514  Info<< "Creating points" << endl;
515 
516  pointField points(nMeshPoints);
517 
518  forAll(blocks, blockI)
519  {
520  const pointField& blockPoints = blocks[blockI].points();
521 
522  forAll(blockPoints, blockPointLabel)
523  {
524  points
525  [
526  pointMergeList
527  [
528  blockPointLabel
529  + blockOffsets[blockI]
530  ]
531  ] = blockPoints[blockPointLabel];
532  }
533  }
534 
535  // Scale the points
536  if (scaleFactor > 1.0 + SMALL || scaleFactor < 1.0 - SMALL)
537  {
538  points *= scaleFactor;
539  }
540 
541  Info<< "Creating cells" << endl;
542 
543  cellShapeList cellShapes(nMeshCells);
544 
545  const cellModel& hex = *(cellModeller::lookup("hex"));
546 
547  label nCreatedCells = 0;
548 
549  forAll(blocks, blockI)
550  {
551  labelListList curBlockCells = blocks[blockI].blockCells();
552 
553  forAll(curBlockCells, blockCelli)
554  {
555  labelList cellPoints(curBlockCells[blockCelli].size());
556 
557  forAll(cellPoints, pointi)
558  {
559  cellPoints[pointi] =
560  pointMergeList
561  [
562  curBlockCells[blockCelli][pointi]
563  + blockOffsets[blockI]
564  ];
565  }
566 
567  cellShapes[nCreatedCells] = cellShape(hex, cellPoints);
568 
569  nCreatedCells++;
570  }
571  }
572 
573  Info<< "Creating boundary patches" << endl;
574 
575  faceListList boundary(npatch);
576  wordList patchNames(npatch);
577  wordList patchTypes(npatch);
578  word defaultFacesName = "defaultFaces";
579  word defaultFacesType = wallPolyPatch::typeName;
580 
581  label nCreatedPatches = 0;
582 
583  forAll(rawPatches, patchi)
584  {
585  if (rawPatches[patchi].size() && cfxPatchTypes[patchi] != "BLKBDY")
586  {
587  // Check if this name has been already created
588  label existingPatch = -1;
589 
590  for (label oldPatchi = 0; oldPatchi < nCreatedPatches; oldPatchi++)
591  {
592  if (patchNames[oldPatchi] == cfxPatchNames[patchi])
593  {
594  existingPatch = oldPatchi;
595  break;
596  }
597  }
598 
599  const faceList& curRawPatch = rawPatches[patchi];
600  label curBlock = patchMasterBlocks[patchi];
601 
602  if (existingPatch >= 0)
603  {
604  Info<< "CFX patch " << patchi
605  << ", of type " << cfxPatchTypes[patchi]
606  << ", name " << cfxPatchNames[patchi]
607  << " already exists as OpenFOAM patch " << existingPatch
608  << ". Adding faces." << endl;
609 
610  faceList& renumberedPatch = boundary[existingPatch];
611  label oldSize = renumberedPatch.size();
612  renumberedPatch.setSize(oldSize + curRawPatch.size());
613 
614  forAll(curRawPatch, facei)
615  {
616  const face& oldFace = curRawPatch[facei];
617 
618  face& newFace = renumberedPatch[oldSize + facei];
619  newFace.setSize(oldFace.size());
620 
621  forAll(oldFace, pointi)
622  {
623  newFace[pointi] =
624  pointMergeList
625  [
626  oldFace[pointi]
627  + blockOffsets[curBlock]
628  ];
629  }
630  }
631  }
632  else
633  {
634  // Real patch to be created
635  faceList& renumberedPatch = boundary[nCreatedPatches];
636  renumberedPatch.setSize(curRawPatch.size());
637 
638  forAll(curRawPatch, facei)
639  {
640  const face& oldFace = curRawPatch[facei];
641 
642  face& newFace = renumberedPatch[facei];
643  newFace.setSize(oldFace.size());
644 
645  forAll(oldFace, pointi)
646  {
647  newFace[pointi] =
648  pointMergeList
649  [
650  oldFace[pointi]
651  + blockOffsets[curBlock]
652  ];
653  }
654  }
655 
656  Info<< "CFX patch " << patchi
657  << ", of type " << cfxPatchTypes[patchi]
658  << ", name " << cfxPatchNames[patchi]
659  << " converted into OpenFOAM patch " << nCreatedPatches
660  << " type ";
661 
662  if (cfxPatchTypes[patchi] == "WALL")
663  {
664  Info<< "wall." << endl;
665 
666  patchTypes[nCreatedPatches] = wallPolyPatch::typeName;
667  patchNames[nCreatedPatches] = cfxPatchNames[patchi];
668  nCreatedPatches++;
669  }
670  else if (cfxPatchTypes[patchi] == "SYMMET")
671  {
672  Info<< "symmetryPlane." << endl;
673 
674  patchTypes[nCreatedPatches] = symmetryPolyPatch::typeName;
675  patchNames[nCreatedPatches] = cfxPatchNames[patchi];
676  nCreatedPatches++;
677  }
678  else if
679  (
680  cfxPatchTypes[patchi] == "INLET"
681  || cfxPatchTypes[patchi] == "OUTLET"
682  || cfxPatchTypes[patchi] == "PRESS"
683  || cfxPatchTypes[patchi] == "CNDBDY"
684  || cfxPatchTypes[patchi] == "USER2D"
685  )
686  {
687  Info<< "generic." << endl;
688 
689  patchTypes[nCreatedPatches] = polyPatch::typeName;
690  patchNames[nCreatedPatches] = cfxPatchNames[patchi];
691  nCreatedPatches++;
692  }
693  else
694  {
696  << "Unrecognised CFX patch type "
697  << cfxPatchTypes[patchi]
698  << abort(FatalError);
699  }
700  }
701  }
702  }
703 
704  boundary.setSize(nCreatedPatches);
705  patchTypes.setSize(nCreatedPatches);
706  patchNames.setSize(nCreatedPatches);
707 
709 
711  (
712  runTime,
713  runTime.constant(),
715  patchNames,
716  patchDicts,
719  );
720 
721  // Add information to dictionary
722  forAll(patchNames, patchi)
723  {
724  if (!patchDicts.set(patchi))
725  {
726  patchDicts.set(patchi, new dictionary());
727  }
728  // Add but not overwrite
729  patchDicts[patchi].add("type", patchTypes[patchi], false);
730  }
731 
733  (
734  IOobject
735  (
737  runTime.constant(),
738  runTime
739  ),
740  xferMove(points),
741  cellShapes,
742  boundary,
743  patchNames,
744  patchDicts,
747  );
748 
749  // Set the precision of the points data to 10
751 
752  Info<< "Writing polyMesh" << endl;
753  pShapeMesh.write();
754 
755  Info<< "End\n" << endl;
756 
757  return 0;
758 }
759 
760 
761 // ************************************************************************* //
word defaultFacesType
Definition: readKivaGrid.H:461
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:428
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
static const cellModel * lookup(const word &)
Look up a model by name and return a pointer to the model or nullptr.
Definition: cellModeller.C:88
A face is a list of labels corresponding to mesh vertices.
Definition: face.H:75
error FatalError
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:319
An analytical geometric cellShape.
Definition: cellShape.H:69
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
Definition: polyMesh.H:312
static unsigned int defaultPrecision()
Return the default precision.
Definition: IOstream.H:461
void size(const label)
Override size to be inconsistent with allocated storage.
Definition: ListI.H:163
wordList patchTypes(nPatches)
static word defaultRegion
Return the default region name.
Definition: polyMesh.H:309
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
static void noParallel()
Remove the parallel options.
Definition: argList.C:148
static SLList< string > validArgs
A list of valid (mandatory) arguments.
Definition: argList.H:154
void exit(const int errNo=1)
Exit : can be called for any error to exit program.
Definition: error.C:168
T optionLookupOrDefault(const word &opt, const T &deflt) const
Read a value from the named option if present.
Definition: argListI.H:237
const pointField & points
Xfer< T > xferMove(T &)
Construct by transferring the contents of the arg.
polyMesh pShapeMesh(IOobject(polyMesh::defaultRegion, runTime.constant(), runTime), xferMove(points), cellShapes, boundary, patchNames, patchDicts, defaultFacesName, defaultFacesType)
A class for handling words, derived from string.
Definition: word.H:59
const cellShapeList & cellShapes
Extract command arguments and options from the supplied argc and argv parameters. ...
Definition: argList.H:102
wordList patchNames(nPatches)
static void addOption(const word &opt, const string &param="", const string &usage="")
Add to an option to validOptions with usage information.
Definition: argList.C:95
faceListList boundary(nPatches)
errorManip< error > abort(error &err)
Definition: errorManip.H:131
preservePatchTypes
dimensioned< scalar > magSqr(const dimensioned< Type > &)
Input from file stream.
Definition: IFstream.H:81
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
word defaultFacesName
Definition: readKivaGrid.H:460
void preservePatchTypes(const objectRegistry &obr, const word &meshInstance, const fileName &meshDir, const wordList &patchNames, PtrList< dictionary > &patchDicts, const word &defaultFacesName, word &defaultFacesType)
Preserve patch types.
void setSize(const label)
Reset size of List.
Definition: List.C:281
label patchi
Ostream & flush(Ostream &os)
Flush stream.
Definition: Ostream.H:245
Hex block definition used in the cfx converter.
Definition: hexBlock.H:50
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:63
Maps a geometry to a set of cell primitives, which enables geometric cell data to be calculated witho...
Definition: cellModel.H:64
messageStream Info
bool check(bool checkArgs=true, bool checkOpts=true) const
Check argument list.
Definition: argList.C:1246
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
PtrList< dictionary > patchDicts
Definition: readKivaGrid.H:537
virtual bool write(const bool valid=true) const
Write using setting from DB.
Foam::argList args(argc, argv)
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
Namespace for OpenFOAM.