48 int main(
int argc,
char *argv[])
55 "Convert CHEMKINIII thermodynamics and reaction data files into" 71 "Read Chemkin thermo file in new format" 76 const bool newFormat =
args.
found(
"newFormat");
93 reactionsFile.writeEntry(
"elements", cr.elementNames()) <<
nl;
94 reactionsFile.writeEntry(
"species", cr.species()) <<
nl;
96 cr.reactions().write(reactionsFile);
111 const word& speciesName = dEntry.keyword();
116 for (
const specieElement& elem : cr.specieComposition()[speciesName])
118 elemDict.add(elem.name(), elem.nAtoms());
121 speciesDict.
add(
"elements", elemDict);
static void noFunctionObjects(bool addWithOption=false)
Remove '-noFunctionObjects' option and ignore any occurrences.
static void addNote(const string ¬e)
Add extra notes for the usage information.
A class for handling file names.
virtual Ostream & write(const char c) override
Write character.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Input/output from string buffers.
Output to file stream as an OSstream, normally using std::ofstream for the actual output...
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
static void noParallel()
Remove the parallel options.
entry * add(entry *entryPtr, bool mergeEntry=false)
Add a new entry.
A class for handling words, derived from Foam::string.
Extract command arguments and options from the supplied argc and argv parameters. ...
An OSstream with internal List storage.
const dictionary & thermoDict
static unsigned int minPrecision(unsigned int prec) noexcept
Set the minimum default precision.
OBJstream os(runTime.globalPath()/outputName)
void write(Ostream &os, const bool subDict=true) const
Write dictionary, normally with sub-dictionary formatting.
T get(const label index) const
Get a value from the argument at index.
A wordList with hashed named lookup, which can be faster in some situations than using the normal lis...
static void addArgument(const string &argName, const string &usage="")
Append a (mandatory) argument to validArgs.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Foam::argList args(argc, argv)
Similar to IStringStream but using an externally managed buffer for its input. This allows the input ...
bool found(const word &optName) const
Return true if the named option is found.
A keyword and a list of tokens is an 'entry'.