Hello Professor,
Thanks for the reply. There is nothing wrong with using compute_projection_from_quadrature_points_matrix(). I just wanted to do it this way. I understand it is complicated. This is what I came up with and tried, but it doesn't work. I created a triangulation object with a single cell (Let's call it cell2) and associated it with a new dofhandler for 1 dof per node. Whenever I needed the derivative of the shape functions with respect to an element whose vertices were given by the coordinates of the gauss point, I set the vertices of cell2 to be the those coordinates. I then initialized a new fe_values object for this cell2 and called fe_values2->shape_grad(). But, that gave me wrong results. I realize this may be because of the order in which gauss points are looped over. If not checked, they might form a distorted element leading to a distorted cell2. (My original grid comes from reading a .ucd file). Also, the gradients were not what I was expecting, so I know this is wrong as of now. I was away for spring break and hence the delay in reply. I apologize for it. On Wednesday, March 7, 2018 at 7:47:41 PM UTC-5, Wolfgang Bangerth wrote: > > On 03/07/2018 12:19 PM, RAJAT ARORA wrote: > > > > I want to do the following thing: I have a scalar quantity available > > only at the Gauss points of a cell. (cell = 2d rectangular element) > > I want to get the derivative of this quantity at the center of the cell. > > > > One way to do this is to locally project the gauss point variable to the > nodes > > of the element using compute_projection_from_quadrature_points_matrix > > and then take the derivative. > > > > What I want to do is the following: Think of the 4 gauss points as a new > > rectangular element. > > Then, these 4 vertices become the node and this makes the value of the > > variable known at the nodes of this element. > > > > Now, I want to take the derivative of the variable wrt to this new cell > > (vertices of new cell = gauss points of parent cell). > > > > Can someone please help me figure out how can I take the derivative wrt > to > > this new cell? > > > > Some thought: Mapping eulerian may not work here as that mapping applies > to > > the nodes and is continuous. Here, the same node gets mapped to > different > > vertices (gauss point of the cell of which the node is a part of), so a > single > > mapping may not work. Either I use different Euler vector for the > different > > element but will that be expensive? > > I think this is too complicated. That's because everything in deal.II > always > assumed that you have a mesh, so if you did what you suggest, you'd have > to > actually build a triangulation and everything that lives on it. That does > not > seem efficient. > > What is wrong with the approach using > compute_projection_from_quadrature_points_matrix()? > > Best > W. > > -- > ------------------------------------------------------------------------ > Wolfgang Bangerth email: bang...@colostate.edu > <javascript:> > 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.