+ CPPUNIT_ASSERT(M1.getNameOfFaceGroups()[2].compare("RightEdge")==0);
+ CPPUNIT_ASSERT(M1.getNameOfNodeGroups()[0].compare("Boundary")==0);
+ CPPUNIT_ASSERT(M1.getNameOfNodeGroups()[1].compare("LeftEdge")==0);
+ CPPUNIT_ASSERT(M1.getNameOfNodeGroups()[2].compare("RightEdge")==0);
+
+ //Test the duplication of a group
+ M1.setGroupAtPlan(0.,0,1.E-14,"LeftEdge") ;
+ M1.setGroupAtPlan(4.,0,1.E-14,"RightEdge") ;
+ CPPUNIT_ASSERT(M1.getNameOfFaceGroups().size() == 3);//There is a default group named "Boundary" that is created by the mesh class
+
+ std::vector<int> id_nodes=M1.getBoundaryNodeIds();
+ int id_size_nodes = id_nodes.size();
+ CPPUNIT_ASSERT_EQUAL( 2, id_size_nodes );
+ CPPUNIT_ASSERT_EQUAL( 0, id_nodes[0] );
+ CPPUNIT_ASSERT_EQUAL( 4, id_nodes[1] );
+
+ std::vector<int> id_faces=M1.getBoundaryFaceIds();
+ CPPUNIT_ASSERT_EQUAL( 2, int(id_faces.size()) );
+ CPPUNIT_ASSERT_EQUAL( 0, id_faces[0] );
+ CPPUNIT_ASSERT_EQUAL( 4, id_faces[1] );
+
+ std::vector<int> id_left = M1.getFaceGroupIds("LeftEdge");
+ std::vector<int> id_right = M1.getFaceGroupIds("RightEdge");
+ CPPUNIT_ASSERT_EQUAL( 0, id_left[0] );
+ CPPUNIT_ASSERT_EQUAL( 4, id_right[0] );
+