41 if (
size() != species_.size())
44 <<
"Number of efficiencies = " << size()
45 <<
" is not equal to the number of species " << species_.size()
61 if (
dict.readIfPresent(
"coeffs", coeffs))
63 if (coeffs.size() != species_.size())
65 FatalIOErrorInFunction(dict)
66 <<
"Number of efficiencies = " << coeffs.size()
67 <<
" is not equal to the number of species " << species_.size()
68 << exit(FatalIOError);
71 for (
const auto& coeff : coeffs)
73 const label idx =
species.find(coeff.first());
78 <<
"No such species: " << coeffs.
first()
88 const scalar defaultEff =
dict.
get<scalar>(
"defaultEfficiency");
110 List<Tuple2<word, scalar>> coeffs(species_.size());
113 coeffs[i].first() = species_[i];
114 coeffs[i].second() = operator[](i);
117 os.writeEntry(
"coeffs", coeffs);
126 const thirdBodyEfficiencies& tbes
for(const label curEdgei :curPointEdges)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void operator=(const UList< scalar > &list)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
T & first()
Access first element of the list, position [0].
label size() const noexcept
scalar & operator[](const label i)
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
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
scalar M(const scalarList &c) const
Calculate and return M, the concentration of the third-bodies.
thirdBodyEfficiencies(const speciesTable &species, const scalarList &efficiencies)
Construct from components.
void write(Ostream &os) const
Write to stream.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
OBJstream os(runTime.globalPath()/outputName)
hashedWordList speciesTable
A table of species as a hashedWordList.
Ostream & endl(Ostream &os)
Add newline and flush stream.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< scalar > scalarList
List of scalar.
#define forAll(list, i)
Loop across all elements in list.