exprResultI.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2012-2018 Bernhard Gschaider <bgschaid@hfd-research.com>
9  Copyright (C) 2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 // * * * * * * * * * * * * Template Specializations * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33 namespace expressions
34 {
35  #undef defineExpressionMethod
36  #define defineExpressionMethod(Type, Var) \
37  template<> \
38  inline const Type& exprResult::singleValue::get<Type>() const \
39  { \
40  return Var; \
41  } \
42  \
43  template<> \
44  inline const Type& exprResult::singleValue::set(const Type& val) \
45  { \
46  Var = val; \
47  return Var; \
48  }
49 
50  defineExpressionMethod(bool, bool_);
52  defineExpressionMethod(scalar, scalar_);
55  defineExpressionMethod(symmTensor, symmTensor_);
57 
58  #undef defineExpressionMethod
59 
60 } // End namespace expressions
61 } // End namespace Foam
62 
63 
64 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
65 
66 template<class Type>
67 inline bool Foam::expressions::exprResult::deleteChecked()
68 {
69  const bool ok = isType<Type>();
70  if (ok && fieldPtr_ != nullptr)
71  {
72  delete static_cast<Field<Type>*>(fieldPtr_);
73  fieldPtr_ = nullptr;
74  size_ = 0;
75  }
76 
77  return ok;
78 }
79 
80 
81 template<class Type>
82 inline bool Foam::expressions::exprResult::readChecked
83 (
84  const word& key,
85  const dictionary& dict,
86  const label len,
87  const bool uniform
88 )
89 {
90  const bool ok = isType<Type>();
91  if (ok)
92  {
93  uglyDelete();
94 
95  if (uniform)
96  {
97  const Type val(dict.get<Type>(key));
98 
99  size_ = len;
100  fieldPtr_ = new Field<Type>(size_, val);
101 
102  single_.set(val);
103  }
104  else
105  {
106  size_ = len;
107  fieldPtr_ = new Field<Type>(key, dict, size_);
108  }
109 
110  isUniform_ = uniform;
111  }
112 
113  return ok;
114 }
115 
116 
117 template<class Type>
118 bool Foam::expressions::exprResult::getUniformChecked
119 (
120  exprResult& result,
121  const label size,
122  const bool noWarn,
123  const bool parRun
124 ) const
125 {
126  if (!isType<Type>())
127  {
128  return false;
129  }
130 
131  result.clear();
132 
133  const Field<Type>& fld = *static_cast<const Field<Type>*>(fieldPtr_);
134 
135  const Type avg = (parRun ? gAverage(fld) : average(fld));
136 
137  if (!noWarn)
138  {
139  const MinMax<Type> limits = (parRun ? gMinMax(fld) : minMax(fld));
140 
141  if (limits.mag() > SMALL)
142  {
144  << "Different min/max values: " << limits
145  << " Using the average " << avg << nl;
146  }
147  }
148 
149  result.setResult(avg, size);
150 
151  return true;
152 }
153 
154 
155 template<class Type>
156 bool Foam::expressions::exprResult::plusEqChecked
157 (
158  const exprResult& b
159 )
160 {
161  const bool ok = isType<Type>();
162 
163  if (ok)
164  {
165  *static_cast<Field<Type>*>(fieldPtr_)
166  += *static_cast<const Field<Type>*>(b.fieldPtr_);
167  }
168 
169  return ok;
170 }
171 
172 
173 template<class Type>
174 bool Foam::expressions::exprResult::multiplyEqChecked
175 (
176  const scalar& b
177 )
178 {
179  const bool ok = isType<Type>();
180 
181  if (ok)
182  {
183  *static_cast<Field<Type>*>(fieldPtr_) *= b;
184  }
185 
186  return ok;
187 }
188 
189 
190 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
191 
192 template<class Type>
194 :
195  exprResult()
196 {
197  DebugInFunction << nl;
198 
199  setResult(f);
200 }
201 
202 
203 template<class Type>
205 :
206  exprResult()
207 {
208  DebugInFunction << nl;
209 
210  setResult(std::move(f));
211 }
212 
213 
214 template<class Type>
216 :
217  exprResult()
218 {
219  setObjectResult(o);
220 }
221 
222 
223 template<class Type>
225 :
226  exprResult()
227 {
228  setObjectResult(o);
229 }
230 
231 
232 template<class Type>
234 :
235  exprResult()
236 {
237  DebugInFunction << nl;
238  setSingleValue(f.value());
239 }
240 
241 
242 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
243 
245 {
246  return (!valType_.empty() && fieldPtr_ != nullptr);
247 }
248 
249 
251 {
252  return valType_;
253 }
254 
255 
257 (
258  const bool isPointVal
259 ) const
260 {
261  return isPointVal_ == isPointVal;
262 }
263 
264 
266 {
267  return isUniform_;
268 }
269 
270 
271 template<class Type>
273 {
274  return valType_ == pTraits<Type>::typeName;
275 }
276 
277 
279 {
280  return valType_ == pTraits<bool>::typeName;
281 }
282 
283 
285 {
286  return objectPtr_.valid();
287 }
288 
289 
291 {
292  return size_;
293 }
294 
295 
296 template<class Type>
298 (
299  const Field<Type>& val,
300  bool isPointVal
301 )
302 {
303  DebugInFunction << nl;
304 
305  target().setResultImpl(val, isPointVal);
306 }
307 
308 
309 template<class Type>
311 (
312  Field<Type>&& val,
313  bool isPointVal
314 )
315 {
316  DebugInFunction << nl;
317 
318  target().setResultImpl(val, isPointVal);
319 }
320 
321 
322 template<class Type>
323 void Foam::expressions::exprResult::setResultImpl
324 (
325  const Field<Type>& fld,
326  bool isPointVal
327 )
328 {
329  DebugInFunction << nl;
330 
331  clear();
332 
333  isUniform_ = false;
334  isPointVal_ = isPointVal;
335 
336  size_ = fld.size();
337  valType_ = pTraits<Type>::typeName;
338  fieldPtr_ = new Field<Type>(fld);
339 
340  DebugInFunction << nl;
341 }
342 
343 
344 template<class Type>
345 void Foam::expressions::exprResult::setResultImpl
346 (
347  Field<Type>&& fld,
348  bool isPointVal
349 )
350 {
351  DebugInFunction << nl;
352 
353  clear();
354 
355  isUniform_ = false;
356  isPointVal_ = isPointVal;
357 
358  size_ = fld.size();
359  valType_ = pTraits<Type>::typeName;
360  fieldPtr_ = new Field<Type>(std::move(fld));
361 
362  DebugInFunction << nl;
363 }
364 
365 
366 template<class Type>
368 {
369  target().setObjectResultImpl(ap.ptr());
370 }
371 
372 
373 template<class Type>
375 {
376  target().setObjectResultImpl(ap.ptr());
377 }
378 
379 
380 template<class T>
381 void Foam::expressions::exprResult::setObjectResultImpl(T* ptr)
382 {
383  DebugInFunction << nl;
384 
385  isUniform_ = false;
386  isPointVal_ = false;
387 
388  size_ = ptr->size();
389  valType_ = ptr->typeName;
390  objectPtr_.reset(ptr);
391 }
392 
393 
394 template<class T>
395 void Foam::expressions::exprResult::setObjectResultImpl(autoPtr<T>& o)
396 {
397  setObjectResultImpl(o.ptr());
398 }
399 
400 
401 template<class T>
402 void Foam::expressions::exprResult::setObjectResultImpl(autoPtr<T>&& o)
403 {
404  setObjectResultImpl(o.ptr());
405 }
406 
407 
408 template<class Type>
410 (
411  Field<Type>* fldPtr,
412  bool isPointVal
413 )
414 {
415  target().setResultImpl(fldPtr, isPointVal);
416 }
417 
418 
419 template<class Type>
420 void Foam::expressions::exprResult::setResultImpl
421 (
422  Field<Type>* fldPtr,
423  bool isPointVal
424 )
425 {
426  DebugInFunction << nl;
427 
428  clear();
429 
430  isPointVal_ = isPointVal;
431  isUniform_ = false;
432 
433  size_ = fldPtr->size();
434  valType_ = pTraits<Type>::typeName;
435  fieldPtr_ = fldPtr;
436 }
437 
438 
439 template<class Type>
441 (
442  const Type& val,
443  const label size
444 )
445 {
446  target().setResultImpl(val, size);
447 }
448 
449 
450 template<class Type>
451 void Foam::expressions::exprResult::setResultImpl
452 (
453  const Type& val,
454  const label len
455 )
456 {
457  DebugInFunction << nl;
458 
459  clear();
460 
461  isPointVal_ = false;
462 
463  size_ = len;
464  valType_ = pTraits<Type>::typeName;
465  fieldPtr_ = new Field<Type>(size_, val);
466 
467  isUniform_ = true;
468  single_.set(val);
469 }
470 
471 
472 template<class Type>
474 {
475  target().setSingleValueImpl(val);
476 }
477 
478 
479 template<class Type>
480 bool Foam::expressions::exprResult::writeSingleValueChecked(Ostream& os) const
481 {
482  if (!isType<Type>())
483  {
484  return false;
485  }
486 
487  if (this->size() <= 0)
488  {
489  if (isUniform_)
490  {
491  os << single_.get<Type>();
492  }
493  else
494  {
495  // Zero-sized - could write nothing, or a zero value
496  os << pTraits<Type>::zero;
497  }
498  }
499  else
500  {
501  const Field<Type>& fld = *static_cast<const Field<Type>*>(fieldPtr_);
502 
503  os << fld.first();
504  }
505 
506  return true;
507 }
508 
509 
510 template<class Type>
511 bool Foam::expressions::exprResult::writeValueFieldChecked(Ostream& os) const
512 {
513  if (!isType<Type>())
514  {
515  return false;
516  }
517 
518  if (this->size() <= 0)
519  {
520  if (isUniform_)
521  {
522  const Type& val = single_.get<Type>();
523  os.writeEntry("value", val);
524  }
525  else
526  {
527  // Zero-sized
528  const Field<Type> fld;
529  fld.writeEntry("value", os);
530  }
531  }
532  else
533  {
534  const Field<Type>& fld = *static_cast<const Field<Type>*>(fieldPtr_);
535 
536  if (isUniform_)
537  {
538  os.writeEntry("value", fld.first());
539  }
540  else
541  {
542  fld.writeEntry("value", os);
543  }
544  }
545 
546  return true;
547 }
548 
549 
550 template<class Type>
551 bool Foam::expressions::exprResult::writeEntryChecked
552 (
553  const word& keyword,
554  Ostream& os
555 ) const
556 {
557  if (!isType<Type>())
558  {
559  return false;
560  }
561 
562  if (this->size() <= 0)
563  {
564  if (isUniform_ && is_contiguous<Type>::value)
565  {
566  const Type& val = single_.get<Type>();
567 
568  if (keyword.size())
569  {
570  os.writeKeyword(keyword);
571  }
572  os << word("uniform") << token::SPACE << val
573  << token::END_STATEMENT << nl;
574  }
575  else
576  {
577  // Zero-sized - written as nonuniform
578  const Field<Type> fld;
579  fld.writeEntry(keyword, os);
580  }
581  }
582  else
583  {
584  const Field<Type>& fld = *static_cast<const Field<Type>*>(fieldPtr_);
585 
586  if (isUniform_ && is_contiguous<Type>::value)
587  {
588  if (keyword.size())
589  {
590  os.writeKeyword(keyword);
591  }
592  os << word("uniform") << token::SPACE << fld.first()
593  << token::END_STATEMENT << nl;
594  }
595  else
596  {
597  fld.writeEntry(keyword, os);
598  }
599  }
600 
601  return true;
602 }
603 
604 
605 template<class Type>
606 bool Foam::expressions::exprResult::setAverageValueChecked(const bool parRun)
607 {
608  if (!isType<Type>())
609  {
610  return false;
611  }
612 
613  const Field<Type>& fld = *static_cast<const Field<Type>*>(fieldPtr_);
614 
615  const MinMax<Type> limits = (parRun ? gMinMax(fld) : minMax(fld));
616 
617  isUniform_ = (limits.mag() <= SMALL);
618 
619  const Type avg = limits.centre();
620 
621  single_.set(avg);
622 
623  return true;
624 }
625 
626 
627 template<class Type>
628 bool Foam::expressions::exprResult::duplicateFieldChecked(const void* ptr)
629 {
630  if (!isType<Type>())
631  {
632  return false;
633  }
634 
635  if (fieldPtr_)
636  {
637  deleteChecked<Type>();
638  }
639 
640  const Field<Type>& fld = *static_cast<const Field<Type>*>(ptr);
641 
642  size_ = fld.size();
643  fieldPtr_ = new Field<Type>(fld);
644 
645  return true;
646 }
647 
648 
649 template<class Type>
650 void Foam::expressions::exprResult::setSingleValueImpl(const Type& val)
651 {
652  DebugInFunction << nl;
653 
654  clear();
655 
656  isPointVal_ = false;
657  isUniform_ = true;
658 
659  single_.set(val);
660  size_ = 1;
661 
662  valType_ = pTraits<Type>::typeName;
663  fieldPtr_ = new Field<Type>(size_, val);
664 }
665 
666 
667 template<class Type>
670 {
671  DebugInFunction << nl;
672 
673  if (!isType<Type>())
674  {
676  << "The expected return type " << pTraits<Type>::typeName
677  << " is different from the stored result type "
678  << valType_ << nl << nl
679  << exit(FatalError);
680  }
681 
682  if (fieldPtr_ == nullptr)
683  {
685  << "Cannot create tmp from nullptr." << nl
686  << "This error message should never appear!!" << nl
687  << exit(FatalError);
688  }
689 
690  Field<Type>* ptr = static_cast<Field<Type>*>(fieldPtr_);
691 
692  if (cacheCopy)
693  {
694  // Leave field intact, return a duplicate field
695  // Or return reference instead??
696  return tmp<Field<Type>>::New(*ptr);
697  }
698 
699 
700  tmp<Field<Type>> result(ptr);
701 
702  fieldPtr_ = nullptr; // Took ownership of field pointer
703  clear();
704 
705  return result;
706 }
707 
708 
709 template<class Type>
710 inline const Foam::Field<Type>&
712 {
713  DebugInFunction << nl;
714 
715  if (!isType<Type>())
716  {
718  << "The expected return type " << pTraits<Type>::typeName
719  << " is different from the stored result type "
720  << valType_ << nl << nl
721  << exit(FatalError);
722  }
723 
724  if (fieldPtr_ == nullptr)
725  {
727  << "Cannot return reference from nullptr." << nl
728  << "This error message should never appear!!" << nl
729  << exit(FatalError);
730  }
731 
732  return *static_cast<const Field<Type>*>(fieldPtr_);
733 }
734 
735 
736 template<class Type>
737 inline Foam::Field<Type>&
739 {
740  return const_cast<Field<Type>&>(this->cref<Type>());
741 }
742 
743 
744 template<class Type>
745 inline Foam::Field<Type>&
747 {
748  return const_cast<Field<Type>&>(this->cref<Type>());
749 }
750 
751 
752 template<class Type>
753 inline Foam::tmp<Type>
755 {
756  DebugInFunction << nl;
757 
758  if (!isType<Type>())
759  {
761  << "The expected return type " << pTraits<Type>::typeName
762  << " is different from the stored result type "
763  << valType_ << nl << nl
764  << exit(FatalError);
765  }
766 
767  Type* ptr = dynamic_cast<Type*>(objectPtr_.get());
768 
769  if (!ptr)
770  {
772  << "Cannot cast object pointer to " << pTraits<Type>::typeName
773  << nl << nl;
774 
775  return nullptr;
776  }
777 
778  if (cacheCopy)
779  {
780  // Return duplicated content
781  return tmp<Type>::New(*ptr);
782  }
783 
784  objectPtr_.release(); // Take ownership in ptr
785 
786  clear();
787 
788  return tmp<Type>(ptr);
789 }
790 
791 
792 template<template<class> class BinaryOp, class Type>
794 (
795  const BinaryOp<Type>& bop,
796  const Type& initial
797 )
798 {
799  if (!isType<Type>())
800  {
802  << "The expected return type " << pTraits<Type>::typeName
803  << " is different from the stored result type "
804  << valType_ << nl << nl
805  << exit(FatalError);
806  }
807 
808  Type result = initial;
809 
810  const Field<Type>& fld = *static_cast<Field<Type>*>(fieldPtr_);
811 
812  for (const Type& val : fld)
813  {
814  result = bop(result, val);
815  }
816 
817  return returnReduce(result, bop);
818 }
819 
820 
821 // ************************************************************************* //
Foam::val
label ListType::const_reference val
Definition: ListOps.H:407
Foam::sphericalTensor
SphericalTensor< scalar > sphericalTensor
SphericalTensor of scalars.
Definition: sphericalTensor.H:51
Foam::expressions::exprResult::isObject
bool isObject() const
True if the object pointer is being used.
Definition: exprResultI.H:284
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::expressions::exprResult::size
label size() const
The field or object size.
Definition: exprResultI.H:290
Foam::returnReduce
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Definition: PstreamReduceOps.H:94
Foam::expressions::exprResult::getReduced
Type getReduced(const BinaryOp< Type > &bop, const Type &initial=pTraits< Type >::zero)
Get a reduced result.
Definition: exprResultI.H:794
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
Foam::gAverage
Type gAverage(const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:604
Foam::tensor
Tensor< scalar > tensor
Tensor of scalars.
Definition: tensor.H:53
Foam::expressions::exprResult::valueType
const word & valueType() const
Basic type for the field or single value.
Definition: exprResultI.H:250
Foam::expressions::exprResult::getResult
tmp< Field< Type > > getResult(bool cacheCopy=false)
Foam::expressions::exprResult::setResult
void setResult(Field< Type > *, bool isPointVal=false)
Set result field, taking ownership of the pointer.
Definition: exprResultI.H:410
Foam::expressions::exprResult::isBool
bool isBool() const
True if valueType is a bool.
Definition: exprResultI.H:278
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:62
Foam::expressions::exprResult
A polymorphic field/result from evaluating an expression.
Definition: exprResult.H:128
Foam::constant::physicoChemical::b
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Definition: createFields.H:27
Foam::Field
Generic templated field type.
Definition: Field.H:63
DebugInFunction
#define DebugInFunction
Report an information message using Foam::Info.
Definition: messageStream.H:356
defineExpressionMethod
#define defineExpressionMethod(Type, Var)
Definition: exprResultI.H:36
Foam::expressions::exprResult::ref
Field< Type > & ref()
Return non-const reference to the field.
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::expressions::exprResult::setSingleValue
void setSingleValue(const Type &val)
Set single-value uniform result.
Definition: exprResultI.H:473
Foam::symmTensor
SymmTensor< scalar > symmTensor
SymmTensor of scalars.
Definition: symmTensor.H:50
Foam::token::END_STATEMENT
End entry [isseparator].
Definition: token.H:116
Foam::autoPtr::ptr
T * ptr() noexcept
Definition: autoPtrI.H:144
fld
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Definition: gmvOutputLagrangian.H:23
Foam::expressions::exprResult::getObjectResult
tmp< Type > getObjectResult(bool cacheCopy=false)
Foam::expressions::exprResult::hasValue
bool hasValue() const
Has a value?
Definition: exprResultI.H:244
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::expressions::exprResult::isUniform
bool isUniform() const
True if single, uniform value.
Definition: exprResultI.H:265
Foam::FatalError
error FatalError
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:43
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::expressions::exprResult::cref
const Field< Type > & cref() const
Return const reference to the field.
Foam::expressions::exprResult::isType
bool isType() const
True if valueType corresponds to the given Type.
Definition: exprResultI.H:272
Foam::vector
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:51
Foam::expressions::exprResult::getRef
Field< Type > & getRef() const
Return non-const reference to the field, casting away constness.
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
Foam::New
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Definition: DimensionedFieldReuseFunctions.H:105
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:355
Foam::expressions::exprResult::exprResult
exprResult()
Construct null.
Definition: exprResult.C:205
clear
patchWriters clear()
Foam::nl
constexpr char nl
Definition: Ostream.H:372
f
labelList f(nPoints)
Foam::pTraits
Traits class for primitives.
Definition: pTraits.H:52
Foam::token::SPACE
Space [isspace].
Definition: token.H:112
Foam::tmp::New
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
Foam::expressions::exprResult::isPointValue
bool isPointValue(const bool isPointVal=true) const
True if representing point values, or test if same as isPointVal.
Definition: exprResultI.H:257
Foam::minMax
MinMax< label > minMax(const labelHashSet &set)
Find the min/max values of labelHashSet.
Definition: hashSets.C:61
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
WarningInFunction
#define WarningInFunction
Report a warning using Foam::Warning.
Definition: messageStream.H:294
Foam::expressions::exprResult::setObjectResult
void setObjectResult(autoPtr< Type > &o)
Definition: exprResultI.H:367
Foam::average
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
Definition: DimensionedFieldFunctions.C:328
Foam::gMinMax
MinMax< Type > gMinMax(const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:595