Nektar++
Functions
Nektar::NekMeshTetrahedronUnitTest Namespace Reference

The above copyright notice and this permission notice shall be included. More...

Functions

 BOOST_AUTO_TEST_CASE (TestConstruction)
 

Detailed Description

The above copyright notice and this permission notice shall be included.

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

Nektar::NekMeshTetrahedronUnitTest::BOOST_AUTO_TEST_CASE ( TestConstruction  )

Definition at line 44 of file TestTetrahedron.cpp.

45{
46 // Setup element config
47 ElmtConfig el_conf(LibUtilities::eTetrahedron, 1, false, false, false);
48
49 // Setup element node list -- order matters!
50 std::vector<NodeSharedPtr> node_set(4);
51 node_set[0] = std::make_shared<Node>(0, -1., 0., 0.);
52 node_set[1] = std::make_shared<Node>(1, 1., 0., 0.);
53 node_set[2] = std::make_shared<Node>(2, 0., 1., 0.);
54 node_set[3] = std::make_shared<Node>(3, 0., 0.5, 1.);
55
56 std::vector<int> tags;
57 tags.push_back(0);
58
59 ElementSharedPtr TestTet = GetElementFactory().CreateInstance(
60 LibUtilities::eTetrahedron, el_conf, node_set, tags);
61
62 BOOST_CHECK_EQUAL(TestTet->GetVertex(3)->m_x, 0.);
63 BOOST_CHECK_EQUAL(TestTet->GetVertex(3)->m_y, 0.5);
64 BOOST_CHECK_EQUAL(TestTet->GetVertex(3)->m_z, 1.);
65}

References Nektar::LibUtilities::eTetrahedron.