On Tue, 4 Dec 2018, Yuxiang Wang wrote:
> When I use `MeshTools::Generation::build_square`, I obtain a mesh with: > enum BOUNDARY_ID { > BOUNDARY_ID_MIN_Y = 0, > BOUNDARY_ID_MAX_X = 1, > BOUNDARY_ID_MAX_Y = 2, > BOUNDARY_ID_MIN_X = 3, > }; > > However, I noticed that > > MeshBase::const_node_iterator nodeit = > mesh.bid_nodes_begin(BOUNDARY_ID_MAX_X); > const MeshBase::const_node_iterator node_end = > mesh.bid_nodes_end(BOUNDARY_ID_MAX_X); > > does not work for such IDs. Yes, that's correct. build_square sets boundary ids on *sides*, but not on nodes. > Could you please help me in how to iterate through all the nodes? You could first use BoundaryInfo::build_node_list_from_side_list() to assign side boundary ids to the nodes on that side. Corner nodes will be assigned 2 boundary ids. --- Roy _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users