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

Nothing is stored, this parser is based on the tinyxml2 implementation. More...

#include <read_reaction_set_data.h>

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

Public Member Functions

 XMLParser (const std::string &filename, bool verbose=true)
 
 ~XMLParser ()
 
void change_file (const std::string &filename)
 
bool initialize ()
 Read header of file, go to interesting part. More...
 
const std::vector< std::string > species_list ()
 reads the species set More...
 
void read_thermodynamic_data (NASAThermoMixture< NumericType, NASA7CurveFit< NumericType > > &thermo)
 reads the thermo, NASA generalist, no templates for virtual More...
 
void read_thermodynamic_data (NASAThermoMixture< NumericType, NASA9CurveFit< NumericType > > &thermo)
 reads the thermo, NASA generalist, no templates for virtual More...
 
void read_thermodynamic_data (NASAThermoMixture< NumericType, CEACurveFit< NumericType > > &)
 reads the thermo, NASA generalist, no templates for virtual More...
 
void read_thermodynamic_data (CEAThermodynamics< NumericType > &)
 reads the thermo, CEA deprecated More...
 
bool reaction ()
 reaction More...
 
bool rate_constant (const std::string &kinetics_model)
 go to next rate constant More...
 
bool Troe () const
 return true if there's a Troe block More...
 
const std::string reaction_id () const
 return reaction id, 0 if not provided More...
 
const std::string reaction_equation () const
 return reaction equation More...
 
const std::string reaction_chemical_process () const
 return reaction chemical process More...
 
const std::string reaction_kinetics_model (const std::vector< std::string > &kinetics_models) const
 return reaction kinetics model More...
 
bool reaction_reversible () const
 return reversible state More...
 
bool reactants_pairs (std::vector< std::pair< std::string, int > > &reactants_pair) const
 return pairs of reactants and stoichiometric coefficients More...
 
bool products_pairs (std::vector< std::pair< std::string, int > > &products_pair) const
 return pairs of products and stoichiometric coefficients More...
 
const std::map< std::string,
NumericType > 
reactants_orders () const
 return a map between reactants' name and found partial orders More...
 
const std::map< std::string,
NumericType > 
products_orders () const
 return a map between products' name and found partial orders More...
 
bool is_k0 (unsigned int nrc, const std::string &kin_model) const
 return true if the concerned reaction rate is the low pressure limit More...
 
unsigned int where_is_k0 (const std::string &kin_model) const
 return index of k0 (0 or 1) More...
 
bool rate_constant_preexponential_parameter (NumericType &A, std::string &A_unit, std::string &def_unit) const
 return true if pre exponentiel coefficient More...
 
bool rate_constant_power_parameter (NumericType &b, std::string &b_unit, std::string &def_unit) const
 return true if beta coefficient More...
 
bool rate_constant_activation_energy_parameter (NumericType &Ea, std::string &Ea_unit, std::string &def_unit) const
 return true if activation energie More...
 
bool rate_constant_Berthelot_coefficient_parameter (NumericType &D, std::string &D_unit, std::string &def_unit) const
 return true if D coefficient More...
 
bool rate_constant_Tref_parameter (NumericType &Tref, std::string &Tref_unit, std::string &def_unit) const
 return true if Tref More...
 
bool rate_constant_lambda_parameter (std::vector< NumericType > &lambda, std::string &lambda_unit, std::string &def_unit) const
 return true if lambda More...
 
bool rate_constant_cross_section_parameter (std::vector< NumericType > &sigma, std::string &sigma_unit, std::string &def_unit) const
 return true if sigma More...
 
bool verify_Kooij_in_place_of_Arrhenius () const
 return true if a Kooij is called Arrhenuis More...
 
bool efficiencies (std::vector< std::pair< std::string, NumericType > > &par_values) const
 return true if efficiencies are found More...
 
bool Troe_alpha_parameter (NumericType &alpha, std::string &alpha_unit, std::string &def_unit) const
 return true is alpha More...
 
bool Troe_T1_parameter (NumericType &T1, std::string &T1_unit, std::string &def_unit) const
 return true is alpha More...
 
bool Troe_T2_parameter (NumericType &T2, std::string &T2_unit, std::string &def_unit) const
 return true is alpha More...
 
bool Troe_T3_parameter (NumericType &T3, std::string &T3_unit, std::string &def_unit) const
 return true is alpha 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...
 
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 ThermoType >
void read_thermodynamic_data_root (ThermoType &thermo)
 reads the thermo, NASA generalist More...
 
template<typename PairedType >
bool molecules_pairs (tinyxml2::XMLElement *molecules, std::vector< std::pair< std::string, PairedType > > &products_pair) const
 return pairs of molecules and stoichiometric coefficients More...
 
bool get_parameter (const tinyxml2::XMLElement *ptr, const std::string &par, NumericType &par_value, std::string &par_unit) const
 return a parameter's value More...
 
bool get_parameter (const tinyxml2::XMLElement *ptr, const std::string &par, std::vector< NumericType > &numpar, std::string &par_unit) const
 return a parameter's values More...
 
const std::string unit (tinyxml2::XMLElement *parameter) const
 return the unit of current pointer More...
 
tinyxml2::XMLElementfind_element_with_attribute (const tinyxml2::XMLElement *element, const std::string &elem_name, const std::string &attribute, const std::string &attr_value) const
 Search the siblings of the element to find the element with the given value for the given attribute. More...
 
std::string nasa_xml_section (NASAThermoMixture< NumericType, NASA7CurveFit< NumericType > > &)
 For the given thermo type, return the string for the corresponding XML section. More...
 
std::string nasa_xml_section (NASAThermoMixture< NumericType, NASA9CurveFit< NumericType > > &)
 For the given thermo type, return the string for the corresponding XML section. More...
 
std::string nasa_xml_section (NASAThermoMixture< NumericType, CEACurveFit< NumericType > > &)
 For the given thermo type, return the string for the corresponding XML section. More...
 
std::string nasa_xml_section (CEAThermodynamics< NumericType > &)
 For the given thermo type, return the string for the corresponding XML section. More...
 
 XMLParser ()
 Never use default constructor. More...
 

Private Attributes

tinyxml2::XMLDocument_doc
 
tinyxml2::XMLElement_species_block
 
tinyxml2::XMLElement_thermo_block
 
tinyxml2::XMLElement_reaction_block
 
tinyxml2::XMLElement_reaction
 
tinyxml2::XMLElement_rate_constant
 
tinyxml2::XMLElement_Troe
 
std::map< ParsingKey, std::string > _map
 
std::map< ParsingKey, std::string > _default_unit
 

Detailed Description

template<typename NumericType = double>
class Antioch::XMLParser< NumericType >

Nothing is stored, this parser is based on the tinyxml2 implementation.

Please note that no other file should include the `tinyxml2_imp.h' header.

The defaults units are based and derived on Cantera:

Definition at line 50 of file read_reaction_set_data.h.

Constructor & Destructor Documentation

template<typename NumericType >
Antioch::XMLParser< NumericType >::XMLParser ( const std::string &  filename,
bool  verbose = true 
)

Definition at line 49 of file xml_parser.C.

References Antioch::XMLParser< NumericType >::_default_unit, Antioch::XMLParser< NumericType >::_doc, Antioch::XMLParser< NumericType >::_map, Antioch::ACTIVATION_ENERGY, antioch_error, Antioch::BACKWARD_ORDER, Antioch::BERTHELOT_COEFFICIENT, Antioch::CHEMICAL_PROCESS, Antioch::EFFICIENCY, Antioch::EQUATION, tinyxml2::XMLDocument::ErrorID(), Antioch::FALLOFF_LOW, Antioch::FALLOFF_LOW_NAME, Antioch::FORWARD_ORDER, tinyxml2::XMLDocument::GetErrorStr1(), tinyxml2::XMLDocument::GetErrorStr2(), Antioch::HV_CROSS_SECTION, Antioch::HV_LAMBDA, Antioch::ID, Antioch::XMLParser< NumericType >::initialize(), Antioch::KINETICS_MODEL, tinyxml2::XMLDocument::LoadFile(), Antioch::NASA7, Antioch::NASA9, Antioch::NASADATA, Antioch::PHASE_BLOCK, Antioch::POWER, Antioch::PREEXP, Antioch::PRODUCTS, Antioch::REACTANTS, Antioch::REACTION, Antioch::REACTION_DATA, Antioch::REVERSIBLE, Antioch::SPECIES, Antioch::SPECIES_DATA, Antioch::SPECIES_SET, Antioch::THERMO, Antioch::TMAX, Antioch::TMIN, Antioch::TREF, Antioch::TROE_F_ALPHA, Antioch::TROE_F_TS, Antioch::TROE_F_TSS, Antioch::TROE_F_TSSS, Antioch::ReactionType::TROE_FALLOFF, Antioch::UNIT, and Antioch::ParserBase< NumericType >::verbose().

49  :
50  ParserBase<NumericType>("XML",filename,verbose),
51  _species_block(NULL),
52  _reaction_block(NULL),
53  _reaction(NULL),
54  _rate_constant(NULL),
55  _Troe(NULL)
56  {
58  if(_doc->LoadFile(filename.c_str()))
59  {
60  std::cerr << "ERROR: unable to load xml file " << filename << std::endl;
61  std::cerr << "Error of tinyxml2 library:\n"
62  << "\tID = " << _doc->ErrorID() << "\n"
63  << "\tError String1 = " << _doc->GetErrorStr1() << "\n"
64  << "\tError String2 = " << _doc->GetErrorStr2() << std::endl;
65  antioch_error();
66  }
67 
68  if(this->verbose())std::cout << "Having opened file " << filename << std::endl;
69 
70 
71  // XML block/section names
72  _map[ParsingKey::PHASE_BLOCK] = "phase";
73  _map[ParsingKey::SPECIES_SET] = "speciesArray";
74  _map[ParsingKey::SPECIES_DATA] = "speciesData";
75  _map[ParsingKey::SPECIES] = "species";
76  _map[ParsingKey::THERMO] = "thermo"; // thermo in ,<speciesData> <species> <thermo> <NASA> <floatArray> </floatArray></NASA> </thermo> </species> </speciesData>
77 
78  // Thermo parameters
79  _map[ParsingKey::TMIN] = "Tmin";
80  _map[ParsingKey::TMAX] = "Tmax";
81  _map[ParsingKey::NASADATA] = "floatArray";
82  _map[ParsingKey::NASA7] = "NASA";
83  _map[ParsingKey::NASA9] = "NASA9";
84 
85  // Kinetics parameters
86  _map[ParsingKey::REACTION_DATA] = "reactionData";
87  _map[ParsingKey::REACTION] = "reaction";
88  _map[ParsingKey::REVERSIBLE] = "reversible";
89  _map[ParsingKey::ID] = "id";
90  _map[ParsingKey::EQUATION] = "equation";
92  _map[ParsingKey::KINETICS_MODEL] = "rateCoeff";
93  _map[ParsingKey::REACTANTS] = "reactants";
94  _map[ParsingKey::PRODUCTS] = "products";
97  _map[ParsingKey::PREEXP] = "A";
98  _map[ParsingKey::POWER] = "b";
101  _map[ParsingKey::TREF] = "Tref";
102  _map[ParsingKey::HV_LAMBDA] = "lambda";
103  _map[ParsingKey::HV_CROSS_SECTION] = "cross_section";
104  _map[ParsingKey::UNIT] = "units";
105  _map[ParsingKey::EFFICIENCY] = "efficiencies";
108  _map[ParsingKey::TROE_FALLOFF] = "Troe";
109  _map[ParsingKey::TROE_F_ALPHA] = "alpha";
110  _map[ParsingKey::TROE_F_TS] = "T1";
113 
114  // typically Cantera files list
115  // pre-exponential parameters in (m3/kmol)^(m-1)/s
116  // activation energy in cal/mol, but we want it in K.
117  // power parameter without unit
118  // if falloff, we need to know who's k0 and kinfty
119  // if photochemistry, we have a cross-section on a lambda grid
120  // cross-section typically in cm2/nm (cross-section on a resolution bin,
121  // if bin unit not given, it is lambda unit (supposed to anyway), and a warning message)
122  // lambda typically in nm, sometimes in ang, default considered here is nm
123  // you can also have cm-1, conversion is done with
124  // formulae nm = cm-1 * / * adapted factor
125  _default_unit[ParsingKey::PREEXP] = "m3/kmol";
137 
138  this->initialize();
139  }
tinyxml2::XMLElement * _rate_constant
Definition: xml_parser.h:257
bool initialize()
Read header of file, go to interesting part.
Definition: xml_parser.C:175
tinyxml2::XMLElement * _reaction_block
Definition: xml_parser.h:254
std::map< ParsingKey, std::string > _default_unit
Definition: xml_parser.h:261
const char * GetErrorStr1() const
Return a possibly helpful diagnostic location or string.
Definition: tinyxml2.h:1199
const char * GetErrorStr2() const
Return a possibly helpful secondary diagnostic location or string.
Definition: tinyxml2.h:1201
#define antioch_error()
int ErrorID() const
Return the errorID.
Definition: tinyxml2.h:1197
int LoadFile(const char *filename)
tinyxml2::XMLElement * _species_block
Definition: xml_parser.h:252
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
bool verbose() const
Definition: parser_base.h:248
tinyxml2::XMLElement * _reaction
Definition: xml_parser.h:255
tinyxml2::XMLDocument * _doc
Definition: xml_parser.h:249
tinyxml2::XMLElement * _Troe
Definition: xml_parser.h:258
template<typename NumericType >
Antioch::XMLParser< NumericType >::~XMLParser ( )

Definition at line 142 of file xml_parser.C.

143  {
144  delete _doc;
145  }
tinyxml2::XMLDocument * _doc
Definition: xml_parser.h:249
template<typename NumericType = double>
Antioch::XMLParser< NumericType >::XMLParser ( )
private

Never use default constructor.

Member Function Documentation

template<typename NumericType >
void Antioch::XMLParser< NumericType >::change_file ( const std::string &  filename)
virtual

Implements Antioch::ParserBase< NumericType >.

Definition at line 148 of file xml_parser.C.

References antioch_error, and tinyxml2::XMLDocument::ErrorID().

149  {
150  ParserBase<NumericType>::_file = filename;
151  _species_block = NULL;
152  _reaction_block = NULL;
153  _reaction = NULL;
154  _rate_constant = NULL;
155  _Troe = NULL;
156 
157  delete _doc;
159  if(_doc->LoadFile(filename.c_str()))
160  {
161  std::cerr << "ERROR: unable to load xml file " << filename << std::endl;
162  std::cerr << "Error of tinyxml2 library:\n"
163  << "\tID = " << _doc->ErrorID() << "\n"
164  << "\tError String1 = " << _doc->GetErrorStr1() << "\n"
165  << "\tError String2 = " << _doc->GetErrorStr2() << std::endl;
166  antioch_error();
167  }
168 
169  if(this->verbose())std::cout << "Having opened file " << filename << std::endl;
170 
171  this->initialize();
172  }
tinyxml2::XMLElement * _rate_constant
Definition: xml_parser.h:257
bool initialize()
Read header of file, go to interesting part.
Definition: xml_parser.C:175
tinyxml2::XMLElement * _reaction_block
Definition: xml_parser.h:254
const char * GetErrorStr1() const
Return a possibly helpful diagnostic location or string.
Definition: tinyxml2.h:1199
const char * GetErrorStr2() const
Return a possibly helpful secondary diagnostic location or string.
Definition: tinyxml2.h:1201
#define antioch_error()
int ErrorID() const
Return the errorID.
Definition: tinyxml2.h:1197
int LoadFile(const char *filename)
tinyxml2::XMLElement * _species_block
Definition: xml_parser.h:252
bool verbose() const
Definition: parser_base.h:248
tinyxml2::XMLElement * _reaction
Definition: xml_parser.h:255
tinyxml2::XMLDocument * _doc
Definition: xml_parser.h:249
tinyxml2::XMLElement * _Troe
Definition: xml_parser.h:258
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::efficiencies ( std::vector< std::pair< std::string, NumericType > > &  par_values) const
virtual

return true if efficiencies are found

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 620 of file xml_parser.C.

References Antioch::EFFICIENCY, tinyxml2::XMLNode::FirstChildElement(), Antioch::KINETICS_MODEL, and Antioch::split_string().

621  {
622  bool out = false;
623  if(_reaction)
624  {
626  if(rate_constant)
627  {
628  if(rate_constant->FirstChildElement(_map.at(ParsingKey::EFFICIENCY).c_str()))
629  {
630  std::vector<std::string> values;
631  std::string value_string = std::string((rate_constant->FirstChildElement(_map.at(ParsingKey::EFFICIENCY).c_str())->GetText())?rate_constant->FirstChildElement(_map.at(ParsingKey::EFFICIENCY).c_str())->GetText():"");
632 
633  split_string(value_string, " ", values);
634 
635  for(unsigned int i = 0; i < values.size(); i++)
636  par_values.push_back(split_string_on_colon<NumericType>(values[i]));
637 
638  out = true;
639  }
640  }
641  }
642  return out;
643  }
void split_string(const std::string &input, const std::string &delimiter, std::vector< std::string > &results)
All characters in delimiter will be treated as a delimiter.
Definition: string_utils.C:34
bool rate_constant(const std::string &kinetics_model)
go to next rate constant
Definition: xml_parser.C:231
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
tinyxml2::XMLElement * _reaction
Definition: xml_parser.h:255
const XMLElement * FirstChildElement(const char *value=0) const
Definition: tinyxml2_imp.h:740
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 >
tinyxml2::XMLElement * Antioch::XMLParser< NumericType >::find_element_with_attribute ( const tinyxml2::XMLElement element,
const std::string &  elem_name,
const std::string &  attribute,
const std::string &  attr_value 
) const
private

Search the siblings of the element to find the element with the given value for the given attribute.

Return pointer to that element.

Definition at line 511 of file xml_parser.C.

References antioch_assert, antioch_error_msg, tinyxml2::XMLElement::Attribute(), and tinyxml2::XMLNode::NextSiblingElement().

515  {
516  antioch_assert(element);
517 
518  const tinyxml2::XMLElement * elem_with_attr = NULL;
519 
520  if( !element->Attribute(attribute.c_str()) )
521  antioch_error_msg("ERROR: Could not find attribute "+attribute+" for current element!");
522 
523  // First check if the first element has the attribute we're looking for
524  if( std::string( element->Attribute(attribute.c_str()) ) == attr_value )
525  elem_with_attr = element;
526 
527  // Otherwise, look at all the siblings
528  else
529  {
530  elem_with_attr = element->NextSiblingElement(elem_name.c_str());
531 
532  while( elem_with_attr )
533  {
534  std::string curr_attr;
535  if( elem_with_attr->Attribute(attribute.c_str()) )
536  curr_attr = std::string(elem_with_attr->Attribute(attribute.c_str()));
537 
538  if( curr_attr == attr_value )
539  break;
540 
541  elem_with_attr = elem_with_attr->NextSiblingElement(elem_name.c_str());
542  }
543 
544  // Error out if we couldn't find the attribute with the correct value
545  if( !elem_with_attr )
546  antioch_error_msg("ERROR: Could not find XMLElement with attribute = "+attribute+" whose value is "+attr_value+"!");
547 
548  }
549 
550  return const_cast<tinyxml2::XMLElement*>(elem_with_attr);
551  }
const char * Attribute(const char *name, const char *value=0) const
#define antioch_assert(asserted)
const XMLElement * NextSiblingElement(const char *value=0) const
Get the next (right) sibling element of this node, with an opitionally supplied name.
Definition: tinyxml2_imp.h:770
#define antioch_error_msg(errmsg)
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::get_parameter ( const tinyxml2::XMLElement ptr,
const std::string &  par,
NumericType &  par_value,
std::string &  par_unit 
) const
private

return a parameter's value

Definition at line 468 of file xml_parser.C.

References antioch_assert, tinyxml2::XMLNode::FirstChildElement(), and Antioch::UNIT.

469  {
470  antioch_assert(ptr);
471 
472  bool out(false);
473  par_unit.clear();
474  if(ptr->FirstChildElement(par.c_str()))
475  {
476  par_value = std::atof(ptr->FirstChildElement(par.c_str())->GetText());
477  if(ptr->FirstChildElement(par.c_str())->Attribute(_map.at(ParsingKey::UNIT).c_str()))
478  par_unit = ptr->FirstChildElement(par.c_str())->Attribute(_map.at(ParsingKey::UNIT).c_str());
479  out = true;
480  }
481 
482  return out;
483  }
#define antioch_assert(asserted)
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
const XMLElement * FirstChildElement(const char *value=0) const
Definition: tinyxml2_imp.h:740
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::get_parameter ( const tinyxml2::XMLElement ptr,
const std::string &  par,
std::vector< NumericType > &  numpar,
std::string &  par_unit 
) const
private

return a parameter's values

Definition at line 486 of file xml_parser.C.

References antioch_assert, tinyxml2::XMLNode::FirstChildElement(), Antioch::split_string(), and Antioch::UNIT.

487  {
488  antioch_assert(ptr);
489 
490  bool out(false);
491  par_unit.clear();
492  if(ptr->FirstChildElement(par.c_str()))
493  {
494  std::vector<std::string> values;
495  split_string(ptr->FirstChildElement(par.c_str())->GetText()," ",values);
496 
497  par_values.resize(values.size());
498  for(unsigned int i = 0; i < values.size(); i++)
499  par_values[i] = string_to_T<NumericType>(values[i].c_str());
500 
501  if(ptr->FirstChildElement(par.c_str())->Attribute(_map.at(ParsingKey::UNIT).c_str()))
502  par_unit = ptr->FirstChildElement(par.c_str())->Attribute(_map.at(ParsingKey::UNIT).c_str());
503 
504  out = true;
505  }
506 
507  return out;
508  }
#define antioch_assert(asserted)
void split_string(const std::string &input, const std::string &delimiter, std::vector< std::string > &results)
All characters in delimiter will be treated as a delimiter.
Definition: string_utils.C:34
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
const XMLElement * FirstChildElement(const char *value=0) const
Definition: tinyxml2_imp.h:740
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::initialize ( )
virtual

Read header of file, go to interesting part.

Implements Antioch::ParserBase< NumericType >.

Definition at line 175 of file xml_parser.C.

References antioch_error, Antioch::PHASE_BLOCK, Antioch::REACTION_DATA, Antioch::SPECIES_DATA, and Antioch::SPECIES_SET.

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

176  {
177  //we start here
179  if (!_reaction_block)
180  {
181  std::cerr << "ERROR: no <ctml> tag found in input file"
182  << std::endl;
183  antioch_error();
184  }
185 
187  if(_species_block)
189 
191 
193 
194  _reaction = NULL;
195  _rate_constant = NULL;
196 
197  return _reaction_block;
198  }
tinyxml2::XMLElement * _rate_constant
Definition: xml_parser.h:257
tinyxml2::XMLElement * _reaction_block
Definition: xml_parser.h:254
#define antioch_error()
tinyxml2::XMLElement * _species_block
Definition: xml_parser.h:252
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
tinyxml2::XMLElement * _reaction
Definition: xml_parser.h:255
const XMLElement * FirstChildElement(const char *value=0) const
Definition: tinyxml2_imp.h:740
tinyxml2::XMLDocument * _doc
Definition: xml_parser.h:249
tinyxml2::XMLElement * _thermo_block
Definition: xml_parser.h:253
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::is_k0 ( unsigned int  nrc,
const std::string &  kin_model 
) const
virtual

return true if the concerned reaction rate is the low pressure limit

In the case of falloff reactions, there is the attribute "name" to specify which rate constant is the low pressure limit. This attribute should have "k0" as value, and nothing else.

If no "name" attribute is provided, the first rate constant is the low pressure limit, if two "name" attribute are provided, or if the value is not "k0", an exception is thrown.

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 404 of file xml_parser.C.

References antioch_assert, antioch_parsing_error, Antioch::FALLOFF_LOW, and Antioch::FALLOFF_LOW_NAME.

405  {
406  bool k0(false);
408  {
410  {
411  k0 = true;
412  // now verifying the second one
413  if(nrc == 0) // first reaction rate block
414  {
415  antioch_assert(_rate_constant->NextSiblingElement(kin_model.c_str()));
416  if(_rate_constant->NextSiblingElement(kin_model.c_str())->Attribute(_map.at(ParsingKey::FALLOFF_LOW_NAME).c_str())) // HAHA
417  {
418  std::string error = "I can understand the need to put attributes everywhere, really, but in this case, I'm ";
419  error += "afraid that it's not a good idea to have two \'name\' attributes: only the low pressure limit should have it.";
420  antioch_parsing_error(error);
421  }
422  }
423  }else
424  {
425  std::string error = "The keyword associated with the \'name\' attribute within the description of a falloff should be, and only be, ";
426  error += "\'k0\' to specify the low pressure limit. It seems that the one you provided, \'";
427  error += std::string(_rate_constant->Attribute(_map.at(ParsingKey::FALLOFF_LOW_NAME).c_str()));
428  error += "\' is not this one. Please correct it at reaction";
429  error += this->reaction_id();
430  error += ": ";
431  error += this->reaction_equation();
432  error += ".";
433  antioch_parsing_error(error);
434  }
435  }else if(nrc == 0) // if we're indeed at the first reading
436  {
437  antioch_assert(_rate_constant->NextSiblingElement(kin_model.c_str()));
438  if(!_rate_constant->NextSiblingElement(kin_model.c_str())->Attribute(_map.at(ParsingKey::FALLOFF_LOW_NAME).c_str())) // and the next doesn't have a name
439  {
440  k0 = true;
441  }else
442  {
443  if(std::string(_rate_constant->NextSiblingElement(kin_model.c_str())->Attribute(_map.at(ParsingKey::FALLOFF_LOW_NAME).c_str())) == _map.at(ParsingKey::FALLOFF_LOW))k0 = false;
444  }
445  }
446  return k0;
447  }
const char * Attribute(const char *name, const char *value=0) const
#define antioch_assert(asserted)
const std::string reaction_id() const
return reaction id, 0 if not provided
Definition: xml_parser.C:265
tinyxml2::XMLElement * _rate_constant
Definition: xml_parser.h:257
const XMLElement * NextSiblingElement(const char *value=0) const
Get the next (right) sibling element of this node, with an opitionally supplied name.
Definition: tinyxml2_imp.h:770
const std::string reaction_equation() const
return reaction equation
Definition: xml_parser.C:273
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
#define antioch_parsing_error(description)
template<typename NumericType >
template<typename PairedType >
bool Antioch::XMLParser< NumericType >::molecules_pairs ( tinyxml2::XMLElement molecules,
std::vector< std::pair< std::string, PairedType > > &  products_pair 
) const
private

return pairs of molecules and stoichiometric coefficients

Definition at line 377 of file xml_parser.C.

References tinyxml2::XMLElement::GetText(), and Antioch::split_string().

378  {
379  bool out(true);
380  if(molecules)
381  {
382 
383  std::vector<std::string> mol_pairs;
384 
385  // Split the reactant string on whitespace. If no entries were found,
386  // there is no whitespace - and assume then only one reactant is listed.
387  split_string(std::string(molecules->GetText()), " ", mol_pairs);
388 
389  for( unsigned int p=0; p < mol_pairs.size(); p++ )
390  {
391  std::pair<std::string,PairedType> pair( split_string_on_colon<PairedType>(mol_pairs[p]) );
392 
393  molecules_pairs.push_back(pair);
394  }
395  }else
396  {
397  out = false;
398  }
399 
400  return out;
401  }
void split_string(const std::string &input, const std::string &delimiter, std::vector< std::string > &results)
All characters in delimiter will be treated as a delimiter.
Definition: string_utils.C:34
bool molecules_pairs(tinyxml2::XMLElement *molecules, std::vector< std::pair< std::string, PairedType > > &products_pair) const
return pairs of molecules and stoichiometric coefficients
Definition: xml_parser.C:377
const char * GetText() const
template<typename NumericType = double>
std::string Antioch::XMLParser< NumericType >::nasa_xml_section ( NASAThermoMixture< NumericType, NASA7CurveFit< NumericType > > &  )
inlineprivate

For the given thermo type, return the string for the corresponding XML section.

Definition at line 230 of file xml_parser.h.

References Antioch::XMLParser< NumericType >::_map, and Antioch::NASA7.

231  { return _map.at(ParsingKey::NASA7); }
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
template<typename NumericType = double>
std::string Antioch::XMLParser< NumericType >::nasa_xml_section ( NASAThermoMixture< NumericType, NASA9CurveFit< NumericType > > &  )
inlineprivate

For the given thermo type, return the string for the corresponding XML section.

Definition at line 234 of file xml_parser.h.

References Antioch::XMLParser< NumericType >::_map, and Antioch::NASA9.

235  { return _map.at(ParsingKey::NASA9); }
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
template<typename NumericType = double>
std::string Antioch::XMLParser< NumericType >::nasa_xml_section ( NASAThermoMixture< NumericType, CEACurveFit< NumericType > > &  )
inlineprivate

For the given thermo type, return the string for the corresponding XML section.

Definition at line 238 of file xml_parser.h.

References antioch_error_msg.

239  { antioch_error_msg("ERROR: Only supported for NASA7CurveFit and NASA9CurveFit!"); return "";}
#define antioch_error_msg(errmsg)
template<typename NumericType = double>
std::string Antioch::XMLParser< NumericType >::nasa_xml_section ( CEAThermodynamics< NumericType > &  )
inlineprivate

For the given thermo type, return the string for the corresponding XML section.

Definition at line 242 of file xml_parser.h.

References antioch_error_msg.

243  { antioch_error_msg("ERROR: Only supported for NASA7CurveFit and NASA9CurveFit!"); return "";}
#define antioch_error_msg(errmsg)
template<typename NumericType >
const std::map< std::string, NumericType > Antioch::XMLParser< NumericType >::products_orders ( ) const
virtual

return a map between products' name and found partial orders

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 357 of file xml_parser.C.

References Antioch::BACKWARD_ORDER, and tinyxml2::XMLNode::FirstChildElement().

358  {
360  std::map<std::string,NumericType> map;
361  if(orders){
362  std::vector<std::pair<std::string,NumericType> > pairs;
363  if(this->molecules_pairs(orders,pairs))
364  {
365  for(unsigned int s = 0; s < pairs.size(); s++)
366  {
367  map.insert(pairs[s]);
368  }
369  }
370  }
371  return map;
372  }
bool molecules_pairs(tinyxml2::XMLElement *molecules, std::vector< std::pair< std::string, PairedType > > &products_pair) const
return pairs of molecules and stoichiometric coefficients
Definition: xml_parser.C:377
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
tinyxml2::XMLElement * _reaction
Definition: xml_parser.h:255
const XMLElement * FirstChildElement(const char *value=0) const
Definition: tinyxml2_imp.h:740
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::products_pairs ( std::vector< std::pair< std::string, int > > &  products_pair) const
virtual

return pairs of products and stoichiometric coefficients

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 331 of file xml_parser.C.

References tinyxml2::XMLNode::FirstChildElement(), and Antioch::PRODUCTS.

332  {
334  return this->molecules_pairs(products, products_pair);
335  }
bool molecules_pairs(tinyxml2::XMLElement *molecules, std::vector< std::pair< std::string, PairedType > > &products_pair) const
return pairs of molecules and stoichiometric coefficients
Definition: xml_parser.C:377
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
tinyxml2::XMLElement * _reaction
Definition: xml_parser.h:255
const XMLElement * FirstChildElement(const char *value=0) const
Definition: tinyxml2_imp.h:740
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::rate_constant ( const std::string &  kinetics_model)
virtual

go to next rate constant

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 231 of file xml_parser.C.

References antioch_assert, Antioch::KINETICS_MODEL, and Antioch::ReactionType::TROE_FALLOFF.

232  {
233  // if in a reaction
234  if(_reaction)
235  {
236  // not the first one
237  if(_rate_constant)
238  {
239  _rate_constant = _rate_constant->NextSiblingElement(kinetics_model.c_str());
240  }else
241  {
242  // first one, we need to set _rate_constant and _Troe, because they contain environments
243  // we suppose that there is a rateCoeff environement
244  // _rate_constant => <rateCoeff> <kin model> </kin model> </rateCoeff>
245  // _Troe => <rateCoeff> <Troe> </Troe> </rateCoeff>
247  _rate_constant = _reaction->FirstChildElement(_map.at(ParsingKey::KINETICS_MODEL).c_str())->FirstChildElement(kinetics_model.c_str());
249  }
250  }else
251  {
252  _rate_constant = NULL;
253  }
254 
255  return _rate_constant;
256  }
#define antioch_assert(asserted)
tinyxml2::XMLElement * _rate_constant
Definition: xml_parser.h:257
const XMLElement * NextSiblingElement(const char *value=0) const
Get the next (right) sibling element of this node, with an opitionally supplied name.
Definition: tinyxml2_imp.h:770
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
tinyxml2::XMLElement * _reaction
Definition: xml_parser.h:255
const XMLElement * FirstChildElement(const char *value=0) const
Definition: tinyxml2_imp.h:740
tinyxml2::XMLElement * _Troe
Definition: xml_parser.h:258
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::rate_constant_activation_energy_parameter ( NumericType &  Ea,
std::string &  Ea_unit,
std::string &  def_unit 
) const
virtual

return true if activation energie

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 569 of file xml_parser.C.

References Antioch::ACTIVATION_ENERGY.

570  {
572  return this->get_parameter(_rate_constant,_map.at(ParsingKey::ACTIVATION_ENERGY).c_str(),Ea,Ea_unit);
573  }
tinyxml2::XMLElement * _rate_constant
Definition: xml_parser.h:257
std::map< ParsingKey, std::string > _default_unit
Definition: xml_parser.h:261
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
bool get_parameter(const tinyxml2::XMLElement *ptr, const std::string &par, NumericType &par_value, std::string &par_unit) const
return a parameter's value
Definition: xml_parser.C:468
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::rate_constant_Berthelot_coefficient_parameter ( NumericType &  D,
std::string &  D_unit,
std::string &  def_unit 
) const
virtual

return true if D coefficient

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 576 of file xml_parser.C.

References Antioch::BERTHELOT_COEFFICIENT, and Antioch::KineticsModel::D.

577  {
579  return this->get_parameter(_rate_constant,_map.at(ParsingKey::BERTHELOT_COEFFICIENT).c_str(),D,D_unit);
580  }
tinyxml2::XMLElement * _rate_constant
Definition: xml_parser.h:257
std::map< ParsingKey, std::string > _default_unit
Definition: xml_parser.h:261
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
bool get_parameter(const tinyxml2::XMLElement *ptr, const std::string &par, NumericType &par_value, std::string &par_unit) const
return a parameter's value
Definition: xml_parser.C:468
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::rate_constant_cross_section_parameter ( std::vector< NumericType > &  sigma,
std::string &  sigma_unit,
std::string &  def_unit 
) const
virtual

return true if sigma

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 590 of file xml_parser.C.

References Antioch::HV_CROSS_SECTION.

591  {
593  return this->get_parameter(_rate_constant,_map.at(ParsingKey::HV_CROSS_SECTION).c_str(),sigma,sigma_unit);
594  }
tinyxml2::XMLElement * _rate_constant
Definition: xml_parser.h:257
std::map< ParsingKey, std::string > _default_unit
Definition: xml_parser.h:261
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
bool get_parameter(const tinyxml2::XMLElement *ptr, const std::string &par, NumericType &par_value, std::string &par_unit) const
return a parameter's value
Definition: xml_parser.C:468
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::rate_constant_lambda_parameter ( std::vector< NumericType > &  lambda,
std::string &  lambda_unit,
std::string &  def_unit 
) const
virtual

return true if lambda

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 583 of file xml_parser.C.

References Antioch::HV_LAMBDA.

584  {
585  def_unit = _default_unit.at(ParsingKey::HV_LAMBDA);
586  return this->get_parameter(_rate_constant,_map.at(ParsingKey::HV_LAMBDA).c_str(),lambda,lambda_unit);
587  }
tinyxml2::XMLElement * _rate_constant
Definition: xml_parser.h:257
std::map< ParsingKey, std::string > _default_unit
Definition: xml_parser.h:261
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
bool get_parameter(const tinyxml2::XMLElement *ptr, const std::string &par, NumericType &par_value, std::string &par_unit) const
return a parameter's value
Definition: xml_parser.C:468
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::rate_constant_power_parameter ( NumericType &  b,
std::string &  b_unit,
std::string &  def_unit 
) const
virtual

return true if beta coefficient

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 562 of file xml_parser.C.

References Antioch::POWER.

563  {
564  def_unit = _default_unit.at(ParsingKey::POWER);
565  return this->get_parameter(_rate_constant,_map.at(ParsingKey::POWER).c_str(),b,b_unit);
566  }
tinyxml2::XMLElement * _rate_constant
Definition: xml_parser.h:257
std::map< ParsingKey, std::string > _default_unit
Definition: xml_parser.h:261
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
bool get_parameter(const tinyxml2::XMLElement *ptr, const std::string &par, NumericType &par_value, std::string &par_unit) const
return a parameter's value
Definition: xml_parser.C:468
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::rate_constant_preexponential_parameter ( NumericType &  A,
std::string &  A_unit,
std::string &  def_unit 
) const
virtual

return true if pre exponentiel coefficient

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 554 of file xml_parser.C.

References Antioch::KineticsModel::A, and Antioch::PREEXP.

555  {
556  def_unit = _default_unit.at(ParsingKey::PREEXP);
557  return this->get_parameter(_rate_constant,_map.at(ParsingKey::PREEXP).c_str(),A,A_unit);
558  }
tinyxml2::XMLElement * _rate_constant
Definition: xml_parser.h:257
std::map< ParsingKey, std::string > _default_unit
Definition: xml_parser.h:261
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
bool get_parameter(const tinyxml2::XMLElement *ptr, const std::string &par, NumericType &par_value, std::string &par_unit) const
return a parameter's value
Definition: xml_parser.C:468
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::rate_constant_Tref_parameter ( NumericType &  Tref,
std::string &  Tref_unit,
std::string &  def_unit 
) const
virtual

return true if Tref

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 597 of file xml_parser.C.

References Antioch::TREF, and Antioch::KineticsModel::Tref().

598  {
599  def_unit = _default_unit.at(ParsingKey::TREF);
600  return this->get_parameter(_rate_constant,_map.at(ParsingKey::TREF).c_str(),Tref,Tref_unit);
601  }
tinyxml2::XMLElement * _rate_constant
Definition: xml_parser.h:257
std::map< ParsingKey, std::string > _default_unit
Definition: xml_parser.h:261
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
bool get_parameter(const tinyxml2::XMLElement *ptr, const std::string &par, NumericType &par_value, std::string &par_unit) const
return a parameter's value
Definition: xml_parser.C:468
template<typename NumericType >
const std::map< std::string, NumericType > Antioch::XMLParser< NumericType >::reactants_orders ( ) const
virtual

return a map between reactants' name and found partial orders

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 338 of file xml_parser.C.

References tinyxml2::XMLNode::FirstChildElement(), and Antioch::FORWARD_ORDER.

339  {
341  std::map<std::string,NumericType> map;
342  if(orders){
343  std::vector<std::pair<std::string,NumericType> > pairs;
344  if(this->molecules_pairs(orders,pairs))
345  {
346  for(unsigned int s = 0; s < pairs.size(); s++)
347  {
348  map.insert(pairs[s]);
349  }
350  }
351  }
352 
353  return map;
354  }
bool molecules_pairs(tinyxml2::XMLElement *molecules, std::vector< std::pair< std::string, PairedType > > &products_pair) const
return pairs of molecules and stoichiometric coefficients
Definition: xml_parser.C:377
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
tinyxml2::XMLElement * _reaction
Definition: xml_parser.h:255
const XMLElement * FirstChildElement(const char *value=0) const
Definition: tinyxml2_imp.h:740
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::reactants_pairs ( std::vector< std::pair< std::string, int > > &  reactants_pair) const
virtual

return pairs of reactants and stoichiometric coefficients

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 324 of file xml_parser.C.

References tinyxml2::XMLNode::FirstChildElement(), and Antioch::REACTANTS.

325  {
327  return this->molecules_pairs(reactants, reactants_pair);
328  }
bool molecules_pairs(tinyxml2::XMLElement *molecules, std::vector< std::pair< std::string, PairedType > > &products_pair) const
return pairs of molecules and stoichiometric coefficients
Definition: xml_parser.C:377
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
tinyxml2::XMLElement * _reaction
Definition: xml_parser.h:255
const XMLElement * FirstChildElement(const char *value=0) const
Definition: tinyxml2_imp.h:740
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::reaction ( )
virtual

reaction

go to next reaction

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 217 of file xml_parser.C.

References antioch_assert, and Antioch::REACTION.

218  {
220  _reaction = (_reaction)?
223 
224  _rate_constant = NULL;
225  _Troe = NULL;
226 
227  return _reaction;
228  }
#define antioch_assert(asserted)
tinyxml2::XMLElement * _rate_constant
Definition: xml_parser.h:257
tinyxml2::XMLElement * _reaction_block
Definition: xml_parser.h:254
const XMLElement * NextSiblingElement(const char *value=0) const
Get the next (right) sibling element of this node, with an opitionally supplied name.
Definition: tinyxml2_imp.h:770
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
tinyxml2::XMLElement * _reaction
Definition: xml_parser.h:255
const XMLElement * FirstChildElement(const char *value=0) const
Definition: tinyxml2_imp.h:740
tinyxml2::XMLElement * _Troe
Definition: xml_parser.h:258
template<typename NumericType >
const std::string Antioch::XMLParser< NumericType >::reaction_chemical_process ( ) const
virtual

return reaction chemical process

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 279 of file xml_parser.C.

References Antioch::CHEMICAL_PROCESS.

280  {
281  const char * chem_proc = _reaction->Attribute(_map.at(ParsingKey::CHEMICAL_PROCESS).c_str());
282 
283  return (chem_proc)?
284  std::string(chem_proc):
285  std::string();
286  }
const char * Attribute(const char *name, const char *value=0) const
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
tinyxml2::XMLElement * _reaction
Definition: xml_parser.h:255
template<typename NumericType >
const std::string Antioch::XMLParser< NumericType >::reaction_equation ( ) const
virtual

return reaction equation

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 273 of file xml_parser.C.

References Antioch::EQUATION.

274  {
275  return _reaction->FirstChildElement(_map.at(ParsingKey::EQUATION).c_str())->GetText();
276  }
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
tinyxml2::XMLElement * _reaction
Definition: xml_parser.h:255
const XMLElement * FirstChildElement(const char *value=0) const
Definition: tinyxml2_imp.h:740
template<typename NumericType >
const std::string Antioch::XMLParser< NumericType >::reaction_id ( ) const
virtual

return reaction id, 0 if not provided

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 265 of file xml_parser.C.

References Antioch::ID.

266  {
267  std::stringstream id;
268  id << _reaction->Attribute(_map.at(ParsingKey::ID).c_str());
269  return id.str();
270  }
const char * Attribute(const char *name, const char *value=0) const
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
tinyxml2::XMLElement * _reaction
Definition: xml_parser.h:255
template<typename NumericType >
const std::string Antioch::XMLParser< NumericType >::reaction_kinetics_model ( const std::vector< std::string > &  kinetics_models) const
virtual

return reaction kinetics model

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 298 of file xml_parser.C.

References antioch_not_implemented, tinyxml2::XMLNode::FirstChildElement(), and Antioch::KINETICS_MODEL.

299  {
300  unsigned int imod(0);
301  tinyxml2::XMLElement * rate_constant = _reaction->FirstChildElement(_map.at(ParsingKey::KINETICS_MODEL).c_str())->FirstChildElement(kinetics_models[imod].c_str());
302  while(!rate_constant)
303  {
304  if(imod == kinetics_models.size() - 1)
305  {
306  std::cerr << "Could not find a suitable kinetics model.\n"
307  << "Implemented kinetics models are:\n";
308 
309  for(unsigned int m = 0; m < kinetics_models.size(); m++)
310  std::cerr << " " << kinetics_models[m] << "\n";
311 
312  std::cerr << "See Antioch documentation for more details."
313  << std::endl;
315  }
316  imod++;
317  rate_constant = _reaction->FirstChildElement(_map.at(ParsingKey::KINETICS_MODEL).c_str())->FirstChildElement(kinetics_models[imod].c_str());
318  }
319 
320  return kinetics_models[imod];
321  }
#define antioch_not_implemented()
bool rate_constant(const std::string &kinetics_model)
go to next rate constant
Definition: xml_parser.C:231
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
tinyxml2::XMLElement * _reaction
Definition: xml_parser.h:255
const XMLElement * FirstChildElement(const char *value=0) const
Definition: tinyxml2_imp.h:740
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::reaction_reversible ( ) const
virtual

return reversible state

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 289 of file xml_parser.C.

References Antioch::REVERSIBLE.

290  {
291  return (_reaction->Attribute(_map.at(ParsingKey::REVERSIBLE).c_str()))?
292  (std::string(_reaction->Attribute(_map.at(ParsingKey::REVERSIBLE).c_str())) == std::string("no"))?false:true //explicit
293  :
294  true; //default
295  }
const char * Attribute(const char *name, const char *value=0) const
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
tinyxml2::XMLElement * _reaction
Definition: xml_parser.h:255
template<typename NumericType>
virtual void Antioch::ParserBase< NumericType >::read_chemical_species ( ChemicalMixture< NumericType > &  )
inlinevirtualinherited

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

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual void Antioch::ParserBase< NumericType >::read_electronic_data ( ChemicalMixture< NumericType > &  )
inlinevirtualinherited

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

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType = double>
void Antioch::XMLParser< NumericType >::read_thermodynamic_data ( NASAThermoMixture< NumericType, NASA7CurveFit< NumericType > > &  thermo)
inlinevirtual

reads the thermo, NASA generalist, no templates for virtual

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 96 of file xml_parser.h.

References Antioch::XMLParser< NumericType >::read_thermodynamic_data_root().

Referenced by AntiochTesting::NASA7XMLParsingTest< long double >::test_parsed_species_list().

97  {this->read_thermodynamic_data_root(thermo);}
void read_thermodynamic_data_root(ThermoType &thermo)
reads the thermo, NASA generalist
Definition: xml_parser.C:676
template<typename NumericType = double>
void Antioch::XMLParser< NumericType >::read_thermodynamic_data ( NASAThermoMixture< NumericType, NASA9CurveFit< NumericType > > &  thermo)
inlinevirtual

reads the thermo, NASA generalist, no templates for virtual

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 100 of file xml_parser.h.

References Antioch::XMLParser< NumericType >::read_thermodynamic_data_root().

101  {this->read_thermodynamic_data_root(thermo);}
void read_thermodynamic_data_root(ThermoType &thermo)
reads the thermo, NASA generalist
Definition: xml_parser.C:676
template<typename NumericType = double>
void Antioch::XMLParser< NumericType >::read_thermodynamic_data ( NASAThermoMixture< NumericType, CEACurveFit< NumericType > > &  )
inlinevirtual

reads the thermo, NASA generalist, no templates for virtual

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 104 of file xml_parser.h.

References antioch_error_msg.

105  {antioch_error_msg("ERROR: XML Parsing only supports parsing for NASA7CurveFit and NASA9CurveFit!");}
#define antioch_error_msg(errmsg)
template<typename NumericType = double>
void Antioch::XMLParser< NumericType >::read_thermodynamic_data ( CEAThermodynamics< NumericType > &  )
inlinevirtual

reads the thermo, CEA deprecated

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 108 of file xml_parser.h.

References antioch_error_msg.

109  {antioch_error_msg("ERROR: XML Parsing only supports parsing for NASA7CurveFit and NASA9CurveFit!");}
#define antioch_error_msg(errmsg)
template<typename NumericType >
template<typename ThermoType >
void Antioch::XMLParser< NumericType >::read_thermodynamic_data_root ( ThermoType &  thermo)
private

reads the thermo, NASA generalist

Definition at line 676 of file xml_parser.C.

References antioch_error_msg, tinyxml2::XMLElement::Attribute(), Antioch::ChemicalMixture< CoeffType >::chemical_mixture(), tinyxml2::XMLNode::FirstChildElement(), tinyxml2::XMLElement::GetText(), Antioch::NASADATA, tinyxml2::XMLNode::NextSiblingElement(), Antioch::remove_newline_from_strings(), Antioch::SPECIES, Antioch::SPECIES_DATA, Antioch::split_string(), Antioch::THERMO, Antioch::TMAX, and Antioch::TMIN.

Referenced by Antioch::XMLParser< NumericType >::read_thermodynamic_data().

677  {
678  if(!_thermo_block)
679  antioch_error_msg("ERROR: No "+_map.at(ParsingKey::SPECIES_DATA)+" section found! Cannot parse thermo!");
680 
681  const ChemicalMixture<NumericType> & chem_mixture = thermo.chemical_mixture();
682  const std::vector<ChemicalSpecies<NumericType>*>& chem_species = chem_mixture.chemical_species();
683 
684  // Based on the ThermoType, namely the CurveFit, we deduce what the section name is.
685  std::string nasa_xml_section = this->nasa_xml_section(thermo);
686 
687  for(unsigned int s = 0; s < chem_mixture.n_species(); s++)
688  {
689  // Step to first species block
691 
692  if(!species_block)
693  antioch_error_msg("ERROR: No "+_map.at(ParsingKey::SPECIES)+" block found within "+_map.at(ParsingKey::SPECIES_DATA)+" section! Cannot parse thermo!");
694 
695 
696  const std::string& name = chem_species[s]->species();
697 
698  tinyxml2::XMLElement * spec = NULL;
699  spec = this->find_element_with_attribute( species_block,
701  "name",
702  name );
703 
704  if(!spec)
705  antioch_error_msg("ERROR: Species "+name+" has not been found in the "+_map.at(ParsingKey::SPECIES_DATA)+" section! Cannot parse thermo!");
706 
707  else
708  {
709  spec = spec->FirstChildElement(_map.at(ParsingKey::THERMO).c_str());
710 
711  if(!spec)
712  antioch_error_msg("ERROR: No "+_map.at(ParsingKey::THERMO)+" block found for species "+name+"! Cannot parse thermo!");
713 
714  // containers for parsing thermo data
715  std::vector<NumericType> temps;
716  std::vector<NumericType> values;
717  tinyxml2::XMLElement * coeffs;
718  std::vector<std::string> coeffs_str;
719 
720  // looping for each of the temperature intervals for this species
721  tinyxml2::XMLElement * nasa = spec->FirstChildElement(nasa_xml_section.c_str());
722  if(!nasa)
723  antioch_error_msg("ERROR: Could not find "+nasa_xml_section+" thermo section!");
724 
725  while(nasa)
726  {
727  if( !(nasa->Attribute(_map.at(ParsingKey::TMIN).c_str())) )
728  antioch_error_msg("ERROR: Could not find "+_map.at(ParsingKey::TMIN)+" attribute for species "+name+"!");
729 
730  if( !(nasa->Attribute(_map.at(ParsingKey::TMAX).c_str())) )
731  antioch_error_msg("ERROR: Could not find "+_map.at(ParsingKey::TMAX)+" attribute for species "+name+"!");
732  // By convention, we put the first TMIN in, and then only the TMAX thereafter
733  // We have a consistency check below to make sure the TMIN's in the input are consistent
734  if( temps.empty() )
735  temps.push_back(string_to_T<NumericType>(nasa->Attribute(_map.at(ParsingKey::TMIN).c_str())));
736 
737  // temperatures, only Tmax as Tmin is suppose to be last Tmax
738  temps.push_back(string_to_T<NumericType>(nasa->Attribute(_map.at(ParsingKey::TMAX).c_str())));
739 
740  // now coeffs
741  if( !(nasa->FirstChildElement(_map.at(ParsingKey::NASADATA).c_str())) )
742  antioch_error_msg("ERROR: Could not find "+_map.at(ParsingKey::NASADATA)+" data for species "+name+"!");
743 
744  coeffs = nasa->FirstChildElement(_map.at(ParsingKey::NASADATA).c_str());
745  split_string(std::string(coeffs->GetText())," ",coeffs_str);
746  remove_newline_from_strings(coeffs_str);
747 
748  for(unsigned int d = 0; d < coeffs_str.size(); d++)
749  values.push_back(string_to_T<NumericType>(coeffs_str[d]));
750 
751  // If we have more than one interval, make sure the temperature intervals match up
752  if( temps.size() > 1 )
753  {
754  NumericType prev_Tmax = *(temps.end()-2);
755  NumericType Tmin = string_to_T<NumericType>(nasa->Attribute(_map.at(ParsingKey::TMIN).c_str()));
756  NumericType diff = (Tmin - prev_Tmax)/prev_Tmax;
757 
758  const NumericType tol = std::numeric_limits<NumericType>::epsilon() * 10.;
759 
760  if(std::abs(diff) > tol)
761  antioch_error_msg("ERROR: Tmax/Tmin mismatch for species "+name+"!");
762  }
763 
764  // This is meant to store only data one interval at a time, so we must clear at each iteration
765  coeffs_str.clear();
766 
767  // Move onto next interval of data
768  nasa = nasa->NextSiblingElement(nasa_xml_section.c_str());
769 
770  } // end while loop
771 
772  thermo.add_curve_fit(name, values, temps);
773  }
774 
775  } // end species loop
776  }
const char * Attribute(const char *name, const char *value=0) const
void remove_newline_from_strings(std::vector< std::string > &strings)
Strips newline characters from strings in the input vector, strings.
Definition: string_utils.C:56
void split_string(const std::string &input, const std::string &delimiter, std::vector< std::string > &results)
All characters in delimiter will be treated as a delimiter.
Definition: string_utils.C:34
std::string nasa_xml_section(NASAThermoMixture< NumericType, NASA7CurveFit< NumericType > > &)
For the given thermo type, return the string for the corresponding XML section.
Definition: xml_parser.h:230
const XMLElement * NextSiblingElement(const char *value=0) const
Get the next (right) sibling element of this node, with an opitionally supplied name.
Definition: tinyxml2_imp.h:770
#define antioch_error_msg(errmsg)
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
const XMLElement * FirstChildElement(const char *value=0) const
Definition: tinyxml2_imp.h:740
tinyxml2::XMLElement * find_element_with_attribute(const tinyxml2::XMLElement *element, const std::string &elem_name, const std::string &attribute, const std::string &attr_value) const
Search the siblings of the element to find the element with the given value for the given attribute...
Definition: xml_parser.C:511
const char * GetText() const
tinyxml2::XMLElement * _thermo_block
Definition: xml_parser.h:253
template<typename NumericType>
virtual void Antioch::ParserBase< NumericType >::read_transport_data ( TransportMixture< NumericType > &  )
inlinevirtualinherited

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

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual void Antioch::ParserBase< NumericType >::read_vibrational_data ( ChemicalMixture< NumericType > &  )
inlinevirtualinherited

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

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
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::XMLParser< NumericType >::species_list ( )
virtual

reads the species set

species

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 203 of file xml_parser.C.

References antioch_error_msg, Antioch::remove_newline_from_strings(), Antioch::SPECIES_SET, and Antioch::split_string().

Referenced by AntiochTesting::NASA7XMLParsingTest< long double >::test_parsed_species_list().

204  {
205  if(!_species_block)
206  antioch_error_msg("ERROR: Could not find "+_map.at(ParsingKey::SPECIES_SET)+" section in input file!");
207 
208  std::vector<std::string> molecules;
209 
210  split_string(std::string(_species_block->GetText())," ",molecules);
211  remove_newline_from_strings(molecules);
212 
213  return molecules;
214  }
void remove_newline_from_strings(std::vector< std::string > &strings)
Strips newline characters from strings in the input vector, strings.
Definition: string_utils.C:56
void split_string(const std::string &input, const std::string &delimiter, std::vector< std::string > &results)
All characters in delimiter will be treated as a delimiter.
Definition: string_utils.C:34
#define antioch_error_msg(errmsg)
tinyxml2::XMLElement * _species_block
Definition: xml_parser.h:252
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
const char * GetText() const
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::Troe ( ) const
virtual

return true if there's a Troe block

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 259 of file xml_parser.C.

260  {
261  return _Troe;
262  }
tinyxml2::XMLElement * _Troe
Definition: xml_parser.h:258
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::Troe_alpha_parameter ( NumericType &  alpha,
std::string &  alpha_unit,
std::string &  def_unit 
) const
virtual

return true is alpha

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 646 of file xml_parser.C.

References Antioch::TROE_F_ALPHA.

647  {
649  return this->get_parameter(_Troe,_map.at(ParsingKey::TROE_F_ALPHA),alpha,alpha_unit);
650  }
std::map< ParsingKey, std::string > _default_unit
Definition: xml_parser.h:261
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
bool get_parameter(const tinyxml2::XMLElement *ptr, const std::string &par, NumericType &par_value, std::string &par_unit) const
return a parameter's value
Definition: xml_parser.C:468
tinyxml2::XMLElement * _Troe
Definition: xml_parser.h:258
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::Troe_T1_parameter ( NumericType &  T1,
std::string &  T1_unit,
std::string &  def_unit 
) const
virtual

return true is alpha

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 653 of file xml_parser.C.

References Antioch::TROE_F_TS.

654  {
655  def_unit = _default_unit.at(ParsingKey::TROE_F_TS);
656  return this->get_parameter(_Troe,_map.at(ParsingKey::TROE_F_TS),T1,T1_unit);
657  }
std::map< ParsingKey, std::string > _default_unit
Definition: xml_parser.h:261
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
bool get_parameter(const tinyxml2::XMLElement *ptr, const std::string &par, NumericType &par_value, std::string &par_unit) const
return a parameter's value
Definition: xml_parser.C:468
tinyxml2::XMLElement * _Troe
Definition: xml_parser.h:258
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::Troe_T2_parameter ( NumericType &  T2,
std::string &  T2_unit,
std::string &  def_unit 
) const
virtual

return true is alpha

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 660 of file xml_parser.C.

References Antioch::TROE_F_TSS.

661  {
662  def_unit = _default_unit.at(ParsingKey::TROE_F_TSS);
663  return this->get_parameter(_Troe,_map.at(ParsingKey::TROE_F_TSS),T2,T2_unit);
664  }
std::map< ParsingKey, std::string > _default_unit
Definition: xml_parser.h:261
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
bool get_parameter(const tinyxml2::XMLElement *ptr, const std::string &par, NumericType &par_value, std::string &par_unit) const
return a parameter's value
Definition: xml_parser.C:468
tinyxml2::XMLElement * _Troe
Definition: xml_parser.h:258
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::Troe_T3_parameter ( NumericType &  T3,
std::string &  T3_unit,
std::string &  def_unit 
) const
virtual

return true is alpha

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 667 of file xml_parser.C.

References Antioch::TROE_F_TSSS.

668  {
669  def_unit = _default_unit.at(ParsingKey::TROE_F_TSSS);
670  return this->get_parameter(_Troe,_map.at(ParsingKey::TROE_F_TSSS),T3,T3_unit);
671  }
std::map< ParsingKey, std::string > _default_unit
Definition: xml_parser.h:261
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
bool get_parameter(const tinyxml2::XMLElement *ptr, const std::string &par, NumericType &par_value, std::string &par_unit) const
return a parameter's value
Definition: xml_parser.C:468
tinyxml2::XMLElement * _Troe
Definition: xml_parser.h:258
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 = double>
const std::string Antioch::XMLParser< NumericType >::unit ( tinyxml2::XMLElement parameter) const
private

return the unit of current pointer

template<typename NumericType>
bool Antioch::ParserBase< NumericType >::verbose ( ) const
inlineinherited
template<typename NumericType >
bool Antioch::XMLParser< NumericType >::verify_Kooij_in_place_of_Arrhenius ( ) const
virtual

return true if a Kooij is called Arrhenuis

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 604 of file xml_parser.C.

References antioch_assert, tinyxml2::XMLNode::FirstChildElement(), Antioch::KINETICS_MODEL, and Antioch::POWER.

605  {
606  bool out(false);
608  antioch_assert(rate_constant->FirstChildElement("Arrhenius"));
609  rate_constant = rate_constant->FirstChildElement("Arrhenius");
610  if(rate_constant->FirstChildElement(_map.at(ParsingKey::POWER).c_str()))
611  {
612  if(std::atof(rate_constant->FirstChildElement(_map.at(ParsingKey::POWER).c_str())->GetText()) != 0.) //not a very good test
613  out = true;
614  }
615 
616  return out;
617  }
#define antioch_assert(asserted)
bool rate_constant(const std::string &kinetics_model)
go to next rate constant
Definition: xml_parser.C:231
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
tinyxml2::XMLElement * _reaction
Definition: xml_parser.h:255
const XMLElement * FirstChildElement(const char *value=0) const
Definition: tinyxml2_imp.h:740
template<typename NumericType >
unsigned int Antioch::XMLParser< NumericType >::where_is_k0 ( const std::string &  kin_model) const
virtual

return index of k0 (0 or 1)

Reimplemented from Antioch::ParserBase< NumericType >.

Definition at line 450 of file xml_parser.C.

References antioch_assert, tinyxml2::XMLElement::Attribute(), Antioch::FALLOFF_LOW, Antioch::FALLOFF_LOW_NAME, tinyxml2::XMLNode::FirstChildElement(), Antioch::KINETICS_MODEL, and tinyxml2::XMLNode::NextSiblingElement().

451  {
452  antioch_assert(!_rate_constant); //should be done exterior to rate constant block
453  antioch_assert(_reaction); //should be done interior to reaction block
454 
456  antioch_assert(rate_constant);
457  rate_constant = rate_constant->FirstChildElement(kin_model.c_str());
458  unsigned int k0(0);
459  if(rate_constant->NextSiblingElement()->Attribute(_map.at(ParsingKey::FALLOFF_LOW_NAME).c_str()))
460  {
461  if(std::string(rate_constant->NextSiblingElement()->Attribute(_map.at(ParsingKey::FALLOFF_LOW_NAME).c_str())) == _map.at(ParsingKey::FALLOFF_LOW))k0=1;
462  }
463 
464  return k0;
465  }
const char * Attribute(const char *name, const char *value=0) const
#define antioch_assert(asserted)
tinyxml2::XMLElement * _rate_constant
Definition: xml_parser.h:257
bool rate_constant(const std::string &kinetics_model)
go to next rate constant
Definition: xml_parser.C:231
const XMLElement * NextSiblingElement(const char *value=0) const
Get the next (right) sibling element of this node, with an opitionally supplied name.
Definition: tinyxml2_imp.h:770
std::map< ParsingKey, std::string > _map
Definition: xml_parser.h:260
tinyxml2::XMLElement * _reaction
Definition: xml_parser.h:255
const XMLElement * FirstChildElement(const char *value=0) const
Definition: tinyxml2_imp.h:740

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 = double>
std::map<ParsingKey,std::string> Antioch::XMLParser< NumericType >::_default_unit
private

Definition at line 261 of file xml_parser.h.

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

template<typename NumericType = double>
tinyxml2::XMLDocument* Antioch::XMLParser< NumericType >::_doc
private

Definition at line 249 of file xml_parser.h.

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

template<typename NumericType>
std::string Antioch::ParserBase< NumericType >::_file
protectedinherited
template<typename NumericType = double>
std::map<ParsingKey,std::string> Antioch::XMLParser< NumericType >::_map
private
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 = double>
tinyxml2::XMLElement* Antioch::XMLParser< NumericType >::_rate_constant
private

Definition at line 257 of file xml_parser.h.

template<typename NumericType = double>
tinyxml2::XMLElement* Antioch::XMLParser< NumericType >::_reaction
private

Definition at line 255 of file xml_parser.h.

template<typename NumericType = double>
tinyxml2::XMLElement* Antioch::XMLParser< NumericType >::_reaction_block
private

Definition at line 254 of file xml_parser.h.

template<typename NumericType = double>
tinyxml2::XMLElement* Antioch::XMLParser< NumericType >::_species_block
private

Definition at line 252 of file xml_parser.h.

template<typename NumericType = double>
tinyxml2::XMLElement* Antioch::XMLParser< NumericType >::_thermo_block
private

Definition at line 253 of file xml_parser.h.

template<typename NumericType = double>
tinyxml2::XMLElement* Antioch::XMLParser< NumericType >::_Troe
private

Definition at line 258 of file xml_parser.h.

template<typename NumericType>
std::string Antioch::ParserBase< NumericType >::_type
protectedinherited
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 class was generated from the following files:

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