Hello all,

I am using parallel::distributed::triangulation, P4est, and Petsc to solve 
a 3D solid mechanics problem using deal.ii

I am moving my mesh after every time step using the below written code. I 
have 2 questions regarding this.

template <int dim> 
void 
PlasticityContactProblem<dim>:: 
move_mesh (const TrilinosWrappers::MPI::Vector 
<http://dealii.org/8.4.0/doxygen/deal.II/classTrilinosWrappers_1_1MPI_1_1Vector.html>
 
&displacement) const 
{ 
 std::vector<bool> vertex_touched(triangulation.n_vertices(), false); 
 for (typename DoFHandler<dim>::active_cell_iterator 
<http://dealii.org/8.4.0/doxygen/deal.II/classDoFHandler.html> cell = 
 dof_handler.begin_active 
<http://dealii.org/8.4.0/doxygen/deal.II/classDoFHandler.html#ad2df51a32781906218910731e063ac62>
(); 
 cell != dof_handler.end 
<http://dealii.org/8.4.0/doxygen/deal.II/classDoFHandler.html#a05c70e1862a2ad145f91f9da1f44cc28>
(); ++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> <http://dealii.org/8.4.0/doxygen/deal.II/classPoint.html> 
vertex_displacement; 
 for (unsigned int d = 0; d < dim; ++d) 
 vertex_displacement[d] = displacement(cell->vertex_dof_index(v, d)); 
 cell->vertex(v) += vertex_displacement; 
 } 
}
 

Deal.ii keeps a full copy of the coarse mesh on each processor.


1. After the p:d:triangulation is created and 
triangulation.global_refine(2) is used, the locally owned cells on each 
mesh will divide in 2^dim elements each but does that also mean that the 
ghost cells or artificial cells on each processor also gets  refined ?

2. To move the ghost cells on the domain as well, is it just sufficient to 
> replace the* if condition* above  with


if (cell->is_locally_owned())  => if (cell->is_ghost())   ?

and the displacement is a ghosted vector.






-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to