Thank you.
I think you are referring to the following function.
/**
* This is at the core of this class. Use this for each
* new element in the mesh. Reinitializes all the physical
* element-dependent data based on the current element
* \p elem. By default the shape functions and associated
* data are computed at the quadrature points specified
* by the quadrature rule \p qrule, but may be any points
* specified on the reference element specified in the optional
* argument \p pts.
*/
virtual void reinit (const Elem * elem,
const std::vector<Point> * const pts = libmesh_nullptr,
const std::vector<Real> * const weights =
libmesh_nullptr) libmesh_override;
But here, it is specified that the points to be given correspond to the
reference element.
So I think I will still get the phi value corresponding to the point in the
reference location.
How do I get the Phi value in the physical coordinates.
And I saw there there is a map function that gives the physical point given the
reference point. Is there a function to do the inverse of the process.
Thanks and Regards
Vegnesh
________________________________
From: David Knezevic [[email protected]]
Sent: Friday, July 08, 2016 4:22 PM
To: Jayaraman, Vegnesh
Cc: [email protected]
Subject: Re: [Libmesh-users] Getting Value of Shape function (Phi) at a non
quadrature point
On Fri, Jul 8, 2016 at 5:15 PM, Jayaraman, Vegnesh
<[email protected]<mailto:[email protected]>> wrote:
Hi
I am trying to solve 2D poisson equation.
\nabla^2 u = f
My f has dirac delta source terms. \delta(r-r_i)
I need the value of phi at a particular global x,y location.
These are the steps that I am currently following:
1) Check if the r_i is in the current element
2) If r_i is in the current element, I take the phi at 4 quadrature points and
perform a bilinear interpolation to get the phi at r_i.
or
The phi returned by get_phi() are the shape function values at the reference
coordinates.
So I modified 2) to perform bilinear interpolation of JxW*phi at 4 quadrature
points.
My issue with the above step is JxW also contains the quadrature weights.
So JxW*phi will not give me the exact phi value at the global coordinates but
also contain quadrature weights.
Is there any way to get phi value in global coordinates.?
I think the easiest way to do this is to use FE::reinit. Have a look at
include/fe/fe.h, you'll see that you can pass a vector of points to reinit and
then evaluate the shape functions on those points.
David
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users