sampledTriSurface.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2026 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 \*---------------------------------------------------------------------------*/
25 
26 #include "sampledTriSurface.H"
27 #include "meshSearch.H"
28 #include "treeDataFace.H"
29 #include "pointInCell.H"
30 #include "OBJstream.H"
32 
33 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
34 
35 namespace Foam
36 {
37  namespace sampledSurfaces
38  {
40 
42  (
44  triSurface,
45  word
46  );
47 
49  (
51  triSurface,
52  word,
53  triSurfaceMesh,
54  "triSurfaceMesh"
55  );
56 
57  //- Private class for finding nearest
58  // Comprising:
59  // - global index
60  // - sqr(distance)
62 
64  {
65 
66  public:
67 
68  void operator()(nearInfo& x, const nearInfo& y) const
69  {
70  if (y.first() < x.first())
71  {
72  x = y;
73  }
74  }
75  };
76  }
77 }
78 
79 
80 const Foam::NamedEnum
81 <
83  3
85 {
86  "cells",
87  "insideCells",
88  "boundaryFaces"
89 };
90 
91 
92 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
93 
95 Foam::sampledSurfaces::triSurface::nonCoupledboundaryTree() const
96 {
97  // Variant of meshBoundarySearch::boundaryTree() that only does non-coupled
98  // boundary faces.
99 
100  if (!boundaryTreePtr_.valid())
101  {
102  // all non-coupled boundary faces (not just walls)
103  const polyBoundaryMesh& patches = mesh().boundary();
104 
105  labelList bndFaces(mesh().nFaces()-mesh().nInternalFaces());
106  label bndI = 0;
108  {
109  const polyPatch& pp = patches[patchi];
110  if (!pp.coupled())
111  {
112  forAll(pp, i)
113  {
114  bndFaces[bndI++] = pp.start()+i;
115  }
116  }
117  }
118  bndFaces.setSize(bndI);
119 
120 
121  treeBoundBox overallBb(mesh().points());
122  overallBb = overallBb.extend(1e-4);
123 
124  boundaryTreePtr_.reset
125  (
126  new indexedOctree<treeDataFace>
127  (
128  treeDataFace // all information needed to search faces
129  (
130  false, // do not cache bb
131  mesh(),
132  bndFaces // boundary faces only
133  ),
134  overallBb, // overall search domain
135  8, // maxLevel
136  10, // leafsize
137  3.0 // duplicity
138  )
139  );
140  }
141 
142  return boundaryTreePtr_();
143 }
144 
145 
146 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
147 
149 (
150  const word& name,
151  const polyMesh& mesh,
152  const word& surfaceName,
153  const samplingSource sampleSource
154 )
155 :
157  surface_
158  (
159  IOobject
160  (
161  surfaceName,
162  mesh.time().constant(),
163  searchableSurface::geometryDir(mesh.time()),
164  mesh,
165  IOobject::MUST_READ,
166  IOobject::NO_WRITE,
167  false
168  )
169  ),
170  sampleSource_(sampleSource),
171  needsUpdate_(true),
172  sampleElements_(0),
173  samplePoints_(0)
174 {}
175 
176 
178 (
179  const word& name,
180  const polyMesh& mesh,
181  const dictionary& dict
182 )
183 :
185  surface_
186  (
187  IOobject
188  (
189  dict.lookup("surface"),
190  mesh.time().constant(),
191  searchableSurface::geometryDir(mesh.time()),
192  mesh,
193  IOobject::MUST_READ,
194  IOobject::NO_WRITE,
195  false
196  )
197  ),
198  sampleSource_(samplingSourceNames_[dict.lookup("source")]),
199  needsUpdate_(true),
200  sampleElements_(0),
201  samplePoints_(0)
202 {}
203 
204 
206 (
207  const word& name,
208  const polyMesh& mesh,
209  const Foam::triSurface& surface,
210  const word& sampleSourceName
211 )
212 :
214  surface_
215  (
216  IOobject
217  (
218  name,
219  mesh.time().constant(),
220  searchableSurface::geometryDir(mesh.time()),
221  mesh,
222  IOobject::NO_READ,
223  IOobject::NO_WRITE,
224  false
225  ),
226  surface
227  ),
228  sampleSource_(samplingSourceNames_[sampleSourceName]),
229  needsUpdate_(true),
230  sampleElements_(0),
231  samplePoints_(0)
232 {}
233 
234 
235 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
236 
238 {}
239 
240 
241 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
242 
244 {
245  return needsUpdate_;
246 }
247 
248 
250 {
251  if (!needsUpdate_)
252  {
253  return false;
254  }
255 
256  // Find the cells the triangles of the surface are in.
257  // Does approximation by looking at the face centres only
258  const pointField& fc = surface_.faceCentres();
259 
260  List<nearInfo> nearest(fc.size());
261 
262  // Global numbering for cells/faces - only used to uniquely identify local
263  // elements
264  globalIndex globalCells
265  (
266  (sampleSource_ == cells || sampleSource_ == insideCells)
267  ? mesh().nCells()
268  : mesh().nFaces()
269  );
270 
271  forAll(nearest, i)
272  {
273  nearest[i].first() = great;
274  nearest[i].second() = labelMax;
275  }
276 
277  if (sampleSource_ == cells)
278  {
279  // Search for nearest cell
280 
281  const indexedOctree<treeDataCell>& cellTree =
283 
284  forAll(fc, triI)
285  {
287  cellTree.findNearest(fc[triI], sqr(great));
288 
289  if (nearInfo.hit())
290  {
291  nearest[triI].first() = magSqr(nearInfo.hitPoint()-fc[triI]);
292  nearest[triI].second() = globalCells.toGlobal(nearInfo.index());
293  }
294  }
295  }
296  else if (sampleSource_ == insideCells)
297  {
298  // Search for cell containing point
299 
300  const indexedOctree<treeDataCell>& cellTree =
302 
303  forAll(fc, triI)
304  {
305  if (cellTree.bb().contains(fc[triI]))
306  {
307  label index =
308  cellTree.findInside
309  (
310  fc[triI],
312  );
313 
314  if (index != -1)
315  {
316  nearest[triI].first() = 0.0;
317  nearest[triI].second() = globalCells.toGlobal(index);
318  }
319  }
320  }
321  }
322  else
323  {
324  // Search on all non-coupled boundary faces
325 
326  const indexedOctree<treeDataFace>& bTree = nonCoupledboundaryTree();
327 
328  forAll(fc, triI)
329  {
330  pointIndexHit nearInfo = bTree.findNearest
331  (
332  fc[triI],
333  sqr(great)
334  );
335  if (nearInfo.hit())
336  {
337  nearest[triI].first() = magSqr(nearInfo.hitPoint()-fc[triI]);
338  nearest[triI].second() = globalCells.toGlobal
339  (
340  bTree.shapes().faceLabels()[nearInfo.index()]
341  );
342  }
343  }
344  }
345 
346 
347  // See which processor has the nearest. Mark and subset
348  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
349 
352 
353  labelList cellOrFaceLabels(fc.size(), -1);
354 
355  label nFound = 0;
356  forAll(nearest, triI)
357  {
358  if (nearest[triI].second() == labelMax)
359  {
360  // Not found on any processor. How to map?
361  }
362  else if (globalCells.isLocal(nearest[triI].second()))
363  {
364  cellOrFaceLabels[triI] = globalCells.toLocal
365  (
366  nearest[triI].second()
367  );
368  nFound++;
369  }
370  }
371 
372 
373  if (debug)
374  {
375  Pout<< "Local out of faces:" << cellOrFaceLabels.size()
376  << " keeping:" << nFound << endl;
377  }
378 
379  // Now subset the surface. Do not use triSurface::subsetMesh since requires
380  // original surface to be in compact numbering.
381 
382  const Foam::triSurface& s = surface_;
383 
384  // Compact to original triangle
385  labelList faceMap(s.size());
386  // Compact to original points
387  labelList pointMap(s.points().size());
388  // From original point to compact points
389  labelList reversePointMap(s.points().size(), -1);
390 
391  {
392  label newPointi = 0;
393  label newFacei = 0;
394 
395  forAll(s, facei)
396  {
397  if (cellOrFaceLabels[facei] != -1)
398  {
399  faceMap[newFacei++] = facei;
400 
401  const triSurface::FaceType& f = s[facei];
402  forAll(f, fp)
403  {
404  if (reversePointMap[f[fp]] == -1)
405  {
406  pointMap[newPointi] = f[fp];
407  reversePointMap[f[fp]] = newPointi++;
408  }
409  }
410  }
411  }
412  faceMap.setSize(newFacei);
413  pointMap.setSize(newPointi);
414  }
415 
416 
417  // Subset cellOrFaceLabels
418  cellOrFaceLabels = UIndirectList<label>(cellOrFaceLabels, faceMap)();
419 
420  // Store any face per point (without using pointFaces())
421  labelList pointToFace(pointMap.size());
422 
423  // Create faces and points for subsetted surface
424  faceList& faces = this->storedFaces();
425  faces.setSize(faceMap.size());
426  forAll(faceMap, i)
427  {
428  const triFace& f = s[faceMap[i]];
429  triFace newF
430  (
431  reversePointMap[f[0]],
432  reversePointMap[f[1]],
433  reversePointMap[f[2]]
434  );
435  faces[i] = newF.triFaceFace();
436 
437  forAll(newF, fp)
438  {
439  pointToFace[newF[fp]] = i;
440  }
441  }
442 
443  this->storedPoints() = pointField(s.points(), pointMap);
444 
445  if (debug)
446  {
447  print(Pout);
448  Pout<< endl;
449  }
450 
451 
452 
453  // Collect the samplePoints and sampleElements
454  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
455 
457  {
458  samplePoints_.setSize(pointMap.size());
459  sampleElements_.setSize(pointMap.size(), -1);
460 
461  if (sampleSource_ == cells)
462  {
463  // samplePoints_ : per surface point a location inside the cell
464  // sampleElements_ : per surface point the cell
465 
466  forAll(points(), pointi)
467  {
468  const point& pt = points()[pointi];
469  label celli = cellOrFaceLabels[pointToFace[pointi]];
470  sampleElements_[pointi] = celli;
471 
472  // Check if point inside cell
473  if (pointInCellFacePlanes(pt, mesh(), sampleElements_[pointi]))
474  {
475  samplePoints_[pointi] = pt;
476  }
477  else
478  {
479  // Find nearest point on faces of cell
480  const cell& cFaces = mesh().cells()[celli];
481 
482  scalar minDistSqr = vGreat;
483 
484  forAll(cFaces, i)
485  {
486  const face& f = mesh().faces()[cFaces[i]];
487  pointHit info = f.nearestPoint(pt, mesh().points());
488  if (info.distance() < minDistSqr)
489  {
490  minDistSqr = info.distance();
491  samplePoints_[pointi] = info.rawPoint();
492  }
493  }
494  }
495  }
496  }
497  else if (sampleSource_ == insideCells)
498  {
499  // samplePoints_ : per surface point a location inside the cell
500  // sampleElements_ : per surface point the cell
501 
502  forAll(points(), pointi)
503  {
504  const point& pt = points()[pointi];
505  label celli = cellOrFaceLabels[pointToFace[pointi]];
506  sampleElements_[pointi] = celli;
507  samplePoints_[pointi] = pt;
508  }
509  }
510  else
511  {
512  // samplePoints_ : per surface point a location on the boundary
513  // sampleElements_ : per surface point the boundary face containing
514  // the location
515 
516  forAll(points(), pointi)
517  {
518  const point& pt = points()[pointi];
519  label facei = cellOrFaceLabels[pointToFace[pointi]];
520  sampleElements_[pointi] = facei;
521  samplePoints_[pointi] = mesh().faces()[facei].nearestPoint
522  (
523  pt,
524  mesh().points()
525  ).rawPoint();
526  }
527  }
528  }
529  else
530  {
531  // if sampleSource_ == cells:
532  // samplePoints_ : n/a
533  // sampleElements_ : per surface triangle the cell
534  // if sampleSource_ == insideCells:
535  // samplePoints_ : n/a
536  // sampleElements_ : -1 or per surface triangle the cell
537  // else:
538  // samplePoints_ : n/a
539  // sampleElements_ : per surface triangle the boundary face
540  samplePoints_.clear();
541  sampleElements_.transfer(cellOrFaceLabels);
542  }
543 
544 
545  if (debug)
546  {
547  this->clearOut();
548 
549  OBJstream str(mesh().time().path()/"surfaceToMesh.obj");
550 
551  Info<< "Dumping correspondence from local surface (points or faces)"
552  << " to mesh (cells or faces) to " << str.name() << endl;
553 
555  {
556  if (sampleSource_ == cells || sampleSource_ == insideCells)
557  {
558  forAll(samplePoints_, pointi)
559  {
560  const label celli = sampleElements_[pointi];
561 
562  str.write
563  (
565  (
566  points()[pointi],
567  samplePoints_[pointi],
568  mesh().cellCentres()[celli]
569  )
570  );
571  }
572  }
573  else
574  {
575  forAll(samplePoints_, pointi)
576  {
577  const label facei = sampleElements_[pointi];
578 
579  str.write
580  (
582  (
583  points()[pointi],
584  samplePoints_[pointi],
585  mesh().faceCentres()[facei]
586  )
587  );
588  }
589  }
590  }
591  else
592  {
593  if (sampleSource_ == cells || sampleSource_ == insideCells)
594  {
595  forAll(sampleElements_, triI)
596  {
597  const label celli = sampleElements_[triI];
598 
599  str.write
600  (
602  (
603  faceCentres()[triI],
604  mesh().cellCentres()[celli]
605  )
606  );
607  }
608  }
609  else
610  {
611  forAll(sampleElements_, triI)
612  {
613  const label facei = sampleElements_[triI];
614 
615  str.write
616  (
618  (
619  faceCentres()[triI],
620  mesh().faceCentres()[facei]
621  )
622  );
623  }
624  }
625  }
626  }
627 
628  needsUpdate_ = false;
629 
630  return true;
631 }
632 
633 
634 #define IMPLEMENT_SAMPLE(Type, nullArg) \
635  Foam::tmp<Foam::Field<Foam::Type>> \
636  Foam::sampledSurfaces::triSurface::sample \
637  ( \
638  const VolField<Type>& vField \
639  ) const \
640  { \
641  return sampleField(vField); \
642  }
644 #undef IMPLEMENT_SAMPLE
645 
646 
647 #define IMPLEMENT_INTERPOLATE(Type, nullArg) \
648  Foam::tmp<Foam::Field<Foam::Type>> \
649  Foam::sampledSurfaces::triSurface::interpolate \
650  ( \
651  const interpolation<Type>& interpolator \
652  ) const \
653  { \
654  return interpolateField(interpolator); \
655  }
657 #undef IMPLEMENT_INTERPOLATE
658 
659 
661 {
664 
665  boundaryTreePtr_.clear();
666  sampleElements_.clear();
667  samplePoints_.clear();
668 
669  needsUpdate_ = true;
670 }
671 
672 
674 {
675  movePoints();
676 }
677 
678 
680 {
681  movePoints();
682 }
683 
684 
686 {
687  movePoints();
688 }
689 
690 
692 {
693  os << "triSurface: " << name() << " :"
694  << " surface:" << surface_.objectRegistry::name()
695  << " faces:" << faces().size()
696  << " points:" << points().size();
697 }
698 
699 
700 // ************************************************************************* //
scalar y
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:449
Macros for easy insertion into run-time selection tables.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:99
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:91
void size(const label)
Override size to be inconsistent with allocated storage.
Definition: ListI.H:164
void clear()
Clear the list, i.e. set size to zero.
Definition: ListI.H:125
void setSize(const label)
Reset size of List.
Definition: List.C:281
virtual void clear()
Clear all storage.
Initialise the NamedEnum HashTable from the static list of names.
Definition: NamedEnum.H:55
OFstream which keeps track of vertices.
Definition: OBJstream.H:56
virtual Ostream & write(const char)
Write character.
Definition: OBJstream.C:81
const fileName & name() const
Return the name of the stream.
Definition: OFstream.H:121
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
scalar distance() const
Return distance to hit.
Definition: PointHit.H:139
const Point & rawPoint() const
Return point with no checking.
Definition: PointHit.H:158
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
Definition: PointIndexHit.H:54
std::remove_reference< FaceList >::type::value_type FaceType
static void listCombineGather(const List< commsStruct > &comms, List< T > &Value, const CombineOp &cop, const int tag, const label comm)
static void listCombineScatter(const List< commsStruct > &comms, List< T > &Value, const int tag, const label comm)
Scatter data. Reverse of combineGather.
A 2-tuple for storing two objects of different types.
Definition: Tuple2.H:66
A List with indirect addressing.
Definition: UIndirectList.H:61
T & first()
Return the first element of the list.
Definition: UListI.H:114
A cell is defined as a list of faces with extra functionality.
Definition: cell.H:60
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
A face is a list of labels corresponding to mesh vertices.
Definition: face.H:76
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
Definition: globalIndex.H:64
label toGlobal(const label i) const
From local to global.
Definition: globalIndexI.H:82
label toLocal(const label i) const
From global to local on current processor.
Definition: globalIndexI.H:117
bool isLocal(const label i) const
Is on local processor.
Definition: globalIndexI.H:95
const Type & shapes() const
Reference to shape.
const treeBoundBox & bb() const
Top bounding box.
label findInside(const point &, const Args &...) const
Find shape containing point. Only implemented for certain.
A line primitive.
Definition: line.H:71
static const meshSearch & New(const polyMesh &mesh, const pointInCellShapes=pointInCellShapes::tets)
Lookup or construct from mesh and cell decomposition option.
Definition: meshSearch.C:61
const indexedOctree< treeDataCell > & cellTree() const
Access the cell tree.
Definition: meshSearch.H:110
A topoSetSource to select faces based on use of points.
Definition: pointToFace.H:52
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:51
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:78
const polyBoundaryMesh & boundary() const
Return boundary mesh.
Definition: polyMesh.H:393
virtual const faceList & faces() const
Return raw faces.
Definition: polyMesh.C:1308
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const cellList & cells() const
An abstract class for surfaces with sampling.
virtual void clearGeom() const
bool interpolate() const
Interpolation requested for surface.
const polyMesh & mesh() const
Access to the underlying mesh.
void operator()(nearInfo &x, const nearInfo &y) const
A sampledSurface from a triSurface. It samples on the points/triangles of the triSurface....
triSurface(const word &name, const polyMesh &mesh, const word &surfaceName, const samplingSource sampleSource)
Construct from components.
static const NamedEnum< samplingSource, 3 > samplingSourceNames_
Names of communication types.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual void movePoints()
Update for mesh point-motion.
samplingSource
Types of communications.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual bool needsUpdate() const
Does the surface need an update?
virtual bool update()
Update the surface as required.
virtual void print(Ostream &) const
Write.
virtual const pointField & points() const
Points of surface.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
bool contains(const vector &dir, const point &) const
Contains point (inside or on edge) and moving in direction.
Definition: treeBoundBox.C:385
A triangular face using a FixedList of labels corresponding to mesh vertices.
Definition: triFace.H:71
face triFaceFace() const
Return triangle as a face.
Definition: triFaceI.H:140
Triangulated surface description with patch information.
Definition: triSurface.H:68
A triangle primitive used to calculate face areas and swept volumes.
Definition: triangle.H:80
A class for handling words, derived from string.
Definition: word.H:63
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
label patchi
const pointField & points
const cellShapeList & cells
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), lagrangian::cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const fvPatchList & patches
const dimensionSet time
addBackwardCompatibleToRunTimeSelectionTable(sampledSurface, triSurface, word, triSurfaceMesh, "triSurfaceMesh")
Tuple2< scalar, label > nearInfo
Private class for finding nearest.
defineTypeNameAndDebug(cutPlane, 0)
addToRunTimeSelectionTable(sampledSurface, cutPlane, word)
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
Definition: units.C:346
Namespace for OpenFOAM.
const doubleScalar e
Definition: doubleScalar.H:106
List< label > labelList
A List of labels.
Definition: labelList.H:56
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
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:288
FOR_ALL_FIELD_TYPES(makeDimensionedPointFieldFunctions)
messageStream Info
labelList second(const UList< labelPair > &p)
Definition: patchToPatch.C:49
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:42
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
bool pointInCellFacePlanes(const point &p, const polyMesh &mesh, const label celli)
Test if a point is in a given cell. For each of the cell's faces, define a.
Definition: pointInCell.C:32
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
prefixOSstream Pout(cout, "Pout")
Definition: IOstreams.H:53
static const label labelMax
Definition: label.H:62
tmp< DimensionedField< scalar, GeoMesh, Field > > magSqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
Function for determining if a point is within a cell of a polyMesh.
label newPointi
Definition: readKivaGrid.H:495
labelList f(nPoints)
#define IMPLEMENT_INTERPOLATE(Type, nullArg)
#define IMPLEMENT_SAMPLE(Type, nullArg)
dictionary dict