27 #include "antioch_config.h"
29 #ifdef ANTIOCH_HAVE_CPPUNIT
46 template<
typename Scalar>
53 std::vector<std::string> species_str_list(2);
54 species_str_list[0] =
"N2";
55 species_str_list[1] =
"NO2";
60 std::string filename = std::string(ANTIOCH_SHARE_XML_INPUT_FILES_SOURCE_PATH)+
"nasa9_thermo.xml";
67 CPPUNIT_ASSERT_EQUAL( (
unsigned int)5, N2_curve_fit.
n_intervals() );
68 CPPUNIT_ASSERT_EQUAL( (
unsigned int)4, NO2_curve_fit.
n_intervals() );
86 for(
unsigned int c = 0; c < exact_coeffs.size(); c++ )
87 CPPUNIT_ASSERT_DOUBLES_EQUAL( exact_coeffs[c], parsed_coeffs[c], this->
tol() );
91 {
return std::numeric_limits<Scalar>::epsilon() * 10; }
95 template<
typename Scalar>
102 std::vector<std::string> species_str_list(2);
103 species_str_list[0] =
"H2";
104 species_str_list[1] =
"N2";
108 std::string thermo_filename = std::string(ANTIOCH_TESTING_INPUT_FILES_PATH)+
"nasa7_thermo_test.xml";
119 std::string thermo_filename = std::string(ANTIOCH_TESTING_INPUT_FILES_PATH)+
"nasa7_thermo_test.xml";
123 std::vector<std::string> species_str_list = xml_parser.
species_list();
139 CPPUNIT_ASSERT_EQUAL( (
unsigned int)2, H2_curve_fit.
n_intervals() );
140 CPPUNIT_ASSERT_EQUAL( (
unsigned int)2, N2_curve_fit.
n_intervals() );
153 for(
unsigned int c = 0; c < exact_coeffs.size(); c++ )
154 CPPUNIT_ASSERT_DOUBLES_EQUAL( exact_coeffs[c], parsed_coeffs[c], this->
tol() );
158 {
return std::numeric_limits<Scalar>::epsilon() * 10; }
240 #endif // ANTIOCH_HAVE_CPPUNIT
std::vector< Scalar > _H2_coeffs_1000_3500
CPPUNIT_TEST_SUITE(NASA9XMLParsingTestFloat)
std::vector< Scalar > _N2_coeffs_1000_6000
std::vector< Scalar > _NO2_coeffs_6000_99999
void test_supplied_species()
const NASAFit & curve_fit(unsigned int s) const
const CoeffType * coefficients(const unsigned int interval) const
The ordering/packing of the coefficients will depend on the subclass.
CPPUNIT_TEST_SUITE(NASA9XMLParsingTestDouble)
std::vector< Scalar > _NO2_coeffs_200_1000
void read_thermodynamic_data(NASAThermoMixture< NumericType, NASA7CurveFit< NumericType > > &thermo)
reads the thermo, NASA generalist, no templates for virtual
std::vector< Scalar > _H2_coeffs_200_1000
std::vector< Scalar > _N2_coeffs_6000_20000
std::vector< Scalar > _N2_coeffs_200_1000
CPPUNIT_TEST_SUITE(NASA9XMLParsingTestLongDouble)
CPPUNIT_TEST(test_supplied_species)
void read_nasa_mixture_data(NASAThermoMixture< NumericType, CurveType > &thermo, const std::string &filename=DefaultSourceFilename::thermo_data(), ParsingType=ASCII, bool verbose=true)
CPPUNIT_TEST(test_supplied_species)
CPPUNIT_TEST(test_supplied_species)
void test_parsed_species_list()
std::vector< Scalar > _N2_coeffs_0_200
This class stores the NASA polynomial fit to the thermodynamics quantities and .
std::vector< Scalar > _N2_coeffs_300_1000
CPPUNIT_TEST_SUITE(NASA7XMLParsingTestLongDouble)
CPPUNIT_TEST_SUITE_REGISTRATION(ArrheniusRateEigenFloatTest)
void check_coefficients(const Scalar *parsed_coeffs, std::vector< Scalar > &exact_coeffs)
void test_supplied_species()
Nothing is stored, this parser is based on the tinyxml2 implementation.
CPPUNIT_TEST(test_supplied_species)
std::vector< Scalar > _NO2_coeffs_0_200
CPPUNIT_TEST(test_supplied_species)
std::vector< Scalar > _N2_coeffs_20000_99999
Class storing chemical mixture properties.
unsigned int n_intervals() const
The number of intervals for this NASA9 curve fit.
CPPUNIT_TEST(test_supplied_species)
const std::vector< std::string > species_list()
reads the species set
std::vector< Scalar > _NO2_coeffs_1000_6000
void check_curve_fits(const Antioch::NASAThermoMixture< Scalar, Antioch::NASA7CurveFit< Scalar > > &nasa_mixture)
CPPUNIT_TEST_SUITE(NASA7XMLParsingTestDouble)
std::vector< Scalar > _N2_coeffs_1000_5000
CPPUNIT_TEST_SUITE(NASA7XMLParsingTestFloat)
void check_coefficients(const Scalar *parsed_coeffs, std::vector< Scalar > &exact_coeffs)