searchableSurfaceCollection.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-2018 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 
28 #include "SortableList.H"
29 #include "Time.H"
30 #include "ListOps.H"
31 
32 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36 
37 defineTypeNameAndDebug(searchableSurfaceCollection, 0);
39 (
40  searchableSurface,
41  searchableSurfaceCollection,
42  dict
43 );
44 
45 }
46 
47 
48 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
49 
50 void Foam::searchableSurfaceCollection::findNearest
51 (
52  const pointField& samples,
53  scalarField& minDistSqr,
54  List<pointIndexHit>& nearestInfo,
55  labelList& nearestSurf
56 ) const
57 {
58  // Initialise
59  nearestInfo.setSize(samples.size());
60  nearestInfo = pointIndexHit();
61  nearestSurf.setSize(samples.size());
62  nearestSurf = -1;
63 
64  List<pointIndexHit> hitInfo(samples.size());
65 
66  const scalarField localMinDistSqr(samples.size(), great);
67 
68  forAll(subGeom_, surfI)
69  {
70  subGeom_[surfI].findNearest
71  (
72  cmptDivide // Transform then divide
73  (
74  transform_[surfI].localPosition(samples),
75  scale_[surfI]
76  ),
77  localMinDistSqr,
78  hitInfo
79  );
80 
81  forAll(hitInfo, pointi)
82  {
83  if (hitInfo[pointi].hit())
84  {
85  // Rework back into global coordinate sys. Multiply then
86  // transform
87  point globalPt = transform_[surfI].globalPosition
88  (
90  (
91  hitInfo[pointi].rawPoint(),
92  scale_[surfI]
93  )
94  );
95 
96  scalar distSqr = magSqr(globalPt - samples[pointi]);
97 
98  if (distSqr < minDistSqr[pointi])
99  {
100  minDistSqr[pointi] = distSqr;
101  nearestInfo[pointi].setPoint(globalPt);
102  nearestInfo[pointi].setHit();
103  nearestInfo[pointi].setIndex
104  (
105  hitInfo[pointi].index()
106  + indexOffset_[surfI]
107  );
108  nearestSurf[pointi] = surfI;
109  }
110  }
111  }
112  }
113 }
114 
115 
116 // Sort hits into per-surface bins. Misses are rejected. Maintains map back
117 // to position
118 void Foam::searchableSurfaceCollection::sortHits
119 (
120  const List<pointIndexHit>& info,
121  List<List<pointIndexHit>>& surfInfo,
122  labelListList& infoMap
123 ) const
124 {
125  // Count hits per surface.
126  labelList nHits(subGeom_.size(), 0);
127 
128  forAll(info, pointi)
129  {
130  if (info[pointi].hit())
131  {
132  label index = info[pointi].index();
133  label surfI = findLower(indexOffset_, index+1);
134  nHits[surfI]++;
135  }
136  }
137 
138  // Per surface the hit
139  surfInfo.setSize(subGeom_.size());
140  // Per surface the original position
141  infoMap.setSize(subGeom_.size());
142 
143  forAll(surfInfo, surfI)
144  {
145  surfInfo[surfI].setSize(nHits[surfI]);
146  infoMap[surfI].setSize(nHits[surfI]);
147  }
148  nHits = 0;
149 
150  forAll(info, pointi)
151  {
152  if (info[pointi].hit())
153  {
154  label index = info[pointi].index();
155  label surfI = findLower(indexOffset_, index+1);
156 
157  // Store for correct surface and adapt indices back to local
158  // ones
159  label localI = nHits[surfI]++;
160  surfInfo[surfI][localI] = pointIndexHit
161  (
162  info[pointi].hit(),
163  info[pointi].rawPoint(),
164  index-indexOffset_[surfI]
165  );
166  infoMap[surfI][localI] = pointi;
167  }
168  }
169 }
170 
171 
172 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
173 
175 (
176  const IOobject& io,
177  const dictionary& dict
178 )
179 :
180  searchableSurface(io),
181  instance_(dict.size()),
182  scale_(dict.size()),
183  transform_(dict.size()),
184  subGeom_(dict.size()),
185  mergeSubRegions_(dict.lookup("mergeSubRegions")),
186  indexOffset_(dict.size()+1)
187 {
188  Info<< "SearchableCollection : " << name() << endl;
189 
190  label surfI = 0;
191  label startIndex = 0;
192  forAllConstIter(dictionary, dict, iter)
193  {
194  if (dict.isDict(iter().keyword()))
195  {
196  instance_[surfI] = iter().keyword();
197 
198  const dictionary& subDict = dict.subDict(instance_[surfI]);
199 
200  scale_[surfI] = subDict.lookup("scale");
201  transform_.set
202  (
203  surfI,
205  (
206  subDict.subDict("transform")
207  )
208  );
209 
210  const word subGeomName(subDict.lookup("surface"));
211  // Pout<< "Trying to find " << subGeomName << endl;
212 
213  const searchableSurface& s =
214  io.db().lookupObject<searchableSurface>(subGeomName);
215 
216  // I don't know yet how to handle the globalSize combined with
217  // regionOffset. Would cause non-consecutive indices locally
218  // if all indices offset by globalSize() of the local region...
219  if (s.size() != s.globalSize())
220  {
222  << "Cannot use a distributed surface in a collection."
223  << exit(FatalError);
224  }
225 
226  subGeom_.set(surfI, &const_cast<searchableSurface&>(s));
227 
228  indexOffset_[surfI] = startIndex;
229  startIndex += subGeom_[surfI].size();
230 
231  Info<< " instance : " << instance_[surfI] << endl;
232  Info<< " surface : " << s.name() << endl;
233  Info<< " scale : " << scale_[surfI] << endl;
234  Info<< " coordsys : " << transform_[surfI] << endl;
235 
236  surfI++;
237  }
238  }
239  indexOffset_[surfI] = startIndex;
240 
241  instance_.setSize(surfI);
242  scale_.setSize(surfI);
243  transform_.setSize(surfI);
244  subGeom_.setSize(surfI);
245  indexOffset_.setSize(surfI+1);
246 
247  // Bounds is the overall bounds
248  bounds() = boundBox(point::max, point::min);
249 
250  forAll(subGeom_, surfI)
251  {
252  const boundBox& surfBb = subGeom_[surfI].bounds();
253 
254  // Transform back to global coordinate sys.
255  const point surfBbMin = transform_[surfI].globalPosition
256  (
258  (
259  surfBb.min(),
260  scale_[surfI]
261  )
262  );
263  const point surfBbMax = transform_[surfI].globalPosition
264  (
266  (
267  surfBb.max(),
268  scale_[surfI]
269  )
270  );
271 
272  bounds().min() = min(bounds().min(), surfBbMin);
273  bounds().max() = max(bounds().max(), surfBbMax);
274  }
275 }
276 
277 
278 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
279 
281 {}
282 
283 
284 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
285 
287 {
288  if (regions_.size() == 0)
289  {
290  regionOffset_.setSize(subGeom_.size());
291 
292  DynamicList<word> allRegions;
293  forAll(subGeom_, surfI)
294  {
295  regionOffset_[surfI] = allRegions.size();
296 
297  if (mergeSubRegions_)
298  {
299  // Single name regardless how many regions subsurface has
300  allRegions.append(instance_[surfI] + "_" + Foam::name(surfI));
301  }
302  else
303  {
304  const wordList& subRegions = subGeom_[surfI].regions();
305 
306  forAll(subRegions, i)
307  {
308  allRegions.append(instance_[surfI] + "_" + subRegions[i]);
309  }
310  }
311  }
312  regions_.transfer(allRegions.shrink());
313  }
314  return regions_;
315 }
316 
317 
319 {
320  return indexOffset_.last();
321 }
322 
323 
326 {
327  tmp<pointField> tCtrs = tmp<pointField>(new pointField(size()));
328  pointField& ctrs = tCtrs.ref();
329 
330  // Append individual coordinates
331  label coordI = 0;
332 
333  forAll(subGeom_, surfI)
334  {
335  const pointField subCoords(subGeom_[surfI].coordinates());
336 
337  forAll(subCoords, i)
338  {
339  ctrs[coordI++] = transform_[surfI].globalPosition
340  (
342  (
343  subCoords[i],
344  scale_[surfI]
345  )
346  );
347  }
348  }
349 
350  return tCtrs;
351 }
352 
353 
355 (
356  pointField& centres,
357  scalarField& radiusSqr
358 ) const
359 {
360  centres.setSize(size());
361  radiusSqr.setSize(centres.size());
362 
363  // Append individual coordinates
364  label coordI = 0;
365 
366  forAll(subGeom_, surfI)
367  {
368  scalar maxScale = cmptMax(scale_[surfI]);
369 
370  pointField subCentres;
371  scalarField subRadiusSqr;
372  subGeom_[surfI].boundingSpheres(subCentres, subRadiusSqr);
373 
374  forAll(subCentres, i)
375  {
376  centres[coordI] = transform_[surfI].globalPosition
377  (
379  (
380  subCentres[i],
381  scale_[surfI]
382  )
383  );
384  radiusSqr[coordI] = maxScale*subRadiusSqr[i];
385  coordI++;
386  }
387  }
388 }
389 
390 
393 {
394  // Get overall size
395  label nPoints = 0;
396 
397  forAll(subGeom_, surfI)
398  {
399  nPoints += subGeom_[surfI].points()().size();
400  }
401 
402  tmp<pointField> tPts(new pointField(nPoints));
403  pointField& pts = tPts.ref();
404 
405  // Append individual coordinates
406  nPoints = 0;
407 
408  forAll(subGeom_, surfI)
409  {
410  const pointField subCoords(subGeom_[surfI].points());
411 
412  forAll(subCoords, i)
413  {
414  pts[nPoints++] = transform_[surfI].globalPosition
415  (
417  (
418  subCoords[i],
419  scale_[surfI]
420  )
421  );
422  }
423  }
424 
425  return tPts;
426 }
427 
428 
429 void Foam::searchableSurfaceCollection::findNearest
430 (
431  const pointField& samples,
432  const scalarField& nearestDistSqr,
433  List<pointIndexHit>& nearestInfo
434 ) const
435 {
436  // How to scale distance?
437  scalarField minDistSqr(nearestDistSqr);
438 
439  labelList nearestSurf;
440  findNearest
441  (
442  samples,
443  minDistSqr,
444  nearestInfo,
445  nearestSurf
446  );
447 }
448 
449 
451 (
452  const pointField& start,
453  const pointField& end,
454  List<pointIndexHit>& info
455 ) const
456 {
457  info.setSize(start.size());
458  info = pointIndexHit();
459 
460  // Current nearest (to start) intersection
461  pointField nearest(end);
462 
463  List<pointIndexHit> hitInfo(start.size());
464 
465  forAll(subGeom_, surfI)
466  {
467  // Starting point
469  (
470  transform_[surfI].localPosition
471  (
472  start
473  ),
474  scale_[surfI]
475  );
476 
477  // Current best end point
479  (
480  transform_[surfI].localPosition
481  (
482  nearest
483  ),
484  scale_[surfI]
485  );
486 
487  subGeom_[surfI].findLine(e0, e1, hitInfo);
488 
489  forAll(hitInfo, pointi)
490  {
491  if (hitInfo[pointi].hit())
492  {
493  // Transform back to global coordinate sys.
494  nearest[pointi] = transform_[surfI].globalPosition
495  (
497  (
498  hitInfo[pointi].rawPoint(),
499  scale_[surfI]
500  )
501  );
502  info[pointi] = hitInfo[pointi];
503  info[pointi].rawPoint() = nearest[pointi];
504  info[pointi].setIndex
505  (
506  hitInfo[pointi].index()
507  + indexOffset_[surfI]
508  );
509  }
510  }
511  }
512 
513 
514  // Debug check
515  if (false)
516  {
517  forAll(info, pointi)
518  {
519  if (info[pointi].hit())
520  {
521  vector n(end[pointi] - start[pointi]);
522  scalar magN = mag(n);
523 
524  if (magN > small)
525  {
526  n /= mag(n);
527 
528  scalar s = ((info[pointi].rawPoint()-start[pointi])&n);
529 
530  if (s < 0 || s > 1)
531  {
533  << "point:" << info[pointi]
534  << " s:" << s
535  << " outside vector "
536  << " start:" << start[pointi]
537  << " end:" << end[pointi]
538  << abort(FatalError);
539  }
540  }
541  }
542  }
543  }
544 }
545 
546 
548 (
549  const pointField& start,
550  const pointField& end,
551  List<pointIndexHit>& info
552 ) const
553 {
554  // To be done ...
555  findLine(start, end, info);
556 }
557 
558 
560 (
561  const pointField& start,
562  const pointField& end,
564 ) const
565 {
566  // To be done. Assume for now only one intersection.
567  List<pointIndexHit> nearestInfo;
568  findLine(start, end, nearestInfo);
569 
570  info.setSize(start.size());
571  forAll(info, pointi)
572  {
573  if (nearestInfo[pointi].hit())
574  {
575  info[pointi].setSize(1);
576  info[pointi][0] = nearestInfo[pointi];
577  }
578  else
579  {
580  info[pointi].clear();
581  }
582  }
583 }
584 
585 
587 (
588  const List<pointIndexHit>& info,
589  labelList& region
590 ) const
591 {
592  if (subGeom_.size() == 0)
593  {}
594  else if (subGeom_.size() == 1)
595  {
596  if (mergeSubRegions_)
597  {
598  region.setSize(info.size());
599  region = regionOffset_[0];
600  }
601  else
602  {
603  subGeom_[0].getRegion(info, region);
604  }
605  }
606  else
607  {
608  // Multiple surfaces. Sort by surface.
609 
610  // Per surface the hit
611  List<List<pointIndexHit>> surfInfo;
612  // Per surface the original position
613  List<List<label>> infoMap;
614  sortHits(info, surfInfo, infoMap);
615 
616  region.setSize(info.size());
617  region = -1;
618 
619  // Do region tests
620 
621  if (mergeSubRegions_)
622  {
623  // Actually no need for surfInfo. Just take region for surface.
624  forAll(infoMap, surfI)
625  {
626  const labelList& map = infoMap[surfI];
627  forAll(map, i)
628  {
629  region[map[i]] = regionOffset_[surfI];
630  }
631  }
632  }
633  else
634  {
635  forAll(infoMap, surfI)
636  {
637  labelList surfRegion;
638  subGeom_[surfI].getRegion(surfInfo[surfI], surfRegion);
639 
640  const labelList& map = infoMap[surfI];
641  forAll(map, i)
642  {
643  region[map[i]] = regionOffset_[surfI] + surfRegion[i];
644  }
645  }
646  }
647  }
648 }
649 
650 
652 (
653  const List<pointIndexHit>& info,
654  vectorField& normal
655 ) const
656 {
657  if (subGeom_.size() == 0)
658  {}
659  else if (subGeom_.size() == 1)
660  {
661  subGeom_[0].getNormal(info, normal);
662  }
663  else
664  {
665  // Multiple surfaces. Sort by surface.
666 
667  // Per surface the hit
668  List<List<pointIndexHit>> surfInfo;
669  // Per surface the original position
670  List<List<label>> infoMap;
671  sortHits(info, surfInfo, infoMap);
672 
673  normal.setSize(info.size());
674 
675  // Do region tests
676  forAll(surfInfo, surfI)
677  {
678  vectorField surfNormal;
679  subGeom_[surfI].getNormal(surfInfo[surfI], surfNormal);
680 
681  // Transform back to global coordinate sys.
682  surfNormal = transform_[surfI].globalVector(surfNormal);
683 
684  const labelList& map = infoMap[surfI];
685  forAll(map, i)
686  {
687  normal[map[i]] = surfNormal[i];
688  }
689  }
690  }
691 }
692 
693 
695 (
696  const pointField& points,
697  List<volumeType>& volType
698 ) const
699 {
701  << "Volume type not supported for collection."
702  << exit(FatalError);
703 }
704 
705 
707 (
708  const List<treeBoundBox>& bbs,
709  const bool keepNonLocal,
710  autoPtr<mapDistribute>& faceMap,
711  autoPtr<mapDistribute>& pointMap
712 )
713 {
714  forAll(subGeom_, surfI)
715  {
716  // Note:Transform the bounding boxes? Something like
717  // pointField bbPoints =
718  // cmptDivide
719  // (
720  // transform_[surfI].localPosition
721  // (
722  // bbs[i].points()
723  // ),
724  // scale_[surfI]
725  // );
726  // treeBoundBox newBb(bbPoints);
727 
728  // Note: what to do with faceMap, pointMap from multiple surfaces?
729  subGeom_[surfI].distribute
730  (
731  bbs,
732  keepNonLocal,
733  faceMap,
734  pointMap
735  );
736  }
737 }
738 
739 
741 {
742  forAll(subGeom_, surfI)
743  {
744  subGeom_[surfI].setField
745  (
746  static_cast<const labelList&>
747  (
749  (
750  values,
751  subGeom_[surfI].size(),
752  indexOffset_[surfI]
753  )
754  )
755  );
756  }
757 }
758 
759 
761 (
762  const List<pointIndexHit>& info,
763  labelList& values
764 ) const
765 {
766  if (subGeom_.size() == 0)
767  {}
768  else if (subGeom_.size() == 1)
769  {
770  subGeom_[0].getField(info, values);
771  }
772  else
773  {
774  // Multiple surfaces. Sort by surface.
775 
776  // Per surface the hit
777  List<List<pointIndexHit>> surfInfo;
778  // Per surface the original position
779  List<List<label>> infoMap;
780  sortHits(info, surfInfo, infoMap);
781 
782  // Do surface tests
783  forAll(surfInfo, surfI)
784  {
785  labelList surfValues;
786  subGeom_[surfI].getField(surfInfo[surfI], surfValues);
787 
788  if (surfValues.size())
789  {
790  // Size values only when we have a surface that supports it.
791  values.setSize(info.size());
792 
793  const labelList& map = infoMap[surfI];
794  forAll(map, i)
795  {
796  values[map[i]] = surfValues[i];
797  }
798  }
799  }
800  }
801 }
802 
803 
804 // ************************************************************************* //
List< labelList > labelListList
A List of labelList.
Definition: labelList.H:57
void cmptMax(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
virtual void getNormal(const List< pointIndexHit > &, vectorField &normal) const
From a set of points and indices get the normal.
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
virtual void distribute(const List< treeBoundBox > &, const bool keepNonLocal, autoPtr< mapDistribute > &faceMap, autoPtr< mapDistribute > &pointMap)
Set bounds of surface. Bounds currently set as list of.
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
virtual void boundingSpheres(pointField &centres, scalarField &radiusSqr) const
Get bounding spheres (centre and radius squared), one per element.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
error FatalError
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:319
virtual void getRegion(const List< pointIndexHit > &, labelList &region) const
From a set of points and indices get the region.
T & ref() const
Return non-const reference or generate a fatal error.
Definition: tmpI.H:174
void size(const label)
Override size to be inconsistent with allocated storage.
Definition: ListI.H:163
searchableSurfaceCollection(const IOobject &io, const dictionary &dict)
Construct from dictionary (used by searchableSurface)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:256
virtual void findLineAny(const pointField &start, const pointField &end, List< pointIndexHit > &) const
Return any intersection on segment from start to end.
A bounding box defined in terms of the points at its extremities.
Definition: boundBox.H:58
PointIndexHit< point > pointIndexHit
Definition: pointIndexHit.H:42
Base class of (analytical or triangulated) surface. Encapsulates all the search routines. WIP.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
virtual void getVolumeType(const pointField &, List< volumeType > &) const
Determine type (inside/outside/mixed) for point. unknown if.
Macros for easy insertion into run-time selection tables.
bool isDict(const word &) const
Check if entry is a sub-dictionary.
Definition: dictionary.C:653
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
Various functions to operate on Lists.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Definition: dictionary.C:699
virtual void findLine(const pointField &start, const pointField &end, List< pointIndexHit > &) const
Find first intersection on segment from start to end.
A List obtained as a section of another List.
Definition: SubList.H:53
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().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))
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:42
const pointField & points
virtual tmp< pointField > points() const
Get the points that define the surface.
void clear()
Clear the list, i.e. set size to zero.
Definition: ListI.H:124
A class for handling words, derived from string.
Definition: word.H:59
label nPoints
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual void findLineAll(const pointField &start, const pointField &end, List< List< pointIndexHit >> &) const
Get all intersections in order from start to end.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
Definition: DynamicListI.H:296
virtual label size() const
Range of local indices that can be returned.
List< label > labelList
A List of labels.
Definition: labelList.H:56
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
Definition: pEqn.H:29
errorManip< error > abort(error &err)
Definition: errorManip.H:131
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
Definition: DynamicListI.H:252
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
virtual void getField(const List< pointIndexHit > &, labelList &) const
WIP. From a set of hits (points and.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
virtual void setField(const labelList &values)
WIP. Store element-wise field.
void setSize(const label)
Reset size of List.
Definition: List.C:281
const point & max() const
Maximum describing the bounding box.
Definition: boundBoxI.H:60
static autoPtr< coordinateSystem > New(const objectRegistry &obr, const dictionary &dict)
Select constructed from dictionary and objectRegistry.
PtrList< coordinateSystem > coordinates(solidRegions.size())
vector point
Point is a vector.
Definition: point.H:41
virtual tmp< pointField > coordinates() const
Get representative set of element coordinates.
messageStream Info
label findLower(const ListType &, typename ListType::const_reference, const label stary, const BinaryOp &bop)
Find last element < given value in sorted list and return index,.
dimensioned< scalar > mag(const dimensioned< Type > &)
label n
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
const point & min() const
Minimum describing the bounding box.
Definition: boundBoxI.H:54
A class for managing temporary objects.
Definition: PtrList.H:53
const objectRegistry & db() const
Return the local objectRegistry.
Definition: IOobject.C:354
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
Namespace for OpenFOAM.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:583
virtual const wordList & regions() const
Names of regions.