Good afternoon, everyone! I have a couple of follow-up questions. (1) Is there an internal command/function that outputs higher-order-elemental (Q2, Q3 elements) nodal physical coordinate? Just like, "cell->vertex" outputs grid points that works for Q1 element. If I want to count in a linear function f(x) = x on Laplace's right-hand-side, should I just manually make an expression, to interpolate mid-nodes, as well as other fractional-nodes @ 1/3 and 2/3 of each cell "he", to construct “x”?
(2) In the nonlinear problem, are nodal physical coordinates updated thru finite element program, like, including "phi_i * x_i" or “grad_phi_i * x_i” for any i of each cell? Thank you very much! Best, Judy On Tuesday, December 7, 2021 at 1:44:38 PM UTC-5 Matthias Maier wrote: > Dear Judy, > > On Tue, Dec 7, 2021, at 11:45 CST, Judy Lee <reader....@gmail.com> wrote: > > > cell_x(i) += fe_values.shape_value(i, q_index) * x(i); > > Here, you are multiplying a scalar (fe_values.shape_value(i, q_index)) > and a rank-1 tensor (x(i)), which results in a rank-1 tensor. > > The error message says that you cannot store this rank-1 tensor in > cell_x(i), which is a scalar (vector<double>). > > I don't know whether this is what you want to do, but in 1D you can > simply take the first value of your rank-1 tensor to transform the > expression into a scalar: > > cell_x(i) += fe_values.shape_value(i, q_index) * x(i)[0]; > > However, this is not a good "dimension independent" approach, meaning > the moment you try to solve in 2D or 3D you will have to modify your > code. > > Best, > Matthias > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/fd77927b-1e26-4316-83d2-29839f84cb2en%40googlegroups.com.