i use The move mesh function, the code is as follows, just like in step-42
    template < int dim >
    void example<dim>::move_mesh(const TrilinosWrappers::MPI::Vector 
&state_change) const
    {
      pcout<<"moving the mesh ..." <<std::endl;
      std::vector<bool> vertex_touched(triangulation.n_vertices(), false);

      for (typename DoFHandler<dim>::active_cell_iterator cell 
=dof_handler.begin_active();cell != dof_handler.end(); ++cell)
        if (cell->is_locally_owned())                                      
                 
          for (unsigned int v = 0; v < 
GeometryInfo<dim>::vertices_per_cell; ++v)         
            {
              if(vertex_touched[cell->vertex_index(v)] == false)
              {
                vertex_touched[cell->vertex_index(v)] = true;

                Point<dim> vertex_displacement;
                for (unsigned int d = 0; d < dim; ++d)                      
           
                  vertex_displacement[d] = 
state_change(cell->vertex_dof_index(v, d));
                cell->vertex(v) += vertex_displacement;
              }
            }
    }

before i use this function ,i use the constraints matrix to distribute the 
vector like this
TrilinosWrappers::MPI::BlockVector move_vector(system_state);
move_vector = system_state;
all_constraints.distribute(move_vector);        
move_mesh(move_vector.block(0));

but the final result still have a departure on the hanging point as follows

[image: example.png]

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/8b59e069-3051-47f1-90ec-90e8b4133fef%40googlegroups.com.

Reply via email to