thanks a lot 在 2019年9月26日星期四 UTC+8下午10:16:42,Bruno Turcksin写道: > > Hi, > > Take a look at > https://github.com/dealii/dealii/wiki/Frequently-Asked-Questions#in-my-graphical-output-the-solution-appears-discontinuous-at-hanging-nodes > > Best, > > Bruno > > On Thursday, September 26, 2019 at 10:09:16 AM UTC-4, huyanzhuo wrote: >> >> 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/daf1c03d-eb89-4eb5-b15a-fba0da7a6a4e%40googlegroups.com.
