antioch-0.4.0
|
#include <ascii_parser.h>
Public Member Functions | |
ASCIIParser (const std::string &file, bool verbose=true) | |
~ASCIIParser () | |
void | change_file (const std::string &filename) |
bool | initialize () |
void | set_ignored_columns (const std::vector< unsigned int > &ignored) |
set the indexes of to-be-ignored columns More... | |
const std::vector< std::string > | species_list () |
read species list More... | |
void | read_chemical_species (ChemicalMixture< NumericType > &chem_mixture) |
read the mandatory data More... | |
void | read_vibrational_data (ChemicalMixture< NumericType > &chem_mixture) |
read the vibrational data More... | |
void | read_electronic_data (ChemicalMixture< NumericType > &chem_mixture) |
read the electronic data More... | |
void | read_transport_data (TransportMixture< NumericType > &transport_mixture) |
reads the transport data, not valid in xml && chemkin More... | |
void | read_thermodynamic_data (NASAThermoMixture< NumericType, NASA7CurveFit< NumericType > > &) |
reads the thermo, NASA generalist, no templates for virtual More... | |
void | read_thermodynamic_data (NASAThermoMixture< NumericType, NASA9CurveFit< NumericType > > &) |
reads the thermo, NASA generalist, no templates for virtual More... | |
void | read_thermodynamic_data (NASAThermoMixture< NumericType, CEACurveFit< NumericType > > &thermo) |
reads the thermo, NASA generalist, no templates for virtual More... | |
void | read_thermodynamic_data (CEAThermodynamics< NumericType > &) |
read the thermodynamic data, deprecated object 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 | |
template<typename CurveType > | |
void | read_thermodynamic_data_root (NASAThermoMixture< NumericType, CurveType > &thermo) |
read the thermodynamic data More... | |
template<typename Mixture > | |
void | read_transport_data_root (Mixture &transport) |
read the thermodynamic data More... | |
void | find_first (unsigned int &index, unsigned int n_data) const |
find the index of the wanted data More... | |
void | check_warn_for_species_with_untrusted_hf (const std::string &name) const |
Warn about species for which Antioch default mixture file has untrusted H_f values. More... | |
ASCIIParser () | |
not allowed More... | |
Private Attributes | |
std::ifstream | _doc |
std::map< ParsingUnit, std::string > | _unit_map |
std::vector< unsigned int > | _ignored |
const unsigned int | _n_columns_chemical_species |
const unsigned int | _n_columns_vib_data |
const unsigned int | _n_columns_el_data |
const unsigned int | _n_columns_transport_species |
bool | _is_antioch_default_mixture_file |
Needed to be able to warn about using not-trusted enthalpies of formation. More... | |
Definition at line 88 of file ascii_parser.h.
Antioch::ASCIIParser< NumericType >::ASCIIParser | ( | const std::string & | file, |
bool | verbose = true |
||
) |
Definition at line 44 of file ascii_parser.C.
References Antioch::ASCIIParser< NumericType >::_doc, Antioch::ASCIIParser< NumericType >::_is_antioch_default_mixture_file, Antioch::ASCIIParser< NumericType >::_unit_map, antioch_error, Antioch::DefaultSourceFilename::chemical_mixture(), Antioch::DefaultInstallFilename::chemical_mixture(), Antioch::MASS_ENTHALPY, Antioch::MOL_WEIGHT, Antioch::ParserBase< NumericType >::skip_comments(), and Antioch::ParserBase< NumericType >::verbose().
Antioch::ASCIIParser< NumericType >::~ASCIIParser | ( | ) |
Definition at line 72 of file ascii_parser.C.
|
private |
not allowed
|
virtual |
Implements Antioch::ParserBase< NumericType >.
Definition at line 78 of file ascii_parser.C.
References antioch_error, Antioch::DefaultSourceFilename::chemical_mixture(), and Antioch::DefaultInstallFilename::chemical_mixture().
Referenced by Antioch::ChemicalMixture< CoeffType >::ChemicalMixture().
|
private |
Warn about species for which Antioch default mixture file has untrusted H_f values.
Definition at line 483 of file ascii_parser.C.
|
inlinevirtualinherited |
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().
|
inherited |
Definition at line 63 of file parser_base.C.
References antioch_parsing_error, Antioch::ASCII, Antioch::CHEMKIN, and Antioch::XML.
|
inlineinherited |
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().
|
private |
find the index of the wanted data
Definition at line 99 of file ascii_parser.C.
References antioch_parsing_error.
|
inlinevirtual |
Implements Antioch::ParserBase< NumericType >.
Definition at line 96 of file ascii_parser.h.
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
virtual |
read the mandatory data
Reimplemented from Antioch::ParserBase< NumericType >.
Definition at line 178 of file ascii_parser.C.
References Antioch::ChemicalMixture< CoeffType >::add_species(), std::int, Antioch::MASS_ENTHALPY, Antioch::MOL_WEIGHT, Antioch::ChemicalMixture< CoeffType >::species_list(), and Antioch::ChemicalMixture< CoeffType >::species_name_map().
|
virtual |
read the electronic data
Reimplemented from Antioch::ParserBase< NumericType >.
Definition at line 300 of file ascii_parser.C.
References Antioch::ChemicalMixture< CoeffType >::add_species_electronic_data(), antioch_assert_equal_to, Antioch::ChemicalMixture< CoeffType >::chemical_species(), std::int, and Antioch::ChemicalMixture< CoeffType >::species_name_map().
|
inlinevirtual |
reads the thermo, NASA generalist, no templates for virtual
Reimplemented from Antioch::ParserBase< NumericType >.
Definition at line 126 of file ascii_parser.h.
References antioch_error_msg.
Referenced by Antioch::read_cea_mixture_data_ascii().
|
inlinevirtual |
reads the thermo, NASA generalist, no templates for virtual
Reimplemented from Antioch::ParserBase< NumericType >.
Definition at line 130 of file ascii_parser.h.
References antioch_error_msg.
|
inlinevirtual |
reads the thermo, NASA generalist, no templates for virtual
Reimplemented from Antioch::ParserBase< NumericType >.
Definition at line 134 of file ascii_parser.h.
References Antioch::ASCIIParser< NumericType >::read_thermodynamic_data_root().
|
virtual |
read the thermodynamic data, deprecated object
Reimplemented from Antioch::ParserBase< NumericType >.
Definition at line 394 of file ascii_parser.C.
References Antioch::CEAThermodynamics< CoeffType >::add_curve_fit(), Antioch::CEAThermodynamics< CoeffType >::chemical_mixture(), and Antioch::ChemicalMixture< CoeffType >::species_name_map().
|
private |
read the thermodynamic data
Definition at line 349 of file ascii_parser.C.
References Antioch::NASAThermoMixture< CoeffType, NASAFit >::add_curve_fit(), Antioch::NASAThermoMixture< CoeffType, NASAFit >::chemical_mixture(), and Antioch::ChemicalMixture< CoeffType >::species_name_map().
Referenced by Antioch::ASCIIParser< NumericType >::read_thermodynamic_data().
|
inlinevirtual |
reads the transport data, not valid in xml && chemkin
Reimplemented from Antioch::ParserBase< NumericType >.
Definition at line 117 of file ascii_parser.h.
References Antioch::ASCIIParser< NumericType >::read_transport_data_root().
|
private |
read the thermodynamic data
Definition at line 438 of file ascii_parser.C.
Referenced by Antioch::ASCIIParser< NumericType >::read_transport_data().
|
virtual |
read the vibrational data
Reimplemented from Antioch::ParserBase< NumericType >.
Definition at line 249 of file ascii_parser.C.
References Antioch::ChemicalMixture< CoeffType >::add_species_vibrational_data(), antioch_assert_equal_to, Antioch::ChemicalMixture< CoeffType >::chemical_species(), std::int, and Antioch::ChemicalMixture< CoeffType >::species_name_map().
void Antioch::ASCIIParser< NumericType >::set_ignored_columns | ( | const std::vector< unsigned int > & | ignored | ) |
set the indexes of to-be-ignored columns
Definition at line 133 of file ascii_parser.C.
Referenced by tester().
|
protectedinherited |
Definition at line 54 of file parser_base.C.
References Antioch::skip_comment_lines().
Referenced by Antioch::ASCIIParser< NumericType >::ASCIIParser().
|
virtual |
read species list
Reimplemented from Antioch::ParserBase< NumericType >.
Definition at line 139 of file ascii_parser.C.
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
inlineinherited |
Definition at line 245 of file parser_base.h.
References Antioch::ParserBase< NumericType >::_type.
|
inlineinherited |
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().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
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().
|
protectedinherited |
Definition at line 261 of file parser_base.h.
|
private |
Definition at line 161 of file ascii_parser.h.
Referenced by Antioch::ASCIIParser< NumericType >::ASCIIParser().
|
protectedinherited |
Definition at line 259 of file parser_base.h.
Referenced by Antioch::ParserBase< NumericType >::file(), and Antioch::ParserBase< NumericType >::ParserBase().
|
private |
Definition at line 164 of file ascii_parser.h.
|
private |
Needed to be able to warn about using not-trusted enthalpies of formation.
Definition at line 171 of file ascii_parser.h.
Referenced by Antioch::ASCIIParser< NumericType >::ASCIIParser().
|
private |
Definition at line 165 of file ascii_parser.h.
|
private |
Definition at line 167 of file ascii_parser.h.
|
private |
Definition at line 168 of file ascii_parser.h.
|
private |
Definition at line 166 of file ascii_parser.h.
|
protectedinherited |
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().
|
protectedinherited |
Definition at line 258 of file parser_base.h.
Referenced by Antioch::ParserBase< NumericType >::ParserBase(), and Antioch::ParserBase< NumericType >::type().
|
private |
Definition at line 162 of file ascii_parser.h.
Referenced by Antioch::ASCIIParser< NumericType >::ASCIIParser().
|
protectedinherited |
Definition at line 260 of file parser_base.h.
Referenced by Antioch::ParserBase< NumericType >::verbose().