26 #include "grins_config.h"
28 #ifdef GRINS_HAVE_ANTIOCH
37 #include "antioch/default_filename.h"
40 #include "libmesh/getpot.h"
45 const std::string& material )
49 std::string warning =
"==============================================\n";
50 warning +=
"WARNING: This AntiochChemistry constructor is DEPREACTED!\n";
51 warning +=
" Prefer alternate constructor where parsing\n";
52 warning +=
" is done outside this class.\n";
53 warning +=
"==============================================\n";
55 libmesh_warning(warning);
57 std::vector<std::string> species_list;
60 bool verbose_antioch_read = input(
"Materials/"+material+
"/GasMixture/Antioch/verbose_read",
false);
62 std::string species_data_filename = input(
"Materials/"+material+
"/GasMixture/Antioch/species_data",
"default" );
63 if( species_data_filename == std::string(
"default") )
64 species_data_filename = Antioch::DefaultInstallFilename::chemical_mixture();
66 std::string vibration_data_filename = input(
"Materials/"+material+
"/GasMixture/Antioch/vibration_data",
"default" );
67 if( vibration_data_filename == std::string(
"default") )
68 vibration_data_filename = Antioch::DefaultInstallFilename::vibrational_data();
70 std::string electronic_data_filename = input(
"Materials/"+material+
"/GasMixture/Antioch/electronic_data",
"default" );
71 if( electronic_data_filename == std::string(
"default") )
72 electronic_data_filename = Antioch::DefaultInstallFilename::electronic_data();
75 _antioch_gas.reset(
new Antioch::ChemicalMixture<libMesh::Real>( species_list,
77 species_data_filename,
78 vibration_data_filename,
79 electronic_data_filename ) );
83 ( libMesh::UniquePtr<Antioch::ChemicalMixture<libMesh::Real> > & chem_mixture )
87 _antioch_gas.reset( chem_mixture.release() );
92 libmesh_assert_less(species_index,
_antioch_gas->n_species());
94 return _antioch_gas->species_inverse_name_map().find(species_index)->second;
99 #endif // GRINS_HAVE_ANTIOCH
libMesh::UniquePtr< Antioch::ChemicalMixture< libMesh::Real > > _antioch_gas
std::string species_name(unsigned int species_index) const
ParameterUser base class. Utility methods for subclasses.
static void parse_chemical_species(const GetPot &input, const std::string &material, std::vector< std::string > &species_names)
Helper function for parsing the chemical species.