libMesh
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MixedDimensionNonUniformRefinement3D Class Reference
Inheritance diagram for MixedDimensionNonUniformRefinement3D:
[legend]

Public Member Functions

 CPPUNIT_TEST_SUITE (MixedDimensionNonUniformRefinement3D)
 Given a mesh with 36 HEX8 elements and an overlapping QUAD4 element located in the center of the HEX8 elements, this test ensures that when a single HEX8 element is flagged for refinement, which is a neighbor of the QUAD4 element, that the QUAD4 element will is also be flagged for refinement due to an underrefined_boundary_limit of 0 (default) and the neighboring HEX8 element (with respect to the QUAD4 element) will also refined due to an overrefined_boundary_limit of 0 (default). More...
 
 CPPUNIT_TEST (testMesh)
 
 CPPUNIT_TEST (testDofOrdering)
 
 CPPUNIT_TEST_SUITE_END ()
 
void setUp ()
 
void tearDown ()
 
void testMesh ()
 
void testDofOrdering ()
 

Protected Member Functions

void build_mesh ()
 

Protected Attributes

ReplicatedMesh_mesh
 

Detailed Description

Definition at line 866 of file mixed_dim_mesh_test.C.

Member Function Documentation

◆ build_mesh()

void MixedDimensionNonUniformRefinement3D::build_mesh ( )
inlineprotected

Definition at line 891 of file mixed_dim_mesh_test.C.

892  {
894 
896 
897  //Add the nodes
898  for (unsigned int z = 0; z < 5; z++)
899  {
900  for (unsigned int y = 0; y < 4; y++)
901  {
902  for (unsigned int x = 0; x < 4; x++)
903  {
904  _mesh->add_point( Point(Real(x),Real(y),Real(z)), 16*z+4*y+x);
905  }
906  }
907  }
908 
909  {
910  //Add the HEX8 elements
911  for (unsigned int z = 0; z < 4; z++)
912  {
913  for (unsigned int y = 0; y < 3; y++)
914  {
915  for (unsigned int x = 0; x < 3; x++)
916  {
917  Elem* hex = _mesh->add_elem( new Hex8 );
918  hex->set_node(0) = _mesh->node_ptr(x+4*y +16*z );
919  hex->set_node(1) = _mesh->node_ptr(x+4*y +16*z + 1);
920  hex->set_node(2) = _mesh->node_ptr(x+4*(y+1)+16*z + 1);
921  hex->set_node(3) = _mesh->node_ptr(x+4*(y+1)+16*z );
922  hex->set_node(4) = _mesh->node_ptr(x+4*y +16*(z+1) );
923  hex->set_node(5) = _mesh->node_ptr(x+4*y +16*(z+1) + 1);
924  hex->set_node(6) = _mesh->node_ptr(x+4*(y+1)+16*(z+1) + 1);
925  hex->set_node(7) = _mesh->node_ptr(x+4*(y+1)+16*(z+1) );
926  }
927  }
928  }
929  Elem* quad = _mesh->add_elem( new Quad4 );
930  unsigned int x=1,y=1,z=2;
931  quad->set_node(0) = _mesh->node_ptr(x+4*y +16*z );
932  quad->set_node(1) = _mesh->node_ptr(x+4*y +16*z + 1);
933  quad->set_node(2) = _mesh->node_ptr(x+4*(y+1)+16*z + 1);
934  quad->set_node(3) = _mesh->node_ptr(x+4*(y+1)+16*z );
935 
936  // 2D elements will have subdomain id 0, this one will have 1
937  quad->subdomain_id() = 1;
938  }
939 
940  // libMesh will renumber, but we numbered according to its scheme
941  // anyway. We do this because when we call uniformly_refine subsequently,
942  // it's going use skip_renumber=false.
943  _mesh->prepare_for_use(false /*skip_renumber*/);
944 
945 #ifdef LIBMESH_ENABLE_AMR
946  //Flag the bottom element for refinement
947  _mesh->elem_ref(13).set_refinement_flag(Elem::REFINE);
949 #endif
950  }

References libMesh::ReplicatedMesh::add_elem(), libMesh::ReplicatedMesh::add_point(), libMesh::MeshBase::elem_ref(), libMesh::ReplicatedMesh::node_ptr(), libMesh::MeshBase::prepare_for_use(), libMesh::Real, libMesh::Elem::REFINE, libMesh::MeshRefinement::refine_and_coarsen_elements(), libMesh::MeshBase::set_mesh_dimension(), libMesh::Elem::set_node(), libMesh::Elem::set_refinement_flag(), libMesh::Elem::subdomain_id(), and TestCommWorld.

◆ CPPUNIT_TEST() [1/2]

MixedDimensionNonUniformRefinement3D::CPPUNIT_TEST ( testDofOrdering  )

◆ CPPUNIT_TEST() [2/2]

MixedDimensionNonUniformRefinement3D::CPPUNIT_TEST ( testMesh  )

◆ CPPUNIT_TEST_SUITE()

MixedDimensionNonUniformRefinement3D::CPPUNIT_TEST_SUITE ( MixedDimensionNonUniformRefinement3D  )

Given a mesh with 36 HEX8 elements and an overlapping QUAD4 element located in the center of the HEX8 elements, this test ensures that when a single HEX8 element is flagged for refinement, which is a neighbor of the QUAD4 element, that the QUAD4 element will is also be flagged for refinement due to an underrefined_boundary_limit of 0 (default) and the neighboring HEX8 element (with respect to the QUAD4 element) will also refined due to an overrefined_boundary_limit of 0 (default).

◆ CPPUNIT_TEST_SUITE_END()

MixedDimensionNonUniformRefinement3D::CPPUNIT_TEST_SUITE_END ( )

◆ setUp()

void MixedDimensionNonUniformRefinement3D::setUp ( )
inline

Definition at line 953 of file mixed_dim_mesh_test.C.

954  {
955 #if LIBMESH_DIM > 2
956  this->build_mesh();
957 #endif
958  }

◆ tearDown()

void MixedDimensionNonUniformRefinement3D::tearDown ( )
inline

Definition at line 960 of file mixed_dim_mesh_test.C.

961  {
962 #if LIBMESH_DIM > 2
963  delete _mesh;
964 #endif
965  }

◆ testDofOrdering()

void MixedDimensionNonUniformRefinement3D::testDofOrdering ( )
inline

Definition at line 1098 of file mixed_dim_mesh_test.C.

1099  {
1100 #ifdef LIBMESH_ENABLE_AMR
1101  EquationSystems es(*_mesh);
1102  es.add_system<LinearImplicitSystem>("TestDofSystem");
1103  es.get_system("TestDofSystem").add_variable("u",FIRST);
1104  es.init();
1105 
1106  DofMap& dof_map = es.get_system("TestDofSystem").get_dof_map();
1107 
1108  //Elements to the left of the QUAD4 elements
1109  std::vector<dof_id_type> elem41_dof_indices, elem42_dof_indices, elem43_dof_indices, elem44_dof_indices;
1110  //Elements to the right of the QUAD4 elements
1111  std::vector<dof_id_type> elem45_dof_indices, elem46_dof_indices, elem47_dof_indices, elem48_dof_indices;
1112  //QUAD4 elements
1113  std::vector<dof_id_type> elem53_dof_indices, elem54_dof_indices, elem55_dof_indices, elem56_dof_indices;
1114 
1115  dof_map.dof_indices( _mesh->elem_ptr(41), elem41_dof_indices );
1116  dof_map.dof_indices( _mesh->elem_ptr(42), elem42_dof_indices );
1117  dof_map.dof_indices( _mesh->elem_ptr(43), elem43_dof_indices );
1118  dof_map.dof_indices( _mesh->elem_ptr(44), elem44_dof_indices );
1119  dof_map.dof_indices( _mesh->elem_ptr(45), elem45_dof_indices );
1120  dof_map.dof_indices( _mesh->elem_ptr(46), elem46_dof_indices );
1121  dof_map.dof_indices( _mesh->elem_ptr(47), elem47_dof_indices );
1122  dof_map.dof_indices( _mesh->elem_ptr(48), elem48_dof_indices );
1123  dof_map.dof_indices( _mesh->elem_ptr(53), elem53_dof_indices );
1124  dof_map.dof_indices( _mesh->elem_ptr(54), elem54_dof_indices );
1125  dof_map.dof_indices( _mesh->elem_ptr(55), elem55_dof_indices );
1126  dof_map.dof_indices( _mesh->elem_ptr(56), elem56_dof_indices );
1127 
1128  /* The dofs for the QUAD4 (ids = 53, 54, 55, and 56) element should be the same
1129  as the face of the HEX8 elements HEX8 (id=41, 42, 43, and 44) left of the
1130  QUAD4 elements. */
1131  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[0], elem41_dof_indices[4] );
1132  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[1], elem41_dof_indices[5] );
1133  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[2], elem41_dof_indices[6] );
1134  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[3], elem41_dof_indices[7] );
1135 
1136  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[0], elem42_dof_indices[4] );
1137  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[1], elem42_dof_indices[5] );
1138  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[2], elem42_dof_indices[6] );
1139  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[3], elem42_dof_indices[7] );
1140 
1141  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[0], elem43_dof_indices[4] );
1142  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[1], elem43_dof_indices[5] );
1143  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[2], elem43_dof_indices[6] );
1144  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[3], elem43_dof_indices[7] );
1145 
1146  CPPUNIT_ASSERT_EQUAL( elem56_dof_indices[0], elem44_dof_indices[4] );
1147  CPPUNIT_ASSERT_EQUAL( elem56_dof_indices[1], elem44_dof_indices[5] );
1148  CPPUNIT_ASSERT_EQUAL( elem56_dof_indices[2], elem44_dof_indices[6] );
1149  CPPUNIT_ASSERT_EQUAL( elem56_dof_indices[3], elem44_dof_indices[7] );
1150 
1151  /* The dofs for the QUAD4 (ids = 53, 54, 55, and 56) element should be the same
1152  as the face of the HEX8 elements HEX8 (id=45, 46, 47, and 49) left of the
1153  QUAD4 elements. */
1154  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[0], elem45_dof_indices[0] );
1155  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[1], elem45_dof_indices[1] );
1156  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[2], elem45_dof_indices[2] );
1157  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[3], elem45_dof_indices[3] );
1158 
1159  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[0], elem46_dof_indices[0] );
1160  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[1], elem46_dof_indices[1] );
1161  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[2], elem46_dof_indices[2] );
1162  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[3], elem46_dof_indices[3] );
1163 
1164  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[0], elem47_dof_indices[0] );
1165  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[1], elem47_dof_indices[1] );
1166  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[2], elem47_dof_indices[2] );
1167  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[3], elem47_dof_indices[3] );
1168 
1169  CPPUNIT_ASSERT_EQUAL( elem56_dof_indices[0], elem48_dof_indices[0] );
1170  CPPUNIT_ASSERT_EQUAL( elem56_dof_indices[1], elem48_dof_indices[1] );
1171  CPPUNIT_ASSERT_EQUAL( elem56_dof_indices[2], elem48_dof_indices[2] );
1172  CPPUNIT_ASSERT_EQUAL( elem56_dof_indices[3], elem48_dof_indices[3] );
1173 
1174  /* The dofs for the HEX8 elements (id=41, 42, 43, and 44) should be the same
1175  on the left side of the QUAD4 elements as the HEX8 elements (id=45, 46, 47, and 48)
1176  on the right as QUAD4 elements. */
1177  CPPUNIT_ASSERT_EQUAL( elem41_dof_indices[4], elem45_dof_indices[0] );
1178  CPPUNIT_ASSERT_EQUAL( elem41_dof_indices[5], elem45_dof_indices[1] );
1179  CPPUNIT_ASSERT_EQUAL( elem41_dof_indices[6], elem45_dof_indices[2] );
1180  CPPUNIT_ASSERT_EQUAL( elem41_dof_indices[7], elem45_dof_indices[3] );
1181 
1182  CPPUNIT_ASSERT_EQUAL( elem42_dof_indices[4], elem46_dof_indices[0] );
1183  CPPUNIT_ASSERT_EQUAL( elem42_dof_indices[5], elem46_dof_indices[1] );
1184  CPPUNIT_ASSERT_EQUAL( elem42_dof_indices[6], elem46_dof_indices[2] );
1185  CPPUNIT_ASSERT_EQUAL( elem42_dof_indices[7], elem46_dof_indices[3] );
1186 
1187  CPPUNIT_ASSERT_EQUAL( elem43_dof_indices[4], elem47_dof_indices[0] );
1188  CPPUNIT_ASSERT_EQUAL( elem43_dof_indices[5], elem47_dof_indices[1] );
1189  CPPUNIT_ASSERT_EQUAL( elem43_dof_indices[6], elem47_dof_indices[2] );
1190  CPPUNIT_ASSERT_EQUAL( elem43_dof_indices[7], elem47_dof_indices[3] );
1191 
1192  CPPUNIT_ASSERT_EQUAL( elem44_dof_indices[4], elem48_dof_indices[0] );
1193  CPPUNIT_ASSERT_EQUAL( elem44_dof_indices[5], elem48_dof_indices[1] );
1194  CPPUNIT_ASSERT_EQUAL( elem44_dof_indices[6], elem48_dof_indices[2] );
1195  CPPUNIT_ASSERT_EQUAL( elem44_dof_indices[7], elem48_dof_indices[3] );
1196 
1197  /* The dofs for the QUAD4 elements (ids = 53, 54, 55, and 56) should be the
1198  same for shared nodes. */
1199  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[1], elem54_dof_indices[0] );
1200  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[2], elem54_dof_indices[3] );
1201  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[3], elem55_dof_indices[0] );
1202  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[2], elem55_dof_indices[1] );
1203  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[2], elem56_dof_indices[0] );
1204  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[3], elem55_dof_indices[1] );
1205  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[3], elem56_dof_indices[0] );
1206  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[2], elem56_dof_indices[1] );
1207  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[1], elem56_dof_indices[0] );
1208  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[2], elem56_dof_indices[3] );
1209 
1210 
1211 #endif
1212  }

References libMesh::EquationSystems::add_system(), libMesh::DofMap::dof_indices(), libMesh::ReplicatedMesh::elem_ptr(), libMesh::FIRST, libMesh::EquationSystems::get_system(), and libMesh::EquationSystems::init().

◆ testMesh()

void MixedDimensionNonUniformRefinement3D::testMesh ( )
inline

Definition at line 967 of file mixed_dim_mesh_test.C.

968  {
969 #ifdef LIBMESH_ENABLE_AMR
970  // We should have 57 total and 54 active elements.
971  CPPUNIT_ASSERT_EQUAL( (dof_id_type)57, _mesh->n_elem() );
972  CPPUNIT_ASSERT_EQUAL( (dof_id_type)54, _mesh->n_active_elem() );
973 
974  // We should have 113 nodes
975  CPPUNIT_ASSERT_EQUAL( (dof_id_type)113, _mesh->n_nodes() );
976 
977  // QUAD4,id=53 should have same nodes as a face in HEX8, id=39
978  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(0),
979  _mesh->elem_ref(41).node_id(4) );
980  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(1),
981  _mesh->elem_ref(41).node_id(5) );
982  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(2),
983  _mesh->elem_ref(41).node_id(6) );
984  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(3),
985  _mesh->elem_ref(41).node_id(7) );
986 
987  // QUAD4,id=53 should have same nodes as a face in HEX8, id=45
988  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(0),
989  _mesh->elem_ref(45).node_id(0) );
990  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(1),
991  _mesh->elem_ref(45).node_id(1) );
992  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(2),
993  _mesh->elem_ref(45).node_id(2) );
994  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(3),
995  _mesh->elem_ref(45).node_id(3) );
996 
997  // QUAD4,id=54 should have same nodes as a face in HEX8, id=42
998  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(0),
999  _mesh->elem_ref(42).node_id(4) );
1000  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(1),
1001  _mesh->elem_ref(42).node_id(5) );
1002  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(2),
1003  _mesh->elem_ref(42).node_id(6) );
1004  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(3),
1005  _mesh->elem_ref(42).node_id(7) );
1006 
1007  // QUAD4,id=54 should have same nodes as a face in HEX8, id=46
1008  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(0),
1009  _mesh->elem_ref(46).node_id(0) );
1010  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(1),
1011  _mesh->elem_ref(46).node_id(1) );
1012  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(2),
1013  _mesh->elem_ref(46).node_id(2) );
1014  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(3),
1015  _mesh->elem_ref(46).node_id(3) );
1016 
1017  // QUAD4,id=55 should have same nodes as a face in HEX8, id=43
1018  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(0),
1019  _mesh->elem_ref(43).node_id(4) );
1020  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(1),
1021  _mesh->elem_ref(43).node_id(5) );
1022  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(2),
1023  _mesh->elem_ref(43).node_id(6) );
1024  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(3),
1025  _mesh->elem_ref(43).node_id(7) );
1026 
1027  // QUAD4,id=55 should have same nodes as a face in HEX8, id=47
1028  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(0),
1029  _mesh->elem_ref(47).node_id(0) );
1030  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(1),
1031  _mesh->elem_ref(47).node_id(1) );
1032  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(2),
1033  _mesh->elem_ref(47).node_id(2) );
1034  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(3),
1035  _mesh->elem_ref(47).node_id(3) );
1036 
1037  // QUAD4,id=56 should have same nodes as a face in HEX8, id=44
1038  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).node_id(0),
1039  _mesh->elem_ref(44).node_id(4) );
1040  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).node_id(1),
1041  _mesh->elem_ref(44).node_id(5) );
1042  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).node_id(2),
1043  _mesh->elem_ref(44).node_id(6) );
1044  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).node_id(3),
1045  _mesh->elem_ref(44).node_id(7) );
1046 
1047  // QUAD4,id=56 should have same nodes as a face in HEX8, id=48
1048  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).node_id(0),
1049  _mesh->elem_ref(48).node_id(0) );
1050  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).node_id(1),
1051  _mesh->elem_ref(48).node_id(1) );
1052  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).node_id(2),
1053  _mesh->elem_ref(48).node_id(2) );
1054  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).node_id(3),
1055  _mesh->elem_ref(48).node_id(3) );
1056 
1057  // Shared node between the QUAD4 elements should have the same global id
1058  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(1),
1059  _mesh->elem_ref(54).node_id(0) );
1060  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(2),
1061  _mesh->elem_ref(54).node_id(3) );
1062  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(3),
1063  _mesh->elem_ref(55).node_id(0) );
1064  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(2),
1065  _mesh->elem_ref(55).node_id(1) );
1066  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(3),
1067  _mesh->elem_ref(56).node_id(0) );
1068  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(2),
1069  _mesh->elem_ref(56).node_id(1) );
1070  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(1),
1071  _mesh->elem_ref(56).node_id(0) );
1072  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(2),
1073  _mesh->elem_ref(56).node_id(3) );
1074 
1075  // QUAD4 child elements should have the correct parent
1076  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).parent(),
1077  _mesh->elem_ptr(36) );
1078  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).parent(),
1079  _mesh->elem_ptr(36) );
1080  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).parent(),
1081  _mesh->elem_ptr(36) );
1082  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).parent(),
1083  _mesh->elem_ptr(36) );
1084 
1085  // QUAD4 child elements should have the correct interior_parent
1086  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).interior_parent(),
1087  _mesh->elem_ptr(41) );
1088  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).interior_parent(),
1089  _mesh->elem_ptr(42) );
1090  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).interior_parent(),
1091  _mesh->elem_ptr(43) );
1092  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).interior_parent(),
1093  _mesh->elem_ptr(44) );
1094 
1095 #endif
1096  }

References libMesh::ReplicatedMesh::elem_ptr(), libMesh::MeshBase::elem_ref(), libMesh::Elem::interior_parent(), libMesh::ReplicatedMesh::n_active_elem(), libMesh::ReplicatedMesh::n_elem(), libMesh::ReplicatedMesh::n_nodes(), libMesh::Elem::node_id(), and libMesh::Elem::parent().

Member Data Documentation

◆ _mesh

ReplicatedMesh* MixedDimensionNonUniformRefinement3D::_mesh
protected

Definition at line 889 of file mixed_dim_mesh_test.C.


The documentation for this class was generated from the following file:
libMesh::dof_id_type
uint8_t dof_id_type
Definition: id_types.h:67
libMesh::MeshRefinement::refine_and_coarsen_elements
bool refine_and_coarsen_elements()
Refines and coarsens user-requested elements.
Definition: mesh_refinement.C:476
libMesh::DofMap::dof_indices
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
Fills the vector di with the global degree of freedom indices for the element.
Definition: dof_map.C:1967
libMesh::ReplicatedMesh::node_ptr
virtual const Node * node_ptr(const dof_id_type i) const override
Definition: replicated_mesh.C:182
libMesh::MeshBase::elem_ref
virtual const Elem & elem_ref(const dof_id_type i) const
Definition: mesh_base.h:521
libMesh::ReplicatedMesh::add_elem
virtual Elem * add_elem(Elem *e) override
Add elem e to the end of the element array.
Definition: replicated_mesh.C:282
MixedDimensionNonUniformRefinement3D::_mesh
ReplicatedMesh * _mesh
Definition: mixed_dim_mesh_test.C:889
MixedDimensionNonUniformRefinement3D::build_mesh
void build_mesh()
Definition: mixed_dim_mesh_test.C:891
libMesh::ReplicatedMesh
The ReplicatedMesh class is derived from the MeshBase class, and is used to store identical copies of...
Definition: replicated_mesh.h:47
libMesh::MeshRefinement
Implements (adaptive) mesh refinement algorithms for a MeshBase.
Definition: mesh_refinement.h:61
libMesh::System::add_variable
unsigned int add_variable(const std::string &var, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
Adds the variable var to the list of variables for this system.
Definition: system.C:1069
TestCommWorld
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:111
libMesh::Point
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:38
libMesh::ReplicatedMesh::n_nodes
virtual dof_id_type n_nodes() const override
Definition: replicated_mesh.h:104
libMesh::Quad4
The QUAD4 is an element in 2D composed of 4 nodes.
Definition: face_quad4.h:51
libMesh::EquationSystems
This is the EquationSystems class.
Definition: equation_systems.h:74
libMesh::Elem::set_node
virtual Node *& set_node(const unsigned int i)
Definition: elem.h:2059
libMesh::Elem::parent
const Elem * parent() const
Definition: elem.h:2434
libMesh::Elem::interior_parent
const Elem * interior_parent() const
Definition: elem.C:749
libMesh::ReplicatedMesh::n_elem
virtual dof_id_type n_elem() const override
Definition: replicated_mesh.h:116
libMesh::Hex8
The Hex8 is an element in 3D composed of 8 nodes.
Definition: cell_hex8.h:53
libMesh::DofMap
This class handles the numbering of degrees of freedom on a mesh.
Definition: dof_map.h:176
libMesh::Elem::subdomain_id
subdomain_id_type subdomain_id() const
Definition: elem.h:2069
libMesh::ReplicatedMesh::elem_ptr
virtual const Elem * elem_ptr(const dof_id_type i) const override
Definition: replicated_mesh.C:232
libMesh::Elem
This is the base class from which all geometric element types are derived.
Definition: elem.h:100
libMesh::Elem::set_refinement_flag
void set_refinement_flag(const RefinementState rflag)
Sets the value of the refinement flag for the element.
Definition: elem.h:2622
libMesh::Elem::node_id
dof_id_type node_id(const unsigned int i) const
Definition: elem.h:1977
libMesh::Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Definition: libmesh_common.h:121
libMesh::MeshBase::prepare_for_use
void prepare_for_use(const bool skip_renumber_nodes_and_elements=false, const bool skip_find_neighbors=false)
Prepare a newly ecreated (or read) mesh for use.
Definition: mesh_base.C:318
libMesh::LinearImplicitSystem
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and linear solvers ...
Definition: linear_implicit_system.h:55
libMesh::MeshBase::set_mesh_dimension
void set_mesh_dimension(unsigned char d)
Resets the logical dimension of the mesh.
Definition: mesh_base.h:218
libMesh::FIRST
Definition: enum_order.h:42
libMesh::ReplicatedMesh::add_point
virtual Node * add_point(const Point &p, const dof_id_type id=DofObject::invalid_id, const processor_id_type proc_id=DofObject::invalid_processor_id) override
functions for adding /deleting nodes elements.
Definition: replicated_mesh.C:417
libMesh::ReplicatedMesh::n_active_elem
virtual dof_id_type n_active_elem() const override
Definition: replicated_mesh.C:1424