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 template<class Type>
249 :
250  List<Type>(list)
251 {}
252 
253 
254 #ifndef NoConstructFromTmp
255 template<class Type>
257 :
258  List<Type>(const_cast<Field<Type>&>(tf()), tf.isTmp())
259 {
260  tf.clear();
261 }
262 #endif
263 
264 
265 template<class Type>
267 :
268  List<Type>(is)
269 {}
270 
271 
272 template<class Type>
274 (
275  const word& keyword,
276  const dictionary& dict,
277  const label s
278 )
279 {
280  if (s)
281  {
282  ITstream& is = dict.lookup(keyword);
283 
284  // Read first token
285  token firstToken(is);
286 
287  if (firstToken.isWord())
288  {
289  if (firstToken.wordToken() == "uniform")
290  {
291  this->setSize(s);
292  operator=(pTraits<Type>(is));
293  }
294  else if (firstToken.wordToken() == "nonuniform")
295  {
296  is >> static_cast<List<Type>&>(*this);
297  if (this->size() != s)
298  {
300  (
301  dict
302  ) << "size " << this->size()
303  << " is not equal to the given value of " << s
304  << exit(FatalIOError);
305  }
306  }
307  else
308  {
310  (
311  dict
312  ) << "expected keyword 'uniform' or 'nonuniform', found "
313  << firstToken.wordToken()
314  << exit(FatalIOError);
315  }
316  }
317  else
318  {
319  if (is.version() == 2.0)
320  {
322  (
323  dict
324  ) << "expected keyword 'uniform' or 'nonuniform', "
325  "assuming deprecated Field format from "
326  "Foam version 2.0." << endl;
327 
328  this->setSize(s);
329 
330  is.putBack(firstToken);
331  operator=(pTraits<Type>(is));
332  }
333  else
334  {
336  (
337  dict
338  ) << "expected keyword 'uniform' or 'nonuniform', found "
339  << firstToken.info()
340  << exit(FatalIOError);
341  }
342  }
343  }
344 }
345 
346 
347 template<class Type>
349 {
350  return tmp<Field<Type>>(new Field<Type>(*this));
351 }
352 
353 
354 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
355 
356 template<class Type>
358 (
359  const UList<Type>& mapF,
360  const labelUList& mapAddressing
361 )
362 {
363  Field<Type>& f = *this;
364 
365  if (f.size() != mapAddressing.size())
366  {
367  f.setSize(mapAddressing.size());
368  }
369 
370  if (mapF.size() > 0)
371  {
372  forAll(f, i)
373  {
374  label mapI = mapAddressing[i];
375 
376  if (mapI >= 0)
377  {
378  f[i] = mapF[mapI];
379  }
380  }
381  }
382 }
383 
384 
385 template<class Type>
387 (
388  const tmp<Field<Type>>& tmapF,
389  const labelUList& mapAddressing
390 )
391 {
392  map(tmapF(), mapAddressing);
393  tmapF.clear();
394 }
395 
396 
397 template<class Type>
399 (
400  const UList<Type>& mapF,
401  const labelListList& mapAddressing,
402  const scalarListList& mapWeights
403 )
404 {
405  Field<Type>& f = *this;
406 
407  if (f.size() != mapAddressing.size())
408  {
409  f.setSize(mapAddressing.size());
410  }
411 
412  if (mapWeights.size() != mapAddressing.size())
413  {
415  << mapWeights.size() << " map size: " << mapAddressing.size()
416  << abort(FatalError);
417  }
418 
419  forAll(f, i)
420  {
421  const labelList& localAddrs = mapAddressing[i];
422  const scalarList& localWeights = mapWeights[i];
423 
424  f[i] = Zero;
425 
426  forAll(localAddrs, j)
427  {
428  f[i] += localWeights[j]*mapF[localAddrs[j]];
429  }
430  }
431 }
432 
433 
434 template<class Type>
436 (
437  const tmp<Field<Type>>& tmapF,
438  const labelListList& mapAddressing,
439  const scalarListList& mapWeights
440 )
441 {
442  map(tmapF(), mapAddressing, mapWeights);
443  tmapF.clear();
444 }
445 
446 
447 template<class Type>
449 (
450  const UList<Type>& mapF,
451  const FieldMapper& mapper,
452  const bool applyFlip
453 )
454 {
455  if (mapper.distributed())
456  {
457  // Fetch remote parts of mapF
458  const mapDistributeBase& distMap = mapper.distributeMap();
459  Field<Type> newMapF(mapF);
460 
461  if (applyFlip)
462  {
463  distMap.distribute(newMapF);
464  }
465  else
466  {
467  distMap.distribute(newMapF, noOp());
468  }
469 
470  if (mapper.direct() && notNull(mapper.directAddressing()))
471  {
472  map(newMapF, mapper.directAddressing());
473  }
474  else if (!mapper.direct())
475  {
476  map(newMapF, mapper.addressing(), mapper.weights());
477  }
478  else if (mapper.direct() && isNull(mapper.directAddressing()))
479  {
480  // Special case, no local mapper. Assume ordering already correct
481  // from distribution. Note: this behaviour is different compared
482  // to local mapper.
483  this->transfer(newMapF);
484  this->setSize(mapper.size());
485  }
486  }
487  else
488  {
489  if
490  (
491  mapper.direct()
492  && notNull(mapper.directAddressing())
493  && mapper.directAddressing().size()
494  )
495  {
496  map(mapF, mapper.directAddressing());
497  }
498  else if (!mapper.direct() && mapper.addressing().size())
499  {
500  map(mapF, mapper.addressing(), mapper.weights());
501  }
502  }
503 }
504 
505 
506 template<class Type>
508 (
509  const tmp<Field<Type>>& tmapF,
510  const FieldMapper& mapper,
511  const bool applyFlip
512 )
513 {
514  map(tmapF(), mapper, applyFlip);
515  tmapF.clear();
516 }
517 
518 
519 template<class Type>
521 (
522  const FieldMapper& mapper,
523  const bool applyFlip
524 )
525 {
526  if (mapper.distributed())
527  {
528  // Fetch remote parts of *this
529  const mapDistributeBase& distMap = mapper.distributeMap();
530  Field<Type> fCpy(*this);
531 
532  if (applyFlip)
533  {
534  distMap.distribute(fCpy);
535  }
536  else
537  {
538  distMap.distribute(fCpy, noOp());
539  }
540 
541  if
542  (
543  (mapper.direct()
544  && notNull(mapper.directAddressing()))
545  || !mapper.direct()
546  )
547  {
548  this->map(fCpy, mapper);
549  }
550  else if (mapper.direct() && isNull(mapper.directAddressing()))
551  {
552  // Special case, no local mapper. Assume ordering already correct
553  // from distribution. Note: this behaviour is different compared
554  // to local mapper.
555  this->transfer(fCpy);
556  this->setSize(mapper.size());
557  }
558  }
559  else
560  {
561  if
562  (
563  (
564  mapper.direct()
565  && notNull(mapper.directAddressing())
566  && mapper.directAddressing().size()
567  )
568  || (!mapper.direct() && mapper.addressing().size())
569  )
570  {
571  Field<Type> fCpy(*this);
572  map(fCpy, mapper);
573  }
574  else
575  {
576  this->setSize(mapper.size());
577  }
578  }
579 }
580 
581 
582 template<class Type>
584 (
585  const UList<Type>& mapF,
586  const labelUList& mapAddressing
587 )
588 {
589  Field<Type>& f = *this;
590 
591  forAll(mapF, i)
592  {
593  label mapI = mapAddressing[i];
594 
595  if (mapI >= 0)
596  {
597  f[mapI] = mapF[i];
598  }
599  }
600 }
601 
602 
603 template<class Type>
605 (
606  const tmp<Field<Type>>& tmapF,
607  const labelUList& mapAddressing
608 )
609 {
610  rmap(tmapF(), mapAddressing);
611  tmapF.clear();
612 }
613 
614 
615 template<class Type>
617 (
618  const UList<Type>& mapF,
619  const labelUList& mapAddressing,
620  const UList<scalar>& mapWeights
621 )
622 {
623  Field<Type>& f = *this;
624 
625  f = Zero;
626 
627  forAll(mapF, i)
628  {
629  f[mapAddressing[i]] += mapF[i]*mapWeights[i];
630  }
631 }
632 
633 
634 template<class Type>
636 (
637  const tmp<Field<Type>>& tmapF,
638  const labelUList& mapAddressing,
639  const UList<scalar>& mapWeights
640 )
641 {
642  rmap(tmapF(), mapAddressing, mapWeights);
643  tmapF.clear();
644 }
645 
646 
647 template<class Type>
649 {
650  TFOR_ALL_F_OP_OP_F(Type, *this, =, -, Type, *this)
651 }
652 
653 
654 template<class Type>
657 (
658  const direction d
659 ) const
660 {
661  tmp<Field<cmptType>> Component(new Field<cmptType>(this->size()));
662  ::Foam::component(Component.ref(), *this, d);
663  return Component;
664 }
665 
666 
667 template<class Type>
669 (
670  const direction d,
671  const UList<cmptType>& sf
672 )
673 {
674  TFOR_ALL_F_OP_FUNC_S_F(Type, *this, ., replace, const direction, d,
675  cmptType, sf)
676 }
677 
678 
679 template<class Type>
681 (
682  const direction d,
683  const tmp<Field<cmptType>>& tsf
684 )
685 {
686  replace(d, tsf());
687  tsf.clear();
688 }
689 
690 
691 template<class Type>
693 (
694  const direction d,
695  const cmptType& c
696 )
697 {
698  TFOR_ALL_F_OP_FUNC_S_S(Type, *this, ., replace, const direction, d,
699  cmptType, c)
700 }
701 
702 
703 template<class Type>
704 template<class VSForm>
705 VSForm Foam::Field<Type>::block(const label start) const
706 {
707  VSForm vs;
708  for (direction i=0; i<VSForm::nComponents; i++)
709  {
710  vs[i] = this->operator[](start + i);
711  }
712  return vs;
713 }
714 
715 
716 template<class Type>
718 {
719  tmp<Field<Type>> transpose(new Field<Type>(this->size()));
720  ::Foam::T(transpose.ref(), *this);
721  return transpose;
722 }
723 
724 
725 template<class Type>
726 void Foam::Field<Type>::writeEntry(const word& keyword, Ostream& os) const
727 {
728  os.writeKeyword(keyword);
729 
730  bool uniform = false;
731 
732  if (this->size() && contiguous<Type>())
733  {
734  uniform = true;
735 
736  forAll(*this, i)
737  {
738  if (this->operator[](i) != this->operator[](0))
739  {
740  uniform = false;
741  break;
742  }
743  }
744  }
745 
746  if (uniform)
747  {
748  os << "uniform " << this->operator[](0) << token::END_STATEMENT;
749  }
750  else
751  {
752  os << "nonuniform ";
754  os << token::END_STATEMENT;
755  }
756 
757  os << endl;
758 }
759 
760 
761 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
762 
763 template<class Type>
765 {
766  if (this == &rhs)
767  {
769  << "attempted assignment to self"
770  << abort(FatalError);
771  }
772 
774 }
775 
776 
777 template<class Type>
779 {
781 }
782 
783 
784 template<class Type>
786 {
788 }
789 
790 
791 template<class Type>
793 {
794  if (this == &(rhs()))
795  {
797  << "attempted assignment to self"
798  << abort(FatalError);
799  }
800 
801  List<Type>::operator=(rhs());
802 }
803 
804 
805 template<class Type>
806 void Foam::Field<Type>::operator=(const Type& t)
807 {
809 }
810 
811 
812 template<class Type>
814 {
816 }
817 
818 
819 template<class Type>
820 template<class Form, class Cmpt, Foam::direction nCmpt>
822 {
823  TFOR_ALL_F_OP_S(Type, *this, =, VSType, vs)
824 }
825 
826 
827 #define COMPUTED_ASSIGNMENT(TYPE, op) \
828  \
829 template<class Type> \
830 void Foam::Field<Type>::operator op(const UList<TYPE>& f) \
831 { \
832  TFOR_ALL_F_OP_F(Type, *this, op, TYPE, f) \
833 } \
834  \
835 template<class Type> \
836 void Foam::Field<Type>::operator op(const tmp<Field<TYPE>>& tf) \
837 { \
838  operator op(tf()); \
839  tf.clear(); \
840 } \
841  \
842 template<class Type> \
843 void Foam::Field<Type>::operator op(const TYPE& t) \
844 { \
845  TFOR_ALL_F_OP_S(Type, *this, op, TYPE, t) \
846 }
847 
852 
853 #undef COMPUTED_ASSIGNMENT
854 
855 
856 // * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
857 
858 template<class Type>
859 Foam::Ostream& Foam::operator<<(Ostream& os, const Field<Type>& f)
860 {
861  os << static_cast<const List<Type>&>(f);
862  return os;
863 }
864 
865 
866 template<class Type>
867 Foam::Ostream& Foam::operator<<(Ostream& os, const tmp<Field<Type>>& tf)
868 {
869  os << tf();
870  tf.clear();
871  return os;
872 }
873 
874 
875 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
876 
877 #include "FieldFunctions.C"
878 
879 // ************************************************************************* //
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
bool isWord() const
Definition: tokenI.H:213
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
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
#define COMPUTED_ASSIGNMENT(TYPE, op)
Definition: Field.C:827
#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:648
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:60
T & ref() const
Return non-const reference or generate a fatal error.
Definition: tmpI.H:174
InfoProxy< token > info() const
Return info proxy.
Definition: token.H:374
#define TFOR_ALL_F_OP_OP_F(typeF1, f1, OP1, OP2, typeF2, f2)
Definition: FieldM.H:329
const word & wordToken() const
Definition: tokenI.H:218
uint8_t direction
Definition: direction.H:45
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
pTraits< Foam::Vector2D >::cmptType cmptType
Component type.
Definition: Field.H:86
void size(const label)
Override size to be inconsistent with allocated storage.
Definition: ListI.H:163
A token holds items read from Istream.
Definition: token.H:69
virtual const labelListList & addressing() const
Definition: FieldMapper.H:94
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.
Templated vector space.
Definition: VectorSpace.H:53
virtual bool direct() const =0
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
Definition: Field.C:726
virtual const scalarListList & weights() const
Definition: FieldMapper.H:103
versionNumber version() const
Return the stream version.
Definition: IOstream.H:399
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:669
virtual const labelUList & directAddressing() const
Definition: FieldMapper.H:85
const tensorField & tf
#define TFOR_ALL_F_OP_S(typeF, f, OP, typeS, s)
Definition: FieldM.H:347
points setSize(newPointi)
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
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
tmp< Field< Type > > clone() const
Clone.
Definition: Field.C:348
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.
static const zero Zero
Definition: zero.H:91
VSForm block(const label start) const
Definition: Field.C:705
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:358
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
Definition: Field.C:657
virtual const mapDistributeBase & distributeMap() const
Definition: FieldMapper.H:73
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
virtual bool distributed() const
Definition: FieldMapper.H:68
void operator=(const Field< Type > &)
Definition: Field.C:764
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
Definition: Ostream.C:54
labelList f(nPoints)
const volScalarField & T
void autoMap(const FieldMapper &map, const bool applyFlip=true)
Map from self.
Definition: Field.C:521
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
void setSize(const label)
Reset size of List.
Definition: List.C:281
void rmap(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 reverse-map from the given field
Definition: Field.C:584
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:331
A List with indirect addressing.
Definition: fvMatrix.H:106
tmp< Field< Type > > T() const
Return the field transpose (only defined for second rank tensors)
Definition: Field.C:717
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:53
label size() const
Return the number of elements in the UList.
Definition: UListI.H:299
High performance macro functions for Field<Type> algebra. These expand using either array element acc...
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
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:576
IOerror FatalIOError