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-2025 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().boundaryMesh();
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  // already marked as expired
252  if (needsUpdate_)
253  {
254  return false;
255  }
256 
259 
260  boundaryTreePtr_.clear();
261  sampleElements_.clear();
262  samplePoints_.clear();
263 
264  needsUpdate_ = true;
265  return true;
266 }
267 
268 
270 {
271  if (!needsUpdate_)
272  {
273  return false;
274  }
275 
276  // Find the cells the triangles of the surface are in.
277  // Does approximation by looking at the face centres only
278  const pointField& fc = surface_.faceCentres();
279 
280  List<nearInfo> nearest(fc.size());
281 
282  // Global numbering for cells/faces - only used to uniquely identify local
283  // elements
284  globalIndex globalCells
285  (
286  (sampleSource_ == cells || sampleSource_ == insideCells)
287  ? mesh().nCells()
288  : mesh().nFaces()
289  );
290 
291  forAll(nearest, i)
292  {
293  nearest[i].first() = great;
294  nearest[i].second() = labelMax;
295  }
296 
297  if (sampleSource_ == cells)
298  {
299  // Search for nearest cell
300 
301  const indexedOctree<treeDataCell>& cellTree =
303 
304  forAll(fc, triI)
305  {
307  cellTree.findNearest(fc[triI], sqr(great));
308 
309  if (nearInfo.hit())
310  {
311  nearest[triI].first() = magSqr(nearInfo.hitPoint()-fc[triI]);
312  nearest[triI].second() = globalCells.toGlobal(nearInfo.index());
313  }
314  }
315  }
316  else if (sampleSource_ == insideCells)
317  {
318  // Search for cell containing point
319 
320  const indexedOctree<treeDataCell>& cellTree =
322 
323  forAll(fc, triI)
324  {
325  if (cellTree.bb().contains(fc[triI]))
326  {
327  label index =
328  cellTree.findInside
329  (
330  fc[triI],
332  );
333 
334  if (index != -1)
335  {
336  nearest[triI].first() = 0.0;
337  nearest[triI].second() = globalCells.toGlobal(index);
338  }
339  }
340  }
341  }
342  else
343  {
344  // Search on all non-coupled boundary faces
345 
346  const indexedOctree<treeDataFace>& bTree = nonCoupledboundaryTree();
347 
348  forAll(fc, triI)
349  {
350  pointIndexHit nearInfo = bTree.findNearest
351  (
352  fc[triI],
353  sqr(great)
354  );
355  if (nearInfo.hit())
356  {
357  nearest[triI].first() = magSqr(nearInfo.hitPoint()-fc[triI]);
358  nearest[triI].second() = globalCells.toGlobal
359  (
360  bTree.shapes().faceLabels()[nearInfo.index()]
361  );
362  }
363  }
364  }
365 
366 
367  // See which processor has the nearest. Mark and subset
368  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
369 
372 
373  labelList cellOrFaceLabels(fc.size(), -1);
374 
375  label nFound = 0;
376  forAll(nearest, triI)
377  {
378  if (nearest[triI].second() == labelMax)
379  {
380  // Not found on any processor. How to map?
381  }
382  else if (globalCells.isLocal(nearest[triI].second()))
383  {
384  cellOrFaceLabels[triI] = globalCells.toLocal
385  (
386  nearest[triI].second()
387  );
388  nFound++;
389  }
390  }
391 
392 
393  if (debug)
394  {
395  Pout<< "Local out of faces:" << cellOrFaceLabels.size()
396  << " keeping:" << nFound << endl;
397  }
398 
399  // Now subset the surface. Do not use triSurface::subsetMesh since requires
400  // original surface to be in compact numbering.
401 
402  const Foam::triSurface& s = surface_;
403 
404  // Compact to original triangle
405  labelList faceMap(s.size());
406  // Compact to original points
407  labelList pointMap(s.points().size());
408  // From original point to compact points
409  labelList reversePointMap(s.points().size(), -1);
410 
411  {
412  label newPointi = 0;
413  label newFacei = 0;
414 
415  forAll(s, facei)
416  {
417  if (cellOrFaceLabels[facei] != -1)
418  {
419  faceMap[newFacei++] = facei;
420 
421  const triSurface::FaceType& f = s[facei];
422  forAll(f, fp)
423  {
424  if (reversePointMap[f[fp]] == -1)
425  {
426  pointMap[newPointi] = f[fp];
427  reversePointMap[f[fp]] = newPointi++;
428  }
429  }
430  }
431  }
432  faceMap.setSize(newFacei);
433  pointMap.setSize(newPointi);
434  }
435 
436 
437  // Subset cellOrFaceLabels
438  cellOrFaceLabels = UIndirectList<label>(cellOrFaceLabels, faceMap)();
439 
440  // Store any face per point (without using pointFaces())
441  labelList pointToFace(pointMap.size());
442 
443  // Create faces and points for subsetted surface
444  faceList& faces = this->storedFaces();
445  faces.setSize(faceMap.size());
446  forAll(faceMap, i)
447  {
448  const triFace& f = s[faceMap[i]];
449  triFace newF
450  (
451  reversePointMap[f[0]],
452  reversePointMap[f[1]],
453  reversePointMap[f[2]]
454  );
455  faces[i] = newF.triFaceFace();
456 
457  forAll(newF, fp)
458  {
459  pointToFace[newF[fp]] = i;
460  }
461  }
462 
463  this->storedPoints() = pointField(s.points(), pointMap);
464 
465  if (debug)
466  {
467  print(Pout);
468  Pout<< endl;
469  }
470 
471 
472 
473  // Collect the samplePoints and sampleElements
474  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
475 
477  {
478  samplePoints_.setSize(pointMap.size());
479  sampleElements_.setSize(pointMap.size(), -1);
480 
481  if (sampleSource_ == cells)
482  {
483  // samplePoints_ : per surface point a location inside the cell
484  // sampleElements_ : per surface point the cell
485 
486  forAll(points(), pointi)
487  {
488  const point& pt = points()[pointi];
489  label celli = cellOrFaceLabels[pointToFace[pointi]];
490  sampleElements_[pointi] = celli;
491 
492  // Check if point inside cell
493  if (pointInCellFacePlanes(pt, mesh(), sampleElements_[pointi]))
494  {
495  samplePoints_[pointi] = pt;
496  }
497  else
498  {
499  // Find nearest point on faces of cell
500  const cell& cFaces = mesh().cells()[celli];
501 
502  scalar minDistSqr = vGreat;
503 
504  forAll(cFaces, i)
505  {
506  const face& f = mesh().faces()[cFaces[i]];
507  pointHit info = f.nearestPoint(pt, mesh().points());
508  if (info.distance() < minDistSqr)
509  {
510  minDistSqr = info.distance();
511  samplePoints_[pointi] = info.rawPoint();
512  }
513  }
514  }
515  }
516  }
517  else if (sampleSource_ == insideCells)
518  {
519  // samplePoints_ : per surface point a location inside the cell
520  // sampleElements_ : per surface point the cell
521 
522  forAll(points(), pointi)
523  {
524  const point& pt = points()[pointi];
525  label celli = cellOrFaceLabels[pointToFace[pointi]];
526  sampleElements_[pointi] = celli;
527  samplePoints_[pointi] = pt;
528  }
529  }
530  else
531  {
532  // samplePoints_ : per surface point a location on the boundary
533  // sampleElements_ : per surface point the boundary face containing
534  // the location
535 
536  forAll(points(), pointi)
537  {
538  const point& pt = points()[pointi];
539  label facei = cellOrFaceLabels[pointToFace[pointi]];
540  sampleElements_[pointi] = facei;
541  samplePoints_[pointi] = mesh().faces()[facei].nearestPoint
542  (
543  pt,
544  mesh().points()
545  ).rawPoint();
546  }
547  }
548  }
549  else
550  {
551  // if sampleSource_ == cells:
552  // samplePoints_ : n/a
553  // sampleElements_ : per surface triangle the cell
554  // if sampleSource_ == insideCells:
555  // samplePoints_ : n/a
556  // sampleElements_ : -1 or per surface triangle the cell
557  // else:
558  // samplePoints_ : n/a
559  // sampleElements_ : per surface triangle the boundary face
560  samplePoints_.clear();
561  sampleElements_.transfer(cellOrFaceLabels);
562  }
563 
564 
565  if (debug)
566  {
567  this->clearOut();
568 
569  OBJstream str(mesh().time().path()/"surfaceToMesh.obj");
570 
571  Info<< "Dumping correspondence from local surface (points or faces)"
572  << " to mesh (cells or faces) to " << str.name() << endl;
573 
575  {
576  if (sampleSource_ == cells || sampleSource_ == insideCells)
577  {
578  forAll(samplePoints_, pointi)
579  {
580  const label celli = sampleElements_[pointi];
581 
582  str.write
583  (
585  (
586  points()[pointi],
587  samplePoints_[pointi],
588  mesh().cellCentres()[celli]
589  )
590  );
591  }
592  }
593  else
594  {
595  forAll(samplePoints_, pointi)
596  {
597  const label facei = sampleElements_[pointi];
598 
599  str.write
600  (
602  (
603  points()[pointi],
604  samplePoints_[pointi],
605  mesh().faceCentres()[facei]
606  )
607  );
608  }
609  }
610  }
611  else
612  {
613  if (sampleSource_ == cells || sampleSource_ == insideCells)
614  {
615  forAll(sampleElements_, triI)
616  {
617  const label celli = sampleElements_[triI];
618 
619  str.write
620  (
622  (
623  faceCentres()[triI],
624  mesh().cellCentres()[celli]
625  )
626  );
627  }
628  }
629  else
630  {
631  forAll(sampleElements_, triI)
632  {
633  const label facei = sampleElements_[triI];
634 
635  str.write
636  (
638  (
639  faceCentres()[triI],
640  mesh().faceCentres()[facei]
641  )
642  );
643  }
644  }
645  }
646  }
647 
648  needsUpdate_ = false;
649 
650  return true;
651 }
652 
653 
656 (
657  const volScalarField& vField
658 ) const
659 {
660  return sampleField(vField);
661 }
662 
663 
666 (
667  const volVectorField& vField
668 ) const
669 {
670  return sampleField(vField);
671 }
672 
675 (
676  const volSphericalTensorField& vField
677 ) const
678 {
679  return sampleField(vField);
680 }
681 
682 
685 (
686  const volSymmTensorField& vField
687 ) const
688 {
689  return sampleField(vField);
690 }
691 
692 
695 (
696  const volTensorField& vField
697 ) const
698 {
699  return sampleField(vField);
700 }
701 
702 
705 (
706  const interpolation<scalar>& interpolator
707 ) const
708 {
709  return interpolateField(interpolator);
710 }
711 
712 
715 (
716  const interpolation<vector>& interpolator
717 ) const
718 {
719  return interpolateField(interpolator);
720 }
721 
724 (
725  const interpolation<sphericalTensor>& interpolator
726 ) const
727 {
728  return interpolateField(interpolator);
729 }
730 
731 
734 (
735  const interpolation<symmTensor>& interpolator
736 ) const
737 {
738  return interpolateField(interpolator);
739 }
740 
741 
744 (
745  const interpolation<tensor>& interpolator
746 ) const
747 {
748  return interpolateField(interpolator);
749 }
750 
751 
753 {
754  os << "triSurface: " << name() << " :"
755  << " surface:" << surface_.objectRegistry::name()
756  << " faces:" << faces().size()
757  << " points:" << points().size();
758 }
759 
760 
761 // ************************************************************************* //
scalar y
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:433
Macros for easy insertion into run-time selection tables.
Generic GeometricField class.
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:60
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.
Abstract base class for interpolation.
Definition: interpolation.H:55
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
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:78
virtual const faceList & faces() const
Return raw faces.
Definition: polyMesh.C:1315
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Definition: polyMesh.H:382
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.
samplingSource
Types of communications.
virtual tmp< scalarField > sample(const volScalarField &) const
Sample field on surface.
virtual bool expire()
Mark the surface as needing an update.
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....
A class for managing temporary objects.
Definition: tmp.H:55
bool contains(const vector &dir, const point &) const
Contains point (inside or on edge) and moving in direction.
Definition: treeBoundBox.C:387
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:69
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:62
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
addBackwardCompatibleToRunTimeSelectionTable(sampledSurface, triSurface, word, triSurfaceMesh, "triSurfaceMesh")
Tuple2< scalar, label > nearInfo
Private class for finding nearest.
defineTypeNameAndDebug(cutPlane, 0)
addToRunTimeSelectionTable(sampledSurface, cutPlane, word)
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:258
messageStream Info
labelList second(const UList< labelPair > &p)
Definition: patchToPatch.C:49
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:42
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)
void sqr(LagrangianPatchField< typename outerProduct< Type, Type >::type > &f, const LagrangianPatchField< Type > &f1)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
prefixOSstream Pout(cout, "Pout")
Definition: IOstreams.H:53
void magSqr(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
static const label labelMax
Definition: label.H:62
Function for determining if a point is within a cell of a polyMesh.
label newPointi
Definition: readKivaGrid.H:495
labelList f(nPoints)
dictionary dict