24 const auto &mesh = state.
mesh;
26 std::set<int> node_ids;
27 for (
int e = 0; e < mesh->n_elements(); e++)
29 const int body_id = mesh->get_body_id(e);
30 if (volume_selection.size() == 0 || std::find(volume_selection.begin(), volume_selection.end(), body_id) != volume_selection.end())
32 for (
int i = 0; i < mesh->dimension() + 1; i++)
34 const int vid = mesh->element_vertex(e, i);
35 if (!mesh->is_boundary_vertex(vid))
46 const auto &mesh = state.
mesh;
47 const auto &bases = state.
bases;
50 std::set<int> node_ids;
53 const int e = lb.element_id();
54 for (
int i = 0; i < lb.size(); ++i)
56 const int primitive_global_id = lb.global_primitive_id(i);
57 const int boundary_id = mesh->get_boundary_id(primitive_global_id);
59 if (surface_selection.size() == 0 || std::find(surface_selection.begin(), surface_selection.end(), boundary_id) != surface_selection.end())
60 for (
long n = 0; n < mesh->dimension(); ++n)
61 node_ids.insert(mesh->boundary_element_vertex(primitive_global_id, n));
70 const auto &mesh = state.
mesh;
71 const auto &bases = state.
bases;
74 if (!mesh->is_simplicial())
77 std::set<int> excluded_node_ids;
78 std::set<int> all_node_ids;
81 const int e = lb.element_id();
82 for (
int i = 0; i < lb.size(); ++i)
84 const int primitive_global_id = lb.global_primitive_id(i);
85 const int boundary_id = mesh->get_boundary_id(primitive_global_id);
87 if (std::count(exclude_surface_selections.begin(), exclude_surface_selections.end(), boundary_id))
88 for (
long n = 0; n < mesh->dimension(); ++n)
89 excluded_node_ids.insert(mesh->boundary_element_vertex(primitive_global_id, n));
90 for (
long n = 0; n < mesh->dimension(); ++n)
91 all_node_ids.insert(mesh->boundary_element_vertex(primitive_global_id, n));
95 std::vector<int> node_ids;
96 std::set_difference(all_node_ids.begin(), all_node_ids.end(), excluded_node_ids.begin(), excluded_node_ids.end(), std::back_inserter(node_ids));