> I asked myself why the constructor of FE_Q wants a quadrature object whos first and last qp is at zero and one, respectively?
Because it is a continuous element and dofs at 0 and 1 are assigned to shared entities (vertices, lines, quads). Peter On Monday, 16 August 2021 at 22:03:44 UTC+2 Simon wrote: > "You've already found this: Both the FE_Q and FE_DGQArbitraryNodes classes > have > constructors that create shape functions based on this information." > > The latter is the element I was looking for. The problem with the > former is that the first and last quadrature point has to be located at > zero and one, respectively - a condition which is not satisfied in my case. > That said, FE_DGQArbitraryNodes is the right element for me, because I do > not use this element to produce a global (dis)continuous field but only do > a local approximation on each cell individually. In particular, I do not > need to create a DoFHandler for this element or do calls like > constraints.distribute_local_to_global(). > > Although FE_DGQArbitraryNodes works fine for me, I asked myself why the > constructor of FE_Q wants a quadrature object whos first and last qp is at > zero and one, respectively? One can not use this constructor for the family > of QGauss objects, just to mention one instance. > > Best > Simon > > Wolfgang Bangerth <[email protected]> schrieb am So., 15. Aug. 2021, > 20:00: > >> >> > I am solving a problem in 2d using FE_Q(2) elements and a gauss >> quadrature >> > rule with (fe.degree +1) quadrature points in each co-ordinate >> direction, that >> > is, I have in total nine quadrature points. My question pertains to the >> following: >> > At each cell, I need to approximate a field whose sampling (support) >> points >> > are the quadrature points belonging to reduced integration, i.e, there >> are >> > four quadrature points in my case and the four (shape) functions >> approximating >> > my field should be designed as follows: >> > N_j (xi_k) = delta_{jk} , >> > where xi_k are the coordinates of the quadrature points. So I need four >> > (shape) functions, each of which is one at one of the four quadrature >> points >> > and zero at the three others. >> >> You've already found this: Both the FE_Q and FE_DGQArbitraryNodes classes >> have >> constructors that create shape functions based on this information. >> >> > That said, my ansatz is given by (the coefficents a(xi) are of course >> known) >> > f(xi) = a(xi_1) N_1(xi) + a(xi_2) N_2(xi) + a(xi_3) N_3(xi) + a(xi_4) >> N(xi) >> > and I need to evaluate the function f(xi) at the *nine* quadrature >> points. >> > >> > What is the best way to do set up the FEValues object? >> > I have seen that there is a constructor for the FE_Q element which >> takes a >> > Quadratute<1> object. I guess this would help me to define the (shape) >> > functions pertaining to the field f(xi), but I think I can not evaluate >> this >> > field at the nine quadrature points, because (i) their local >> coordinates are >> > of course different in the new FEValues object and (ii) second, I would >> have >> > to insert negative local coordinates for a set of them. >> > Maybe I do not even need a FEValues object for my purpuse. As I said, I >> only >> > need to do the approximation f(xi) and evaluate it at the nine >> quadrature points. >> >> The construction of a finite element field and its evaluation at >> quadrature >> points are two different things. Let's say you use one of the classes >> above to >> create a finite element with the delta-property you seek. Then you create >> a >> DoFHandler with it that describes a finite element field on the entire >> mesh. >> To evaluate it at certain points, you'd just create a FEValues object as >> always, which allows you to obtain the values of shape functions and of >> the >> finite element field that results from a solution vector, at the >> quadratrure >> points of interest. >> >> Best >> W. >> >> -- >> ------------------------------------------------------------------------ >> Wolfgang Bangerth email: [email protected] >> 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 [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/dealii/3432bf6b-3048-10df-8ee3-9751bf74c847%40colostate.edu >> . >> > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/dc963dbd-eea3-46a1-8585-1401903211b0n%40googlegroups.com.
