Go to the documentation of this file.
47 int main(
int argc,
char *argv[])
54 "Convert CHEMKINIII thermodynamics and reaction data files into"
70 "Read Chemkin thermo file in new format"
75 const bool newFormat =
args.
found(
"newFormat");
85 reactionsFile.writeEntry(
"elements", cr.elementNames()) <<
nl;
86 reactionsFile.writeEntry(
"species", cr.species()) <<
nl;
88 cr.reactions().write(reactionsFile);
95 cr.speciesThermo().
write(os);
101 const word& speciesName = dEntry.keyword();
106 for (
const specieElement& elem : cr.specieComposition()[speciesName])
108 elemDict.add(elem.name(), elem.nAtoms());
111 speciesDict.
add(
"elements", elemDict);
A keyword and a list of tokens is an 'entry'.
virtual bool write(const token &tok)
Write token to stream or otherwise handle it.
A class for handling words, derived from Foam::string.
static void addNote(const string ¬e)
Add extra notes for the usage information.
Extract command arguments and options from the supplied argc and argv parameters.
Input/output from string buffers.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void addArgument(const string &argName, const string &usage="")
Append a (mandatory) argument to validArgs.
static void noFunctionObjects(bool addWithOption=false)
Remove '-noFunctionObjects' option and ignore any occurrences.
A wordList with hashed named lookup, which can be faster in some situations than using the normal lis...
messageStream Info
Information stream (uses stdout - output is on the master only)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Input from string buffer, using a ISstream.
Output to file stream, using an OSstream.
Foam::string str() const
Get the string - as Foam::string rather than std::string.
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
const dictionary & thermoDict
static unsigned int defaultPrecision()
Return the default precision.
void write(Ostream &os, const bool subDict=true) const
Write dictionary, normally with sub-dictionary formatting.
Output to string buffer, using a OSstream.
entry * add(entry *entryPtr, bool mergeEntry=false)
Add a new entry.
static void noParallel()
Remove the parallel options.
Foam::argList args(argc, argv)
bool found(const word &optName) const
Return true if the named option is found.