26 #include "grins_config.h"
28 #ifdef GRINS_HAVE_ANTIOCH
34 #include "libmesh/getpot.h"
41 if( !input.have_variable(
"Physics/Chemistry/species") )
43 std::cerr <<
"Error: Must specify species list to use Antioch." << std::endl;
47 unsigned int n_species = input.vector_variable_size(
"Physics/Chemistry/species");
48 std::vector<std::string> species_list(n_species);
50 for(
unsigned int s = 0; s <
n_species; s++ )
52 species_list[s] = input(
"Physics/Chemistry/species",
"DIE!", s );
55 _antioch_gas.reset(
new Antioch::ChemicalMixture<libMesh::Real>( species_list ) );
67 libmesh_assert_less(species_index,
_antioch_gas->n_species());
69 #if ANTIOCH_MAJOR_VERSION < 1 && ANTIOCH_MINOR_VERSION < 3
70 std::string name =
"dummy";
72 for( std::map<std::string,unsigned int>::const_iterator it =
_antioch_gas->active_species_name_map().begin();
73 it !=
_antioch_gas->active_species_name_map().end(); it++ )
75 if( it->second == species_index )
81 if( name == std::string(
"dummy") )
83 std::cerr <<
"Error: Could not find a species name for the given index!"
90 return _antioch_gas->species_inverse_name_map().find(species_index)->second;
96 #endif // GRINS_HAVE_ANTIOCH
unsigned int n_species() const
std::string species_name(unsigned int species_index) const
virtual ~AntiochChemistry()
boost::scoped_ptr< Antioch::ChemicalMixture< libMesh::Real > > _antioch_gas