49 vector geomMin(GREAT, GREAT, GREAT);
50 vector geomMax(-GREAT, -GREAT, -GREAT);
85 geomMax[i] = 1.0001*(geomMax[i] - geomMin[i]) + geomMin[i];
94 <<
"Max bounds must be greater than min bounds" <<
nl
95 <<
" direction = " << i <<
nl
107 <<
"Bin widths must be greater than zero" <<
nl
108 <<
" direction = " << i <<
nl
111 <<
" bin width = " <<
binW_[i]
127 bool faceInside =
true;
130 if (d[i][j] < binMinMax_[j][0] || d[i][j] > binMinMax_[j][1])
143 n[j] = floor((d[i][j] - binMinMax_[j][0])/binW_[j]);
144 n[j] =
min(
max(
n[j], 0), nBins_[j] - 1);
148 binIndices[i] =
n[0] + nBins_[0]*
n[1] + nBins_[0]*nBins_[1]*
n[2];
162 faceToBin_.setSize(mesh_.nBoundaryFaces());
168 const label i0 = pp.
start() - mesh_.nInternalFaces();
171 binAddr(coordSysPtr_->localPosition(pp.
faceCentres()));
174 cellToBin_.setSize(mesh_.nCells());
177 for (
const label zonei : cellZoneIDs_)
179 const cellZone& cZone = mesh_.cellZones()[zonei];
182 binAddr(coordSysPtr_->localPosition(
vectorField(mesh_.C(), cZone)))
187 const label celli = cZone[i];
188 cellToBin_[celli] = bins[i];
200 const word& outputPrefix
226 Info<<
" Activating a set of uniform bins" <<
endl;
232 for (
const label
n : nBins_)
240 <<
"Number of bins must be greater than zero" <<
nl
241 <<
" e1 bins = " << nBins_[0] <<
nl
242 <<
" e2 bins = " << nBins_[1] <<
nl
243 <<
" e3 bins = " << nBins_[2]
247 Info<<
" - Employing:" <<
nl
248 <<
" " << nBins_[0] <<
" e1 bins," <<
nl
249 <<
" " << nBins_[1] <<
" e2 bins," <<
nl
250 <<
" " << nBins_[2] <<
" e3 bins"
253 cumulative_ = binDict.
getOrDefault<
bool>(
"cumulative",
false);
254 Info<<
" - cumulative : " << cumulative_ <<
endl;
255 Info<<
" - decomposePatchValues : " << decomposePatchValues_ <<
endl;
257 if (binDict.
found(
"minMax"))
267 Info<<
" - " << ei <<
" min : "
268 << binMinMax_[i][0] <<
nl
269 <<
" - " << ei <<
" max : "
270 << binMinMax_[i][1] <<
endl;
287 processField<scalar>(i)
288 || processField<vector>(i)
289 || processField<sphericalTensor>(i)
290 || processField<symmTensor>(i)
291 || processField<tensor>(i);
296 <<
"Unable to find field " << fieldNames_[i]
301 writtenHeader_ =
true;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
virtual bool read()
Re-read model coefficients if they have changed.
A List obtained as a section of another List.
void size(const label n)
Older name for setAddressableSize.
Base class for bin models to handle general bin characteristics.
const fvMesh & mesh_
Reference to the mesh.
autoPtr< coordinateSystem > coordSysPtr_
Local coordinate system of bins.
labelHashSet patchSet_
Indices of operand patches.
labelList cellZoneIDs_
Indices of operand cell zones.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Mesh data needed to do the Finite Volume discretisation.
const volVectorField & C() const
Return cell centres as volVectorField.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
void movePoints()
Update for new mesh geometry.
void updateMesh()
Update for new mesh topology.
static constexpr direction nComponents
Number of components in bool is 1.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
A patch is a list of labels that address the faces in the global face list.
label start() const
Return start label of this patch in the polyMesh face list.
const polyBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
const vectorField::subField faceCentres() const
Return face centres.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
void reduce(const List< UPstream::commsStruct > &comms, T &value, const BinaryOp &bop, const int tag, const label comm)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.
#define forAllIters(container, iter)
Iterate across all elements in the container object.