antioch-0.4.0
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
Antioch::ASCIIParser< NumericType > Singleton Reference

#include <ascii_parser.h>

Inheritance diagram for Antioch::ASCIIParser< NumericType >:
Antioch::ParserBase< NumericType >

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...
 

Detailed Description

template<typename NumericType>
singleton Antioch::ASCIIParser< NumericType >

Definition at line 88 of file ascii_parser.h.

Constructor & Destructor Documentation

template<typename NumericType >
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().

45  : ParserBase<NumericType>("ascii",file,verbose,"#!"),
46  _doc(file.c_str()),
47  _n_columns_chemical_species(4), // Spec. Mol. Wt., Hform (0K), cfs, zns
48  _n_columns_vib_data(2), // Species Theta_v degeneracy
49  _n_columns_el_data(2), // Species ThetaE edg #elevels
50  _n_columns_transport_species(5), // Species, eps/kB (K), sigma (ang), alpha (D), alpha (ang^3), Zrot@298 K
52  {
53  if(!_doc.is_open())
54  {
55  std::cerr << "ERROR: unable to load file " << file << std::endl;
56  antioch_error();
57  }
58 
62 
63  if(this->verbose())std::cout << "Having opened file " << file << std::endl;
64 
65  this->skip_comments(_doc);
66 
67  _unit_map[MOL_WEIGHT] = "g/mol";
68  _unit_map[MASS_ENTHALPY] = "J/kg";
69  }
bool _is_antioch_default_mixture_file
Needed to be able to warn about using not-trusted enthalpies of formation.
Definition: ascii_parser.h:171
void skip_comments(std::istream &doc)
Definition: parser_base.C:54
std::map< ParsingUnit, std::string > _unit_map
Definition: ascii_parser.h:162
#define antioch_error()
static const std::string & chemical_mixture()
std::ifstream _doc
Definition: ascii_parser.h:161
const unsigned int _n_columns_el_data
Definition: ascii_parser.h:167
const std::string file() const
Definition: parser_base.h:242
static const std::string & chemical_mixture()
const unsigned int _n_columns_chemical_species
Definition: ascii_parser.h:165
bool verbose() const
Definition: parser_base.h:248
const unsigned int _n_columns_transport_species
Definition: ascii_parser.h:168
const unsigned int _n_columns_vib_data
Definition: ascii_parser.h:166
template<typename NumericType >
Antioch::ASCIIParser< NumericType >::~ASCIIParser ( )

Definition at line 72 of file ascii_parser.C.

73  {
74  _doc.close();
75  }
std::ifstream _doc
Definition: ascii_parser.h:161
template<typename NumericType>
Antioch::ASCIIParser< NumericType >::ASCIIParser ( )
private

not allowed

Member Function Documentation

template<typename NumericType >
void Antioch::ASCIIParser< NumericType >::change_file ( const std::string &  filename)
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().

79  {
80  _doc.close();
81  _doc.open(filename.c_str());
82  ParserBase<NumericType>::_file = filename;
83  if(!_doc.is_open())
84  {
85  std::cerr << "ERROR: unable to load file " << filename << std::endl;
86  antioch_error();
87  }
88 
89  if( filename == DefaultSourceFilename::chemical_mixture() ||
92 
93  if(this->verbose())std::cout << "Having opened file " << filename << std::endl;
94 
95  this->skip_comments(_doc);
96  }
bool _is_antioch_default_mixture_file
Needed to be able to warn about using not-trusted enthalpies of formation.
Definition: ascii_parser.h:171
void skip_comments(std::istream &doc)
Definition: parser_base.C:54
#define antioch_error()
static const std::string & chemical_mixture()
std::ifstream _doc
Definition: ascii_parser.h:161
static const std::string & chemical_mixture()
bool verbose() const
Definition: parser_base.h:248
template<typename NumericType >
void Antioch::ASCIIParser< NumericType >::check_warn_for_species_with_untrusted_hf ( const std::string &  name) const
private

Warn about species for which Antioch default mixture file has untrusted H_f values.

Definition at line 483 of file ascii_parser.C.

484  {
485  std::vector<std::string> species_with_unknown_Hf(9);
486  species_with_unknown_Hf[0] = "CH2O";
487  species_with_unknown_Hf[1] = "HCCO";
488  species_with_unknown_Hf[2] = "HCCOH";
489  species_with_unknown_Hf[3] = "H2CN";
490  species_with_unknown_Hf[4] = "HCNN";
491  species_with_unknown_Hf[5] = "HCNO";
492  species_with_unknown_Hf[6] = "HOCN";
493  species_with_unknown_Hf[7] = "C3H7";
494  species_with_unknown_Hf[8] = "CH2CHO";
495 
496  std::vector<std::string>::const_iterator it = std::search_n( species_with_unknown_Hf.begin(),
497  species_with_unknown_Hf.end(),
498  1, name );
499  if( it != species_with_unknown_Hf.end() )
500  {
501  std::cout << "WARNING: Detected that you're using Antioch's default chemical mixture file" << std::endl
502  << " and using species " << name <<". The Enthaply of formation of this" << std::endl
503  << " species is currently NOT TRUSTED. BE AWARE THAT USING StatMechThermodynamics"
504  << std::endl
505  << " WILL LIKELY GIVE INACCURATE RESULTS! All other calculations are unaffected."
506  << std::endl;
507  }
508 
509  }
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::efficiencies ( std::vector< std::pair< std::string, NumericType > > &  ) const
inlinevirtualinherited
Returns
true if efficiencies are found

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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType >
ParsingType Antioch::ParserBase< NumericType >::enum_type ( ) const
inherited
Returns
enum

Definition at line 63 of file parser_base.C.

References antioch_parsing_error, Antioch::ASCII, Antioch::CHEMKIN, and Antioch::XML.

64  {
65  ParsingType PType(ASCII);
66  if(_type == "ascii")
67  {
68  PType = ASCII;
69  }
70  else if(_type == "ChemKin")
71  {
72  PType = CHEMKIN;
73  }
74  else if(_type == "XML")
75  {
76  PType = XML;
77  }
78  else
79  {
80  antioch_parsing_error(std::string("unknown parser type!!! " + _type));
81  }
82 
83  return PType;
84  }
std::string _type
Definition: parser_base.h:258
#define antioch_parsing_error(description)
template<typename NumericType>
const std::string Antioch::ParserBase< NumericType >::file ( ) const
inlineinherited
template<typename NumericType >
void Antioch::ASCIIParser< NumericType >::find_first ( unsigned int &  index,
unsigned int  n_data 
) const
private

find the index of the wanted data

Definition at line 99 of file ascii_parser.C.

References antioch_parsing_error.

100  {
101  // slow algorithm so whatever order of ignored column is fine
102  bool find(true);
103  while(find)
104  {
105  find = false;
106  for(unsigned int ii = 0; ii < _ignored.size(); ii++)
107  {
108  if(index == _ignored[ii])
109  {
110  find = true;
111  index++;
112  break;
113  }
114  }
115  }
116 
117  if(index > n_data)
118  {
119  std::cerr << "Error while reading " << this->file() << std::endl
120  << "Total number of columns provided is " << n_data
121  << " with " << _ignored.size() << " ignored column." << std::endl
122  << "The provided ignored index are:\n";
123  for(unsigned int i = 0; i < _ignored.size(); i++)
124  {
125  std::cerr << _ignored[i] << std::endl;
126  }
127  std::cerr << "Indexes start at zero, maybe try decreasing them?" << std::endl;
128  antioch_parsing_error("Error in ASCII parser");
129  }
130  }
std::vector< unsigned int > _ignored
Definition: ascii_parser.h:164
const std::string file() const
Definition: parser_base.h:242
#define antioch_parsing_error(description)
template<typename NumericType>
bool Antioch::ASCIIParser< NumericType >::initialize ( )
inlinevirtual

Implements Antioch::ParserBase< NumericType >.

Definition at line 96 of file ascii_parser.h.

96 {return false;}
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::is_k0 ( unsigned int  ,
const std::string &   
) const
inlinevirtualinherited
Returns
true if "name" attribute is found with value "k0"

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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual const std::map<std::string,NumericType> Antioch::ParserBase< NumericType >::products_orders ( ) const
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().

194 {antioch_not_implemented_msg(_not_implemented); return std::map<std::string,NumericType>();}
#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::products_pairs ( std::vector< std::pair< std::string, int > > &  ) const
inlinevirtualinherited
Returns
pairs of products and stoichiometric coefficients

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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::rate_constant ( const std::string &  )
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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::rate_constant_activation_energy_parameter ( NumericType &  ,
std::string &  ,
std::string &   
) const
inlinevirtualinherited
Returns
true if activation energie

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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::rate_constant_Berthelot_coefficient_parameter ( NumericType &  ,
std::string &  ,
std::string &   
) const
inlinevirtualinherited
Returns
true if D coefficient

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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::rate_constant_cross_section_parameter ( std::vector< NumericType > &  ,
std::string &  ,
std::string &   
) const
inlinevirtualinherited
Returns
true if sigma

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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::rate_constant_lambda_parameter ( std::vector< NumericType > &  ,
std::string &  ,
std::string &   
) const
inlinevirtualinherited
Returns
true if lambda

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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::rate_constant_power_parameter ( NumericType &  ,
std::string &  ,
std::string &   
) const
inlinevirtualinherited
Returns
true if beta coefficient

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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::rate_constant_preexponential_parameter ( NumericType &  ,
std::string &  ,
std::string &   
) const
inlinevirtualinherited
Returns
true if pre exponentiel coefficient

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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::rate_constant_Tref_parameter ( NumericType &  ,
std::string &  ,
std::string &   
) const
inlinevirtualinherited
Returns
true if Tref

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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual const std::map<std::string,NumericType> Antioch::ParserBase< NumericType >::reactants_orders ( ) const
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().

191 {antioch_not_implemented_msg(_not_implemented); return std::map<std::string,NumericType>();}
#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::reactants_pairs ( std::vector< std::pair< std::string, int > > &  ) const
inlinevirtualinherited
Returns
pairs of reactants and stoichiometric coefficients

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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::reaction ( )
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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual const std::string Antioch::ParserBase< NumericType >::reaction_chemical_process ( ) const
inlinevirtualinherited
Returns
reaction chemical process

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().

176 {antioch_not_implemented_msg(_not_implemented); return std::string();}
#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual const std::string Antioch::ParserBase< NumericType >::reaction_equation ( ) const
inlinevirtualinherited
Returns
reaction equation

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().

173 {antioch_not_implemented_msg(_not_implemented); return std::string();}
#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual const std::string Antioch::ParserBase< NumericType >::reaction_id ( ) const
inlinevirtualinherited
Returns
reaction id, 0 if not provided

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().

170 {antioch_not_implemented_msg(_not_implemented); return std::string();}
#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual const std::string Antioch::ParserBase< NumericType >::reaction_kinetics_model ( const std::vector< std::string > &  ) const
inlinevirtualinherited
Returns
reaction kinetics model

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().

179 {antioch_not_implemented_msg(_not_implemented); return std::string();}
#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::reaction_reversible ( ) const
inlinevirtualinherited
Returns
reversible state

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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType >
void Antioch::ASCIIParser< NumericType >::read_chemical_species ( ChemicalMixture< NumericType > &  chem_mixture)
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().

179  {
180  std::string name;
181  NumericType mol_wght, h_form, n_tr_dofs;
182  int charge;
183  NumericType mw_unit = Units<NumericType>(_unit_map.at(MOL_WEIGHT)).get_SI_factor();
184  NumericType ef_unit = Units<NumericType>(_unit_map.at(MASS_ENTHALPY)).get_SI_factor();
185 
186  const unsigned int n_data = _n_columns_chemical_species + _ignored.size(); // we read all those columns
187  unsigned int imw(0);
188  this->find_first(imw,n_data);
189  unsigned int ihf(imw+1);
190  this->find_first(ihf,n_data);
191  unsigned int itrdofs(ihf+1);
192  this->find_first(itrdofs,n_data);
193  unsigned int ic(itrdofs+1);
194  this->find_first(ic,n_data);
195 
196  std::vector<NumericType> read(n_data,0.);
197 
198  if(this->verbose())std::cout << "Reading species characteristics in file " << this->file() << std::endl;
199  while (_doc.good())
200  {
201 
202  this->skip_comments(_doc); // if comment in the middle
203 
204  _doc >> name; // Species Name
205  for(unsigned int i = 0; i < n_data; i++)_doc >> read[i];
206  mol_wght = read[imw]; // molecular weight (kg/kmol)
207  h_form = read[ihf]; // heat of formation at Ok (J/kg)
208  n_tr_dofs = read[itrdofs]; // number of translational/rotational DOFs
209  charge = int(read[ic]); // charge number
210 
211  mol_wght *= mw_unit; // to SI (kg/mol)
212  h_form *= ef_unit; // to SI (J/kg)
213 
214  // If we are still good, we have a valid set of thermodynamic
215  // data for this species. Otherwise, we read past end-of-file
216  // in the section above
217  if (_doc.good())
218  {
219  // If we do not have this species, just go on
220  if (!chem_mixture.species_name_map().count(name))continue;
221 
222  Species species = chem_mixture.species_name_map().at(name);
223 
224  // using default comparison:
225  std::vector<Species>::const_iterator it = std::search_n( chem_mixture.species_list().begin(),
226  chem_mixture.species_list().end(),
227  1, species);
228  if( it != chem_mixture.species_list().end() )
229  {
230  unsigned int index = static_cast<unsigned int>(it - chem_mixture.species_list().begin());
231  chem_mixture.add_species( index, name, mol_wght, h_form, n_tr_dofs, charge );
232  if(this->verbose())
233  {
234  std::cout << "Adding " << name << " informations:\n\t"
235  << "molecular weight: " << mol_wght << " kg/mol\n\t"
236  << "formation enthalpy @0 K: " << h_form << " J/mol\n\t"
237  << "trans-rot degrees of freedom: " << n_tr_dofs << "\n\t"
238  << "charge: " << charge << std::endl;
239  }
242  }
243 
244  }
245  }
246  }
unsigned int Species
std::vector< unsigned int > _ignored
Definition: ascii_parser.h:164
bool _is_antioch_default_mixture_file
Needed to be able to warn about using not-trusted enthalpies of formation.
Definition: ascii_parser.h:171
void skip_comments(std::istream &doc)
Definition: parser_base.C:54
std::map< ParsingUnit, std::string > _unit_map
Definition: ascii_parser.h:162
void find_first(unsigned int &index, unsigned int n_data) const
find the index of the wanted data
Definition: ascii_parser.C:99
std::ifstream _doc
Definition: ascii_parser.h:161
const std::string file() const
Definition: parser_base.h:242
const unsigned int _n_columns_chemical_species
Definition: ascii_parser.h:165
a int
Definition: eigen_utils.h:67
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.
Definition: ascii_parser.C:483
bool verbose() const
Definition: parser_base.h:248
template<typename NumericType >
void Antioch::ASCIIParser< NumericType >::read_electronic_data ( ChemicalMixture< NumericType > &  chem_mixture)
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().

301  {
302  std::string name;
303  NumericType theta_e;
304  unsigned int n_degeneracies;
305 
306  const unsigned int n_data = _n_columns_el_data + _ignored.size(); // we read all those columns
307  unsigned int ite(0);
308  this->find_first(ite,n_data);
309  unsigned int ide(ite+1);
310  this->find_first(ide,n_data);
311 
312  std::vector<NumericType> read(n_data,0);
313 
314  if(this->verbose())std::cout << "Reading electronic data in file " << this->file() << std::endl;
315  while (_doc.good())
316  {
317  _doc >> name; // Species Name
318  for(unsigned int i = 0; i < n_data; i++)_doc >> read[i];
319  theta_e = read[ite]; // characteristic electronic temperature (K)
320  n_degeneracies = (unsigned int)(read[ide]); // number of degeneracies for this level
321 
322  // If we are still good, we have a valid set of thermodynamic
323  // data for this species. Otherwise, we read past end-of-file
324  // in the section above
325  if (_doc.good())
326  {
327  // If we do not have this species, just go on
328  if (!chem_mixture.species_name_map().count(name))continue;
329 
330  // ... otherwise we add the data
331  const unsigned int s =
332  chem_mixture.species_name_map().find(name)->second;
333 
334  antioch_assert_equal_to((chem_mixture.chemical_species()[s])->species(), name);
335 
336  chem_mixture.add_species_electronic_data(s, theta_e, n_degeneracies);
337  if(this->verbose())
338  {
339  std::cout << "Adding electronic data of species " << name << "\n\t"
340  << "electronic temperature: " << theta_e << " K\n\t"
341  << "degeneracy: " << n_degeneracies << std::endl;
342  }
343  }
344  }
345  }
std::vector< unsigned int > _ignored
Definition: ascii_parser.h:164
#define antioch_assert_equal_to(expr1, expr2)
void find_first(unsigned int &index, unsigned int n_data) const
find the index of the wanted data
Definition: ascii_parser.C:99
std::ifstream _doc
Definition: ascii_parser.h:161
const unsigned int _n_columns_el_data
Definition: ascii_parser.h:167
const std::string file() const
Definition: parser_base.h:242
a int
Definition: eigen_utils.h:67
bool verbose() const
Definition: parser_base.h:248
template<typename NumericType>
void Antioch::ASCIIParser< NumericType >::read_thermodynamic_data ( NASAThermoMixture< NumericType, NASA7CurveFit< NumericType > > &  )
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().

127  {antioch_error_msg("ERROR: ASCIIParsing only supports parsing for CEACurveFit!");}
#define antioch_error_msg(errmsg)
template<typename NumericType>
void Antioch::ASCIIParser< NumericType >::read_thermodynamic_data ( NASAThermoMixture< NumericType, NASA9CurveFit< NumericType > > &  )
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.

131  {antioch_error_msg("ERROR: ASCIIParsing only supports parsing for CEACurveFit!");}
#define antioch_error_msg(errmsg)
template<typename NumericType>
void Antioch::ASCIIParser< NumericType >::read_thermodynamic_data ( NASAThermoMixture< NumericType, CEACurveFit< NumericType > > &  thermo)
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().

135  {this->read_thermodynamic_data_root(thermo);}
void read_thermodynamic_data_root(NASAThermoMixture< NumericType, CurveType > &thermo)
read the thermodynamic data
Definition: ascii_parser.C:349
template<typename NumericType >
void Antioch::ASCIIParser< NumericType >::read_thermodynamic_data ( CEAThermodynamics< NumericType > &  thermo)
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().

395  {
396  std::string name;
397  unsigned int n_int;
398  std::vector<NumericType> coeffs;
399  NumericType h_form, val;
400 
401  const ChemicalMixture<NumericType>& chem_mixture = thermo.chemical_mixture();
402 
403 // \todo: only cea, should do NASA
404  while (_doc.good())
405  {
406  this->skip_comments(_doc);
407 
408  _doc >> name; // Species Name
409  _doc >> n_int; // Number of T intervals: [200-1000], [1000-6000], ([6000-20000])
410  _doc >> h_form; // Formation Enthalpy @ 298.15 K
411 
412  coeffs.clear();
413  for (unsigned int interval=0; interval<n_int; interval++)
414  {
415  for (unsigned int n=0; n<10; n++)
416  {
417  _doc >> val, coeffs.push_back(val);
418  }
419  }
420 
421  // If we are still good, we have a valid set of thermodynamic
422  // data for this species. Otherwise, we read past end-of-file
423  // in the section above
424  if (_doc.good())
425  {
426  // Check if this is a species we want.
427  if( chem_mixture.species_name_map().find(name) !=
428  chem_mixture.species_name_map().end() )
429  {
430  thermo.add_curve_fit(name, coeffs);
431  }
432  }
433  } // end while
434  }
void skip_comments(std::istream &doc)
Definition: parser_base.C:54
std::ifstream _doc
Definition: ascii_parser.h:161
template<typename NumericType >
template<typename CurveType >
void Antioch::ASCIIParser< NumericType >::read_thermodynamic_data_root ( NASAThermoMixture< NumericType, CurveType > &  thermo)
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().

350  {
351  std::string name;
352  unsigned int n_int;
353  std::vector<NumericType> coeffs;
354  NumericType h_form, val;
355 
356  const ChemicalMixture<NumericType>& chem_mixture = thermo.chemical_mixture();
357 
358 // \todo: only cea, should do NASA
359  while (_doc.good())
360  {
361  this->skip_comments(_doc);
362 
363  _doc >> name; // Species Name
364  _doc >> n_int; // Number of T intervals: [200-1000], [1000-6000], ([6000-20000])
365  _doc >> h_form; // Formation Enthalpy @ 298.15 K
366 
367  coeffs.clear();
368  for (unsigned int interval=0; interval<n_int; interval++)
369  {
370  for (unsigned int n=0; n<10; n++)
371  {
372  _doc >> val, coeffs.push_back(val);
373  }
374  }
375 
376  // If we are still good, we have a valid set of thermodynamic
377  // data for this species. Otherwise, we read past end-of-file
378  // in the section above
379  if (_doc.good())
380  {
381  // Check if this is a species we want.
382  if( chem_mixture.species_name_map().find(name) !=
383  chem_mixture.species_name_map().end() )
384  {
385  if(this->verbose())std::cout << "Adding curve fit " << name << std::endl;
386  thermo.add_curve_fit(name, coeffs);
387  }
388  }
389  } // end while
390  }
void skip_comments(std::istream &doc)
Definition: parser_base.C:54
std::ifstream _doc
Definition: ascii_parser.h:161
bool verbose() const
Definition: parser_base.h:248
template<typename NumericType>
void Antioch::ASCIIParser< NumericType >::read_transport_data ( TransportMixture< NumericType > &  transport_mixture)
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().

117 {this->read_transport_data_root(transport_mixture);}
void read_transport_data_root(Mixture &transport)
read the thermodynamic data
Definition: ascii_parser.C:438
template<typename NumericType >
template<typename Mixture >
void Antioch::ASCIIParser< NumericType >::read_transport_data_root ( Mixture &  transport)
private

read the thermodynamic data

Definition at line 438 of file ascii_parser.C.

Referenced by Antioch::ASCIIParser< NumericType >::read_transport_data().

439  {
440  std::string name;
441  NumericType LJ_eps_kB;
442  NumericType LJ_sigma;
443  NumericType dipole_moment;
444  NumericType pol;
445  NumericType Zrot;
446 
447  const unsigned int n_data = _n_columns_transport_species + _ignored.size(); // we read all those columns
448  unsigned int iLJeps(0);
449  this->find_first(iLJeps,n_data);
450  unsigned int iLJsig(iLJeps+1);
451  this->find_first(iLJsig,n_data);
452  unsigned int idip(iLJsig+1);
453  this->find_first(idip,n_data);
454  unsigned int ipol(idip+1);
455  this->find_first(ipol,n_data);
456  unsigned int irot(ipol+1);
457  this->find_first(irot,n_data);
458 
459  std::vector<NumericType> read(n_data,0.);
460 
461  while (_doc.good())
462  {
463  this->skip_comments(_doc);
464 
465  _doc >> name;
466  for(unsigned int i = 0; i < n_data; i++)_doc >> read[i];
467  LJ_eps_kB = read[iLJeps];
468  LJ_sigma = read[iLJsig];
469  dipole_moment = read[idip];
470  pol = read[ipol];
471  Zrot = read[irot];
472  if(transport.chemical_mixture().species_name_map().count(name))
473  {
474  unsigned int place = transport.chemical_mixture().species_name_map().at(name);
475  NumericType mass = transport.chemical_mixture().M(place);
476  // adding species in mixture
477  transport.add_species(place,LJ_eps_kB,LJ_sigma,dipole_moment,pol,Zrot,mass);
478  }
479  }
480  }
std::vector< unsigned int > _ignored
Definition: ascii_parser.h:164
void skip_comments(std::istream &doc)
Definition: parser_base.C:54
void find_first(unsigned int &index, unsigned int n_data) const
find the index of the wanted data
Definition: ascii_parser.C:99
std::ifstream _doc
Definition: ascii_parser.h:161
const unsigned int _n_columns_transport_species
Definition: ascii_parser.h:168
template<typename NumericType >
void Antioch::ASCIIParser< NumericType >::read_vibrational_data ( ChemicalMixture< NumericType > &  chem_mixture)
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().

250  {
251  std::string name;
252  NumericType theta_v;
253  unsigned int n_degeneracies;
254 
255  const unsigned int n_data = _n_columns_vib_data + _ignored.size(); // we read all those columns
256  unsigned int itv(0);
257  this->find_first(itv,n_data);
258  unsigned int ide(itv+1);
259  this->find_first(ide,n_data);
260 
261  std::vector<NumericType> read(n_data,0);
262 
263  if(this->verbose())std::cout << "Reading vibrational data in file " << this->file() << std::endl;
264  while (_doc.good())
265  {
266 
267  this->skip_comments(_doc); // if comment in the middle
268 
269  _doc >> name; // Species Name
270  for(unsigned int i = 0; i < n_data; i++)_doc >> read[i];
271  theta_v = read[itv]; // characteristic vibrational temperature (K)
272  n_degeneracies = (unsigned int)(read[ide]); // degeneracy of the mode
273 
274  // If we are still good, we have a valid set of thermodynamic
275  // data for this species. Otherwise, we read past end-of-file
276  // in the section above
277  if (_doc.good())
278  {
279  // If we do not have this species, just keep going
280  if (!chem_mixture.species_name_map().count(name))continue;
281 
282  // ... otherwise we add the data
283  const unsigned int s =
284  chem_mixture.species_name_map().find(name)->second;
285 
286  antioch_assert_equal_to((chem_mixture.chemical_species()[s])->species(), name);
287 
288  chem_mixture.add_species_vibrational_data(s, theta_v, n_degeneracies);
289  if(this->verbose())
290  {
291  std::cout << "Adding vibrational data of species " << name << "\n\t"
292  << "vibrational temperature: " << theta_v << " K\n\t"
293  << "degeneracy: " << n_degeneracies << std::endl;
294  }
295  }
296  }
297  }
std::vector< unsigned int > _ignored
Definition: ascii_parser.h:164
#define antioch_assert_equal_to(expr1, expr2)
void skip_comments(std::istream &doc)
Definition: parser_base.C:54
void find_first(unsigned int &index, unsigned int n_data) const
find the index of the wanted data
Definition: ascii_parser.C:99
std::ifstream _doc
Definition: ascii_parser.h:161
const std::string file() const
Definition: parser_base.h:242
a int
Definition: eigen_utils.h:67
bool verbose() const
Definition: parser_base.h:248
const unsigned int _n_columns_vib_data
Definition: ascii_parser.h:166
template<typename NumericType >
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().

134  {
135  _ignored = ignored;
136  }
std::vector< unsigned int > _ignored
Definition: ascii_parser.h:164
template<typename NumericType >
void Antioch::ParserBase< NumericType >::skip_comments ( std::istream &  doc)
protectedinherited

Definition at line 54 of file parser_base.C.

References Antioch::skip_comment_lines().

Referenced by Antioch::ASCIIParser< NumericType >::ASCIIParser().

55  {
56  for(unsigned int c = 0; c < _comments.size(); c++)
57  {
59  }
60  }
std::string _comments
Definition: parser_base.h:261
void skip_comment_lines(std::istream &in, const char comment_start)
Skip comment lines in the header of an ASCII text file prefixed with the comment character 'comment_s...
Definition: input_utils.h:46
template<typename NumericType >
const std::vector< std::string > Antioch::ASCIIParser< NumericType >::species_list ( )
virtual

read species list

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 139 of file ascii_parser.C.

140  {
141  std::vector<std::string> species_list;
142  std::string spec;
143 
144  while(_doc.good())
145  {
146  this->skip_comments(_doc); // if comments in the middle
147 
148  _doc >> spec;
149 
150  if(!_doc.good())break; // read successful?
151 
152  // checking doublon
153  bool doublon(false);
154  for(unsigned int s = 0; s < species_list.size(); s++)
155  {
156  if(spec == species_list[s])
157  {
158  doublon = true;
159  break;
160  }
161  if(doublon)
162  {
163  std::cerr << "Multiple declaration of " << spec
164  << ", skipping doublon" << std::endl;
165  continue;
166  }
167  // adding
168  }
169  if(this->verbose())std::cout << spec << std::endl;
170  species_list.push_back(spec);
171  }
172 
173  if(this->verbose())std::cout << "Found " << species_list.size() << " species\n\n" << std::endl;
174  return species_list;
175  }
void skip_comments(std::istream &doc)
Definition: parser_base.C:54
std::ifstream _doc
Definition: ascii_parser.h:161
bool verbose() const
Definition: parser_base.h:248
const std::vector< std::string > species_list()
read species list
Definition: ascii_parser.C:139
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::Troe ( ) const
inlinevirtualinherited
Returns
true if there's a Troe block

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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::Troe_alpha_parameter ( NumericType &  ,
std::string &  ,
std::string &   
) const
inlinevirtualinherited
Returns
true is alpha

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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::Troe_T1_parameter ( NumericType &  ,
std::string &  ,
std::string &   
) const
inlinevirtualinherited
Returns
true is alpha

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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::Troe_T2_parameter ( NumericType &  ,
std::string &  ,
std::string &   
) const
inlinevirtualinherited
Returns
true is alpha

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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::Troe_T3_parameter ( NumericType &  ,
std::string &  ,
std::string &   
) const
inlinevirtualinherited
Returns
true is alpha

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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
const std::string Antioch::ParserBase< NumericType >::type ( ) const
inlineinherited
Returns
type of parser

Definition at line 245 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_type.

245 {return _type;}
std::string _type
Definition: parser_base.h:258
template<typename NumericType>
bool Antioch::ParserBase< NumericType >::verbose ( ) const
inlineinherited
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::verify_Kooij_in_place_of_Arrhenius ( ) const
inlinevirtualinherited
Returns
true if a Kooij is called Arrhenuis

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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual unsigned int Antioch::ParserBase< NumericType >::where_is_k0 ( const std::string &  ) const
inlinevirtualinherited
Returns
index of k0 (0 or 1)

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().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263

Member Data Documentation

template<typename NumericType>
std::string Antioch::ParserBase< NumericType >::_comments
protectedinherited

Definition at line 261 of file parser_base.h.

template<typename NumericType>
std::ifstream Antioch::ASCIIParser< NumericType >::_doc
private

Definition at line 161 of file ascii_parser.h.

Referenced by Antioch::ASCIIParser< NumericType >::ASCIIParser().

template<typename NumericType>
std::string Antioch::ParserBase< NumericType >::_file
protectedinherited
template<typename NumericType>
std::vector<unsigned int> Antioch::ASCIIParser< NumericType >::_ignored
private

Definition at line 164 of file ascii_parser.h.

template<typename NumericType>
bool Antioch::ASCIIParser< NumericType >::_is_antioch_default_mixture_file
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().

template<typename NumericType>
const unsigned int Antioch::ASCIIParser< NumericType >::_n_columns_chemical_species
private

Definition at line 165 of file ascii_parser.h.

template<typename NumericType>
const unsigned int Antioch::ASCIIParser< NumericType >::_n_columns_el_data
private

Definition at line 167 of file ascii_parser.h.

template<typename NumericType>
const unsigned int Antioch::ASCIIParser< NumericType >::_n_columns_transport_species
private

Definition at line 168 of file ascii_parser.h.

template<typename NumericType>
const unsigned int Antioch::ASCIIParser< NumericType >::_n_columns_vib_data
private

Definition at line 166 of file ascii_parser.h.

template<typename NumericType>
std::string Antioch::ParserBase< NumericType >::_not_implemented
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().

template<typename NumericType>
std::string Antioch::ParserBase< NumericType >::_type
protectedinherited
template<typename NumericType>
std::map<ParsingUnit,std::string> Antioch::ASCIIParser< NumericType >::_unit_map
private

Definition at line 162 of file ascii_parser.h.

Referenced by Antioch::ASCIIParser< NumericType >::ASCIIParser().

template<typename NumericType>
bool Antioch::ParserBase< NumericType >::_verbose
protectedinherited

Definition at line 260 of file parser_base.h.

Referenced by Antioch::ParserBase< NumericType >::verbose().


The documentation for this singleton was generated from the following files:

Generated on Thu Jul 7 2016 11:09:48 for antioch-0.4.0 by  doxygen 1.8.8