sampledCuttingPlane.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-2016 OpenFOAM Foundation
9 Copyright (C) 2016-2022 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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 "sampledCuttingPlane.H"
30#include "dictionary.H"
31#include "fvMesh.H"
32#include "volFields.H"
34#include "cartesianCS.H"
36#include "PtrList.H"
37
38// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
39
40namespace Foam
41{
44 (
47 word,
49 );
50}
51
52
53// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
54
55Foam::plane Foam::sampledCuttingPlane::definePlane
56(
57 const polyMesh& mesh,
58 const dictionary& dict
59)
60{
61 plane pln(dict);
62
63 bool adjust = false;
64 const dictionary* dictptr = nullptr;
65 coordSystem::cartesian cs;
66
67 if (dict.found(coordinateSystem::typeName_(), keyType::LITERAL))
68 {
69 // Create with registry to allow lookup from globally defined
70 // coordinate systems?
71
72 auto csPtr =
73 coordinateSystem::New(mesh, dict, coordinateSystem::typeName_());
74
75 if (csPtr)
76 {
77 adjust = true;
78 cs = csPtr();
79 }
80 }
81 else if
82 (
83 (dictptr = dict.findDict("transform", keyType::LITERAL)) != nullptr
84 )
85 {
86 adjust = true;
87 cs = coordSystem::cartesian(*dictptr);
88 }
89
90
91 // Make plane relative to the Cartesian coordinate system
92 if (adjust)
93 {
94 const point orig = cs.globalPosition(pln.origin());
95 const vector norm = cs.globalVector(pln.normal());
96
98 << "plane "
99 << " origin:" << pln.origin()
100 << " normal:" << pln.normal()
101 << " =>"
102 << " origin:" << orig << " normal:" << norm
103 << endl;
104
105 // Reassign the plane
106 pln = plane(orig, norm);
107 }
108
109 return pln;
110}
111
112
113void Foam::sampledCuttingPlane::checkBoundsIntersection
114(
115 const plane& pln,
116 const boundBox& meshBb
117) const
118{
119 // Verify specified bounding box
120 const boundBox& clipBb = isoParams_.getClipBounds();
121
122 if (clipBb.valid())
123 {
124 // Bounding box does not overlap with (global) mesh!
125 if (!clipBb.overlaps(meshBb))
126 {
128 << nl
129 << name() << " : "
130 << "Bounds " << clipBb
131 << " do not overlap the mesh bounding box " << meshBb
132 << nl << endl;
133 }
134
135 // Plane does not intersect the bounding box
136 if (!clipBb.intersects(pln))
137 {
139 << nl
140 << name() << " : "
141 << "Plane "<< pln << " does not intersect the bounds "
142 << clipBb
143 << nl << endl;
144 }
145 }
146
147 // Plane does not intersect the (global) mesh!
148 if (!meshBb.intersects(pln))
149 {
151 << nl
152 << name() << " : "
153 << "Plane "<< pln << " does not intersect the mesh bounds "
154 << meshBb
155 << nl << endl;
156 }
157}
158
159
160void Foam::sampledCuttingPlane::setDistanceFields(const plane& pln)
161{
162 volScalarField& cellDistance = cellDistancePtr_();
163
164 // Get mesh from volField,
165 // so automatically submesh or baseMesh
166
167 const fvMesh& mesh = cellDistance.mesh();
168
169 // Distance to cell centres
170 // ~~~~~~~~~~~~~~~~~~~~~~~~
171
172 // Internal field
173 {
174 const auto& cc = mesh.cellCentres();
175 scalarField& fld = cellDistance.primitiveFieldRef();
176
177 forAll(cc, i)
178 {
179 fld[i] = pln.signedDistance(cc[i]);
180 }
181 }
182
183 // Patch fields
184 {
185 volScalarField::Boundary& cellDistanceBf =
186 cellDistance.boundaryFieldRef();
187
188 forAll(cellDistanceBf, patchi)
189 {
190 if
191 (
192 isA<emptyFvPatchScalarField>
193 (
194 cellDistanceBf[patchi]
195 )
196 )
197 {
198 cellDistanceBf.set
199 (
200 patchi,
201 new calculatedFvPatchScalarField
202 (
203 mesh.boundary()[patchi],
204 cellDistance
205 )
206 );
207
208 const polyPatch& pp = mesh.boundary()[patchi].patch();
209 pointField::subField cc = pp.patchSlice(mesh.faceCentres());
210
211 fvPatchScalarField& fld = cellDistanceBf[patchi];
212 fld.setSize(pp.size());
213 forAll(fld, i)
214 {
215 fld[i] = pln.signedDistance(cc[i]);
216 }
217 }
218 else
219 {
220 // Other side cell centres?
221 const pointField& cc = mesh.C().boundaryField()[patchi];
222 fvPatchScalarField& fld = cellDistanceBf[patchi];
223
224 forAll(fld, i)
225 {
226 fld[i] = pln.signedDistance(cc[i]);
227 }
228 }
229 }
230 }
231
232
233 // On processor patches the mesh.C() will already be the cell centre
234 // on the opposite side so no need to swap cellDistance.
235
236 // Distance to points
237 pointDistance_.resize(mesh.nPoints());
238 {
239 const pointField& pts = mesh.points();
240
241 forAll(pointDistance_, i)
242 {
243 pointDistance_[i] = pln.signedDistance(pts[i]);
244 }
245 }
246}
247
248
249void Foam::sampledCuttingPlane::combineSurfaces
250(
251 PtrList<isoSurfaceBase>& isoSurfPtrs
252)
253{
254 isoSurfacePtr_.reset(nullptr);
255
256 // Already checked previously for ALGO_POINT, but do it again
257 // - ALGO_POINT still needs fields (for interpolate)
258 // The others can do straight transfer
259 if
260 (
261 isoParams_.algorithm() == isoSurfaceParams::ALGO_POINT
262 && isoSurfPtrs.size() == 1
263 )
264 {
265 // Shift ownership from list to autoPtr
266 isoSurfacePtr_.reset(isoSurfPtrs.release(0));
267 }
268 else if (isoSurfPtrs.size() == 1)
269 {
270 autoPtr<isoSurfaceBase> ptr(isoSurfPtrs.release(0));
271 auto& surf = *ptr;
272
273 surface_.transfer(static_cast<meshedSurface&>(surf));
274 meshCells_.transfer(surf.meshCells());
275 }
276 else
277 {
278 // Combine faces with point offsets
279 //
280 // Note: use points().size() from surface, not nPoints()
281 // since there may be uncompacted dangling nodes
282
283 label nFaces = 0, nPoints = 0;
284
285 for (const auto& surf : isoSurfPtrs)
286 {
287 nFaces += surf.size();
288 nPoints += surf.points().size();
289 }
290
291 faceList newFaces(nFaces);
292 pointField newPoints(nPoints);
293 meshCells_.resize(nFaces);
294
295 surfZoneList newZones(isoSurfPtrs.size());
296
297 nFaces = 0;
298 nPoints = 0;
299 forAll(isoSurfPtrs, surfi)
300 {
301 autoPtr<isoSurfaceBase> ptr(isoSurfPtrs.release(surfi));
302 auto& surf = *ptr;
303
304 SubList<face> subFaces(newFaces, surf.size(), nFaces);
305 SubList<point> subPoints(newPoints, surf.points().size(), nPoints);
306 SubList<label> subCells(meshCells_, surf.size(), nFaces);
307
308 newZones[surfi] = surfZone
309 (
311 subFaces.size(), // size
312 nFaces, // start
313 surfi // index
314 );
315
316 subFaces = surf.surfFaces();
317 subPoints = surf.points();
318 subCells = surf.meshCells();
319
320 if (nPoints)
321 {
322 for (face& f : subFaces)
323 {
324 for (label& pointi : f)
325 {
326 pointi += nPoints;
327 }
328 }
329 }
330
331 nFaces += subFaces.size();
332 nPoints += subPoints.size();
333 }
334
335 meshedSurface combined
336 (
337 std::move(newPoints),
338 std::move(newFaces),
339 newZones
340 );
341
342 surface_.transfer(combined);
343 }
344
345 // Addressing into the full mesh
346 if (subMeshPtr_ && meshCells_.size())
347 {
348 meshCells_ =
349 UIndirectList<label>(subMeshPtr_->cellMap(), meshCells_);
350 }
351}
352
353
354void Foam::sampledCuttingPlane::createGeometry()
355{
356 if (debug)
357 {
358 Pout<< "sampledCuttingPlane::createGeometry :updating geometry."
359 << endl;
360 }
361
362 // Clear any previously stored topologies
363 surface_.clear();
364 meshCells_.clear();
365 isoSurfacePtr_.reset(nullptr);
366
367 // Clear derived data
369
370 // Clear any stored fields
371 pointDistance_.clear();
372 cellDistancePtr_.clear();
373
374 const bool hasCellZones =
375 (-1 != mesh().cellZones().findIndex(zoneNames_));
376
377 const fvMesh& fvm = static_cast<const fvMesh&>(this->mesh());
378
379 // Geometry
380 if
381 (
382 simpleSubMesh_
383 && isoParams_.algorithm() != isoSurfaceParams::ALGO_POINT
384 )
385 {
386 subMeshPtr_.reset(nullptr);
387
388 // Handle cell zones as inverse (blocked) selection
389 if (!ignoreCellsPtr_)
390 {
391 ignoreCellsPtr_.reset(new bitSet);
392
393 if (hasCellZones)
394 {
395 bitSet select(mesh().cellZones().selection(zoneNames_));
396
397 if (select.any() && !select.all())
398 {
399 // From selection to blocking
400 select.flip();
401
402 *ignoreCellsPtr_ = std::move(select);
403 }
404 }
405 }
406 }
407 else
408 {
409 // A standard subMesh treatment
410
411 if (ignoreCellsPtr_)
412 {
413 ignoreCellsPtr_->clearStorage();
414 }
415 else
416 {
417 ignoreCellsPtr_.reset(new bitSet);
418 }
419
420 // Get sub-mesh if any
421 if (!subMeshPtr_ && hasCellZones)
422 {
423 const label exposedPatchi =
424 mesh().boundaryMesh().findPatchID(exposedPatchName_);
425
426 bitSet cellsToSelect(mesh().cellZones().selection(zoneNames_));
427
429 << "Allocating subset of size "
430 << cellsToSelect.count() << " with exposed faces into patch "
431 << exposedPatchi << endl;
432
433
434 // If we will use a fvMeshSubset so can apply bounds as well to make
435 // the initial selection smaller.
436
437 const boundBox& clipBb = isoParams_.getClipBounds();
438 if (clipBb.valid() && cellsToSelect.any())
439 {
440 const auto& cellCentres = fvm.C();
441
442 for (const label celli : cellsToSelect)
443 {
444 const point& cc = cellCentres[celli];
445
446 if (!clipBb.contains(cc))
447 {
448 cellsToSelect.unset(celli);
449 }
450 }
451
453 << "Bounded subset of size "
454 << cellsToSelect.count() << endl;
455 }
456
457 subMeshPtr_.reset
458 (
459 new fvMeshSubset(fvm, cellsToSelect, exposedPatchi)
460 );
461 }
462 }
463
464
465 // Select either the submesh or the underlying mesh
466 const fvMesh& mesh =
467 (
468 subMeshPtr_
469 ? subMeshPtr_->subMesh()
470 : fvm
471 );
472
473 checkBoundsIntersection(plane_, mesh.bounds());
474
475
476 // Distance to cell centres
477 // ~~~~~~~~~~~~~~~~~~~~~~~~
478
479 cellDistancePtr_.reset
480 (
482 (
483 IOobject
484 (
485 "cellDistance",
486 mesh.time().timeName(),
487 mesh.time(),
490 false
491 ),
492 mesh,
494 )
495 );
496 const volScalarField& cellDistance = cellDistancePtr_();
497
498 setDistanceFields(plane_);
499
500 if (debug)
501 {
502 Pout<< "Writing cell distance:" << cellDistance.objectPath() << endl;
503 cellDistance.write();
504 pointScalarField pointDist
505 (
506 IOobject
507 (
508 "pointDistance",
509 mesh.time().timeName(),
510 mesh.time(),
513 false
514 ),
517 );
518 pointDist.primitiveFieldRef() = pointDistance_;
519
520 Pout<< "Writing point distance:" << pointDist.objectPath() << endl;
521 pointDist.write();
522 }
523
524
525 // Create surfaces for each offset
526
527 PtrList<isoSurfaceBase> isoSurfPtrs(offsets_.size());
528
529 forAll(offsets_, surfi)
530 {
531 isoSurfPtrs.set
532 (
533 surfi,
535 (
536 isoParams_,
537 cellDistance,
538 pointDistance_,
539 offsets_[surfi],
540 *ignoreCellsPtr_
541 )
542 );
543 }
544
545 // And flatten
546 combineSurfaces(isoSurfPtrs);
547
548
549 // Discard fields if not required by an iso-surface
550 if (!isoSurfacePtr_)
551 {
552 cellDistancePtr_.reset(nullptr);
553 pointDistance_.clear();
554 }
555
556 if (debug)
557 {
558 print(Pout, debug);
559 Pout<< endl;
560 }
561}
562
563
564// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
565
567(
568 const word& name,
569 const polyMesh& mesh,
570 const dictionary& dict
571)
572:
574 plane_(definePlane(mesh, dict)),
575 offsets_(),
576 isoParams_
577 (
578 dict,
579 isoSurfaceParams::ALGO_TOPO,
580 isoSurfaceParams::filterType::DIAGCELL
581 ),
582 average_(dict.getOrDefault("average", false)),
583 simpleSubMesh_(dict.getOrDefault("simpleSubMesh", false)),
584 zoneNames_(),
585 exposedPatchName_(),
586 needsUpdate_(true),
587
588 surface_(),
589 meshCells_(),
590 isoSurfacePtr_(nullptr),
591
592 subMeshPtr_(nullptr),
593 ignoreCellsPtr_(nullptr),
594 cellDistancePtr_(nullptr),
595 pointDistance_()
596{
597 dict.readIfPresent("offsets", offsets_);
598
599 if (offsets_.empty())
600 {
601 offsets_.resize(1);
602 offsets_.first() = Zero;
603 }
604
605 if (offsets_.size() > 1)
606 {
607 const label nOrig = offsets_.size();
608
609 inplaceUniqueSort(offsets_);
610
611 if (nOrig != offsets_.size())
612 {
614 << "Removed non-unique offsets" << nl;
615 }
616 }
617
618 if (isoParams_.algorithm() == isoSurfaceParams::ALGO_POINT)
619 {
620 // Not possible for ALGO_POINT
621 simpleSubMesh_ = false;
622
623 // Not possible for ALGO_POINT
624 if (offsets_.size() > 1)
625 {
627 << "Multiple offsets with iso-surface (point) not supported"
628 << " since needs original interpolators." << nl
629 << exit(FatalIOError);
630 }
631 }
632
633
634 // Zones
635
636 if (!dict.readIfPresent("zones", zoneNames_) && dict.found("zone"))
637 {
638 zoneNames_.resize(1);
639 dict.readEntry("zone", zoneNames_.first());
640 }
641
642 if (-1 != mesh.cellZones().findIndex(zoneNames_))
643 {
644 dict.readIfPresent("exposedPatchName", exposedPatchName_);
645
647 << "Restricting to cellZone(s) " << flatOutput(zoneNames_)
648 << " with exposed internal faces into patch "
649 << mesh.boundaryMesh().findPatchID(exposedPatchName_) << endl;
650 }
651}
652
653
654// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
655
657{
658 return needsUpdate_;
659}
660
661
663{
664 if (debug)
665 {
666 Pout<< "sampledCuttingPlane::expire :"
667 << " needsUpdate:" << needsUpdate_ << endl;
668 }
669
670 surface_.clear();
671 meshCells_.clear();
672 isoSurfacePtr_.reset(nullptr);
673
674 // Clear derived data
676
677 // Already marked as expired
678 if (needsUpdate_)
679 {
680 return false;
681 }
682
683 needsUpdate_ = true;
684 return true;
685}
686
687
689{
690 if (debug)
691 {
692 Pout<< "sampledCuttingPlane::update :"
693 << " needsUpdate:" << needsUpdate_ << endl;
694 }
695
696 if (!needsUpdate_)
697 {
698 return false;
699 }
700
701 createGeometry();
702
703 needsUpdate_ = false;
704 return true;
705}
706
707
710(
711 const interpolation<scalar>& sampler
712) const
713{
714 return sampleOnFaces(sampler);
715}
716
717
720(
721 const interpolation<vector>& sampler
722) const
723{
724 return sampleOnFaces(sampler);
725}
726
727
730(
731 const interpolation<sphericalTensor>& sampler
732) const
733{
734 return sampleOnFaces(sampler);
735}
736
737
740(
741 const interpolation<symmTensor>& sampler
742) const
743{
744 return sampleOnFaces(sampler);
745}
746
747
750(
751 const interpolation<tensor>& sampler
752) const
753{
754 return sampleOnFaces(sampler);
755}
756
757
760(
761 const interpolation<scalar>& interpolator
762) const
763{
764 return sampleOnPoints(interpolator);
765}
766
767
770(
771 const interpolation<vector>& interpolator
772) const
773{
774 return sampleOnPoints(interpolator);
775}
776
777
780(
781 const interpolation<sphericalTensor>& interpolator
782) const
783{
784 return sampleOnPoints(interpolator);
785}
786
787
790(
791 const interpolation<symmTensor>& interpolator
792) const
793{
794 return sampleOnPoints(interpolator);
795}
796
797
800(
801 const interpolation<tensor>& interpolator
802) const
803{
804 return sampleOnPoints(interpolator);
805}
806
807
809{
810 os << "sampledCuttingPlane: " << name() << " :"
811 << " plane:" << plane_
812 << " offsets:" << flatOutput(offsets_);
813
814 if (level)
815 {
816 os << " faces:" << faces().size()
817 << " points:" << points().size();
818 }
819}
820
821
822// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
#define addNamedToRunTimeSelectionTable(baseType, thisType, argNames, lookupName)
Add to construction table with 'lookupName' as the key.
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
SubField< vector > subField
Declare type of subField.
Definition: Field.H:89
Minimal example by using system/controlDict.functions:
GeometricBoundaryField< scalar, fvPatchField, volMesh > Boundary
Type of boundary fields.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
void resize(const label len)
Adjust allocated size of list.
Definition: ListI.H:139
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Definition: Time.C:717
static word timeName(const scalar t, const int precision=precision_)
Definition: Time.C:780
T & first()
Return the first element of the list.
Definition: UListI.H:202
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
Definition: UListI.H:427
void size(const label n)
Older name for setAddressableSize.
Definition: UList.H:114
label findIndex(const wordRe &key) const
Zone index for the first match, return -1 if not found.
Definition: ZoneMesh.C:497
static word defaultName
The default cloud name: defaultCloud.
Definition: cloud.H:90
Constructs cutting plane through a mesh.
Definition: cuttingPlane.H:62
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
dictionary * findDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX)
Find and return a sub-dictionary pointer if present.
Definition: dictionaryI.H:127
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
Definition: dictionaryI.H:87
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
const volVectorField & C() const
Return cell centres as volVectorField.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
Definition: fvMesh.C:712
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:290
Abstract base class for volume field interpolation.
Definition: interpolation.H:60
Preferences for controlling iso-surface algorithms.
algorithmType algorithm() const noexcept
Get current algorithm.
@ LITERAL
String literal.
Definition: keyType.H:81
scalar print()
Print to screen.
Geometric class that creates a 3D plane and can return the intersection point between a line and the ...
Definition: plane.H:95
label findPatchID(const word &patchName, const bool allowNotFound=true) const
Find patch index given a name, return -1 if not found.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
const boundBox & bounds() const
Return mesh bounding box.
Definition: polyMesh.H:462
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Definition: polyMesh.H:456
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
Definition: polyMesh.H:504
virtual const pointField & points() const
Return raw points.
Definition: polyMesh.C:1083
const vectorField & faceCentres() const
const vectorField & cellCentres() const
label nPoints() const noexcept
Number of mesh points.
A sampledSurface defined by a plane using an iso-surface algorithm to cut the mesh.
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.
An abstract class for surfaces with sampling.
virtual void clearGeom() const
Additional cleanup when clearing the geometry.
const polyMesh & mesh() const noexcept
Access to the underlying mesh.
bool interpolate() const noexcept
Same as isPointData()
A class for managing temporary objects.
Definition: tmp.H:65
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
A class for handling words, derived from Foam::string.
Definition: word.H:68
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition: className.H:121
dynamicFvMesh & mesh
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:473
OBJstream os(runTime.globalPath()/outputName)
const labelList nFaces(UPstream::listGatherValues< label >(aMesh.nFaces()))
const pointField & points
label nPoints
#define DebugInfo
Report an information message using Foam::Info.
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
#define WarningInFunction
Report a warning using Foam::Warning.
List< bool > select(const label n, const labelUList &locations)
Definition: BitOps.C:142
Ostream & print(Ostream &os, UIntType value, char off='0', char on='1')
Print 0/1 bits in the (unsigned) integral type.
Definition: BitOps.H:240
Namespace for OpenFOAM.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
GeometricField< scalar, pointPatchField, pointMesh > pointScalarField
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:52
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:82
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:44
vector point
Point is a vector.
Definition: point.H:43
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
MeshedSurface< face > meshedSurface
void inplaceUniqueSort(ListType &input)
Inplace sorting and removal of duplicates.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
Definition: FlatOutput.H:215
IOerror FatalIOError
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
List< surfZone > surfZoneList
Definition: surfZoneList.H:47
List< face > faceList
A List of faces.
Definition: faceListFwd.H:47
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
fvPatchField< scalar > fvPatchScalarField
constexpr char nl
The newline '\n' character (0x0a)
Definition: Ostream.H:53
labelList f(nPoints)
List< treeBoundBox > meshBb(1, treeBoundBox(boundBox(coarseMesh.points(), false)).extend(rndGen, 1e-3))
dictionary dict
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:333