GRINS-0.8.0
List of all members | Public Member Functions | Private Attributes
GRINSTesting::AntiochMixtureBuilderBaseTest Class Reference
Inheritance diagram for GRINSTesting::AntiochMixtureBuilderBaseTest:
Inheritance graph
[legend]
Collaboration diagram for GRINSTesting::AntiochMixtureBuilderBaseTest:
Collaboration graph
[legend]

Public Member Functions

 CPPUNIT_TEST_SUITE (AntiochMixtureBuilderBaseTest)
 
 CPPUNIT_TEST (test_build_chem_mix)
 
 CPPUNIT_TEST (test_build_reaction_set)
 
 CPPUNIT_TEST (test_build_nasa_thermo_mix_cea)
 
 CPPUNIT_TEST (test_parse_min_T)
 
 CPPUNIT_TEST (test_parse_clip_negative_rho)
 
 CPPUNIT_TEST_SUITE_END ()
 
void setUp ()
 
void test_build_chem_mix ()
 
void test_build_reaction_set ()
 
void test_build_nasa_thermo_mix_cea ()
 
void test_parse_min_T ()
 
void test_parse_clip_negative_rho ()
 

Private Attributes

libMesh::UniquePtr< GetPot > _input
 

Detailed Description

Definition at line 42 of file antioch_mixture_builder_test.C.

Member Function Documentation

GRINSTesting::AntiochMixtureBuilderBaseTest::CPPUNIT_TEST ( test_build_chem_mix  )
GRINSTesting::AntiochMixtureBuilderBaseTest::CPPUNIT_TEST ( test_build_reaction_set  )
GRINSTesting::AntiochMixtureBuilderBaseTest::CPPUNIT_TEST ( test_build_nasa_thermo_mix_cea  )
GRINSTesting::AntiochMixtureBuilderBaseTest::CPPUNIT_TEST ( test_parse_min_T  )
GRINSTesting::AntiochMixtureBuilderBaseTest::CPPUNIT_TEST ( test_parse_clip_negative_rho  )
GRINSTesting::AntiochMixtureBuilderBaseTest::CPPUNIT_TEST_SUITE ( AntiochMixtureBuilderBaseTest  )
GRINSTesting::AntiochMixtureBuilderBaseTest::CPPUNIT_TEST_SUITE_END ( )
void GRINSTesting::AntiochMixtureBuilderBaseTest::setUp ( )
inline

Definition at line 57 of file antioch_mixture_builder_test.C.

References _input.

58  {
59  std::string input_file = std::string(GRINS_TEST_SRCDIR)+"/input_files/antioch.in";
60  _input.reset( new GetPot(input_file) );
61  }
void GRINSTesting::AntiochMixtureBuilderBaseTest::test_build_chem_mix ( )
inline

Definition at line 63 of file antioch_mixture_builder_test.C.

References _input, and GRINS::AntiochMixtureBuilderBase::build_chem_mix().

64  {
66 
67  libMesh::UniquePtr<Antioch::ChemicalMixture<libMesh::Real> > chem_mix
68  = builder.build_chem_mix(*_input, "TestMaterial");
69 
70  // Just a couple of basic tests for the parsed ChemicalMixture
71  CPPUNIT_ASSERT_EQUAL( 5, (int)chem_mix->n_species() );
72 
73  const std::vector<Antioch::ChemicalSpecies<libMesh::Real>*> & all_species =
74  chem_mix->chemical_species();
75 
76  CPPUNIT_ASSERT_EQUAL( 5, (int)all_species.size() );
77  }
Base class building Antioch mixture wrappers.
libMesh::UniquePtr< Antioch::ChemicalMixture< libMesh::Real > > build_chem_mix(const GetPot &input, const std::string &material)
void GRINSTesting::AntiochMixtureBuilderBaseTest::test_build_nasa_thermo_mix_cea ( )
inline

Definition at line 93 of file antioch_mixture_builder_test.C.

References _input, GRINS::AntiochMixtureBuilderBase::build_chem_mix(), and GRINS::AntiochMixtureBuilderBase::build_nasa_thermo_mix().

94  {
96 
97  libMesh::UniquePtr<Antioch::ChemicalMixture<libMesh::Real> > chem_mix
98  = builder.build_chem_mix(*_input, "TestMaterial");
99 
100  libMesh::UniquePtr<Antioch::NASAThermoMixture<libMesh::Real,Antioch::CEACurveFit<libMesh::Real> > >
101  nasa_mix =
102  builder.build_nasa_thermo_mix<Antioch::CEACurveFit<libMesh::Real> >(*_input, "TestMaterial", *chem_mix);
103 
104  CPPUNIT_ASSERT(nasa_mix->check());
105  }
Base class building Antioch mixture wrappers.
libMesh::UniquePtr< Antioch::NASAThermoMixture< libMesh::Real, KineticsThermoCurveFit > > build_nasa_thermo_mix(const GetPot &input, const std::string &material, const Antioch::ChemicalMixture< libMesh::Real > &chem_mix)
libMesh::UniquePtr< Antioch::ChemicalMixture< libMesh::Real > > build_chem_mix(const GetPot &input, const std::string &material)
void GRINSTesting::AntiochMixtureBuilderBaseTest::test_build_reaction_set ( )
inline

Definition at line 79 of file antioch_mixture_builder_test.C.

References _input, GRINS::AntiochMixtureBuilderBase::build_chem_mix(), and GRINS::AntiochMixtureBuilderBase::build_reaction_set().

80  {
82 
83  libMesh::UniquePtr<Antioch::ChemicalMixture<libMesh::Real> > chem_mix
84  = builder.build_chem_mix(*_input, "TestMaterial");
85 
86  libMesh::UniquePtr<Antioch::ReactionSet<libMesh::Real> > reaction_set
87  = builder.build_reaction_set(*_input, "TestMaterial", *chem_mix);
88 
89  CPPUNIT_ASSERT_EQUAL( 5, (int)reaction_set->n_species() );
90  CPPUNIT_ASSERT_EQUAL( 5, (int)reaction_set->n_reactions() );
91  }
libMesh::UniquePtr< Antioch::ReactionSet< libMesh::Real > > build_reaction_set(const GetPot &input, const std::string &material, const Antioch::ChemicalMixture< libMesh::Real > &chem_mix)
Base class building Antioch mixture wrappers.
libMesh::UniquePtr< Antioch::ChemicalMixture< libMesh::Real > > build_chem_mix(const GetPot &input, const std::string &material)
void GRINSTesting::AntiochMixtureBuilderBaseTest::test_parse_clip_negative_rho ( )
inline

Definition at line 117 of file antioch_mixture_builder_test.C.

References _input, and GRINS::AntiochMixtureBuilderBase::parse_clip_negative_rho().

118  {
120 
121  bool clip_negative_rho_exact = true;
122  bool clip_negative_rho = builder.parse_clip_negative_rho( *_input, "TestMaterial" );
123 
124  CPPUNIT_ASSERT_EQUAL( clip_negative_rho_exact, clip_negative_rho );
125  }
bool parse_clip_negative_rho(const GetPot &input, const std::string &material)
Base class building Antioch mixture wrappers.
void GRINSTesting::AntiochMixtureBuilderBaseTest::test_parse_min_T ( )
inline

Definition at line 107 of file antioch_mixture_builder_test.C.

References _input, and GRINS::AntiochMixtureBuilderBase::parse_min_T().

108  {
110 
111  libMesh::Real min_T_exact = 114.15;
112  libMesh::Real min_T = builder.parse_min_T( *_input, "TestMaterial" );
113 
114  CPPUNIT_ASSERT_DOUBLES_EQUAL( min_T_exact, min_T, std::numeric_limits<libMesh::Real>::epsilon() );
115  }
Base class building Antioch mixture wrappers.
libMesh::Real parse_min_T(const GetPot &input, const std::string &material)

Member Data Documentation

libMesh::UniquePtr<GetPot> GRINSTesting::AntiochMixtureBuilderBaseTest::_input
private

The documentation for this class was generated from the following file:

Generated on Tue Dec 19 2017 12:47:32 for GRINS-0.8.0 by  doxygen 1.8.9.1