stk::mesh::EntityId SideIdPool::get_available_id() { ThrowRequireWithSierraHelpMsg(mNumIdsUsed < mSuggestedIds.size()); stk::mesh::EntityId availId = *(mSuggestedIds.begin() + mNumIdsUsed); mNumIdsUsed++; return availId; }
stk::mesh::Entity create_side_and_add_to_shared_entity_list(stk::mesh::Entity element, stk::mesh::EntityRank side_rank, const stk::mesh::EntityVector& nodes, const stk::mesh::shared_entity_type &shared_entity_other_proc, stk::mesh::BulkData& bulkData, std::vector<stk::mesh::shared_entity_type>& shared_entities_this_proc, int other_proc_id, stk::mesh::Part& root_topo_part) { stk::mesh::Entity side = stk::unit_test_util::declare_element_to_sub_topology_with_nodes(bulkData, element, nodes, shared_entity_other_proc.global_key.id(), side_rank, root_topo_part); ThrowRequireWithSierraHelpMsg(bulkData.is_valid(side)); add_side_to_shared_entities(side, shared_entities_this_proc, shared_entity_other_proc, other_proc_id); return side; }
stk::mesh::GraphEdge unpack_edge(stk::CommSparse& comm, const stk::mesh::BulkData& bulkData, const ElemElemGraph& graph, int proc_id) { stk::mesh::EntityId id1 = 0, id2 = 0; unsigned side1 = 0, side2 = 0; comm.recv_buffer(proc_id).unpack<stk::mesh::EntityId>(id1); comm.recv_buffer(proc_id).unpack<unsigned>(side1); comm.recv_buffer(proc_id).unpack<stk::mesh::EntityId>(id2); comm.recv_buffer(proc_id).unpack<unsigned>(side2); stk::mesh::Entity element = bulkData.get_entity(stk::topology::ELEM_RANK, id2); ThrowRequireWithSierraHelpMsg(bulkData.is_valid(element)); stk::mesh::impl::LocalId localId2 = graph.get_local_element_id(element); stk::mesh::GraphEdge edge(localId2, side2, -id1, side1); return edge; }
void set_sideset_face_creation_behavior(SideSetFaceCreationBehavior behavior) { ThrowRequireWithSierraHelpMsg(behavior!=STK_IO_SIDE_CREATION_USING_GRAPH_TEST); m_sideset_face_creation_behavior = behavior; }