7#include <unordered_map>
8#include "yaml-cpp/yaml.h"
17class SpeciesSummaryWriterBase;
42 void setCheckRefs(
const bool check_refs) { _check_refs = check_refs; }
43 void setReadXsecFiles(
const bool read_xsec_files) { _read_xsec_files = read_xsec_files; }
73 preventInvalidDataFetch();
85 preventInvalidDataFetch();
97 preventInvalidDataFetch();
98 return _tabulated_xsec_based;
109 preventInvalidDataFetch();
110 return _function_xsec_based;
121 preventInvalidDataFetch();
122 return _tabulated_rate_based;
133 preventInvalidDataFetch();
134 return _function_rate_based;
143 const std::vector<std::shared_ptr<const Species>> &
transientSpecies()
const;
160 const std::vector<std::shared_ptr<Species>> &
species()
const;
162 void writeReactionTable(
const std::string & file)
const;
163 void writeReactionTable(
const std::string & file,
TableWriterBase & writer)
const;
179 std::string _delimiter;
181 bool _network_has_errors;
183 bool _network_has_bib_errors;
189 bool _read_xsec_files;
191 std::unordered_map<std::string, YAML::Node> _networks;
193 std::unordered_map<std::string, std::string> _bibs;
195 std::unordered_map<std::string, std::string> _data_paths;
205 void checkFile(
const std::string & file)
const;
212 void checkBibFile(
const std::string & file)
const;
226 void parseReactions(
const YAML::Node & inputs,
228 std::vector<std::shared_ptr<Reaction>> * rxn_list,
229 std::vector<std::shared_ptr<const Reaction>> * tabulated_rxn_list,
230 std::vector<std::shared_ptr<const Reaction>> * function_rxn_list,
231 const std::string & type,
232 const std::string & data_path,
233 const std::string & bib_file);
239 const std::vector<std::shared_ptr<const
Reaction>> & rxn_list) const;
246 void preventInvalidDataFetch()
const;
251 std::vector<std::shared_ptr<Reaction>> _rate_based;
252 std::vector<std::shared_ptr<const Reaction>> _tabulated_rate_based;
253 std::vector<std::shared_ptr<const Reaction>> _function_rate_based;
254 std::vector<std::shared_ptr<Reaction>> _xsec_based;
255 std::vector<std::shared_ptr<const Reaction>> _tabulated_xsec_based;
256 std::vector<std::shared_ptr<const Reaction>> _function_xsec_based;
Class for collecting and managing cite keys from the user provided bib files.
Definition BibTexHelper.h:14
This is the class that processes reaction networks and allows for interaction with the data contained...
Definition NetworkParser.h:24
const std::vector< std::shared_ptr< Species > > & species() const
Gets all of the species in the network This function will also exist the program if there are any err...
Definition NetworkParser.C:331
void parseNetwork(const std::string &file)
Method goes through all of the reactions in this network constructs Reaction objects and then puts th...
Definition NetworkParser.C:156
const std::vector< std::shared_ptr< Reaction > > & xsecBasedReactions() const
Gets all of the reactions in the xsec-based block that have cross section data in a file.
Definition NetworkParser.h:83
const std::vector< std::shared_ptr< const Reaction > > & functionXSecReactions() const
Gets all of the reactions in the xsec-based block that have cross section that can be represented wit...
Definition NetworkParser.h:107
const std::vector< std::shared_ptr< const Reaction > > & tabulatedXSecReactions() const
Gets all of the reactions in the xsec-based block that have cross section data in a file.
Definition NetworkParser.h:95
static NetworkParser & instance()
Getter for the singleton instance.
Definition NetworkParser.C:39
void setDelimiter(const std::string &delimiter)
Sets the delimiter for the networks which have some tabulated data.
Definition NetworkParser.C:49
void writeSpeciesSummary(const std::string &file)
Writes a summary of the species in the network to a file.
const std::vector< std::shared_ptr< const Reaction > > & functionRateReactions() const
Gets all of the reactions in the xsec-based block that have rate data that can be represented with a ...
Definition NetworkParser.h:131
const std::vector< std::shared_ptr< const Reaction > > & tabulatedRateReactions() const
Gets all of the reactions in the xsec-based block that have rate data in a file.
Definition NetworkParser.h:119
void clear()
Resets the parser to a fresh state, as if no networks have been processed.
Definition NetworkParser.C:62
const std::vector< std::shared_ptr< Reaction > > & rateBasedReactions() const
Gets all of the reactions in the xsec-based block that have cross section data in a file.
Definition NetworkParser.h:71
const std::vector< std::string > & speciesNames() const
Gets the names of all of the species in the network This function will also exist the program if ther...
Definition NetworkParser.C:324
const std::vector< std::shared_ptr< const Species > > & transientSpecies() const
Gets all of the species in the network that have a non-zero This function will also exist the program...
Definition NetworkParser.C:338
Stores all of the data needed to perform calculations with a specific reaction.
Definition Reaction.h:63
This factory creates and stores, and passes around all of the species that exist in a reaction mechan...
Definition SpeciesFactory.h:21
Definition SpeciesSummaryWriterBase.h:13
Definition TableWriterBase.h:12