scotchDecomp.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-2015 OpenFOAM Foundation
6  \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
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  From scotch forum:
25 
26  By: Francois PELLEGRINI RE: Graph mapping 'strategy' string [ reply ]
27  2008-08-22 10:09 Strategy handling in Scotch is a bit tricky. In order
28  not to be confused, you must have a clear view of how they are built.
29  Here are some rules:
30 
31  1- Strategies are made up of "methods" which are combined by means of
32  "operators".
33 
34  2- A method is of the form "m{param=value,param=value,...}", where "m"
35  is a single character (this is your first error: "f" is a method name,
36  not a parameter name).
37 
38  3- There exist different sort of strategies : bipartitioning strategies,
39  mapping strategies, ordering strategies, which cannot be mixed. For
40  instance, you cannot build a bipartitioning strategy and feed it to a
41  mapping method (this is your second error).
42 
43  To use the "mapCompute" routine, you must create a mapping strategy, not
44  a bipartitioning one, and so use stratGraphMap() and not
45  stratGraphBipart(). Your mapping strategy should however be based on the
46  "recursive bipartitioning" method ("b"). For instance, a simple (and
47  hence not very efficient) mapping strategy can be :
48 
49  "b{sep=f}"
50 
51  which computes mappings with the recursive bipartitioning method "b",
52  this latter using the Fiduccia-Mattheyses method "f" to compute its
53  separators.
54 
55  If you want an exact partition (see your previous post), try
56  "b{sep=fx}".
57 
58  However, these strategies are not the most efficient, as they do not
59  make use of the multi-level framework.
60 
61  To use the multi-level framework, try for instance:
62 
63  "b{sep=m{vert=100,low=h,asc=f}x}"
64 
65  The current default mapping strategy in Scotch can be seen by using the
66  "-vs" option of program gmap. It is, to date:
67 
68  m
69  {
70  asc=b
71  {
72  width=3,
73  bnd=d{pass=40, dif=1, rem=0}
74  f{move=80, pass=-1, bal=0.01},
75  org=f{move=80,pass=-1,bal=0.01}
76  },
77  low=r
78  {
79  job=t,
80  bal=0.01,
81  map=t,
82  poli=S,
83  sep=
84  (
85  m
86  {
87  asc=b
88  {
89  bnd=f{move=120, pass=-1, bal=0.01, type=b},
90  org=f{move=120,pass=-1,bal=0.01,type=b},
91  width=3
92  },
93  low=h{pass=10}
94  f{move=120,pass=-1,bal=0.01,type=b},
95  vert=120,
96  rat=0.8
97  }
98  |m
99  {
100  asc=b
101  {
102  bnd=f{move=120,pass=-1,bal=0.01,type=b},
103  org=f{move=120,pass=-1,bal=0.01,type=b},
104  width=3
105  },
106  low=h{pass=10}
107  f{move=120,pass=-1,bal=0.01,type=b},
108  vert=120,
109  rat=0.8
110  }
111  )
112  },
113  vert=10000,
114  rat=0.8,
115  type=0
116  }
117 
118 
119  Note: instead of gmap run gpart <nProcs> -vs <grfFile>
120  where <grfFile> can be obtained by running with 'writeGraph=true'
121 
122 \*---------------------------------------------------------------------------*/
123 
124 #include "scotchDecomp.H"
126 #include "floatScalar.H"
127 #include "Time.H"
128 #include "OFstream.H"
129 #include "globalIndex.H"
130 #include "SubField.H"
131 
132 // Symbol to force loading at runtime
133 extern "C"
135 {}
136 
137 
138 extern "C"
139 {
140 #include "scotch.h"
141 }
142 
143 
144 // Hack: scotch generates floating point errors so need to switch of error
145 // trapping!
146 #ifdef __GLIBC__
147 # ifndef _GNU_SOURCE
148 # define _GNU_SOURCE
149 # endif
150 # include <fenv.h>
151 #endif
152 
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 namespace Foam
157 {
158  defineTypeNameAndDebug(scotchDecomp, 0);
159 
161  (
162  decompositionMethod,
163  scotchDecomp,
164  dictionary
165  );
166 }
167 
168 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
169 
170 void Foam::scotchDecomp::check(const int retVal, const char* str)
171 {
172  if (retVal)
173  {
175  << "Call to scotch routine " << str << " failed."
176  << exit(FatalError);
177  }
178 }
179 
180 
182 (
183  const fileName& meshPath,
184  const List<label>& adjncy,
185  const List<label>& xadj,
186  const scalarField& cWeights,
187 
188  List<label>& finalDecomp
189 )
190 {
191  if (!Pstream::parRun())
192  {
193  decomposeOneProc
194  (
195  meshPath,
196  adjncy,
197  xadj,
198  cWeights,
199  finalDecomp
200  );
201  }
202  else
203  {
204  if (debug)
205  {
206  Info<< "scotchDecomp : running in parallel."
207  << " Decomposing all of graph on master processor." << endl;
208  }
209  globalIndex globalCells(xadj.size()-1);
210  label nTotalConnections = returnReduce(adjncy.size(), sumOp<label>());
211 
212  // Send all to master. Use scheduled to save some storage.
213  if (Pstream::master())
214  {
215  Field<label> allAdjncy(nTotalConnections);
216  Field<label> allXadj(globalCells.size()+1);
217  scalarField allWeights(globalCells.size());
218 
219  // Insert my own
220  label nTotalCells = 0;
221  forAll(cWeights, cellI)
222  {
223  allXadj[nTotalCells] = xadj[cellI];
224  allWeights[nTotalCells++] = cWeights[cellI];
225  }
226  nTotalConnections = 0;
227  forAll(adjncy, i)
228  {
229  allAdjncy[nTotalConnections++] = adjncy[i];
230  }
231 
232  for (int slave=1; slave<Pstream::nProcs(); slave++)
233  {
234  IPstream fromSlave(Pstream::scheduled, slave);
235  Field<label> nbrAdjncy(fromSlave);
236  Field<label> nbrXadj(fromSlave);
237  scalarField nbrWeights(fromSlave);
238 
239  // Append.
240  //label procStart = nTotalCells;
241  forAll(nbrXadj, cellI)
242  {
243  allXadj[nTotalCells] = nTotalConnections+nbrXadj[cellI];
244  allWeights[nTotalCells++] = nbrWeights[cellI];
245  }
246  // No need to renumber xadj since already global.
247  forAll(nbrAdjncy, i)
248  {
249  allAdjncy[nTotalConnections++] = nbrAdjncy[i];
250  }
251  }
252  allXadj[nTotalCells] = nTotalConnections;
253 
254 
255  Field<label> allFinalDecomp;
256  decomposeOneProc
257  (
258  meshPath,
259  allAdjncy,
260  allXadj,
261  allWeights,
262  allFinalDecomp
263  );
264 
265 
266  // Send allFinalDecomp back
267  for (int slave=1; slave<Pstream::nProcs(); slave++)
268  {
269  OPstream toSlave(Pstream::scheduled, slave);
270  toSlave << SubField<label>
271  (
272  allFinalDecomp,
273  globalCells.localSize(slave),
274  globalCells.offset(slave)
275  );
276  }
277  // Get my own part (always first)
278  finalDecomp = SubField<label>
279  (
280  allFinalDecomp,
281  globalCells.localSize()
282  );
283  }
284  else
285  {
286  // Send my part of the graph (already in global numbering)
287  {
288  OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
289  toMaster<< adjncy << SubField<label>(xadj, xadj.size()-1)
290  << cWeights;
291  }
292 
293  // Receive back decomposition
294  IPstream fromMaster(Pstream::scheduled, Pstream::masterNo());
295  fromMaster >> finalDecomp;
296  }
297  }
298  return 0;
299 }
300 
301 
302 // Call scotch with options from dictionary.
304 (
305  const fileName& meshPath,
306  const List<label>& adjncy,
307  const List<label>& xadj,
308  const scalarField& cWeights,
309 
310  List<label>& finalDecomp
311 )
312 {
313  // Dump graph
314  if (decompositionDict_.found("scotchCoeffs"))
315  {
316  const dictionary& scotchCoeffs =
317  decompositionDict_.subDict("scotchCoeffs");
318 
319  if (scotchCoeffs.lookupOrDefault("writeGraph", false))
320  {
321  OFstream str(meshPath + ".grf");
322 
323  Info<< "Dumping Scotch graph file to " << str.name() << endl
324  << "Use this in combination with gpart." << endl;
325 
326  label version = 0;
327  str << version << nl;
328  // Numer of vertices
329  str << xadj.size()-1 << ' ' << adjncy.size() << nl;
330  // Numbering starts from 0
331  label baseval = 0;
332  // Has weights?
333  label hasEdgeWeights = 0;
334  label hasVertexWeights = 0;
335  label numericflag = 10*hasEdgeWeights+hasVertexWeights;
336  str << baseval << ' ' << numericflag << nl;
337  for (label cellI = 0; cellI < xadj.size()-1; cellI++)
338  {
339  label start = xadj[cellI];
340  label end = xadj[cellI+1];
341  str << end-start;
342 
343  for (label i = start; i < end; i++)
344  {
345  str << ' ' << adjncy[i];
346  }
347  str << nl;
348  }
349  }
350  }
351 
352 
353  // Strategy
354  // ~~~~~~~~
355 
356  // Default.
357  SCOTCH_Strat stradat;
358  check(SCOTCH_stratInit(&stradat), "SCOTCH_stratInit");
359 
360  if (decompositionDict_.found("scotchCoeffs"))
361  {
362  const dictionary& scotchCoeffs =
363  decompositionDict_.subDict("scotchCoeffs");
364 
365  string strategy;
366  if (scotchCoeffs.readIfPresent("strategy", strategy))
367  {
368  if (debug)
369  {
370  Info<< "scotchDecomp : Using strategy " << strategy << endl;
371  }
372  SCOTCH_stratGraphMap(&stradat, strategy.c_str());
373  //fprintf(stdout, "S\tStrat=");
374  //SCOTCH_stratSave(&stradat, stdout);
375  //fprintf(stdout, "\n");
376  }
377  }
378 
379 
380  // Graph
381  // ~~~~~
382 
383  List<label> velotab;
384 
385 
386  // Check for externally provided cellweights and if so initialise weights
387  // Note: min, not gMin since routine runs on master only.
388  scalar minWeights = min(cWeights);
389  if (!cWeights.empty())
390  {
391  if (minWeights <= 0)
392  {
394  << "Illegal minimum weight " << minWeights
395  << endl;
396  }
397 
398  if (cWeights.size() != xadj.size()-1)
399  {
401  << "Number of cell weights " << cWeights.size()
402  << " does not equal number of cells " << xadj.size()-1
403  << exit(FatalError);
404  }
405 
406  scalar velotabSum = sum(cWeights)/minWeights;
407 
408  scalar rangeScale(1.0);
409 
410  if (velotabSum > scalar(labelMax - 1))
411  {
412  // 0.9 factor of safety to avoid floating point round-off in
413  // rangeScale tipping the subsequent sum over the integer limit.
414  rangeScale = 0.9*scalar(labelMax - 1)/velotabSum;
415 
417  << "Sum of weights has overflowed integer: " << velotabSum
418  << ", compressing weight scale by a factor of " << rangeScale
419  << endl;
420  }
421 
422  // Convert to integers.
423  velotab.setSize(cWeights.size());
424 
425  forAll(velotab, i)
426  {
427  velotab[i] = int((cWeights[i]/minWeights - 1)*rangeScale) + 1;
428  }
429  }
430 
431 
432 
433  SCOTCH_Graph grafdat;
434  check(SCOTCH_graphInit(&grafdat), "SCOTCH_graphInit");
435  check
436  (
437  SCOTCH_graphBuild
438  (
439  &grafdat,
440  0, // baseval, c-style numbering
441  xadj.size()-1, // vertnbr, nCells
442  xadj.begin(), // verttab, start index per cell into adjncy
443  &xadj[1], // vendtab, end index ,,
444  velotab.begin(), // velotab, vertex weights
445  NULL, // vlbltab
446  adjncy.size(), // edgenbr, number of arcs
447  adjncy.begin(), // edgetab
448  NULL // edlotab, edge weights
449  ),
450  "SCOTCH_graphBuild"
451  );
452  check(SCOTCH_graphCheck(&grafdat), "SCOTCH_graphCheck");
453 
454 
455  // Architecture
456  // ~~~~~~~~~~~~
457  // (fully connected network topology since using switch)
458 
459  SCOTCH_Arch archdat;
460  check(SCOTCH_archInit(&archdat), "SCOTCH_archInit");
461 
462  List<label> processorWeights;
463  if (decompositionDict_.found("scotchCoeffs"))
464  {
465  const dictionary& scotchCoeffs =
466  decompositionDict_.subDict("scotchCoeffs");
467 
468  scotchCoeffs.readIfPresent("processorWeights", processorWeights);
469  }
470  if (processorWeights.size())
471  {
472  if (debug)
473  {
474  Info<< "scotchDecomp : Using procesor weights " << processorWeights
475  << endl;
476  }
477  check
478  (
479  SCOTCH_archCmpltw(&archdat, nProcessors_, processorWeights.begin()),
480  "SCOTCH_archCmpltw"
481  );
482  }
483  else
484  {
485  check
486  (
487  SCOTCH_archCmplt(&archdat, nProcessors_),
488  "SCOTCH_archCmplt"
489  );
490 
491 
492  //- Hack to test clustering. Note that finalDecomp is non-compact
493  // numbers!
494  //
496  //check
497  //(
498  // SCOTCH_archVcmplt(&archdat),
499  // "SCOTCH_archVcmplt"
500  //);
501  //
503  //SCOTCH_Num straval = 0;
506  //
509  //SCOTCH_Num agglomSize = 3;
510  //
512  //check
513  //(
514  // SCOTCH_stratGraphClusterBuild
515  // (
516  // &stradat, // strategy to build
517  // straval, // strategy flags
518  // agglomSize, // cells per cluster
519  // 1.0, // weight?
520  // 0.01 // max load imbalance
521  // ),
522  // "SCOTCH_stratGraphClusterBuild"
523  //);
524  }
525 
526 
527  //SCOTCH_Mapping mapdat;
528  //SCOTCH_graphMapInit(&grafdat, &mapdat, &archdat, NULL);
529  //SCOTCH_graphMapCompute(&grafdat, &mapdat, &stradat); /* Perform mapping */
530  //SCOTCH_graphMapExit(&grafdat, &mapdat);
531 
532 
533  // Hack:switch off fpu error trapping
534 # ifdef FE_NOMASK_ENV
535  int oldExcepts = fedisableexcept
536  (
537  FE_DIVBYZERO
538  | FE_INVALID
539  | FE_OVERFLOW
540  );
541 # endif
542 
543  finalDecomp.setSize(xadj.size()-1);
544  finalDecomp = 0;
545  check
546  (
547  SCOTCH_graphMap
548  (
549  &grafdat,
550  &archdat,
551  &stradat, // const SCOTCH_Strat *
552  finalDecomp.begin() // parttab
553  ),
554  "SCOTCH_graphMap"
555  );
556 
557 # ifdef FE_NOMASK_ENV
558  feenableexcept(oldExcepts);
559 # endif
560 
561 
562 
563  //finalDecomp.setSize(xadj.size()-1);
564  //check
565  //(
566  // SCOTCH_graphPart
567  // (
568  // &grafdat,
569  // nProcessors_, // partnbr
570  // &stradat, // const SCOTCH_Strat *
571  // finalDecomp.begin() // parttab
572  // ),
573  // "SCOTCH_graphPart"
574  //);
575 
576  // Release storage for graph
577  SCOTCH_graphExit(&grafdat);
578  // Release storage for strategy
579  SCOTCH_stratExit(&stradat);
580  // Release storage for network topology
581  SCOTCH_archExit(&archdat);
582 
583  return 0;
584 }
585 
586 
587 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
588 
589 Foam::scotchDecomp::scotchDecomp(const dictionary& decompositionDict)
590 :
591  decompositionMethod(decompositionDict)
592 {}
593 
594 
595 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
596 
598 (
599  const polyMesh& mesh,
600  const pointField& points,
601  const scalarField& pointWeights
602 )
603 {
604  if (points.size() != mesh.nCells())
605  {
607  << "Can use this decomposition method only for the whole mesh"
608  << endl
609  << "and supply one coordinate (cellCentre) for every cell." << endl
610  << "The number of coordinates " << points.size() << endl
611  << "The number of cells in the mesh " << mesh.nCells()
612  << exit(FatalError);
613  }
614 
615  // Calculate local or global (if Pstream::parRun()) connectivity
616  CompactListList<label> cellCells;
617  calcCellCells
618  (
619  mesh,
620  identity(mesh.nCells()),
621  mesh.nCells(),
622  true,
623  cellCells
624  );
625 
626  // Decompose using default weights
627  List<label> finalDecomp;
628  decompose
629  (
630  mesh.time().path()/mesh.name(),
631  cellCells.m(),
632  cellCells.offsets(),
633  pointWeights,
634  finalDecomp
635  );
636 
637  // Copy back to labelList
638  labelList decomp(finalDecomp.size());
639  forAll(decomp, i)
640  {
641  decomp[i] = finalDecomp[i];
642  }
643  return decomp;
644 }
645 
646 
648 (
649  const polyMesh& mesh,
650  const labelList& agglom,
651  const pointField& agglomPoints,
652  const scalarField& pointWeights
653 )
654 {
655  if (agglom.size() != mesh.nCells())
656  {
658  << "Size of cell-to-coarse map " << agglom.size()
659  << " differs from number of cells in mesh " << mesh.nCells()
660  << exit(FatalError);
661  }
662 
663  // Calculate local or global (if Pstream::parRun()) connectivity
664  CompactListList<label> cellCells;
665  calcCellCells
666  (
667  mesh,
668  agglom,
669  agglomPoints.size(),
670  true,
671  cellCells
672  );
673 
674  // Decompose using weights
675  List<label> finalDecomp;
676  decompose
677  (
678  mesh.time().path()/mesh.name(),
679  cellCells.m(),
680  cellCells.offsets(),
681  pointWeights,
682  finalDecomp
683  );
684 
685  // Rework back into decomposition for original mesh_
686  labelList fineDistribution(agglom.size());
687 
688  forAll(fineDistribution, i)
689  {
690  fineDistribution[i] = finalDecomp[agglom[i]];
691  }
692 
693  return fineDistribution;
694 }
695 
696 
698 (
699  const labelListList& globalCellCells,
700  const pointField& cellCentres,
701  const scalarField& cWeights
702 )
703 {
704  if (cellCentres.size() != globalCellCells.size())
705  {
707  << "Inconsistent number of cells (" << globalCellCells.size()
708  << ") and number of cell centres (" << cellCentres.size()
709  << ")." << exit(FatalError);
710  }
711 
712 
713  // Make Metis CSR (Compressed Storage Format) storage
714  // adjncy : contains neighbours (= edges in graph)
715  // xadj(celli) : start of information in adjncy for celli
716 
717  CompactListList<label> cellCells(globalCellCells);
718 
719  // Decompose using weights
720  List<label> finalDecomp;
721  decompose
722  (
723  "scotch",
724  cellCells.m(),
725  cellCells.offsets(),
726  cWeights,
727  finalDecomp
728  );
729 
730  // Copy back to labelList
731  labelList decomp(finalDecomp.size());
732  forAll(decomp, i)
733  {
734  decomp[i] = finalDecomp[i];
735  }
736  return decomp;
737 }
738 
739 
740 // ************************************************************************* //
Foam::pointField
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:42
Foam::scalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Definition: primitiveFieldsFwd.H:48
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
SubField.H
Foam::labelList
List< label > labelList
A List of labels.
Definition: labelList.H:56
Foam::returnReduce
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Definition: PstreamReduceOps.H:86
Foam::UPstream::scheduled
@ scheduled
Definition: UPstream.H:67
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:406
Foam::dictionary::readIfPresent
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
Definition: dictionaryTemplates.C:94
Foam::addToRunTimeSelectionTable
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
globalIndex.H
Foam::labelMax
static const label labelMax
Definition: label.H:62
Foam::UPstream::nProcs
static label nProcs(const label communicator=0)
Number of processes in parallel run.
Definition: UPstream.H:387
Foam::UPstream::parRun
static bool & parRun()
Is this a parallel run?
Definition: UPstream.H:377
Foam::dictionary::lookupOrDefault
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
Definition: dictionaryTemplates.C:33
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::scotchDecomp::decompose
label decompose(const fileName &meshPath, const List< label > &adjncy, const List< label > &xadj, const scalarField &cWeights, List< label > &finalDecomp)
Definition: dummyScotchDecomp.C:61
Foam::scotchDecomp::check
static void check(const int, const char *)
Check and print error message.
Definition: dummyScotchDecomp.C:56
OFstream.H
Foam::primitiveMesh::nCells
label nCells() const
Definition: primitiveMeshI.H:64
List::size
int size() const
Definition: ListI.H:83
Foam::label
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
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::nl
static const char nl
Definition: Ostream.H:260
Foam::Info
messageStream Info
scotchDecomp.H
Foam::UPstream::masterNo
static int masterNo()
Process index of the master.
Definition: UPstream.H:393
Foam::identity
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
Definition: ListOps.C:104
Foam::FatalError
error FatalError
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::HashTable::size
label size() const
Return number of elements in table.
Definition: HashTableI.H:65
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam::decompositionMethod
Abstract base class for decomposition.
Definition: decompositionMethod.H:48
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
Foam::OFstream
Output to file stream.
Definition: OFstream.H:81
Foam::UPstream::master
static bool master(const label communicator=0)
Am I the master process.
Definition: UPstream.H:399
Foam::List::setSize
void setSize(const label)
Reset size of List.
Foam::labelListList
List< labelList > labelListList
A List of labelList.
Definition: labelList.H:57
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:318
Foam::scotchDecomp::decomposeOneProc
label decomposeOneProc(const fileName &meshPath, const List< label > &adjncy, const List< label > &xadj, const scalarField &cWeights, List< label > &finalDecomp)
Decompose non-parallel.
Definition: scotchDecomp.C:304
Foam::Time::path
fileName path() const
Return path.
Definition: Time.H:281
Foam::List< label >
points
const pointField & points
Definition: gmvOutputHeader.H:1
Foam::sum
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
Definition: DimensionedFieldFunctions.C:333
floatScalar.H
Foam::fvMesh::time
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:243
List
Definition: Test.C:19
Foam::OFstream::name
const fileName & name() const
Return the name of the stream.
Definition: OFstream.H:118
Foam::List::size
void size(const label)
Override size to be inconsistent with allocated storage.
Foam::dictionary::subDict
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Definition: dictionary.C:631
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::min
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
WarningInFunction
#define WarningInFunction
Report a warning using Foam::Warning.
Definition: messageStream.H:259
Foam::scotchDecomp::scotchDecomp
scotchDecomp(const scotchDecomp &)
scotchDecompLoad
void scotchDecompLoad()
Definition: scotchDecomp.C:134
Foam::fvMesh::name
const word & name() const
Return reference to name.
Definition: fvMesh.H:257