## [Libmesh-users] Legendre polynomial basis

 [Libmesh-users] Legendre polynomial basis From: Vijay S. Mahadevan - 2008-06-19 18:42:42 ```Hi, I was wondering if there is something special that needs to be specified in order to use LEGENDRE FE basis functions for say diffusion problems. I am particularly interested in basis functions that are orthogonal to each other by nature since it simplifies the mass matrix structure. Hence, when I try to create elements with legendre basis, I end up with a runtime error because all the functions in FEInterface class never have a switch statement for LEGENDRE option. So my question is, can I use LEGENDRE basis at all for non-infinite elements ? Would it require a lot of work to add this support ? Or is there a deeper reason why this was intentionally left out of the implementation and was written only for infinite elements alone ? Thanks for the help in advance. Vijay ```

 [Libmesh-users] Legendre polynomial basis From: Vijay S. Mahadevan - 2008-06-19 18:42:42 ```Hi, I was wondering if there is something special that needs to be specified in order to use LEGENDRE FE basis functions for say diffusion problems. I am particularly interested in basis functions that are orthogonal to each other by nature since it simplifies the mass matrix structure. Hence, when I try to create elements with legendre basis, I end up with a runtime error because all the functions in FEInterface class never have a switch statement for LEGENDRE option. So my question is, can I use LEGENDRE basis at all for non-infinite elements ? Would it require a lot of work to add this support ? Or is there a deeper reason why this was intentionally left out of the implementation and was written only for infinite elements alone ? Thanks for the help in advance. Vijay ```
 Re: [Libmesh-users] Legendre polynomial basis From: Benjamin Kirk - 2008-06-19 18:48:54 ```> So my question is, can I use LEGENDRE basis at all for non-infinite > elements ? Would it require a lot of work to add this support ? Or is > there a deeper reason why this was intentionally left out of the > implementation and was written only for infinite elements alone ? The enum LEGENDRE right now is for the radial direction in the infinite elements, as you point out. There is not a deeper reason other than no one has implemented them for finite elements yet. Adding Legendre polynomials would be pretty straightforward, though, especially for the tensor-product elements. See for example the QUAD and HEX sections of the case statements in src/fe/fe_lagrange_* to get a feel for what would be involved. -Ben ```
 Re: [Libmesh-users] Legendre polynomial basis From: John Peterson - 2008-06-19 18:49:12 ```On Thu, Jun 19, 2008 at 1:42 PM, Vijay S. Mahadevan wrote: > Hi, > > I was wondering if there is something special that needs to be > specified in order to use LEGENDRE FE basis functions for say > diffusion problems. I am particularly interested in basis functions > that are orthogonal to each other by nature since it simplifies the > mass matrix structure. Hence, when I try to create elements with > legendre basis, I end up with a runtime error because all the > functions in FEInterface class never have a switch statement for > LEGENDRE option. They've never been implemented, though they are quite useful in certain special situations. I think they're only orthogonal on affine elements (?). For steady diffusion problems there are also "integrated legendre" polynomials so that the diffusion matrix instead of the mass matrix is simplified ... > So my question is, can I use LEGENDRE basis at all for non-infinite > elements ? Would it require a lot of work to add this support ? Or is > there a deeper reason why this was intentionally left out of the > implementation and was written only for infinite elements alone ? It depends how you define "a lot". I would definitely call it non-trivial though. We have some interesting templated FE definitions that take a while to get used to, but other than that it shouldn't be too bad. -- John ```
 Re: [Libmesh-users] Legendre polynomial basis From: Vijay S. Mahadevan - 2008-06-19 19:09:02 ```On Thu, Jun 19, 2008 at 12:48 PM, Benjamin Kirk wrote: >> So my question is, can I use LEGENDRE basis at all for non-infinite >> elements ? Would it require a lot of work to add this support ? Or is >> there a deeper reason why this was intentionally left out of the >> implementation and was written only for infinite elements alone ? > > The enum LEGENDRE right now is for the radial direction in the infinite > elements, as you point out. There is not a deeper reason other than no one > has implemented them for finite elements yet. > > Adding Legendre polynomials would be pretty straightforward, though, > especially for the tensor-product elements. See for example the QUAD and > HEX sections of the case statements in src/fe/fe_lagrange_* to get a feel > for what would be involved. > > -Ben > > Guys, I am currently using QUAD and HEX only for higher dimensions and so, this is definitely attractive for my case. I will look at the templated FE definitions for Lagrange element and create the Legendre basis on the same lines. Sometime in the future, I can create a patch with the source so that it can be useful for others who might need it. Thanks for the help. Vijay ```
 Re: [Libmesh-users] Legendre polynomial basis From: Lorenzo Botti - 2008-06-19 20:48:03 ```I think it would be useful to have high order Legendre basis function for high order discontinuous Galerkin discretizations. But I would need them also for tets and prisms... I know that in this case it is necessary to introduce a change of coordinates in order to keep the polynomial defined in the [-1, 1] interval. I don't think it's a big complication, is it? Lorenzo Il giorno 19/giu/08, alle ore 21:09, Vijay S. Mahadevan ha scritto: > On Thu, Jun 19, 2008 at 12:48 PM, Benjamin Kirk > wrote: >>> So my question is, can I use LEGENDRE basis at all for non-infinite >>> elements ? Would it require a lot of work to add this support ? Or >>> is >>> there a deeper reason why this was intentionally left out of the >>> implementation and was written only for infinite elements alone ? >> >> The enum LEGENDRE right now is for the radial direction in the >> infinite >> elements, as you point out. There is not a deeper reason other >> than no one >> has implemented them for finite elements yet. >> >> Adding Legendre polynomials would be pretty straightforward, though, >> especially for the tensor-product elements. See for example the >> QUAD and >> HEX sections of the case statements in src/fe/fe_lagrange_* to get >> a feel >> for what would be involved. >> >> -Ben >> >> > > Guys, > > I am currently using QUAD and HEX only for higher dimensions and so, > this is definitely attractive for my case. I will look at the > templated FE definitions for Lagrange element and create the Legendre > basis on the same lines. > > Sometime in the future, I can create a patch with the source so that > it can be useful for others who might need it. > > Thanks for the help. > Vijay > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Libmesh-users mailing list > Libmesh-users@... > https://lists.sourceforge.net/lists/listinfo/libmesh-users ```
 Re: [Libmesh-users] Legendre polynomial basis From: Jan Biermann - 2008-06-20 15:09:50 ```Hi, I did actually implement integrated Legendre polynomials (SZABAB elements) for 3-D (HEX, TET) up to order four. I just didn't send the patch to the developers yet. This is gonna happen soon though. I don't know if this will help you. Jan Vijay S. Mahadevan schrieb: > Hi, > > I was wondering if there is something special that needs to be > specified in order to use LEGENDRE FE basis functions for say > diffusion problems. I am particularly interested in basis functions > that are orthogonal to each other by nature since it simplifies the > mass matrix structure. Hence, when I try to create elements with > legendre basis, I end up with a runtime error because all the > functions in FEInterface class never have a switch statement for > LEGENDRE option. > > So my question is, can I use LEGENDRE basis at all for non-infinite > elements ? Would it require a lot of work to add this support ? Or is > there a deeper reason why this was intentionally left out of the > implementation and was written only for infinite elements alone ? > > Thanks for the help in advance. > Vijay > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Libmesh-users mailing list > Libmesh-users@... > https://lists.sourceforge.net/lists/listinfo/libmesh-users > ```