Definition at line 17 of file write_edgeset_data.C.
◆ CPPUNIT_TEST()
◆ CPPUNIT_TEST_SUITE()
This test ensures you can write both vector and scalar variables.
◆ CPPUNIT_TEST_SUITE_END()
WriteEdgesetData::CPPUNIT_TEST_SUITE_END |
( |
| ) |
|
◆ testWrite()
void WriteEdgesetData::testWrite |
( |
| ) |
|
|
inline |
Definition at line 31 of file write_edgeset_data.C.
46 std::vector<BoundaryInfo::BCTuple> bc_tuples =
49 for (
const auto & t : bc_tuples)
58 for (
unsigned short edge=0; edge<4; ++edge)
62 for (
unsigned short edge=8; edge<12; ++edge)
70 #ifdef LIBMESH_HAVE_EXODUS_API
75 writer.write(
"write_edgeset_data.e");
84 reader.read(
"write_edgeset_data.e");
88 CPPUNIT_ASSERT(read_bi.
edgeset_name(0) ==
"back_edgeset");
89 CPPUNIT_ASSERT(read_bi.
edgeset_name(5) ==
"front_edgeset");
94 std::map<boundary_id_type, unsigned int> counts;
96 for (
const auto & t : edge_tuples)
97 counts[std::get<2>(t)]++;
98 CPPUNIT_ASSERT(counts[0] == 100);
99 CPPUNIT_ASSERT(counts[5] == 100);
101 #endif // #ifdef LIBMESH_HAVE_EXODUS_API
References libMesh::BoundaryInfo::add_edge(), libMesh::MeshTools::Generation::build_cube(), libMesh::BoundaryInfo::build_edge_list(), libMesh::BoundaryInfo::build_side_list(), libMesh::BoundaryInfo::edgeset_name(), libMesh::MeshBase::get_boundary_info(), libMesh::BoundaryInfo::get_edge_boundary_ids(), libMesh::HEX8, mesh, libMesh::BoundaryInfo::n_edge_conds(), libMesh::ExodusII_IO::read(), TestCommWorld, and libMesh::ExodusII_IO::write().
The documentation for this class was generated from the following file:
The BoundaryInfo class contains information relevant to boundary conditions including storing faces,...
const BoundaryInfo & get_boundary_info() const
The information about boundary ids on the mesh.
std::size_t n_edge_conds() const
The ExodusII_IO class implements reading meshes in the ExodusII file format from Sandia National Labs...
std::string & edgeset_name(boundary_id_type id)
void build_side_list(std::vector< dof_id_type > &element_id_list, std::vector< unsigned short int > &side_list, std::vector< boundary_id_type > &bc_id_list) const
Creates a list of element numbers, sides, and ids for those sides.
The ReplicatedMesh class is derived from the MeshBase class, and is used to store identical copies of...
void build_edge_list(std::vector< dof_id_type > &element_id_list, std::vector< unsigned short int > &edge_list, std::vector< boundary_id_type > &bc_id_list) const
Creates a list of element numbers, edges, and boundary ids for those edges.
libMesh::Parallel::Communicator * TestCommWorld
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.
const std::set< boundary_id_type > & get_edge_boundary_ids() const