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

Public Member Functions

 CPPUNIT_TEST_SUITE (BuilderHelperTest)
 
 CPPUNIT_TEST (test_parse_var_sections)
 
 CPPUNIT_TEST_SUITE_END ()
 
void tearDown ()
 
void test_parse_var_sections ()
 
- Public Member Functions inherited from GRINS::BuilderHelper
 BuilderHelper ()
 
 ~BuilderHelper ()
 

Additional Inherited Members

- Static Public Member Functions inherited from GRINS::BuilderHelper
static void parse_var_sections (const GetPot &input, std::set< std::string > &sections)
 Parses the input file for [Variables] first-level subsections. More...
 
static void parse_var_sections_vector (const GetPot &input, std::vector< std::string > &sections)
 The same as parse_var_sections, except the result is returned in an std::vector. More...
 
- Protected Member Functions inherited from GRINSTesting::SystemHelper
void setup_multiphysics_system (const std::string &filename)
 
void reset_all ()
 
- Protected Attributes inherited from GRINSTesting::SystemHelper
libMesh::UniquePtr< GetPot > _input
 
GRINS::SharedPtr< libMesh::UnstructuredMesh > _mesh
 
libMesh::UniquePtr< libMesh::EquationSystems > _es
 
GRINS::MultiphysicsSystem_system
 

Detailed Description

Definition at line 47 of file builder_helper.C.

Member Function Documentation

GRINSTesting::BuilderHelperTest::CPPUNIT_TEST ( test_parse_var_sections  )
GRINSTesting::BuilderHelperTest::CPPUNIT_TEST_SUITE ( BuilderHelperTest  )
GRINSTesting::BuilderHelperTest::CPPUNIT_TEST_SUITE_END ( )
void GRINSTesting::BuilderHelperTest::tearDown ( )
inline

Definition at line 60 of file builder_helper.C.

References GRINSTesting::SystemHelper::reset_all().

61  {
62  this->reset_all();
63  }
void GRINSTesting::BuilderHelperTest::test_parse_var_sections ( )
inline

Definition at line 65 of file builder_helper.C.

References GRINSTesting::SystemHelper::_input, GRINS::BuilderHelper::parse_var_sections(), and GRINSTesting::SystemHelper::setup_multiphysics_system().

66  {
67  std::string filename = std::string(GRINS_TEST_UNIT_INPUT_SRCDIR)+"/default_bc_builder.in";
68  this->setup_multiphysics_system(filename);
69 
70  // Now we can parse the variable sections and names
71  std::set<std::string> sections;
72  this->parse_var_sections(*_input,sections);
73 
74  // Make sure we have the right sections
75  CPPUNIT_ASSERT_EQUAL(4,(int)sections.size());
76  CPPUNIT_ASSERT( sections.find("Velocity") != sections.end() );
77  CPPUNIT_ASSERT( sections.find("Pressure") != sections.end() );
78  CPPUNIT_ASSERT( sections.find("Temperature") != sections.end() );
79  CPPUNIT_ASSERT( sections.find("SpeciesMassFractions") != sections.end() );
80  }
void setup_multiphysics_system(const std::string &filename)
Definition: system_helper.h:42
libMesh::UniquePtr< GetPot > _input
Definition: system_helper.h:62
static void parse_var_sections(const GetPot &input, std::set< std::string > &sections)
Parses the input file for [Variables] first-level subsections.

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