volPointInterpolate.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9  Copyright (C) 2016-2024 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "volPointInterpolation.H"
30 #include "volFields.H"
31 #include "pointFields.H"
32 #include "emptyFvPatch.H"
33 #include "coupledPointPatchField.H"
34 #include "pointConstraints.H"
35 
36 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
37 
38 template<class Type>
39 void Foam::volPointInterpolation::pushUntransformedData
40 (
41  List<Type>& pointData
42 ) const
43 {
44  // Transfer onto coupled patch
45  const globalMeshData& gmd = mesh().globalData();
46  const indirectPrimitivePatch& cpp = gmd.coupledPatch();
47  const labelList& meshPoints = cpp.meshPoints();
48 
49  const mapDistribute& slavesMap = gmd.globalCoPointSlavesMap();
50  const labelListList& slaves = gmd.globalCoPointSlaves();
51 
52  List<Type> elems(slavesMap.constructSize());
53  forAll(meshPoints, i)
54  {
55  elems[i] = pointData[meshPoints[i]];
56  }
57 
58  // Combine master data with slave data
59  forAll(slaves, i)
60  {
61  const labelList& slavePoints = slaves[i];
62 
63  // Copy master data to slave slots
64  forAll(slavePoints, j)
65  {
66  elems[slavePoints[j]] = elems[i];
67  }
68  }
69 
70  // Push slave-slot data back to slaves
71  slavesMap.reverseDistribute(elems.size(), elems, false);
72 
73  // Extract back onto mesh
74  forAll(meshPoints, i)
75  {
76  pointData[meshPoints[i]] = elems[i];
77  }
78 }
79 
80 
81 template<class Type>
82 void Foam::volPointInterpolation::addSeparated
83 (
84  GeometricField<Type, pointPatchField, pointMesh>& pf
85 ) const
86 {
87  if (debug)
88  {
89  Pout<< "volPointInterpolation::addSeparated" << endl;
90  }
91 
92  auto& pfi = pf.internalFieldRef();
93  auto& pfbf = pf.boundaryFieldRef();
94 
95  const label startOfRequests = UPstream::nRequests();
96 
97  forAll(pfbf, patchi)
98  {
99  if (pfbf[patchi].coupled())
100  {
101  refCast<coupledPointPatchField<Type>>
102  (pfbf[patchi]).initSwapAddSeparated
103  (
105  pfi
106  );
107  }
108  }
109 
110  // Wait for outstanding requests (non-blocking)
111  UPstream::waitRequests(startOfRequests);
112 
113  forAll(pfbf, patchi)
114  {
115  if (pfbf[patchi].coupled())
116  {
117  refCast<coupledPointPatchField<Type>>
118  (pfbf[patchi]).swapAddSeparated
119  (
121  pfi
122  );
123  }
124  }
125 }
126 
127 
128 template<class Type>
130 (
131  const GeometricField<Type, fvPatchField, volMesh>& vf,
132  GeometricField<Type, pointPatchField, pointMesh>& pf
133 ) const
134 {
135  if (debug)
136  {
137  Pout<< "volPointInterpolation::interpolateInternalField("
138  << "const GeometricField<Type, fvPatchField, volMesh>&, "
139  << "GeometricField<Type, pointPatchField, pointMesh>&) : "
140  << "interpolating field " << vf.name()
141  << " from cells to points " << pf.name() << endl;
142  }
143 
144  const labelListList& pointCells = vf.mesh().pointCells();
145 
146  // Multiply volField by weighting factor matrix to create pointField
147  forAll(pointCells, pointi)
148  {
149  if (!isPatchPoint_[pointi])
150  {
151  const scalarList& pw = pointWeights_[pointi];
152  const labelList& ppc = pointCells[pointi];
153 
154  pf[pointi] = Zero;
155 
156  forAll(ppc, pointCelli)
157  {
158  pf[pointi] += pw[pointCelli]*vf[ppc[pointCelli]];
159  }
160  }
161  }
162 }
163 
164 
165 template<class Type>
167 (
168  const DimensionedField<Type, volMesh>& vf,
169  DimensionedField<Type, pointMesh>& pf
170 ) const
171 {
172  if (debug)
173  {
174  Pout<< "volPointInterpolation::interpolateDimensionedInternalField("
175  << "const DimensionedField<Type, volMesh>&, "
176  << "DimensionedField<Type, pointMesh>&) : "
177  << "interpolating field " << vf.name() << " from cells to points "
178  << pf.name() << endl;
179  }
180 
181  const fvMesh& mesh = vf.mesh();
182 
183  const labelListList& pointCells = mesh.pointCells();
184  const pointField& points = mesh.points();
185  const vectorField& cellCentres = mesh.cellCentres();
186 
187  // Re-do weights and interpolation since normal interpolation
188  // pointWeights_ are for non-boundary points only. Not efficient but
189  // then saves on space.
190 
191  // Multiply volField by weighting factor matrix to create pointField
192  scalarField sumW(points.size(), Zero);
193  forAll(pointCells, pointi)
194  {
195  const labelList& ppc = pointCells[pointi];
196 
197  pf[pointi] = Type(Zero);
198 
199  forAll(ppc, pointCelli)
200  {
201  label celli = ppc[pointCelli];
202  scalar pw = 1.0/mag(points[pointi] - cellCentres[celli]);
203 
204  pf[pointi] += pw*vf[celli];
205  sumW[pointi] += pw;
206  }
207  }
208 
209  // Sum collocated contributions
210  pointConstraints::syncUntransformedData(mesh, sumW, plusEqOp<scalar>());
211  pointConstraints::syncUntransformedData(mesh, pf, plusEqOp<Type>());
212 
213  // Normalise
214  forAll(pf, pointi)
215  {
216  scalar s = sumW[pointi];
217  if (s > ROOTVSMALL)
218  {
219  pf[pointi] /= s;
220  }
221  }
222 }
223 
224 
225 template<class Type>
226 void Foam::volPointInterpolation::flatBoundaryField
227 (
228  UList<Type>& result,
229  const GeometricField<Type, fvPatchField, volMesh>& fld
230 ) const
231 {
232  const polyBoundaryMesh& pbm = fld.mesh().boundaryMesh();
233 
234  #ifdef FULLDEBUG
235  if (FOAM_UNLIKELY(result.size() != pbm.nFaces()))
236  {
238  << "mesh nBoundaryFaces = " << pbm.nFaces()
239  << " but result size = " << result.size()
240  << abort(FatalError);
241  }
242  #endif
243 
244  // Some patches (eg empty) may not contribute values. Init to zero
245  result = Foam::zero{};
246 
247  const auto& bfield = fld.boundaryField();
248 
249  forAll(bfield, patchi)
250  {
251  // Destination within the boundaryField
252  const auto start = pbm[patchi].offset();
253  const auto& pfld = bfield[patchi];
254 
255  // Note: restrict transcribing to actual size of the patch field
256  // - handles "empty" patch type etc.
257 
258  if (!pfld.coupled())
259  {
260  result.slice(start, pfld.size()) = pfld;
261  }
262  }
263 }
264 
265 
266 template<class Type>
268 Foam::volPointInterpolation::flatBoundaryField
269 (
270  const GeometricField<Type, fvPatchField, volMesh>& fld
271 ) const
272 {
273  auto tresult = tmp<Field<Type>>::New(fld.mesh().nBoundaryFaces());
274  flatBoundaryField(tresult.ref(), fld);
275  return tresult;
276 }
277 
278 
279 template<class Type>
281 (
284 ) const
285 {
286  const primitivePatch& boundary = boundaryPtr_();
287 
288  Field<Type>& pfi = pf.primitiveFieldRef();
289 
290  // Get face data in flat list
291  tmp<Field<Type>> tboundaryVals(flatBoundaryField(vf));
292  const Field<Type>& boundaryVals = tboundaryVals();
293 
294 
295  // Do points on 'normal' patches from the surrounding patch faces
296  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
297 
298  const labelList& mp = boundary.meshPoints();
299 
300  forAll(mp, i)
301  {
302  label pointi = mp[i];
303 
304  if (isPatchPoint_[pointi])
305  {
306  const labelList& pFaces = boundary.pointFaces()[i];
307  const scalarList& pWeights = boundaryPointWeights_[i];
308 
309  Type& val = pfi[pointi];
310 
311  val = Zero;
312  forAll(pFaces, j)
313  {
314  if (boundaryIsPatchFace_[pFaces[j]])
315  {
316  val += pWeights[j]*boundaryVals[pFaces[j]];
317  }
318  }
319  }
320  }
321 
322  // Sum collocated contributions
323  pointConstraints::syncUntransformedData(mesh(), pfi, plusEqOp<Type>());
324 
325  // And add separated contributions
326  addSeparated(pf);
327 
328  // Optionally normalise
329  if (normalisationPtr_)
330  {
331  const scalarField& normalisation = normalisationPtr_();
332  forAll(mp, i)
333  {
334  pfi[mp[i]] *= normalisation[i];
335  }
336  }
337 
338 
339  // Push master data to slaves. It is possible (not sure how often) for
340  // a coupled point to have its master on a different patch so
341  // to make sure just push master data to slaves.
342  pushUntransformedData(pfi);
343 }
344 
345 
346 template<class Type>
348 (
351  const bool overrideFixedValue
352 ) const
353 {
354  interpolateBoundaryField(vf, pf);
355 
356  // Apply constraints
357  const pointConstraints& pcs = pointConstraints::New(pf.mesh());
359  pcs.constrain(pf, overrideFixedValue);
360 }
361 
362 
363 template<class Type>
365 (
368 ) const
369 {
370  if (debug)
371  {
372  Pout<< "volPointInterpolation::interpolate("
373  << "const GeometricField<Type, fvPatchField, volMesh>&, "
374  << "GeometricField<Type, pointPatchField, pointMesh>&) : "
375  << "interpolating field " << vf.name() << " from cells to points "
376  << pf.name() << endl;
377  }
378 
379  interpolateInternalField(vf, pf);
380 
381  // Interpolate to the patches preserving fixed value BCs
382  interpolateBoundaryField(vf, pf, false);
383 }
384 
385 
386 template<class Type>
389 (
391  const wordList& patchFieldTypes
392 ) const
393 {
394  const pointMesh& pm = pointMesh::New(vf.mesh());
395 
396  // Construct tmp<pointField>
398  (
399  IOobject
400  (
401  "volPointInterpolate(" + vf.name() + ')',
402  vf.instance(),
403  pm.thisDb()
404  ),
405  pm,
406  vf.dimensions(),
407  patchFieldTypes
408  );
409 
410  interpolateInternalField(vf, tpf.ref());
411 
412  // Interpolate to the patches overriding fixed value BCs
413  interpolateBoundaryField(vf, tpf.ref(), true);
414 
415  return tpf;
416 }
417 
418 
419 template<class Type>
422 (
424  const wordList& patchFieldTypes
425 ) const
426 {
427  // Construct tmp<pointField>
429  interpolate(tvf(), patchFieldTypes);
430  tvf.clear();
431  return tpf;
432 }
433 
434 
435 template<class Type>
438 (
440  const word& name,
441  const bool cache
442 ) const
443 {
445 
446  const pointMesh& pm = pointMesh::New(vf.mesh());
447  const objectRegistry& db = pm.thisDb();
448 
449  PointFieldType* pfPtr =
450  db.objectRegistry::template getObjectPtr<PointFieldType>(name);
451 
452  if (!cache || vf.mesh().changing())
453  {
454  // Delete any old occurrences to avoid double registration
455  if (pfPtr && pfPtr->ownedByRegistry())
456  {
457  solution::cachePrintMessage("Deleting", name, vf);
458  delete pfPtr;
459  }
460 
462  (
463  IOobject
464  (
465  name,
466  vf.instance(),
467  pm.thisDb()
468  ),
469  pm,
470  vf.dimensions()
471  );
472 
473  interpolate(vf, tpf.ref());
474 
475  return tpf;
476  }
477 
478 
479  if (!pfPtr)
480  {
481  solution::cachePrintMessage("Calculating and caching", name, vf);
482 
483  pfPtr = interpolate(vf, name, false).ptr();
484  regIOobject::store(pfPtr);
485  }
486  else
487  {
488  PointFieldType& pf = *pfPtr;
489 
490  if (pf.upToDate(vf)) //TBD: , vf.mesh().points()))
491  {
492  solution::cachePrintMessage("Reusing", name, vf);
493  }
494  else
495  {
496  solution::cachePrintMessage("Updating", name, vf);
497  interpolate(vf, pf);
498  }
499  }
500 
501  return *pfPtr;
502 }
503 
504 
505 template<class Type>
508 (
510 ) const
511 {
512  return interpolate(vf, "volPointInterpolate(" + vf.name() + ')', false);
513 }
514 
515 
516 template<class Type>
519 (
521 ) const
522 {
523  // Construct tmp<pointField>
525  interpolate(tvf());
526  tvf.clear();
527  return tpf;
528 }
529 
530 
531 template<class Type>
534 (
536  const word& name,
537  const bool cache
538 ) const
539 {
540  typedef DimensionedField<Type, pointMesh> PointFieldType;
541 
542  const pointMesh& pm = pointMesh::New(vf.mesh());
543  const objectRegistry& db = pm.thisDb();
544 
545 
546  PointFieldType* pfPtr =
547  db.objectRegistry::template getObjectPtr<PointFieldType>(name);
548 
549  if (!cache || vf.mesh().changing())
550  {
551  // Delete any old occurrences to avoid double registration
552  if (pfPtr && pfPtr->ownedByRegistry())
553  {
554  solution::cachePrintMessage("Deleting", name, vf);
555  delete pfPtr;
556  }
557 
559  (
560  IOobject
561  (
562  name,
563  vf.instance(),
564  pm.thisDb()
565  ),
566  pm,
567  vf.dimensions()
568  );
569 
570  interpolateDimensionedInternalField(vf, tpf.ref());
571 
572  return tpf;
573  }
574 
575 
576  if (!pfPtr)
577  {
578  solution::cachePrintMessage("Calculating and caching", name, vf);
579 
580  pfPtr = interpolate(vf, name, false).ptr();
581  regIOobject::store(pfPtr);
582  }
583  else
584  {
585  PointFieldType& pf = *pfPtr;
586 
587  if (pf.upToDate(vf)) //TBD: , vf.mesh().points()))
588  {
589  solution::cachePrintMessage("Reusing", name, vf);
590  }
591  else
592  {
593  solution::cachePrintMessage("Updating", name, vf);
594  interpolateDimensionedInternalField(vf, pf);
595  }
596  }
597 
598  return *pfPtr;
599 }
600 
601 
602 template<class Type>
605 (
607 ) const
608 {
609  return interpolate(vf, "volPointInterpolate(" + vf.name() + ')', false);
610 }
611 
612 
613 template<class Type>
616 (
618 ) const
619 {
620  // Construct tmp<pointField>
622  tvf.clear();
623  return tpf;
624 }
625 
626 
627 // ************************************************************************* //
List< scalar > scalarList
List of scalar.
Definition: scalarList.H:32
faceListList boundary
const polyBoundaryMesh & pbm
tmp< GeometricField< Type, pointPatchField, pointMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &) const
Interpolate volField using inverse distance weighting.
void size(const label n)
Older name for setAddressableSize.
Definition: UList.H:119
void interpolateBoundaryField(const GeometricField< Type, fvPatchField, volMesh > &vf, GeometricField< Type, pointPatchField, pointMesh > &pf) const
Interpolate boundary field without applying constraints/boundary.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional &#39;FOAM FATAL ERROR&#39; header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:652
const word & name() const noexcept
Return the object name.
Definition: IOobjectI.H:205
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
Definition: curveTools.C:75
static label nRequests() noexcept
Number of outstanding requests (on the internal list of requests)
static FOAM_NO_DANGLING_REFERENCE const pointConstraints & New(const pointMesh &mesh, Args &&... args)
Get existing or create MeshObject registered with typeName.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:518
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
bool store()
Register object with its registry and transfer ownership to the registry.
Definition: regIOobjectI.H:36
Generic GeometricField class.
PrimitivePatch< IndirectList< face >, const pointField & > indirectPrimitivePatch
A PrimitivePatch with an IndirectList for the faces, const reference for the point field...
virtual const fileName & name() const override
Get the name of the output serial stream. (eg, the name of the Fstream file name) ...
Definition: OSstream.H:134
List< labelList > labelListList
List of labelList.
Definition: labelList.H:38
static void waitRequests()
Wait for all requests to finish.
Definition: UPstream.H:2619
virtual const pointField & points() const
Return raw points.
Definition: polyMesh.C:1063
Mesh representing a set of points created from polyMesh.
Definition: pointMesh.H:45
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:400
Application of (multi-)patch point constraints.
static void cachePrintMessage(const char *message, const word &name, const FieldType &fld)
Helper for printing cache message.
A list of faces which address into the list of points.
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:38
dynamicFvMesh & mesh
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition: exprTraits.C:127
const pointField & points
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Definition: Field.H:69
const fvMesh & mesh() const noexcept
Reference to the mesh.
Definition: MeshObject.H:257
A class for handling words, derived from Foam::string.
Definition: word.H:63
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
static void syncUntransformedData(const polyMesh &mesh, List< Type > &pointData, const CombineOp &cop)
Helper: sync data on collocated points only.
const objectRegistry & thisDb() const
Return database. For now is its polyMesh.
Definition: pointMesh.H:201
#define FOAM_UNLIKELY(cond)
Definition: stdFoam.H:65
Info<< "Finished reading KIVA file"<< endl;cellShapeList cellShapes(nPoints);labelList cellZoning(nPoints, -1);const cellModel &hex=cellModel::ref(cellModel::HEX);labelList hexLabels(8);label activeCells=0;labelList pointMap(nPoints);forAll(pointMap, i){ pointMap[i]=i;}for(label i=0;i< nPoints;i++){ if(f[i] > 0.0) { hexLabels[0]=i;hexLabels[1]=i1tab[i];hexLabels[2]=i3tab[i1tab[i]];hexLabels[3]=i3tab[i];hexLabels[4]=i8tab[i];hexLabels[5]=i1tab[i8tab[i]];hexLabels[6]=i3tab[i1tab[i8tab[i]]];hexLabels[7]=i3tab[i8tab[i]];cellShapes[activeCells].reset(hex, hexLabels);edgeList edges=cellShapes[activeCells].edges();forAll(edges, ei) { if(edges[ei].mag(points)< SMALL) { label start=pointMap[edges[ei].start()];while(start !=pointMap[start]) { start=pointMap[start];} label end=pointMap[edges[ei].end()];while(end !=pointMap[end]) { end=pointMap[end];} pointMap[start]=pointMap[end]=Foam::min(start, end);} } cellZoning[activeCells]=idreg[i];activeCells++;}}cellShapes.setSize(activeCells);cellZoning.setSize(activeCells);forAll(cellShapes, celli){ cellShape &cs=cellShapes[celli];forAll(cs, i) { cs[i]=pointMap[cs[i]];} cs.collapse();}label bcIDs[11]={-1, 0, 2, 4, -1, 5, -1, 6, 7, 8, 9};constexpr label nBCs=12;const word *kivaPatchTypes[nBCs]={ &wallPolyPatch::typeName, &wallPolyPatch::typeName, &wallPolyPatch::typeName, &wallPolyPatch::typeName, &symmetryPolyPatch::typeName, &wedgePolyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &symmetryPolyPatch::typeName, &oldCyclicPolyPatch::typeName};enum patchTypeNames{ PISTON, VALVE, LINER, CYLINDERHEAD, AXIS, WEDGE, INFLOW, OUTFLOW, PRESIN, PRESOUT, SYMMETRYPLANE, CYCLIC};const char *kivaPatchNames[nBCs]={ "piston", "valve", "liner", "cylinderHead", "axis", "wedge", "inflow", "outflow", "presin", "presout", "symmetryPlane", "cyclic"};List< DynamicList< face > > pFaces[nBCs]
Definition: readKivaGrid.H:233
const globalMeshData & globalData() const
Return parallel info (demand-driven)
Definition: polyMesh.C:1296
void interpolateInternalField(const GeometricField< Type, fvPatchField, volMesh > &, GeometricField< Type, pointPatchField, pointMesh > &) const
Interpolate internal field from volField to pointField.
const vectorField & cellCentres() const
errorManip< error > abort(error &err)
Definition: errorManip.H:139
const labelListList & pointCells() const
static std::string name(const std::string &str)
Return basename (part beyond last /), including its extension.
Definition: fileNameI.H:192
int debug
Static debugging option.
void interpolateDimensionedInternalField(const DimensionedField< Type, volMesh > &vf, DimensionedField< Type, pointMesh > &pf) const
Interpolate dimensioned internal field from cells to points.
const dimensionSet & dimensions() const noexcept
Return dimensions.
const fileName & instance() const noexcept
Read access to instance path component.
Definition: IOobjectI.H:289
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
label nFaces() const noexcept
The number of boundary faces in the underlying mesh.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field values.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const Mesh & mesh() const noexcept
Return const reference to mesh.
"nonBlocking" (immediate) : (MPI_Isend, MPI_Irecv)
Internal & ref(const bool updateAccessTime=true)
Same as internalFieldRef()
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition: zero.H:57
Field< vector > vectorField
Specialisation of Field<T> for vector.
List< label > labelList
A List of labels.
Definition: List.H:61
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Registry of regIOobjects.
bool coupled
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Defines the attributes of an object for which implicit objectRegistry management is supported...
Definition: IOobject.H:188
void constrain(GeometricField< Type, pointPatchField, pointMesh > &pf, const bool overrideValue=false) const
Apply boundary conditions (single-patch constraints) and.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
const dimensionedScalar mp
Proton mass.
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:127