| 94 | \*---------------------------------------------------------------------------*/ |
| 95 | |
| 96 | class fieldMinMax |
| 97 | : |
| 98 | public fvMeshFunctionObject, |
| 99 | public logFiles |
| 100 | { |
| 101 | public: |
| 102 | |
| 103 | enum modeType |
| 104 | { |
| 105 | mdMag, |
| 106 | mdCmpt |
| 107 | }; |
| 108 | |
| 109 | protected: |
| 110 | |
| 111 | // Protected data |
| 112 | |
| 113 | //- Mode type names |
| 114 | static const NamedEnum<modeType, 2> modeTypeNames_; |
| 115 | |
| 116 | //- Switch to write location of min/max values |
| 117 | Switch location_; |
| 118 | |
| 119 | //- Mode for min/max - only applicable for ranks > 0 |
| 120 | modeType mode_; |
| 121 | |
| 122 | //- Fields to assess min/max |
| 123 | wordList fieldSet_; |
| 124 | |
| 125 | |
| 126 | // Protected Member Functions |
| 127 | |
| 128 | //- Helper function to write the output |
| 129 | template<class Type> |
| 130 | void output |
| 131 | ( |
| 132 | const word& fieldName, |
| 133 | const word& outputName, |
| 134 | const label minCell, |
| 135 | const label maxCell, |
| 136 | const vector& minC, |
| 137 | const vector& maxC, |
| 138 | const label minProci, |
| 139 | const label maxProci, |
| 140 | const Type& minValue, |
| 141 | const Type& maxValue |
| 142 | ); |
| 143 | |
| 144 | //- Disallow default bitwise copy construct |
| 145 | fieldMinMax(const fieldMinMax&); |
| 146 | |
| 147 | //- Disallow default bitwise assignment |
| 148 | void operator=(const fieldMinMax&); |
| 149 | |
| 150 | //- Calculate the field min/max |
| 151 | template<class Type> |
| 152 | void calcMinMaxFields |
| 153 | ( |