Hi Ilya, You should have a look at some of the previous discussions on the use of the cell->vertex_dof_index <https://groups.google.com/forum/#!searchin/dealii/vertex_dof_index%7Csort:relevance> function; this provides an easy link between vertices and degrees of freedom.
In summary, and assuming that you have just a displacement field, then for each cell you would probably need to do something like this: for (int v=0; v<GeometryInfo<dim>::vertices_per_cell; ++v) if (vertex_touched(cell->vertex_index(v)) == false) { const Point<dim> vertex_displacement = function.get_value(cell->vertex(v)); for (unsigned int d=0; d<dim; ++d) solution(cell->vertex_dof_index(v,d)) += vertex_displacement[d]; vertex_touched(cell->vertex_index(v)); } Here, vertex_touched refers to some global vector that records if you've updated the solution vector for a specific vertex (see step-18 <https://www.dealii.org/8.4.1/doxygen/deal.II/step_18.html>). Regards, J-P On Friday, September 2, 2016 at 2:07:23 PM UTC+2, Bryukhanov Ilya wrote: > > Hi, > > I want to change the solution vector (for example displacement vector from > step-8 and step-18) by the vector > that depends on the point. I want to iterate over all vertexes and add to > each solution component some value > that is a function of the vertex coordinate. > How can I do it in dealii? > > Best, > Ilya > > -- 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.