hi all,

I am solving some equations on a moving domain which essentially compacts. 
I am using something similar to that in step-18 to move my mesh around. So 
i have something like
pcout << " Moving mesh..." << std::endl;
std::vector<bool> vertex_touched (triangulation.n_vertices 
<https://www.dealii.org/8.5.0/doxygen/deal.II/classTriangulation.html#ad49cc6eadbda275e0c2ef0155469d656>
(),
false);
for (typename DoFHandler<dim>::active_cell_iterator 
<https://www.dealii.org/8.5.0/doxygen/deal.II/classDoFHandler.html>
cell = dof_handler.begin_active 
<https://www.dealii.org/8.5.0/doxygen/deal.II/classDoFHandler.html#ad2df51a32781906218910731e063ac62>
 
();
cell != dof_handler.end 
<https://www.dealii.org/8.5.0/doxygen/deal.II/classDoFHandler.html#a05c70e1862a2ad145f91f9da1f44cc28>();
 
++cell)
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> <https://www.dealii.org/8.5.0/doxygen/deal.II/classPoint.html> 
vertex_displacement;
for (unsigned int d=0; d<dim; ++d)
vertex_displacement[d]
= solution.block(0)(cell->vertex_dof_index(v,d));
cell->vertex(v) += vertex_displacement*timestep_size;
}

However, I realised that this moves each vertex by the velocity at that 
point, but I need, for example, a vertex on the top boundary to have moved 
as much as the ones below it has moved as well as the velocity at the 
points itself. 

In my problem, the velocity is negative and monotonic, so the bottom should 
have moved by the point velocity times the timestep, but the one above 
should have moved by however much the bottom one moved plus its own. This i 
believe is not what I am doing with the code above, but I am not sure how 
to single the vertices in each vertical layer out so that I get the right 
movement. Any suggestions would be very helpful!

I hope this makes sense.

Many thanks in advance.

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

Reply via email to