9#include <kernel/adjacency/graph.hpp>
32 template<
typename Space_>
36 const Index num_cells(space.get_mesh().get_num_entities(Space_::shape_dim));
37 const Index num_dofs(space.get_num_dofs());
40 std::vector<Index> dom_ptr(num_cells+1u);
41 dom_ptr[0u] =
Index(0);
44 FEAT_PRAGMA_OMP(parallel)
46 typename Space_::DofMappingType dof_map(space);
49 for(
Index i = 0; i < num_cells; ++i)
52 dom_ptr[i+1u] =
Index(dof_map.get_num_local_dofs());
59 typename Space_::DofMappingType dof_map(space);
60 for(
Index i = 0; i < num_cells; ++i)
63 dom_ptr[i+1u] = dom_ptr[i] +
Index(dof_map.get_num_local_dofs());
70 std::vector<Index> img_idx(dom_ptr[num_cells]);
72 FEAT_PRAGMA_OMP(parallel)
74 typename Space_::DofMappingType dof_map(space);
77 for(
Index i = 0; i < num_cells; ++i)
81 for(
int j(0); j < dof_map.get_num_local_dofs(); ++j, ++l)
83 img_idx[l] = dof_map.get_index(j);
Adjacency Graph implementation.
Dof-Mapping renderer class.
static Adjacency::Graph render(const Space_ &space)
Renders the dof-mapping of a space into an adjacency graph.
void feat_omp_in_scan(std::size_t n, const T_ x[], T_ y[])
Computes an OpenMP-parallel inclusive scan a.k.a. a prefix sum of an array, i.e.
std::uint64_t Index
Index data type.