{
IndexSet selected_dofs_z;
std::set<types::boundary_id> boundary_ids_z = std::set<types::boundary_id>();
boundary_ids_x.insert(4);
DoFTools::extract_boundary_dofs(dof_handler, fe.component_mask(z_displacement),
selected_dofs_z, boundary_ids_z);
unsigned int nb_dofs_face_z = selected_dofs_z.n_elements();
IndexSet::ElementIterator dofs_z = selected_dofs_z.begin();
double relative_displacement_z = 1e-5;
for(unsigned int i = 0; i < nb_dofs_face_z; i++)
{
constraints.add_line(*dofs_z);
constraints.set_inhomogeneity(*dofs_z, relative_displacement_z));
dofs_z++;
}
}
When I do this on single 8 noded element, I get the constraints as -
2 = 0.001
3 0: 1
4 1: 1
5 = 0.002
6 0: 1
7 1: 1
8 = 0.002
9 0: 1
10 1: 1
11 = 0.003
12 0: 1
13 1: 1
14 = 0.001
15 0: 1
16 1: 1
17 = 0.001
18 0: 1
19 1: 1
20 = 0.001
21 0: 1
22 1: 1
23 = 0.001
When I should be getting -
2 = 0.001
3 0: 1
4 1: 1
5 = 0.001
6 0: 1
7 1: 1
8 = 0.001
9 0: 1
10 1: 1
11 = 0.001
12 0: 1
13 1: 1
14 = 0.001
15 0: 1
16 1: 1
17 = 0.001
18 0: 1
19 1: 1
20 = 0.001
21 0: 1
22 1: 1
23 = 0.001
Is there a mistake in how I am using set_inhomogeneity?
Thanks in advance,
Raghunandan.