## Re: [Libmesh-users] Interpolation order

 Re: [Libmesh-users] Interpolation order From: Roy Stogner - 2013-02-21 21:17:58 ```On Thu, 21 Feb 2013, Manav Bhatia wrote: >    I have a preference for Lagrange interpolation for the structural > (and some thermal) applications that I am working on, primarily due > to easy application of Dirichlet boundary conditions. Have you noticed the relatively-new DirichletBoundary class we have? Hand that a functor, and it'll do the projections onto non-Lagrange spaces for you. Right now there's still work and testing to be done for transient Dirichlet conditions (that functor may get evaluated at time t in places where it should be evaluated at t +/- deltat...) but for steady Dirichlet conditions it's pretty solid. > Perhaps hierarchic polynomials would also offer a similar feature > (please correct if I am wrong) due to the presence of node and edge > functions whose dof values can be specified, and bubble functions > that are zero on the boundaries.  Unless your Dirichlet values are piecewise-linear, they'll have non-zero dofs corresponding to those bubble functions. What our DirichletBoundary stuff gives you is interpolation at nodes, then constrained L2 projection for edge-interior values, then further-constrained L2 projection for face-interior values. >    I am curious about your comment "mapped the Lagrange bases on to > nodes topologically". Are you implying a software fix of telling the > dof that it is associated with a node, or some sort of a > mathematical mapping process? Software. Suppose you have a quad on the unit square. Isoparametric cubic Lagrange elements would have nodes at (1/3,0) and (2/3,0), each with a single degree of freedom. My suggestion would be to do what we do with hierarchics: keep the single node at (1/2,0), give it two degrees of freedom, then use some canonical ordering based on node positions to determine which DoF is which. This breaks code which assumes that solution(node->dof_number(0,0,0)) == u(Point(node)), but mathematically it can still be the same basis being used. --- Roy```

 Re: [Libmesh-users] Interpolation order From: Manav Bhatia - 2013-02-21 20:19:29 ```Thanks David, this is helpful. I have a related question: L2_LAGRANGE provides the *discontinuous* interpolation using Lagrange polynomials, so I could use a quad4 and have as high as third order (currently, and I will be glad to contribute more). However, is there a way to achieve the same order of *C0 continuous* Lagrange interpolation on quad4. This would require that the node and edge dofs be consolidated between elements. I would appreciate your comments. Thanks, Manav On 02/21/2013 10:55 AM, Manav Bhatia wrote: > Hi,> > I am curious if the library allows for use of Lagrange elements in C0 > discontinuous interpolation. We have L2_LAGRANGE basis functions, which are the same as the LAGRANGE basis functions but where dofs are associated with elements rather than the nodes, and hence can be discontinuous (hence the "L2" naming). I guess this is what you're asking about? > Also, is it allowed to have an Lagrange > interpolation of an order that is higher than the geometry order? For > example, can I use a 4th order Lagrange interpolation on a quad4? You can do this with L2_LAGRANGE, though I think L2_LAGRANGE currently only goes up to third order (a patch that allows higher order would be welcome!) David ```
 Re: [Libmesh-users] Interpolation order From: Roy Stogner - 2013-02-21 20:34:46 ```On Thu, 21 Feb 2013, Manav Bhatia wrote: > L2_LAGRANGE provides the *discontinuous* interpolation using Lagrange > polynomials, so I could use a quad4 and have as high as third order > (currently, and I will be glad to contribute more). However, is there a way > to achieve the same order of *C0 continuous* Lagrange interpolation on > quad4. This would require that the node and edge dofs be consolidated > between elements. If we stuck with the same isoparametric element paradigm that current LAGRANGE code in libMesh uses, then there's no way to add higher order Lagrange FE support without first adding higher order geometric support, which would be a huge pain in the neck. If we simply mapped the Lagrange bases on to nodes topologically, though, it shouldn't be any harder than writing the high order HIERARCHIC and other bases was, though. We'd still need new geometric elements in a few cases (pyramids, tets, prisms) to give us side nodes, but that's something we've been wanting anyway. I'm not sure how useful people would find that second case, though. In my experience, users who like Lagrange because of its conditioning properties are well outnumbered by users who like Lagrange because it's easy to (sometimes inadvertently) write code which assumes that there's exactly one DoF per variable per Node and that this DoF corresponds to the variable's value at that Point. --- Roy ```
 Re: [Libmesh-users] Interpolation order From: Manav Bhatia - 2013-02-21 20:55:54 ```Thanks, Roy. I have a preference for Lagrange interpolation for the structural (and some thermal) applications that I am working on, primarily due to easy application of Dirichlet boundary conditions. Perhaps hierarchic polynomials would also offer a similar feature (please correct if I am wrong) due to the presence of node and edge functions whose dof values can be specified, and bubble functions that are zero on the boundaries. I was considering the possibility of experimenting with increasingly higher order interpolation for my shell element. This does not necessarily have to be Lagrange polynomials (although it would be nice to experiment), and can be a hierarchic basis like the one I mentioned above. I am curious about your comment "mapped the Lagrange bases on to nodes topologically". Are you implying a software fix of telling the dof that it is associated with a node, or some sort of a mathematical mapping process? Thanks, Manav On Thu, Feb 21, 2013 at 3:34 PM, Roy Stogner wrote: > > On Thu, 21 Feb 2013, Manav Bhatia wrote: > > L2_LAGRANGE provides the *discontinuous* interpolation using Lagrange >> polynomials, so I could use a quad4 and have as high as third order >> (currently, and I will be glad to contribute more). However, is there a >> way >> to achieve the same order of *C0 continuous* Lagrange interpolation on >> quad4. This would require that the node and edge dofs be consolidated >> between elements. >> > > If we stuck with the same isoparametric element paradigm that current > LAGRANGE code in libMesh uses, then there's no way to add higher order > Lagrange FE support without first adding higher order geometric > support, which would be a huge pain in the neck. > > If we simply mapped the Lagrange bases on to nodes topologically, > though, it shouldn't be any harder than writing the high order > HIERARCHIC and other bases was, though. We'd still need new geometric > elements in a few cases (pyramids, tets, prisms) to give us side > nodes, but that's something we've been wanting anyway. > > I'm not sure how useful people would find that second case, though. > In my experience, users who like Lagrange because of its conditioning > properties are well outnumbered by users who like Lagrange because > it's easy to (sometimes inadvertently) write code which assumes that > there's exactly one DoF per variable per Node and that this DoF > corresponds to the variable's value at that Point. > --- > Roy > ```
 Re: [Libmesh-users] Interpolation order From: Roy Stogner - 2013-02-21 21:17:58 ```On Thu, 21 Feb 2013, Manav Bhatia wrote: >    I have a preference for Lagrange interpolation for the structural > (and some thermal) applications that I am working on, primarily due > to easy application of Dirichlet boundary conditions. Have you noticed the relatively-new DirichletBoundary class we have? Hand that a functor, and it'll do the projections onto non-Lagrange spaces for you. Right now there's still work and testing to be done for transient Dirichlet conditions (that functor may get evaluated at time t in places where it should be evaluated at t +/- deltat...) but for steady Dirichlet conditions it's pretty solid. > Perhaps hierarchic polynomials would also offer a similar feature > (please correct if I am wrong) due to the presence of node and edge > functions whose dof values can be specified, and bubble functions > that are zero on the boundaries.  Unless your Dirichlet values are piecewise-linear, they'll have non-zero dofs corresponding to those bubble functions. What our DirichletBoundary stuff gives you is interpolation at nodes, then constrained L2 projection for edge-interior values, then further-constrained L2 projection for face-interior values. >    I am curious about your comment "mapped the Lagrange bases on to > nodes topologically". Are you implying a software fix of telling the > dof that it is associated with a node, or some sort of a > mathematical mapping process? Software. Suppose you have a quad on the unit square. Isoparametric cubic Lagrange elements would have nodes at (1/3,0) and (2/3,0), each with a single degree of freedom. My suggestion would be to do what we do with hierarchics: keep the single node at (1/2,0), give it two degrees of freedom, then use some canonical ordering based on node positions to determine which DoF is which. This breaks code which assumes that solution(node->dof_number(0,0,0)) == u(Point(node)), but mathematically it can still be the same basis being used. --- Roy```
 Re: [Libmesh-users] Interpolation order From: Manav Bhatia - 2013-02-21 21:47:42 ```I had looked at DirichletBoundary class in the examples, but I had not realized that it works for all interpolation basis. What you describe is very impressive, and I will certaintly look deeper into the class. Thanks! Manav On Thu, Feb 21, 2013 at 4:17 PM, Roy Stogner wrote: > > On Thu, 21 Feb 2013, Manav Bhatia wrote: > > I have a preference for Lagrange interpolation for the structural >> (and some thermal) applications that I am working on, primarily due >> to easy application of Dirichlet boundary conditions. >> > > Have you noticed the relatively-new DirichletBoundary class we have? > Hand that a functor, and it'll do the projections onto non-Lagrange > spaces for you. Right now there's still work and testing to be done > for transient Dirichlet conditions (that functor may get evaluated at > time t in places where it should be evaluated at t +/- deltat...) but > for steady Dirichlet conditions it's pretty solid. > > > Perhaps hierarchic polynomials would also offer a similar feature >> (please correct if I am wrong) due to the presence of node and edge >> functions whose dof values can be specified, and bubble functions >> that are zero on the boundaries. >> > > Unless your Dirichlet values are piecewise-linear, they'll have > non-zero dofs corresponding to those bubble functions. What our > DirichletBoundary stuff gives you is interpolation at nodes, then > constrained L2 projection for edge-interior values, then > further-constrained L2 projection for face-interior values. > > > I am curious about your comment "mapped the Lagrange bases on to >> nodes topologically". Are you implying a software fix of telling the >> dof that it is associated with a node, or some sort of a >> mathematical mapping process? >> > > Software. Suppose you have a quad on the unit square. Isoparametric > cubic Lagrange elements would have nodes at (1/3,0) and (2/3,0), each > with a single degree of freedom. My suggestion would be to do what we > do with hierarchics: keep the single node at (1/2,0), give it two > degrees of freedom, then use some canonical ordering based on node > positions to determine which DoF is which. This breaks code which > assumes that solution(node->dof_number(0,0,**0)) == u(Point(node)), but > mathematically it can still be the same basis being used. > --- > Roy ```