Re: [deal.II] modify solution vector

2016-09-02 Thread Wolfgang Bangerth

On 09/02/2016 06:07 AM, Bryukhanov Ilya wrote:


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?


It sounds like you have a solution u_h(x) and you want to add to it a function 
v_h(x) that you know at each vertex location, i.e., it *interpolates* a 
continuous function v(x) that you know.


If put this way, I would suggest you call
  VectorTools::interpolate
on v(x) to get the nodal values V of v_h(x), and then add V to your solution 
vector U.


I think that ought to be easier than what you suggest (though internally it 
does exactly that).


Best
 W.

--

Wolfgang Bangerth  email: bange...@colostate.edu
   www: http://www.math.colostate.edu/~bangerth/

--
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.


[deal.II] modify solution vector

2016-09-02 Thread Bryukhanov Ilya
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.