Field.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 | Copyright (C) 2011-2016 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 "FieldMapper.H"
27 #include "FieldM.H"
28 #include "dictionary.H"
29 #include "contiguous.H"
30 #include "mapDistributeBase.H"
31 #include "flipOp.H"
32 
33 // * * * * * * * * * * * * * * * Static Members * * * * * * * * * * * * * * //
34 
35 template<class Type>
36 const char* const Foam::Field<Type>::typeName("Field");
37 
38 
39 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
40 
41 template<class Type>
43 :
44  List<Type>()
45 {}
46 
47 
48 template<class Type>
50 :
51  List<Type>(size)
52 {}
53 
54 
55 template<class Type>
56 Foam::Field<Type>::Field(const label size, const Type& t)
57 :
58  List<Type>(size, t)
59 {}
60 
61 
62 template<class Type>
64 :
65  List<Type>(size, Zero)
66 {}
67 
68 
69 template<class Type>
71 (
72  const UList<Type>& mapF,
73  const labelUList& mapAddressing
74 )
75 :
76  List<Type>(mapAddressing.size())
77 {
78  map(mapF, mapAddressing);
79 }
80 
81 
82 template<class Type>
84 (
85  const tmp<Field<Type>>& tmapF,
86  const labelUList& mapAddressing
87 )
88 :
89  List<Type>(mapAddressing.size())
90 {
91  map(tmapF, mapAddressing);
92 }
93 
94 
95 template<class Type>
97 (
98  const UList<Type>& mapF,
99  const labelListList& mapAddressing,
100  const scalarListList& mapWeights
101 )
102 :
103  List<Type>(mapAddressing.size())
104 {
105  map(mapF, mapAddressing, mapWeights);
106 }
107 
108 
109 template<class Type>
111 (
112  const tmp<Field<Type>>& tmapF,
113  const labelListList& mapAddressing,
114  const scalarListList& mapWeights
115 )
116 :
117  List<Type>(mapAddressing.size())
118 {
119  map(tmapF, mapAddressing, mapWeights);
120 }
121 
122 
123 template<class Type>
125 (
126  const UList<Type>& mapF,
127  const FieldMapper& mapper,
128  const bool applyFlip
129 )
130 :
131  List<Type>(mapper.size())
132 {
133  map(mapF, mapper, applyFlip);
134 }
135 
136 
137 template<class Type>
139 (
140  const UList<Type>& mapF,
141  const FieldMapper& mapper,
142  const Type& defaultValue,
143  const bool applyFlip
144 )
145 :
146  List<Type>(mapper.size(), defaultValue)
147 {
148  map(mapF, mapper, applyFlip);
149 }
150 
151 
152 template<class Type>
154 (
155  const UList<Type>& mapF,
156  const FieldMapper& mapper,
157  const UList<Type>& defaultValues,
158  const bool applyFlip
159 )
160 :
161  List<Type>(defaultValues)
162 {
163  map(mapF, mapper, applyFlip);
164 }
165 
166 
167 template<class Type>
169 (
170  const tmp<Field<Type>>& tmapF,
171  const FieldMapper& mapper,
172  const bool applyFlip
173 )
174 :
175  List<Type>(mapper.size())
176 {
177  map(tmapF, mapper, applyFlip);
178 }
179 
180 
181 template<class Type>
183 (
184  const tmp<Field<Type>>& tmapF,
185  const FieldMapper& mapper,
186  const Type& defaultValue,
187  const bool applyFlip
188 )
189 :
190  List<Type>(mapper.size(), defaultValue)
191 {
192  map(tmapF, mapper, applyFlip);
193 }
194 
195 
196 template<class Type>
198 (
199  const tmp<Field<Type>>& tmapF,
200  const FieldMapper& mapper,
201  const UList<Type>& defaultValues,
202  const bool applyFlip
203 )
204 :
205  List<Type>(defaultValues)
206 {
207  map(tmapF, mapper, applyFlip);
208 }
209 
210 
211 template<class Type>
213 :
214  tmp<Field<Type>>::refCount(),
215  List<Type>(f)
216 {}
217 
218 
219 template<class Type>
221 :
222  List<Type>(f, reuse)
223 {}
224 
225 
226 template<class Type>
228 :
229  List<Type>(f)
230 {}
231 
232 
233 template<class Type>
235 :
236  List<Type>(f)
237 {}
238 
239 
240 template<class Type>
242 :
243  List<Type>(list)
244 {}
245 
246 
247 #ifndef NoConstructFromTmp
248 template<class Type>
250 :
251  List<Type>(const_cast<Field<Type>&>(tf()), tf.isTmp())
252 {
253  tf.clear();
254 }
255 #endif
256 
257 
258 template<class Type>
260 :
261  List<Type>(is)
262 {}
263 
264 
265 template<class Type>
267 (
268  const word& keyword,
269  const dictionary& dict,
270  const label s
271 )
272 {
273  if (s)
274  {
275  ITstream& is = dict.lookup(keyword);
276 
277  // Read first token
278  token firstToken(is);
279 
280  if (firstToken.isWord())
281  {
282  if (firstToken.wordToken() == "uniform")
283  {
284  this->setSize(s);
286  }
287  else if (firstToken.wordToken() == "nonuniform")
288  {
289  is >> static_cast<List<Type>&>(*this);
290  if (this->size() != s)
291  {
293  (
294  dict
295  ) << "size " << this->size()
296  << " is not equal to the given value of " << s
297  << exit(FatalIOError);
298  }
299  }
300  else
301  {
303  (
304  dict
305  ) << "expected keyword 'uniform' or 'nonuniform', found "
306  << firstToken.wordToken()
307  << exit(FatalIOError);
308  }
309  }
310  else
311  {
312  if (is.version() == 2.0)
313  {
315  (
316  dict
317  ) << "expected keyword 'uniform' or 'nonuniform', "
318  "assuming deprecated Field format from "
319  "Foam version 2.0." << endl;
320 
321  this->setSize(s);
322 
323  is.putBack(firstToken);
325  }
326  else
327  {
329  (
330  dict
331  ) << "expected keyword 'uniform' or 'nonuniform', found "
332  << firstToken.info()
333  << exit(FatalIOError);
334  }
335  }
336  }
337 }
338 
339 
340 template<class Type>
342 {
343  return tmp<Field<Type>>(new Field<Type>(*this));
344 }
345 
346 
347 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
348 
349 template<class Type>
351 (
352  const UList<Type>& mapF,
353  const labelUList& mapAddressing
354 )
355 {
356  Field<Type>& f = *this;
357 
358  if (f.size() != mapAddressing.size())
359  {
360  f.setSize(mapAddressing.size());
361  }
362 
363  if (mapF.size() > 0)
364  {
365  forAll(f, i)
366  {
367  label mapI = mapAddressing[i];
368 
369  if (mapI >= 0)
370  {
371  f[i] = mapF[mapI];
372  }
373  }
374  }
375 }
376 
377 
378 template<class Type>
380 (
381  const tmp<Field<Type>>& tmapF,
382  const labelUList& mapAddressing
383 )
384 {
385  map(tmapF(), mapAddressing);
386  tmapF.clear();
387 }
388 
389 
390 template<class Type>
392 (
393  const UList<Type>& mapF,
394  const labelListList& mapAddressing,
395  const scalarListList& mapWeights
396 )
397 {
398  Field<Type>& f = *this;
399 
400  if (f.size() != mapAddressing.size())
401  {
402  f.setSize(mapAddressing.size());
403  }
404 
405  if (mapWeights.size() != mapAddressing.size())
406  {
408  << mapWeights.size() << " map size: " << mapAddressing.size()
409  << abort(FatalError);
410  }
411 
412  forAll(f, i)
413  {
414  const labelList& localAddrs = mapAddressing[i];
415  const scalarList& localWeights = mapWeights[i];
416 
417  f[i] = Zero;
418 
419  forAll(localAddrs, j)
420  {
421  f[i] += localWeights[j]*mapF[localAddrs[j]];
422  }
423  }
424 }
425 
426 
427 template<class Type>
429 (
430  const tmp<Field<Type>>& tmapF,
431  const labelListList& mapAddressing,
432  const scalarListList& mapWeights
433 )
434 {
435  map(tmapF(), mapAddressing, mapWeights);
436  tmapF.clear();
437 }
438 
439 
440 template<class Type>
442 (
443  const UList<Type>& mapF,
444  const FieldMapper& mapper,
445  const bool applyFlip
446 )
447 {
448  if (mapper.distributed())
449  {
450  // Fetch remote parts of mapF
451  const mapDistributeBase& distMap = mapper.distributeMap();
452  Field<Type> newMapF(mapF);
453 
454  if (applyFlip)
455  {
456  distMap.distribute(newMapF);
457  }
458  else
459  {
460  distMap.distribute(newMapF, noOp());
461  }
462 
463  if (mapper.direct() && notNull(mapper.directAddressing()))
464  {
465  map(newMapF, mapper.directAddressing());
466  }
467  else if (!mapper.direct())
468  {
469  map(newMapF, mapper.addressing(), mapper.weights());
470  }
471  else if (mapper.direct() && isNull(mapper.directAddressing()))
472  {
473  // Special case, no local mapper. Assume ordering already correct
474  // from distribution. Note: this behaviour is different compared
475  // to local mapper.
476  this->transfer(newMapF);
477  this->setSize(mapper.size());
478  }
479  }
480  else
481  {
482  if
483  (
484  mapper.direct()
485  && notNull(mapper.directAddressing())
486  && mapper.directAddressing().size()
487  )
488  {
489  map(mapF, mapper.directAddressing());
490  }
491  else if (!mapper.direct() && mapper.addressing().size())
492  {
493  map(mapF, mapper.addressing(), mapper.weights());
494  }
495  }
496 }
497 
498 
499 template<class Type>
501 (
502  const tmp<Field<Type>>& tmapF,
503  const FieldMapper& mapper,
504  const bool applyFlip
505 )
506 {
507  map(tmapF(), mapper, applyFlip);
508  tmapF.clear();
509 }
510 
511 
512 template<class Type>
514 (
515  const FieldMapper& mapper,
516  const bool applyFlip
517 )
518 {
519  if (mapper.distributed())
520  {
521  // Fetch remote parts of *this
522  const mapDistributeBase& distMap = mapper.distributeMap();
523  Field<Type> fCpy(*this);
524 
525  if (applyFlip)
526  {
527  distMap.distribute(fCpy);
528  }
529  else
530  {
531  distMap.distribute(fCpy, noOp());
532  }
533 
534  if
535  (
536  (mapper.direct()
537  && notNull(mapper.directAddressing()))
538  || !mapper.direct()
539  )
540  {
541  this->map(fCpy, mapper);
542  }
543  else if (mapper.direct() && isNull(mapper.directAddressing()))
544  {
545  // Special case, no local mapper. Assume ordering already correct
546  // from distribution. Note: this behaviour is different compared
547  // to local mapper.
548  this->transfer(fCpy);
549  this->setSize(mapper.size());
550  }
551  }
552  else
553  {
554  if
555  (
556  (
557  mapper.direct()
558  && notNull(mapper.directAddressing())
559  && mapper.directAddressing().size()
560  )
561  || (!mapper.direct() && mapper.addressing().size())
562  )
563  {
564  Field<Type> fCpy(*this);
565  map(fCpy, mapper);
566  }
567  else
568  {
569  this->setSize(mapper.size());
570  }
571  }
572 }
573 
574 
575 template<class Type>
577 (
578  const UList<Type>& mapF,
579  const labelUList& mapAddressing
580 )
581 {
582  Field<Type>& f = *this;
583 
584  forAll(mapF, i)
585  {
586  label mapI = mapAddressing[i];
587 
588  if (mapI >= 0)
589  {
590  f[mapI] = mapF[i];
591  }
592  }
593 }
594 
595 
596 template<class Type>
598 (
599  const tmp<Field<Type>>& tmapF,
600  const labelUList& mapAddressing
601 )
602 {
603  rmap(tmapF(), mapAddressing);
604  tmapF.clear();
605 }
606 
607 
608 template<class Type>
610 (
611  const UList<Type>& mapF,
612  const labelUList& mapAddressing,
613  const UList<scalar>& mapWeights
614 )
615 {
616  Field<Type>& f = *this;
617 
618  f = Zero;
619 
620  forAll(mapF, i)
621  {
622  f[mapAddressing[i]] += mapF[i]*mapWeights[i];
623  }
624 }
625 
626 
627 template<class Type>
629 (
630  const tmp<Field<Type>>& tmapF,
631  const labelUList& mapAddressing,
632  const UList<scalar>& mapWeights
633 )
634 {
635  rmap(tmapF(), mapAddressing, mapWeights);
636  tmapF.clear();
637 }
638 
639 
640 template<class Type>
642 {
643  TFOR_ALL_F_OP_OP_F(Type, *this, =, -, Type, *this)
644 }
645 
646 
647 template<class Type>
650 (
651  const direction d
652 ) const
653 {
654  tmp<Field<cmptType>> Component(new Field<cmptType>(this->size()));
655  ::Foam::component(Component.ref(), *this, d);
656  return Component;
657 }
658 
659 
660 template<class Type>
662 (
663  const direction d,
664  const UList<cmptType>& sf
665 )
666 {
667  TFOR_ALL_F_OP_FUNC_S_F(Type, *this, ., replace, const direction, d,
668  cmptType, sf)
669 }
670 
671 
672 template<class Type>
674 (
675  const direction d,
676  const tmp<Field<cmptType>>& tsf
677 )
678 {
679  replace(d, tsf());
680  tsf.clear();
681 }
682 
683 
684 template<class Type>
686 (
687  const direction d,
688  const cmptType& c
689 )
690 {
691  TFOR_ALL_F_OP_FUNC_S_S(Type, *this, ., replace, const direction, d,
692  cmptType, c)
693 }
694 
695 
696 template<class Type>
697 template<class VSForm>
698 VSForm Foam::Field<Type>::block(const label start) const
699 {
700  VSForm vs;
701  for (direction i=0; i<VSForm::nComponents; i++)
702  {
703  vs[i] = this->operator[](start + i);
704  }
705  return vs;
706 }
707 
708 
709 template<class Type>
711 {
712  tmp<Field<Type>> transpose(new Field<Type>(this->size()));
713  ::Foam::T(transpose.ref(), *this);
714  return transpose;
715 }
716 
717 
718 template<class Type>
719 void Foam::Field<Type>::writeEntry(const word& keyword, Ostream& os) const
720 {
721  os.writeKeyword(keyword);
722 
723  bool uniform = false;
724 
725  if (this->size() && contiguous<Type>())
726  {
727  uniform = true;
728 
729  forAll(*this, i)
730  {
731  if (this->operator[](i) != this->operator[](0))
732  {
733  uniform = false;
734  break;
735  }
736  }
737  }
738 
739  if (uniform)
740  {
741  os << "uniform " << this->operator[](0) << token::END_STATEMENT;
742  }
743  else
744  {
745  os << "nonuniform ";
747  os << token::END_STATEMENT;
748  }
749 
750  os << endl;
751 }
752 
753 
754 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
755 
756 template<class Type>
758 {
759  if (this == &rhs)
760  {
762  << "attempted assignment to self"
763  << abort(FatalError);
764  }
765 
767 }
768 
769 
770 template<class Type>
772 {
774 }
775 
776 
777 template<class Type>
779 {
781 }
782 
783 
784 template<class Type>
786 {
787  if (this == &(rhs()))
788  {
790  << "attempted assignment to self"
791  << abort(FatalError);
792  }
793 
794  List<Type>::operator=(rhs());
795 }
796 
797 
798 template<class Type>
799 void Foam::Field<Type>::operator=(const Type& t)
800 {
802 }
803 
804 
805 template<class Type>
807 {
809 }
810 
811 
812 template<class Type>
813 template<class Form, class Cmpt, Foam::direction nCmpt>
815 {
816  TFOR_ALL_F_OP_S(Type, *this, =, VSType, vs)
817 }
818 
819 
820 #define COMPUTED_ASSIGNMENT(TYPE, op) \
821  \
822 template<class Type> \
823 void Foam::Field<Type>::operator op(const UList<TYPE>& f) \
824 { \
825  TFOR_ALL_F_OP_F(Type, *this, op, TYPE, f) \
826 } \
827  \
828 template<class Type> \
829 void Foam::Field<Type>::operator op(const tmp<Field<TYPE>>& tf) \
830 { \
831  operator op(tf()); \
832  tf.clear(); \
833 } \
834  \
835 template<class Type> \
836 void Foam::Field<Type>::operator op(const TYPE& t) \
837 { \
838  TFOR_ALL_F_OP_S(Type, *this, op, TYPE, t) \
839 }
840 
845 
846 #undef COMPUTED_ASSIGNMENT
847 
848 
849 // * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
850 
851 template<class Type>
852 Foam::Ostream& Foam::operator<<(Ostream& os, const Field<Type>& f)
853 {
854  os << static_cast<const List<Type>&>(f);
855  return os;
856 }
857 
858 
859 template<class Type>
860 Foam::Ostream& Foam::operator<<(Ostream& os, const tmp<Field<Type>>& tf)
861 {
862  os << tf();
863  tf.clear();
864  return os;
865 }
866 
867 
868 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
869 
870 #include "FieldFunctions.C"
871 
872 // ************************************************************************* //
A simple container for copying or transferring objects of type <T>.
Definition: Xfer.H:85
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:428
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
uint8_t direction
Definition: direction.H:46
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
Reference counter for various OpenFOAM components.
Definition: refCount.H:49
error FatalError
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Type & operator[](const label)
Return element of UList.
#define COMPUTED_ASSIGNMENT(TYPE, op)
Definition: Field.C:820
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:319
static const char *const typeName
Definition: Field.H:94
void negate()
Negate this field.
Definition: Field.C:641
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
#define TFOR_ALL_F_OP_OP_F(typeF1, f1, OP1, OP2, typeF2, f2)
Definition: FieldM.H:329
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
pTraits< Type >::cmptType cmptType
Component type.
Definition: Field.H:86
void size(const label)
Override size to be inconsistent with allocated storage.
Definition: ListI.H:76
A token holds items read from Istream.
Definition: token.H:69
void putBack(const token &)
Put back token.
Definition: Istream.C:30
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
Template function to specify if the data of a type are contiguous.
Traits class for primitives.
Definition: pTraits.H:50
Templated vector space.
Definition: VectorSpace.H:53
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
Definition: Field.C:719
virtual bool direct() const =0
virtual bool distributed() const
Definition: FieldMapper.H:68
void writeEntry(Ostream &) const
Write the UList as a dictionary entry.
Definition: UListIO.C:35
Pre-declare related SubField type.
Definition: Field.H:61
void replace(const direction, const UList< cmptType > &)
Replace a component field of the field.
Definition: Field.C:662
const tensorField & tf
#define TFOR_ALL_F_OP_S(typeF, f, OP, typeS, s)
Definition: FieldM.H:347
tmp< Field< Type > > clone() const
Clone.
Definition: Field.C:341
virtual const labelUList & directAddressing() const
Definition: FieldMapper.H:85
virtual const labelListList & addressing() const
Definition: FieldMapper.H:94
Field()
Construct null.
Definition: Field.C:42
virtual label size() const =0
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))
bool isNull(const T &t)
Return true if t is a reference to the nullObject of type T.
Definition: nullObjectI.H:40
bool isWord() const
Definition: tokenI.H:213
Abstract base class to hold the Field mapping addressing and weights.
Definition: FieldMapper.H:45
Pre-declare SubField and related Field type.
Definition: Field.H:57
A class for handling words, derived from string.
Definition: word.H:59
VSForm block(const label start) const
Definition: Field.C:698
static void distribute(const Pstream::commsTypes commsType, const List< labelPair > &schedule, const label constructSize, const labelListList &subMap, const bool subHasFlip, const labelListList &constructMap, const bool constructHasFlip, List< T > &, const negateOp &negOp, const int tag=UPstream::msgType())
Distribute data. Note:schedule only used for Pstream::scheduled.
static const zero Zero
Definition: zero.H:91
versionNumber version() const
Return the stream version.
Definition: IOstream.H:399
errorManip< error > abort(error &err)
Definition: errorManip.H:131
#define TFOR_ALL_F_OP_FUNC_S_S(typeF1, f1, OP, FUNC, typeS1, s1, typeS2, s2)
Definition: FieldM.H:227
void map(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 map from the given field
Definition: Field.C:351
Class containing processor-to-processor mapping information.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
tmp< Field< Type > > T() const
Return the field transpose (only defined for second rank tensors)
Definition: Field.C:710
void operator=(const Field< Type > &)
Definition: Field.C:757
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
Definition: Field.C:650
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
Definition: Ostream.C:54
labelList f(nPoints)
virtual const mapDistributeBase & distributeMap() const
Definition: FieldMapper.H:73
const volScalarField & T
label size() const
Return the number of elements in the UList.
void autoMap(const FieldMapper &map, const bool applyFlip=true)
Map from self.
Definition: Field.C:514
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
Definition: nullObjectI.H:46
#define TFOR_ALL_F_OP_FUNC_S_F(typeF1, f1, OP, FUNC, typeS, s, typeF2, f2)
Definition: FieldM.H:210
virtual const scalarListList & weights() const
Definition: FieldMapper.H:103
void operator=(const UList< T > &)
Assignment from UList operator. Takes linear time.
Definition: List.C:399
label size() const
Return the number of elements in the UList.
Definition: UListI.H:299
void setSize(const label)
Reset size of List.
void rmap(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 reverse-map from the given field
Definition: Field.C:577
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:331
InfoProxy< token > info() const
Return info proxy.
Definition: token.H:374
const word & wordToken() const
Definition: tokenI.H:218
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
Definition: zero.H:49
Uniform/equally-weighted distribution model.
Definition: uniform.H:47
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
A class for managing temporary objects.
Definition: PtrList.H:54
High performance macro functions for Field<Type> algebra. These expand using either array element acc...
T & ref() const
Return non-const reference or generate a fatal error.
Definition: tmpI.H:174
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
void transfer(List< Type > &)
Transfer the contents of the argument List into this list.
Input token stream.
Definition: ITstream.H:49
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:451
IOerror FatalIOError