I am solving an elasticity problem wherein I have a pin support at one vertex. Earlier, I was using std::map object to apply BCs. Now, I am trying to solve the same problem using an affine constraint object to apply BCs. But, I am facing issues filling my affine constraint object with the information corresponding to the vertex with pin support.
I was doing the following for my std::map boundary_values object:
for (const auto &cell : dof_handler.active_cell_iterators())
{
for (const auto &face : cell->face_iterators())
for (const auto vertex_number : cell->vertex_indices())
{
const auto vert = cell->vertex(vertex_number);
if (vertices satisfy the condition)
{
types::global_dof_index x=
cell->vertex_dof_index(vertex_number, 0);
boundary_values[x] = 0;
types::global_dof_index y=
cell->vertex_dof_index(vertex_number, 1);
boundary_values[y] = 0;
}
}
}
What changes should I do to fill my constraint object with the same information?
Thanks and regards
Wasim Niyaz