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-2015 OpenFOAM Foundation
6  \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
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  const UList<Type>& mapF,
66  const labelUList& mapAddressing
67 )
68 :
69  List<Type>(mapAddressing.size())
70 {
71  map(mapF, mapAddressing);
72 }
73 
74 
75 template<class Type>
77 (
78  const tmp<Field<Type> >& tmapF,
79  const labelUList& mapAddressing
80 )
81 :
82  List<Type>(mapAddressing.size())
83 {
84  map(tmapF, mapAddressing);
85 }
86 
87 
88 template<class Type>
90 (
91  const UList<Type>& mapF,
92  const labelListList& mapAddressing,
93  const scalarListList& mapWeights
94 )
95 :
96  List<Type>(mapAddressing.size())
97 {
98  map(mapF, mapAddressing, mapWeights);
99 }
100 
101 
102 template<class Type>
104 (
105  const tmp<Field<Type> >& tmapF,
106  const labelListList& mapAddressing,
107  const scalarListList& mapWeights
108 )
109 :
110  List<Type>(mapAddressing.size())
111 {
112  map(tmapF, mapAddressing, mapWeights);
113 }
114 
115 
116 template<class Type>
118 (
119  const UList<Type>& mapF,
120  const FieldMapper& mapper,
121  const bool applyFlip
122 )
123 :
124  List<Type>(mapper.size())
125 {
126  map(mapF, mapper, applyFlip);
127 }
128 
129 
130 template<class Type>
132 (
133  const UList<Type>& mapF,
134  const FieldMapper& mapper,
135  const Type& defaultValue,
136  const bool applyFlip
137 )
138 :
139  List<Type>(mapper.size(), defaultValue)
140 {
141  map(mapF, mapper, applyFlip);
142 }
143 
144 
145 template<class Type>
147 (
148  const UList<Type>& mapF,
149  const FieldMapper& mapper,
150  const UList<Type>& defaultValues,
151  const bool applyFlip
152 )
153 :
154  List<Type>(defaultValues)
155 {
156  map(mapF, mapper, applyFlip);
157 }
158 
159 
160 template<class Type>
162 (
163  const tmp<Field<Type> >& tmapF,
164  const FieldMapper& mapper,
165  const bool applyFlip
166 )
167 :
168  List<Type>(mapper.size())
169 {
170  map(tmapF, mapper, applyFlip);
171 }
172 
173 
174 template<class Type>
176 (
177  const tmp<Field<Type> >& tmapF,
178  const FieldMapper& mapper,
179  const Type& defaultValue,
180  const bool applyFlip
181 )
182 :
183  List<Type>(mapper.size(), defaultValue)
184 {
185  map(tmapF, mapper, applyFlip);
186 }
187 
188 
189 template<class Type>
191 (
192  const tmp<Field<Type> >& tmapF,
193  const FieldMapper& mapper,
194  const UList<Type>& defaultValues,
195  const bool applyFlip
196 )
197 :
198  List<Type>(defaultValues)
199 {
200  map(tmapF, mapper, applyFlip);
201 }
202 
203 
204 template<class Type>
205 Foam::Field<Type>::Field(const Field<Type>& f)
206 :
207  refCount(),
208  List<Type>(f)
209 {}
210 
211 
212 template<class Type>
213 Foam::Field<Type>::Field(Field<Type>& f, bool reUse)
214 :
215  List<Type>(f, reUse)
216 {}
217 
218 
219 template<class Type>
221 :
222  List<Type>(f)
223 {}
224 
225 
226 template<class Type>
227 Foam::Field<Type>::Field(const Xfer<Field<Type> >& f)
228 :
229  List<Type>(f)
230 {}
231 
232 
233 template<class Type>
234 Foam::Field<Type>::Field(const UList<Type>& list)
235 :
236  List<Type>(list)
237 {}
238 
239 
240 // Construct as copy of tmp<Field>
241 #ifndef NoConstructFromTmp
242 template<class Type>
243 Foam::Field<Type>::Field(const tmp<Field<Type> >& tf)
244 :
245  List<Type>(const_cast<Field<Type>&>(tf()), tf.isTmp())
246 {
247  const_cast<Field<Type>&>(tf()).resetRefCount();
248 }
249 #endif
250 
251 
252 template<class Type>
253 Foam::Field<Type>::Field(Istream& is)
254 :
255  List<Type>(is)
256 {}
257 
258 
259 template<class Type>
261 (
262  const word& keyword,
263  const dictionary& dict,
264  const label s
265 )
266 {
267  if (s)
268  {
269  ITstream& is = dict.lookup(keyword);
270 
271  // Read first token
272  token firstToken(is);
273 
274  if (firstToken.isWord())
275  {
276  if (firstToken.wordToken() == "uniform")
277  {
278  this->setSize(s);
279  operator=(pTraits<Type>(is));
280  }
281  else if (firstToken.wordToken() == "nonuniform")
282  {
283  is >> static_cast<List<Type>&>(*this);
284  if (this->size() != s)
285  {
287  (
288  dict
289  ) << "size " << this->size()
290  << " is not equal to the given value of " << s
291  << exit(FatalIOError);
292  }
293  }
294  else
295  {
297  (
298  dict
299  ) << "expected keyword 'uniform' or 'nonuniform', found "
300  << firstToken.wordToken()
301  << exit(FatalIOError);
302  }
303  }
304  else
305  {
306  if (is.version() == 2.0)
307  {
309  (
310  dict
311  ) << "expected keyword 'uniform' or 'nonuniform', "
312  "assuming deprecated Field format from "
313  "Foam version 2.0." << endl;
314 
315  this->setSize(s);
316 
317  is.putBack(firstToken);
318  operator=(pTraits<Type>(is));
319  }
320  else
321  {
323  (
324  dict
325  ) << "expected keyword 'uniform' or 'nonuniform', found "
326  << firstToken.info()
327  << exit(FatalIOError);
328  }
329  }
330  }
331 }
332 
333 
334 template<class Type>
336 {
337  return tmp<Field<Type> >(new Field<Type>(*this));
338 }
339 
340 
341 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
342 
343 template<class Type>
345 (
346  const UList<Type>& mapF,
347  const labelUList& mapAddressing
348 )
349 {
350  Field<Type>& f = *this;
351 
352  if (f.size() != mapAddressing.size())
353  {
354  f.setSize(mapAddressing.size());
355  }
356 
357  if (mapF.size() > 0)
358  {
359  forAll(f, i)
360  {
361  label mapI = mapAddressing[i];
362 
363  if (mapI >= 0)
364  {
365  f[i] = mapF[mapI];
366  }
367  }
368  }
369 }
370 
371 
372 template<class Type>
374 (
375  const tmp<Field<Type> >& tmapF,
376  const labelUList& mapAddressing
377 )
378 {
379  map(tmapF(), mapAddressing);
380  tmapF.clear();
381 }
382 
383 
384 template<class Type>
386 (
387  const UList<Type>& mapF,
388  const labelListList& mapAddressing,
389  const scalarListList& mapWeights
390 )
391 {
392  Field<Type>& f = *this;
393 
394  if (f.size() != mapAddressing.size())
395  {
396  f.setSize(mapAddressing.size());
397  }
398 
399  if (mapWeights.size() != mapAddressing.size())
400  {
402  << mapWeights.size() << " map size: " << mapAddressing.size()
403  << abort(FatalError);
404  }
405 
406  forAll(f, i)
407  {
408  const labelList& localAddrs = mapAddressing[i];
409  const scalarList& localWeights = mapWeights[i];
410 
411  f[i] = pTraits<Type>::zero;
412 
413  forAll(localAddrs, j)
414  {
415  f[i] += localWeights[j]*mapF[localAddrs[j]];
416  }
417  }
418 }
419 
420 
421 template<class Type>
423 (
424  const tmp<Field<Type> >& tmapF,
425  const labelListList& mapAddressing,
426  const scalarListList& mapWeights
427 )
428 {
429  map(tmapF(), mapAddressing, mapWeights);
430  tmapF.clear();
431 }
432 
433 
434 template<class Type>
436 (
437  const UList<Type>& mapF,
438  const FieldMapper& mapper,
439  const bool applyFlip
440 )
441 {
442  if (mapper.distributed())
443  {
444  // Fetch remote parts of mapF
445  const mapDistributeBase& distMap = mapper.distributeMap();
446  Field<Type> newMapF(mapF);
447 
448  if (applyFlip)
449  {
450  distMap.distribute(newMapF);
451  }
452  else
453  {
454  distMap.distribute(newMapF, noOp());
455  }
456 
457  if (mapper.direct() && notNull(mapper.directAddressing()))
458  {
459  map(newMapF, mapper.directAddressing());
460  }
461  else if (!mapper.direct())
462  {
463  map(newMapF, mapper.addressing(), mapper.weights());
464  }
465  else if (mapper.direct() && isNull(mapper.directAddressing()))
466  {
467  // Special case, no local mapper. Assume ordering already correct
468  // from distribution. Note: this behaviour is different compared
469  // to local mapper.
470  this->transfer(newMapF);
471  this->setSize(mapper.size());
472  }
473  }
474  else
475  {
476  if
477  (
478  mapper.direct()
479  && notNull(mapper.directAddressing())
480  && mapper.directAddressing().size()
481  )
482  {
483  map(mapF, mapper.directAddressing());
484  }
485  else if (!mapper.direct() && mapper.addressing().size())
486  {
487  map(mapF, mapper.addressing(), mapper.weights());
488  }
489  }
490 }
491 
492 
493 template<class Type>
495 (
496  const tmp<Field<Type> >& tmapF,
497  const FieldMapper& mapper,
498  const bool applyFlip
499 )
500 {
501  map(tmapF(), mapper, applyFlip);
502  tmapF.clear();
503 }
504 
505 
506 template<class Type>
508 (
509  const FieldMapper& mapper,
510  const bool applyFlip
511 )
512 {
513  if (mapper.distributed())
514  {
515  // Fetch remote parts of *this
516  const mapDistributeBase& distMap = mapper.distributeMap();
517  Field<Type> fCpy(*this);
518 
519  if (applyFlip)
520  {
521  distMap.distribute(fCpy);
522  }
523  else
524  {
525  distMap.distribute(fCpy, noOp());
526  }
527 
528  if
529  (
530  (mapper.direct()
531  && notNull(mapper.directAddressing()))
532  || !mapper.direct()
533  )
534  {
535  this->map(fCpy, mapper);
536  }
537  else if (mapper.direct() && isNull(mapper.directAddressing()))
538  {
539  // Special case, no local mapper. Assume ordering already correct
540  // from distribution. Note: this behaviour is different compared
541  // to local mapper.
542  this->transfer(fCpy);
543  this->setSize(mapper.size());
544  }
545  }
546  else
547  {
548  if
549  (
550  (
551  mapper.direct()
552  && notNull(mapper.directAddressing())
553  && mapper.directAddressing().size()
554  )
555  || (!mapper.direct() && mapper.addressing().size())
556  )
557  {
558  Field<Type> fCpy(*this);
559  map(fCpy, mapper);
560  }
561  else
562  {
563  this->setSize(mapper.size());
564  }
565  }
566 }
567 
568 
569 template<class Type>
571 (
572  const UList<Type>& mapF,
573  const labelUList& mapAddressing
574 )
575 {
576  Field<Type>& f = *this;
577 
578  forAll(mapF, i)
579  {
580  label mapI = mapAddressing[i];
581 
582  if (mapI >= 0)
583  {
584  f[mapI] = mapF[i];
585  }
586  }
587 }
588 
589 
590 template<class Type>
592 (
593  const tmp<Field<Type> >& tmapF,
594  const labelUList& mapAddressing
595 )
596 {
597  rmap(tmapF(), mapAddressing);
598  tmapF.clear();
599 }
600 
601 
602 template<class Type>
604 (
605  const UList<Type>& mapF,
606  const labelUList& mapAddressing,
607  const UList<scalar>& mapWeights
608 )
609 {
610  Field<Type>& f = *this;
611 
613 
614  forAll(mapF, i)
615  {
616  f[mapAddressing[i]] += mapF[i]*mapWeights[i];
617  }
618 }
619 
620 
621 template<class Type>
623 (
624  const tmp<Field<Type> >& tmapF,
625  const labelUList& mapAddressing,
626  const UList<scalar>& mapWeights
627 )
628 {
629  rmap(tmapF(), mapAddressing, mapWeights);
630  tmapF.clear();
631 }
632 
633 
634 template<class Type>
636 {
637  TFOR_ALL_F_OP_OP_F(Type, *this, =, -, Type, *this)
638 }
639 
640 
641 template<class Type>
644 (
645  const direction d
646 ) const
647 {
648  tmp<Field<cmptType> > Component(new Field<cmptType>(this->size()));
649  ::Foam::component(Component(), *this, d);
650  return Component;
651 }
652 
653 
654 template<class Type>
656 (
657  const direction d,
658  const UList<cmptType>& sf
659 )
660 {
661  TFOR_ALL_F_OP_FUNC_S_F(Type, *this, ., replace, const direction, d,
662  cmptType, sf)
663 }
664 
665 
666 template<class Type>
668 (
669  const direction d,
670  const tmp<Field<cmptType> >& tsf
671 )
672 {
673  replace(d, tsf());
674  tsf.clear();
675 }
676 
677 
678 template<class Type>
680 (
681  const direction d,
682  const cmptType& c
683 )
684 {
685  TFOR_ALL_F_OP_FUNC_S_S(Type, *this, ., replace, const direction, d,
686  cmptType, c)
687 }
688 
689 
690 template<class Type>
692 {
693  tmp<Field<Type> > transpose(new Field<Type>(this->size()));
694  ::Foam::T(transpose(), *this);
695  return transpose;
696 }
697 
698 
699 template<class Type>
700 void Foam::Field<Type>::writeEntry(const word& keyword, Ostream& os) const
701 {
702  os.writeKeyword(keyword);
703 
704  bool uniform = false;
705 
706  if (this->size() && contiguous<Type>())
707  {
708  uniform = true;
709 
710  forAll(*this, i)
711  {
712  if (this->operator[](i) != this->operator[](0))
713  {
714  uniform = false;
715  break;
716  }
717  }
718  }
719 
720  if (uniform)
721  {
722  os << "uniform " << this->operator[](0) << token::END_STATEMENT;
723  }
724  else
725  {
726  os << "nonuniform ";
728  os << token::END_STATEMENT;
729  }
730 
731  os << endl;
732 }
733 
734 
735 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
736 
737 template<class Type>
739 {
740  if (this == &rhs)
741  {
743  << "attempted assignment to self"
744  << abort(FatalError);
745  }
746 
748 }
749 
750 
751 template<class Type>
753 {
755 }
756 
757 
758 template<class Type>
760 {
762 }
763 
764 
765 template<class Type>
767 {
768  if (this == &(rhs()))
769  {
771  << "attempted assignment to self"
772  << abort(FatalError);
773  }
774 
775  // This is dodgy stuff, don't try it at home.
776  Field* fieldPtr = rhs.ptr();
777  List<Type>::transfer(*fieldPtr);
778  delete fieldPtr;
779 }
780 
781 
782 template<class Type>
783 void Foam::Field<Type>::operator=(const Type& t)
784 {
786 }
787 
788 
789 template<class Type>
790 template<class Form, class Cmpt, int nCmpt>
792 {
793  TFOR_ALL_F_OP_S(Type, *this, =, VSType, vs)
794 }
795 
796 
797 #define COMPUTED_ASSIGNMENT(TYPE, op) \
798  \
799 template<class Type> \
800 void Foam::Field<Type>::operator op(const UList<TYPE>& f) \
801 { \
802  TFOR_ALL_F_OP_F(Type, *this, op, TYPE, f) \
803 } \
804  \
805 template<class Type> \
806 void Foam::Field<Type>::operator op(const tmp<Field<TYPE> >& tf) \
807 { \
808  operator op(tf()); \
809  tf.clear(); \
810 } \
811  \
812 template<class Type> \
813 void Foam::Field<Type>::operator op(const TYPE& t) \
814 { \
815  TFOR_ALL_F_OP_S(Type, *this, op, TYPE, t) \
816 }
817 
818 COMPUTED_ASSIGNMENT(Type, +=)
819 COMPUTED_ASSIGNMENT(Type, -=)
820 COMPUTED_ASSIGNMENT(scalar, *=)
821 COMPUTED_ASSIGNMENT(scalar, /=)
822 
823 #undef COMPUTED_ASSIGNMENT
824 
825 
826 // * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
827 
828 template<class Type>
829 Foam::Ostream& Foam::operator<<(Ostream& os, const Field<Type>& f)
830 {
831  os << static_cast<const List<Type>&>(f);
832  return os;
833 }
834 
835 
836 template<class Type>
837 Foam::Ostream& Foam::operator<<(Ostream& os, const tmp<Field<Type> >& tf)
838 {
839  os << tf();
840  tf.clear();
841  return os;
842 }
843 
844 
845 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
846 
847 #include "FieldFunctions.C"
848 
849 // ************************************************************************* //
setSize
points setSize(newPointi)
Foam::scalarList
List< scalar > scalarList
A List of scalars.
Definition: scalarList.H:50
Foam::component
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
Definition: FieldFieldFunctions.C:41
FieldFunctions.C
mapDistributeBase.H
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::labelList
List< label > labelList
A List of labels.
Definition: labelList.H:56
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:406
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::Field::autoMap
void autoMap(const FieldMapper &map, const bool applyFlip=true)
Map from self.
Definition: Field.C:508
Foam::mapDistributeBase::distribute
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.
Definition: mapDistributeBaseTemplates.C:119
Foam::Field::typeName
static const char *const typeName
Definition: Field.H:94
Foam::notNull
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
Definition: nullObjectI.H:46
FieldM.H
High performance macro functions for Field<Type> algebra. These expand using either array element acc...
Foam::FieldMapper::size
virtual label size() const =0
TFOR_ALL_F_OP_FUNC_S_S
#define TFOR_ALL_F_OP_FUNC_S_S(typeF1, f1, OP, FUNC, typeS1, s1, typeS2, s2)
Definition: FieldM.H:227
Foam::FieldMapper
Abstract base class to hold the Field mapping addressing and weights.
Definition: FieldMapper.H:45
Foam::FatalIOError
IOerror FatalIOError
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::FieldMapper::direct
virtual bool direct() const =0
Foam::Field::clone
tmp< Field< Type > > clone() const
Clone.
Definition: Field.C:335
TFOR_ALL_F_OP_S
#define TFOR_ALL_F_OP_S(typeF, f, OP, typeS, s)
Definition: FieldM.H:347
Foam::VectorSpace
Templated vector space.
Definition: VectorSpace.H:52
Foam::Field::map
void map(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 map from the given field
Definition: Field.C:345
Foam::SubField< Type >
tf
const tensorField & tf
Definition: getPatchFieldTensor.H:36
Foam::uniform
Uniform/equally-weighted distribution model.
Definition: uniform.H:47
Foam::noOp
Definition: flipOp.H:62
Foam::label
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
Foam::Field::Field
Field()
Construct null.
Definition: Field.C:42
Foam::Field< Type >
Foam::Field::T
tmp< Field< Type > > T() const
Return the field transpose (only defined for second rank tensors)
Definition: Field.C:691
Foam::Field::replace
void replace(const direction, const UList< cmptType > &)
Replace a component field of the field.
Foam::operator<<
Ostream & operator<<(Ostream &, const edgeMesh &)
Definition: edgeMeshIO.C:130
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::Field::rmap
void rmap(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 reverse-map from the given field
Definition: Field.C:571
Foam::FatalError
error FatalError
Foam::Field::negate
void negate()
Negate this field.
Definition: Field.C:635
Foam::FieldMapper::directAddressing
virtual const labelUList & directAddressing() const
Definition: FieldMapper.H:85
flipOp.H
Foam::tmp::ptr
T * ptr() const
Return tmp pointer for reuse.
Definition: tmpI.H:146
Foam::abort
errorManip< error > abort(error &err)
Definition: errorManip.H:131
sf
volScalarField sf(fieldObject, mesh)
Foam::Field::component
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
Definition: Field.C:644
s
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))
Foam::Field::operator=
void operator=(const Field< Type > &)
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
Foam::Field::writeEntry
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
Definition: Field.C:700
Foam::labelListList
List< labelList > labelListList
A List of labelList.
Definition: labelList.H:57
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:318
T
const volScalarField & T
Definition: createFields.H:25
Foam::FieldMapper::addressing
virtual const labelListList & addressing() const
Definition: FieldMapper.H:94
TFOR_ALL_F_OP_FUNC_S_F
#define TFOR_ALL_F_OP_FUNC_S_F(typeF1, f1, OP, FUNC, typeS, s, typeF2, f2)
Definition: FieldM.H:210
f
labelList f(nPoints)
contiguous.H
Template function to specify if the data of a type are contiguous.
Foam::List
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
Foam::pTraits
Traits class for primitives.
Definition: pTraits.H:50
Foam::Ostream::writeKeyword
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
Definition: Ostream.C:59
Foam::UList< Type >
dictionary.H
Foam::isNull
bool isNull(const T &t)
Return true if t is a reference to the nullObject of type T.
Definition: nullObjectI.H:40
Foam::direction
unsigned char direction
Definition: direction.H:43
Foam::constant::universal::c
const dimensionedScalar c
Speed of light in a vacuum.
Foam::mapDistributeBase
Class containing processor-to-processor mapping information.
Definition: mapDistributeBase.H:91
FieldMapper.H
FatalIOErrorInFunction
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:330
List
Definition: Test.C:19
Foam::List::size
void size(const label)
Override size to be inconsistent with allocated storage.
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
IOWarningInFunction
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
Definition: messageStream.H:271
Foam::scalarListList
List< scalarList > scalarListList
Definition: scalarList.H:51
Foam::labelUList
UList< label > labelUList
Definition: UList.H:63
Foam::UList::size
label size() const
Return the number of elements in the UList.
Definition: UListI.H:299
TFOR_ALL_F_OP_OP_F
#define TFOR_ALL_F_OP_OP_F(typeF1, f1, OP1, OP2, typeF2, f2)
Definition: FieldM.H:329
Foam::FieldMapper::distributeMap
virtual const mapDistributeBase & distributeMap() const
Definition: FieldMapper.H:73
Foam::FieldMapper::distributed
virtual bool distributed() const
Definition: FieldMapper.H:68
COMPUTED_ASSIGNMENT
#define COMPUTED_ASSIGNMENT(TYPE, op)
Definition: Field.C:797