MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / ElementDofLayout

Method ElementDofLayout

cpp/dolfinx/fem/ElementDofLayout.cpp:19–40  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

17
18//-----------------------------------------------------------------------------
19ElementDofLayout::ElementDofLayout(
20 int block_size,
21 const std::vector<std::vector<std::vector<int>>>& entity_dofs,
22 const std::vector<std::vector<std::vector<int>>>& entity_closure_dofs,
23 const std::vector<int>& parent_map,
24 const std::vector<ElementDofLayout>& sub_layouts)
25 : _block_size(block_size), _parent_map(parent_map), _num_dofs(0),
26 _entity_dofs(entity_dofs), _entity_closure_dofs(entity_closure_dofs),
27 _sub_dofmaps(sub_layouts)
28{
29 // TODO: Handle global support dofs
30
31 assert(entity_dofs.size() == _entity_closure_dofs.size());
32 for (std::size_t dim = 0; dim < entity_dofs.size(); ++dim)
33 {
34 assert(!entity_dofs[dim].empty());
35 assert(!_entity_closure_dofs[dim].empty());
36 _num_dofs = std::accumulate(entity_dofs[dim].begin(),
37 entity_dofs[dim].end(), _num_dofs,
38 [](auto a, auto& b) { return a + b.size(); });
39 }
40}
41//-----------------------------------------------------------------------------
42ElementDofLayout ElementDofLayout::copy() const
43{

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected