antioch-0.4.0
|
A parser is an instance related to a file. More...
#include <chemical_mixture.h>
Public Member Functions | |
ParserBase (const std::string &type, const std::string &file, bool verbose=true, const std::string &comments="") | |
virtual | ~ParserBase () |
virtual bool | initialize ()=0 |
virtual void | change_file (const std::string &filename)=0 |
virtual const std::vector < std::string > | species_list () |
reads the species set More... | |
virtual void | read_chemical_species (ChemicalMixture< NumericType > &) |
reads the mandatory data, not valid in xml && chemkin More... | |
virtual void | read_vibrational_data (ChemicalMixture< NumericType > &) |
reads the vibrational data, not valid in xml && chemkin More... | |
virtual void | read_electronic_data (ChemicalMixture< NumericType > &) |
reads the electronic data, not valid in xml && chemkin More... | |
virtual void | read_transport_data (TransportMixture< NumericType > &) |
reads the transport data, not valid in xml && chemkin More... | |
virtual void | read_thermodynamic_data (NASAThermoMixture< NumericType, NASA7CurveFit< NumericType > > &) |
thermo More... | |
virtual void | read_thermodynamic_data (NASAThermoMixture< NumericType, NASA9CurveFit< NumericType > > &) |
reads the thermo, NASA generalist, no templates for virtual More... | |
virtual void | read_thermodynamic_data (NASAThermoMixture< NumericType, CEACurveFit< NumericType > > &) |
reads the thermo, NASA generalist, no templates for virtual More... | |
virtual void | read_thermodynamic_data (CEAThermodynamics< NumericType > &) |
reads the thermo, CEA deprecated More... | |
virtual bool | reaction () |
reaction More... | |
virtual bool | rate_constant (const std::string &) |
go to next rate constant More... | |
virtual bool | Troe () const |
virtual const std::string | reaction_id () const |
virtual const std::string | reaction_equation () const |
virtual const std::string | reaction_chemical_process () const |
virtual const std::string | reaction_kinetics_model (const std::vector< std::string > &) const |
virtual bool | reaction_reversible () const |
virtual bool | reactants_pairs (std::vector< std::pair< std::string, int > > &) const |
virtual bool | products_pairs (std::vector< std::pair< std::string, int > > &) const |
virtual const std::map < std::string, NumericType > | reactants_orders () const |
return a map between reactants' name and found partial orders More... | |
virtual const std::map < std::string, NumericType > | products_orders () const |
return a map between products' name and found partial orders More... | |
virtual bool | is_k0 (unsigned int, const std::string &) const |
virtual unsigned int | where_is_k0 (const std::string &) const |
virtual bool | rate_constant_preexponential_parameter (NumericType &, std::string &, std::string &) const |
virtual bool | rate_constant_power_parameter (NumericType &, std::string &, std::string &) const |
virtual bool | rate_constant_activation_energy_parameter (NumericType &, std::string &, std::string &) const |
virtual bool | rate_constant_Berthelot_coefficient_parameter (NumericType &, std::string &, std::string &) const |
virtual bool | rate_constant_Tref_parameter (NumericType &, std::string &, std::string &) const |
virtual bool | rate_constant_lambda_parameter (std::vector< NumericType > &, std::string &, std::string &) const |
virtual bool | rate_constant_cross_section_parameter (std::vector< NumericType > &, std::string &, std::string &) const |
virtual bool | verify_Kooij_in_place_of_Arrhenius () const |
virtual bool | efficiencies (std::vector< std::pair< std::string, NumericType > > &) const |
virtual bool | Troe_alpha_parameter (NumericType &, std::string &, std::string &) const |
virtual bool | Troe_T1_parameter (NumericType &, std::string &, std::string &) const |
virtual bool | Troe_T2_parameter (NumericType &, std::string &, std::string &) const |
virtual bool | Troe_T3_parameter (NumericType &, std::string &, std::string &) const |
const std::string | file () const |
const std::string | type () const |
bool | verbose () const |
ParsingType | enum_type () const |
Protected Member Functions | |
void | skip_comments (std::istream &doc) |
Protected Attributes | |
std::string | _type |
std::string | _file |
bool | _verbose |
std::string | _comments |
std::string | _not_implemented |
Private Member Functions | |
ParserBase () | |
A parser is an instance related to a file.
The parser corresponds to a file type (e.g. XML or ChemKin). The file HAS to be given in the constructor as the parser is indissociable from the file. Set to `true' by default, a verbose switch is also available.
We define here the rule of parsing for all parsers. Differences/specificities are described in the corresponding files.
The different things to parse are:
Definition at line 53 of file chemical_mixture.h.
Antioch::ParserBase< NumericType >::ParserBase | ( | const std::string & | type, |
const std::string & | file, | ||
bool | verbose = true , |
||
const std::string & | comments = "" |
||
) |
Definition at line 36 of file parser_base.C.
References Antioch::ParserBase< NumericType >::_file, Antioch::ParserBase< NumericType >::_not_implemented, and Antioch::ParserBase< NumericType >::_type.
|
inlinevirtual |
Definition at line 114 of file parser_base.h.
|
private |
|
pure virtual |
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 227 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
ParsingType Antioch::ParserBase< NumericType >::enum_type | ( | ) | const |
Definition at line 63 of file parser_base.C.
References antioch_parsing_error, Antioch::ASCII, Antioch::CHEMKIN, and Antioch::XML.
|
inline |
Definition at line 242 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_file.
Referenced by Antioch::read_species_data(), Antioch::read_species_electronic_data(), Antioch::read_species_vibrational_data(), and Antioch::read_transport_species_data().
|
pure virtual |
Implemented in Antioch::ChemKinParser< NumericType >, Antioch::ASCIIParser< NumericType >, and Antioch::XMLParser< NumericType >.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 197 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
return a map between products' name and found partial orders
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 194 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 188 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
go to next rate constant
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 162 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 209 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 212 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 221 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 218 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 206 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 203 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 215 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
return a map between reactants' name and found partial orders
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 191 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 185 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
reaction
read & store current reaction and go to next reaction
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 159 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 176 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 173 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 170 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 179 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 182 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
reads the mandatory data, not valid in xml && chemkin
Reimplemented in Antioch::ASCIIParser< NumericType >.
Definition at line 127 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_species_data().
|
inlinevirtual |
reads the electronic data, not valid in xml && chemkin
Reimplemented in Antioch::ASCIIParser< NumericType >.
Definition at line 133 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_species_electronic_data().
|
inlinevirtual |
thermo
reads the thermo, NASA generalist, no templates for virtual
Reimplemented in Antioch::ASCIIParser< NumericType >, Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 143 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_cea_mixture_data(), and Antioch::read_nasa_mixture_data().
|
inlinevirtual |
reads the thermo, NASA generalist, no templates for virtual
Reimplemented in Antioch::ASCIIParser< NumericType >, Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 146 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
|
inlinevirtual |
reads the thermo, NASA generalist, no templates for virtual
Reimplemented in Antioch::ASCIIParser< NumericType >, Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 149 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
|
inlinevirtual |
reads the thermo, CEA deprecated
Reimplemented in Antioch::ASCIIParser< NumericType >, Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 152 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
|
inlinevirtual |
reads the transport data, not valid in xml && chemkin
Reimplemented in Antioch::ASCIIParser< NumericType >.
Definition at line 138 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_transport_species_data().
|
inlinevirtual |
reads the vibrational data, not valid in xml && chemkin
Reimplemented in Antioch::ASCIIParser< NumericType >.
Definition at line 130 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_species_vibrational_data().
|
protected |
Definition at line 54 of file parser_base.C.
References Antioch::skip_comment_lines().
Referenced by Antioch::ASCIIParser< NumericType >::ASCIIParser().
|
inlinevirtual |
reads the species set
species
Reimplemented in Antioch::ASCIIParser< NumericType >, Antioch::XMLParser< NumericType >, and Antioch::ChemKinParser< NumericType >.
Definition at line 124 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_chemical_species_composition().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 167 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 230 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 233 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 236 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 239 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inline |
Definition at line 245 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_type.
|
inline |
Definition at line 248 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_verbose.
Referenced by Antioch::ASCIIParser< NumericType >::ASCIIParser(), Antioch::ChemKinParser< NumericType >::ChemKinParser(), and Antioch::XMLParser< NumericType >::XMLParser().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 224 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
inlinevirtual |
Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.
Definition at line 200 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.
Referenced by Antioch::read_reaction_set_data().
|
protected |
Definition at line 261 of file parser_base.h.
|
protected |
Definition at line 259 of file parser_base.h.
Referenced by Antioch::ParserBase< NumericType >::file(), and Antioch::ParserBase< NumericType >::ParserBase().
|
protected |
Definition at line 263 of file parser_base.h.
Referenced by Antioch::ParserBase< NumericType >::efficiencies(), Antioch::ParserBase< NumericType >::is_k0(), Antioch::ParserBase< NumericType >::ParserBase(), Antioch::ParserBase< NumericType >::products_orders(), Antioch::ParserBase< NumericType >::products_pairs(), Antioch::ParserBase< NumericType >::rate_constant(), Antioch::ParserBase< NumericType >::rate_constant_activation_energy_parameter(), Antioch::ParserBase< NumericType >::rate_constant_Berthelot_coefficient_parameter(), Antioch::ParserBase< NumericType >::rate_constant_cross_section_parameter(), Antioch::ParserBase< NumericType >::rate_constant_lambda_parameter(), Antioch::ParserBase< NumericType >::rate_constant_power_parameter(), Antioch::ParserBase< NumericType >::rate_constant_preexponential_parameter(), Antioch::ParserBase< NumericType >::rate_constant_Tref_parameter(), Antioch::ParserBase< NumericType >::reactants_orders(), Antioch::ParserBase< NumericType >::reactants_pairs(), Antioch::ParserBase< NumericType >::reaction(), Antioch::ParserBase< NumericType >::reaction_chemical_process(), Antioch::ParserBase< NumericType >::reaction_equation(), Antioch::ParserBase< NumericType >::reaction_id(), Antioch::ParserBase< NumericType >::reaction_kinetics_model(), Antioch::ParserBase< NumericType >::reaction_reversible(), Antioch::ParserBase< NumericType >::read_chemical_species(), Antioch::ParserBase< NumericType >::read_electronic_data(), Antioch::ParserBase< NumericType >::read_thermodynamic_data(), Antioch::ParserBase< NumericType >::read_transport_data(), Antioch::ParserBase< NumericType >::read_vibrational_data(), Antioch::ParserBase< NumericType >::species_list(), Antioch::ParserBase< NumericType >::Troe(), Antioch::ParserBase< NumericType >::Troe_alpha_parameter(), Antioch::ParserBase< NumericType >::Troe_T1_parameter(), Antioch::ParserBase< NumericType >::Troe_T2_parameter(), Antioch::ParserBase< NumericType >::Troe_T3_parameter(), Antioch::ParserBase< NumericType >::verify_Kooij_in_place_of_Arrhenius(), and Antioch::ParserBase< NumericType >::where_is_k0().
|
protected |
Definition at line 258 of file parser_base.h.
Referenced by Antioch::ParserBase< NumericType >::ParserBase(), and Antioch::ParserBase< NumericType >::type().
|
protected |
Definition at line 260 of file parser_base.h.
Referenced by Antioch::ParserBase< NumericType >::verbose().