39 {
41
43 5, 5, 5,
44 0., 1.,
45 0., 1.,
46 0., 1.,
48
49
50
52
53 std::vector<BoundaryInfo::BCTuple> bc_tuples =
55
56 for (const auto & t : bc_tuples)
57 {
60
61
62
63
64 if (b_id == 0)
65 for (unsigned short edge=0; edge<4; ++edge)
67
68 if (b_id == 5)
69 for (unsigned short edge=8; edge<12; ++edge)
71 }
72
73
76
77
78 {
80 writer.write(filename);
81 }
82
83
85
86
88 IOClass reader(read_mesh);
89 reader.read(filename);
90
91
93 CPPUNIT_ASSERT(read_bi.
edgeset_name(0) ==
"back_edgeset");
94 CPPUNIT_ASSERT(read_bi.
edgeset_name(5) ==
"front_edgeset");
97
98
99 std::map<boundary_id_type, unsigned int> counts;
101 for (const auto & t : edge_tuples)
103 CPPUNIT_ASSERT(counts[0] == 100);
104 CPPUNIT_ASSERT(counts[5] == 100);
105 }
The BoundaryInfo class contains information relevant to boundary conditions including storing faces,...
void add_edge(const dof_id_type elem, const unsigned short int edge, const boundary_id_type id)
Add edge edge of element number elem with boundary id id to the boundary information data structure.
std::vector< BCTuple > build_side_list(BCTupleSortBy sort_by=BCTupleSortBy::ELEM_ID) const
std::size_t n_edge_conds() const
const std::set< boundary_id_type > & get_edge_boundary_ids() const
std::string & edgeset_name(boundary_id_type id)
std::vector< BCTuple > build_edge_list() const
Create a list of (element_id, edge_id, boundary_id) tuples for all relevant edges.
const BoundaryInfo & get_boundary_info() const
The information about boundary ids on the mesh.
The ReplicatedMesh class is derived from the MeshBase class, and is used to store identical copies of...
Communicator * TestCommWorld
const Elem & get(const ElemType type_in)