- # Mapping from global to local dofs.
- dof_glob2loc::Vector{IT}
- end
- function _make_list_of_entity_lists(fens, fes, Np, No, dofnums, fr, node_to_partition = Int[])
- timers = set_up_timers("partition", "helper_lists", "list_of_entity_lists",)
- IT = eltype(fes.conn[1])
- if isempty(node_to_partition)
- t_ = time()
- femm = FEMMBase(IntegDomain(fes, PointRule()))
- C = connectionmatrix(femm, count(fens))
- g = Metis.graph(C; check_hermitian=true)
- node_to_partition = Metis.partition(g, Np; alg=:KWAY) # introduces randomness
- update_timer!(timers, "partition", time() - t_)
- end
- Np = maximum(node_to_partition)
- t_ = time()
- n2e = FENodeToFEMap(fes, count(fens))
- node_lists = _construct_node_lists(fens, fes, n2e, No, Np, node_to_partition)
- element_lists, element_to_partition = _construct_element_lists(fens, fes, n2e, node_lists, node_to_partition)
- own_comm = _construct_communication_lists_own(node_lists, n2e, fes, node_to_partition, element_to_partition)