Dear Wolfgang, Thank you very much!
>> So, my questions are: >> 1.If I need to get >> >> 4.JPG >> >> >>in every time step, which means that phi_x and phi_y are updated in >> every time step, and the information of phi_x and phi_y are calculated >> from "phi" by using function: "get_function_gradients". >> >> And I don't know the exact value of phi and grad_phi in every time step. >> So how can I remove oscillations? > I don't understand this. If you don't know what grad phi is, how do you > want to compute atan2(phi_y,phi_x) and from that F? If you don't know > what phi is, you also can't compute grad phi via a finite different > approximation. > It doesn't matter whether you compute the gradient exactly or via a FDM > approximation *conceptually*, but it will almost certainly be *more > accurate* to use the exact derivative with get_function_gradients(). I want to describe what do I need the gradient for: https://groups.google.com/forum/#!topic/dealii/YSzg4k47T00 As you can see, I want to update \phi in every time step, then use "get_function_gradients()" to get grad_phi in every time step. But my problem is: In 0th time step, I have exact original phi function, then project it onto the C0 finite element space and get the degree of freedom vector: phi_0. Then I use "get_function_gradients()" to get grad_phi, but the result is not so good as above, unless use FDM to approximate grad_phi. For these experiences in 0th time step, I guess that maybe I need to do something like this in every time step. I get that "get_function_gradients()" is more accurate, but it can't deal with some oscillations I think. As a result, I want to use FDM to approximate grad_phi in every time step. So I need the exact real coordinates of grid nodes (like exact (x,y), not only the number of the cell and the number which point of quadrature_point), then get the real coordinates of adjacent nodes, and get the values of phi_up, phi_down, phi_left, phi_right. Now I use cell_matrix(i,j) += (fe_values.shape_value (i, q_index) * fe_values.shape_value (j, q_index) * fe_values.JxW (q_index)); to describe every point I can get their value, how can I get the exact real coordinates of thses points (Gauss points) or grid nodes? Which function can return the exact real coordinates? Thank you very much! Best, Chucui -- 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.
