23 #ifndef __DOF_MAP_BUILDER_H 24 #define __DOF_MAP_BUILDER_H 29 #include <unordered_map> 61 static void build(
DofMap& dofmap,
const Mesh& dolfin_mesh,
62 std::shared_ptr<const SubDomain> constrained_domain);
70 static void build_sub_map_view(
DofMap& sub_dofmap,
71 const DofMap& parent_dofmap,
72 const std::vector<std::size_t>& component,
79 static std::size_t build_constrained_vertex_indices(
81 const std::map<
unsigned int, std::pair<
unsigned int,
82 unsigned int>>& slave_to_master_vertices,
83 std::vector<std::int64_t>& modified_vertex_indices_global);
88 build_local_ufc_dofmap(std::vector<std::vector<dolfin::la_index>>& dofmap,
89 const ufc::dofmap& ufc_dofmap,
103 static int compute_node_ownership(
104 std::vector<short int>& node_ownership,
105 std::unordered_map<
int, std::vector<int>>& shared_node_to_processes,
106 std::set<int>& neighbours,
107 const std::vector<std::vector<la_index>>& node_dofmap,
108 const std::vector<int>& boundary_nodes,
109 const std::set<std::size_t>& global_nodes,
110 const std::vector<std::size_t>& node_local_to_global,
112 const std::size_t global_dim);
116 build_dofmap(std::vector<std::vector<la_index>>& dofmap,
117 const std::vector<std::vector<la_index>>& node_dofmap,
118 const std::vector<int>& old_to_new_node_local,
119 const std::size_t block_size);
125 static std::set<std::size_t>
126 compute_global_dofs(std::shared_ptr<const ufc::dofmap> ufc_dofmap,
127 const std::vector<std::size_t>& num_mesh_entities_local);
132 compute_global_dofs(std::set<std::size_t>& global_dofs,
133 std::size_t& offset_local,
134 std::shared_ptr<const ufc::dofmap> ufc_dofmap,
135 const std::vector<std::size_t>& num_mesh_entities_local);
138 static std::shared_ptr<ufc::dofmap> extract_ufc_sub_dofmap(
139 const ufc::dofmap& ufc_dofmap,
141 const std::vector<std::size_t>& component,
142 const std::vector<std::size_t>& num_global_mesh_entities);
145 static std::size_t compute_blocksize(
const ufc::dofmap& ufc_dofmap);
147 static void compute_constrained_mesh_indices(
148 std::vector<std::vector<std::int64_t>>& global_entity_indices,
149 std::vector<std::size_t>& num_mesh_entities_global,
150 const std::vector<bool>& needs_mesh_entities,
154 static std::shared_ptr<const ufc::dofmap>
155 build_ufc_node_graph(
156 std::vector<std::vector<la_index>>& node_dofmap,
157 std::vector<std::size_t>& node_local_to_global,
158 std::vector<std::size_t>& num_mesh_entities_global,
159 std::shared_ptr<const ufc::dofmap> ufc_dofmap,
161 std::shared_ptr<const SubDomain> constrained_domain,
162 const std::size_t block_size);
164 static std::shared_ptr<const ufc::dofmap>
165 build_ufc_node_graph_constrained(
166 std::vector<std::vector<la_index>>& node_dofmap,
167 std::vector<std::size_t>& node_local_to_global,
168 std::vector<int>& node_ufc_local_to_local,
169 std::vector<std::size_t>& num_mesh_entities_global,
170 std::shared_ptr<const ufc::dofmap> ufc_dofmap,
172 std::shared_ptr<const SubDomain> constrained_domain,
173 const std::size_t block_size);
180 static void compute_shared_nodes(
181 std::vector<int>& boundary_nodes,
182 const std::vector<std::vector<la_index>>& node_dofmap,
183 const std::size_t num_nodes_local,
184 const ufc::dofmap& ufc_dofmap,
187 static void compute_node_reordering(
189 std::vector<int>& old_to_new_local,
190 const std::unordered_map<
int, std::vector<int>>& node_to_sharing_processes,
191 const std::vector<std::size_t>& old_local_to_global,
192 const std::vector<std::vector<la_index>>& node_dofmap,
193 const std::vector<short int>& node_ownership,
194 const std::set<std::size_t>& global_nodes,
195 const MPI_Comm mpi_comm);
197 static void get_cell_entities_local(
const Cell& cell,
198 std::vector<std::vector<std::size_t>>& entity_indices,
199 const std::vector<bool>& needs_mesh_entities);
201 static void get_cell_entities_global(
const Cell& cell,
202 std::vector<std::vector<std::size_t>>& entity_indices,
203 const std::vector<bool>& needs_mesh_entities);
205 static void get_cell_entities_global_constrained(
const Cell& cell,
206 std::vector<std::vector<std::size_t>>& entity_indices,
207 const std::vector<std::vector<std::int64_t>>& global_entity_indices,
208 const std::vector<bool>& needs_mesh_entities);
212 static std::vector<std::size_t> compute_num_mesh_entities_local(
213 const Mesh& mesh,
const std::vector<bool>& needs_mesh_entities);
Definition: SubDomain.h:42
Definition: IndexMap.h:35
Definition: Extrapolation.h:34
A Cell is a MeshEntity of topological codimension 0.
Definition: Cell.h:42
Degree-of-freedom map.
Definition: DofMap.h:54
Builds a DofMap on a Mesh.
Definition: DofMapBuilder.h:50