61 <<
"Inconsistent data list size - expect size 3"
66 data[1][bini] +=
n*(v &
n);
67 data[2][bini] += v -
n*(v &
n);
82 coordSysPtr_ = coordinateSystem::NewIfPresent(
dict);
86 Info<<
"Setting co-ordinate system:" <<
nl
87 <<
" - type : " << coordSysPtr_->name() <<
nl
88 <<
" - origin : " << coordSysPtr_->origin() <<
nl
89 <<
" - e3 : " << coordSysPtr_->e3() <<
nl
90 <<
" - e1 : " << coordSysPtr_->e1() <<
endl;
92 else if (
dict.readIfPresent(
"CofR", origin))
103 coordSysPtr_.reset(
new coordSystem::cartesian(origin, e3, e1));
118 const word& outputPrefix
121 writeFile(
mesh, outputPrefix),
123 decomposePatchValues_(false),
142 patchIDs_ =
pbm.patchSet(
dict.get<wordRes>(
"patches")).sortedToc();
146 if (
dict.readIfPresent(
"cellZones", zoneNames))
149 DynamicList<wordRe> czUnmatched;
150 for (
const auto& cz : zoneNames)
152 const labelList czi(mesh_.cellZones().indices(cz));
156 czUnmatched.append(cz);
164 if (czUnmatched.size())
167 <<
"Unable to find zone(s): " << czUnmatched <<
nl
168 <<
"Valid cellZones are : " << mesh_.cellZones().sortedNames()
172 cellZoneIDs_.transfer(
zoneIDs);
177 filePtrs_.resize(fieldNames_.size());
180 filePtrs_.set(i, newFileAtStartTime(fieldNames_[i] +
"Bin"));
const polyBoundaryMesh & pbm
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void append(const T &val)
Copy append an element to the end of this list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void append(const T &val)
Append an element at the end of the list.
bool empty() const noexcept
True if List is empty (ie, size() is zero).
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.
PtrList< OFstream > filePtrs_
List of file pointers; 1 file per field.
wordList fieldNames_
Names of operand fields.
label nBin_
Total number of bins.
bool decomposePatchValues(List< List< Type > > &data, const label bini, const Type &v, const vector &n) const
Helper function to decompose patch values into normal and tangential components.
virtual void movePoints(const polyMesh &mesh)
Update for changes of mesh.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
autoPtr< coordinateSystem > coordSysPtr_
Local coordinate system of bins.
bool decomposePatchValues_
Decompose patch values into normal and tangential components.
virtual void updateMesh(const mapPolyMesh &mpm)
Update for changes of mesh.
labelList cellZoneIDs_
Indices of operand cell zones.
bool cumulative_
Flag to accumulate bin data with increasing distance in binning direction.
binModel(const dictionary &dict, const fvMesh &mesh, const word &outputPrefix)
Construct from components.
void setCoordinateSystem(const dictionary &dict, const word &e3Name=word::null, const word &e1Name=word::null)
Set the co-ordinate system from dictionary and axes names.
labelList patchIDs_
Indices of operand patches.
A Cartesian coordinate system.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
virtual autoPtr< OFstream > newFileAtStartTime(const word &name) const
Return autoPtr to a new file using the simulation start time.
writeFile(const objectRegistry &obr, const fileName &prefix, const word &name="undefined", const bool writeToFile=true, const string &ext=".dat")
Construct from objectRegistry, prefix, fileName.
virtual bool read(const dictionary &dict)
Read.
Mesh data needed to do the Finite Volume discretisation.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
Mesh consisting of general polyhedral cells.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const labelIOList & zoneIDs
#define WarningInFunction
Report a warning using Foam::Warning.
HashSet< word, Hash< word > > wordHashSet
A HashSet of words, uses string hasher.
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
vector point
Point is a vector.
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
constexpr char nl
The newline '\n' character (0x0a).
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.
#define forAll(list, i)
Loop across all elements in list.