I am extremely sorry, the ordering is actually mentioned in the 
documentation of TensorProductPolynomials 
<https://www.dealii.org/current/doxygen/deal.II/classTensorProductPolynomials.html>.
 
It is lexicographic. I didn't look at this carefully. I suppose the 
ordering would then be the same for FE_DGQLegendre.

Apologies for my oversight.

On Tuesday, May 25, 2021 at 10:37:24 AM UTC+5:30 [email protected] 
wrote:

> Wolfgang,
>
> Thanks a lot for your reply. What I actually need is a change of basis 
> from Lagrange polynomials (nodal) to Legendre polynomials (modal). I then 
> want to know the coefficients of certain modes.
>
> So, if there is any straightforward way to do this in dealii, I would 
> proceed with that. I, could not find any such functions and hence planned 
> on doing it manually, using the shape functions. However, even using any 
> inbuilt functions would only address my issue partly if the ordering is not 
> clear.
>
> One workaround I think is to use 1d basis functions. Since 3d basis 
> functions are tensor products of these, and the ordering of shape functions 
> is fixed for FE_DGQ, I can use 1d Lagrange polynomials to get the required 
> modes. The 1d Lagrange polynomials have a definite order, as can be seen 
> from Legendre::generate_complete_basis 
> <https://www.dealii.org/current/doxygen/deal.II/polynomial_8cc_source.html#l00877>
> ().
>
> I will also try your suggestion to figure out the ordering for a 3d 
> element once I get some time.
>
> Thanks again!
>
> On Monday, May 24, 2021 at 9:02:29 PM UTC+5:30 Wolfgang Bangerth wrote:
>
>> On 5/24/21 5:36 AM, [email protected] wrote: 
>> > 
>> > I wasn't able to figure out the ordering of polynomials stored 
>> > in FE_DGQLegendre<3>. If I am correct, this class is constructed by 
>> FE_Poly's 
>> > constructor using TensorProductPolynomials of Polynomials::Legendre. If 
>> this 
>> > is indeed so, then I wasn't able to find the ordering mentioned in 
>> > TensorProductPolynomials as well. 
>> > 
>> > So, like always, is the ordering lexicographic (since these are tensor 
>> product 
>> > basis functions)? Or is it based on the order of basis function (say, 
>> lowest 
>> > to highest)? 
>>
>> Vachan, 
>> I don't know, but here is the way to find out assuming that you are 
>> interested 
>> in the local enumeration (i.e., the order of shape functions within a 
>> single 
>> cell): You create such a finite element and then output the values of the 
>> i'th 
>> shape function via 
>> FiniteElement::shape_value(i,p) 
>> on a regular grid of points on the reference cell [0,1]^d. 
>>
>> Alternatively: For DG elements, the local enumeration equals the global 
>> enumeration. You can generate a mesh with one cell, associated a 
>> DoFHandler 
>> with it, and then use DataOut::build_patches() with a relatively large 
>> number 
>> of subdivisions to output the finite element field associated with a 
>> solution 
>> vector that has only one entry (i.e., a unit vector). This is how the 
>> pictures 
>> of the shape functions that are shown in several of the finite element 
>> documentation pages are generated. 
>>
>> Of course, if you learn how the shape functions are numbered, it would be 
>> most 
>> excellent if you could write a short patch that adds this piece of 
>> information 
>> to the documentation! 
>>
>> Best 
>> Wolfgang 
>>
>> -- 
>> ------------------------------------------------------------------------ 
>> 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/bff5cd2d-f5d3-4be5-b6b2-59f148658e27n%40googlegroups.com.

Reply via email to