44 <<
"Number of efficiencies = " <<
size()
45 <<
" is not equal to the number of species " << species_.
size()
54 const dictionary&
dict 60 List<Tuple2<word, scalar>> coeffs;
61 if (
dict.readIfPresent(
"coeffs", coeffs))
63 if (coeffs.size() != species_.
size())
66 <<
"Number of efficiencies = " << coeffs.size()
67 <<
" is not equal to the number of species " << species_.
size()
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");
101 M += operator[](i)*
c[i];
110 List<Tuple2<word, scalar>> coeffs(species_.size());
113 coeffs[i].first() = species_[i];
114 coeffs[i].second() = operator[](i);
126 const thirdBodyEfficiencies& tbes
List< scalar > scalarList
List of scalar.
void size(const label n)
Older name for setAddressableSize.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
void operator=(const UList< scalar > &a)
Assignment to UList operator. Takes linear time.
hashedWordList speciesTable
A table of species as a hashedWordList.
#define forAll(list, i)
Loop across all elements in list.
T & operator[](const label i)
Return element of UList.
scalar M(const scalarList &c) const
Calculate and return M, the concentration of the third-bodies.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
label size() const noexcept
The number of elements in the List.
OBJstream os(runTime.globalPath()/outputName)
thirdBodyEfficiencies(const speciesTable &species, const scalarList &efficiencies)
Construct from components.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
A wordList with hashed named lookup, which can be faster in some situations than using the normal lis...
const dimensionedScalar c
Speed of light in a vacuum.
void write(Ostream &os) const
Write to 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 ...