diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C index fe3f48e6be53a0d5d634d4659072419e711761d3..2b5549f3bf93d2a9c87856fb61be8b16434babab 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C @@ -927,6 +927,19 @@ Foam::word Foam::GeometricField<Type, PatchField, GeoMesh>::select } +template<class Type, template<class> class PatchField, class GeoMesh> +void Foam::GeometricField<Type, PatchField, GeoMesh>::writeMinMax +( + Ostream& os +) const +{ + os << "min/max(" << this->name() << ") = " + << min(*this).value() << ", " + << max(*this).value() + << endl; +} + + // writeData member function required by regIOobject template<class Type, template<class> class PatchField, class GeoMesh> bool Foam::GeometricField<Type, PatchField, GeoMesh>:: diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H index ba510d77e86f5109fed052770affe935315d5ecf..e966f6f81b91509fcd9de880282af95e503a49de 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -488,6 +488,9 @@ public: // otherwise the standard parameters by returning the field name word select(bool final) const; + //- Helper function to write the min and max to an Ostream + void writeMinMax(Ostream& os) const; + // Member function *this operators