Hello All,

I was trying to displace one vertex by a small value. Here is what I 
thought will work:

dealii::Point<dim> target_point(0,0,0);
double delta = 0.00001;
unsigned int component_num = 0
      unsigned int vertices_per_cell=GeometryInfo<dim>::vertices_per_cell;
      
      // Loop over each locally owned cell
      typename DoFHandler<dim>::active_cell_iterator cell = 
dof_handler.begin_active(), 
                                                     endc = 
dof_handler.end();
      for (; cell!=endc; ++cell)
        if (cell->is_locally_owned())
          for (unsigned int i=0; i<vertices_per_cell; ++i)
          // Check if the vertex is the target vertex
            if (target_point.distance (cell->vertex(i)) < 1e-2 * 
cell->diameter())
              {
                unsigned int nodeID=cell->vertex_dof_index(i,component_num);
                constraints.add_line(nodeID);
                constraints.add_entry(nodeID,component_num,delta);
               }  

Is this the right approach? Thanks for any feedback.

Regards,
Rahul

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/ae68eb86-8512-430e-b17a-feed87c1a52en%40googlegroups.com.

Reply via email to