## Re: [Libmesh-users] question about 'order' or element and variable

 Re: [Libmesh-users] question about 'order' or element and variable From: Benjamin S. Kirk - 2004-09-11 03:37:46 ```You are right that the variable and element order are related, but sadly the relationship is a little more complicated that what you described... In general, the Elem::order() defines the "natural" order of the element. This is the order implied by a Lagrange nodal basis that employs all the nodes of the element. This is the basis that is used for geometrical operations, like mapping the physical element to a reference element for shape function evaluation, computing the element Jacobian, etc... Right now Elem::order() is hard-coded for each element type to be what you would expect: Quad4::order() is FIRST, Quad8::order() is SECOND, Quad9::order() is SECOND, etc... If we had a Quad16 bicubic element its order would be THIRD. Since this is the order that is used in the geometric mapping a 2D mesh composed of Quad9's and Tri6's can represent quadratic boundaries exactly since the elements may have second-order curved edges. (Note that hard-coding Elem::order() in this case may be inefficient: if the sides are straight with equispaced nodes then there is no need to compute a second-order map. In the future full-order mapping may only be applied to elements touching the boundary of the domain.) On the other hand, the approximation order is exactly that: the polynomial degree used in approximating an unknown. This is where the element order and approximation order get a bit confusing... - For Lagrange finite elements (the default) you have *at most* one DOF per node, so here your approximation order must be <= the element order. For example: o You *could* do first-order approximation on a Quad9, there will just not be any DOFs at the edge or center node. o You *cannot* do second-order approximation on a Quad4. - For Hierarchic finite elements there may be multiple DOFs per node, so in this case your approximation order may be higher than the element order. Another example: o You *can* do third-order approximation on a Quad9. In this case there will be 1 DOF per corner node, 2 DOFs per edge node, and 4 DOFs at the center node - For DG finite elements you can have any approximation order on any element order. As for the other questions: A mesh should contain elements of the same order. A mix of Quad8, Quad9, and Tri6's is valid, but a mix of Tri3's and Quad9's is not. (In the former case all edges have a middle node, in the latter only some would.) You can add variables of whatever order you want, provided you observe the previous "rules." Sometimes, however, the equations you are solving actually limit the choice of variable approximation. See for example, uh, example 11. There we solve the Stokes equations for a low-speed incompressible fluid. We use second order approximation for the Cartesian velocity components, but only first order for the pressure. In the case of the Stokes equations using equal-order interpolation for the velocity and pressure can actually produce a mathematically unstable approximation. If you are curious about similar restrictions for the class of problems you are interested in I recommend checking the finite element literature related to such applications... If there is no endless babble about approximation space compatibility, LBB, inf-sup, etc... then equal-order approximation is probably safe. Let me know if you have any more questions, -Ben PS: A long-term goal is to add so-called p-refinement support, in which case the approximation order can actually vary from element to element. Manav Bhatia wrote: > Hi > I needed some help in understanding the order of the > variable that we add to a system and that of the > elements. > As I would guess, the former has to be less than or > equal to the latter. But I can not understand the > following: > -- what would happen if the mesh has elements of mixed > order, say first and second, and then we add a > variable of order first? > -- what would happen if we have to variables in the > same system of the same order? > -- are there any specific guidelines about choosing > the variable's order in such mixed cases? > > Thanks in advance. > > Regards > Manav > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - 50x more storage than other providers! > http://promotions.yahoo.com/new_mail > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Libmesh-users mailing list > Libmesh-users@... > https://lists.sourceforge.net/lists/listinfo/libmesh-users ```

 [Libmesh-users] question about 'order' or element and variable From: Manav Bhatia - 2004-09-08 17:02:15 ```Hi I needed some help in understanding the order of the variable that we add to a system and that of the elements. As I would guess, the former has to be less than or equal to the latter. But I can not understand the following: -- what would happen if the mesh has elements of mixed order, say first and second, and then we add a variable of order first? -- what would happen if we have to variables in the same system of the same order? -- are there any specific guidelines about choosing the variable's order in such mixed cases? Thanks in advance. Regards Manav __________________________________ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail ```
 Re: [Libmesh-users] question about 'order' or element and variable From: Benjamin S. Kirk - 2004-09-11 03:37:46 ```You are right that the variable and element order are related, but sadly the relationship is a little more complicated that what you described... In general, the Elem::order() defines the "natural" order of the element. This is the order implied by a Lagrange nodal basis that employs all the nodes of the element. This is the basis that is used for geometrical operations, like mapping the physical element to a reference element for shape function evaluation, computing the element Jacobian, etc... Right now Elem::order() is hard-coded for each element type to be what you would expect: Quad4::order() is FIRST, Quad8::order() is SECOND, Quad9::order() is SECOND, etc... If we had a Quad16 bicubic element its order would be THIRD. Since this is the order that is used in the geometric mapping a 2D mesh composed of Quad9's and Tri6's can represent quadratic boundaries exactly since the elements may have second-order curved edges. (Note that hard-coding Elem::order() in this case may be inefficient: if the sides are straight with equispaced nodes then there is no need to compute a second-order map. In the future full-order mapping may only be applied to elements touching the boundary of the domain.) On the other hand, the approximation order is exactly that: the polynomial degree used in approximating an unknown. This is where the element order and approximation order get a bit confusing... - For Lagrange finite elements (the default) you have *at most* one DOF per node, so here your approximation order must be <= the element order. For example: o You *could* do first-order approximation on a Quad9, there will just not be any DOFs at the edge or center node. o You *cannot* do second-order approximation on a Quad4. - For Hierarchic finite elements there may be multiple DOFs per node, so in this case your approximation order may be higher than the element order. Another example: o You *can* do third-order approximation on a Quad9. In this case there will be 1 DOF per corner node, 2 DOFs per edge node, and 4 DOFs at the center node - For DG finite elements you can have any approximation order on any element order. As for the other questions: A mesh should contain elements of the same order. A mix of Quad8, Quad9, and Tri6's is valid, but a mix of Tri3's and Quad9's is not. (In the former case all edges have a middle node, in the latter only some would.) You can add variables of whatever order you want, provided you observe the previous "rules." Sometimes, however, the equations you are solving actually limit the choice of variable approximation. See for example, uh, example 11. There we solve the Stokes equations for a low-speed incompressible fluid. We use second order approximation for the Cartesian velocity components, but only first order for the pressure. In the case of the Stokes equations using equal-order interpolation for the velocity and pressure can actually produce a mathematically unstable approximation. If you are curious about similar restrictions for the class of problems you are interested in I recommend checking the finite element literature related to such applications... If there is no endless babble about approximation space compatibility, LBB, inf-sup, etc... then equal-order approximation is probably safe. Let me know if you have any more questions, -Ben PS: A long-term goal is to add so-called p-refinement support, in which case the approximation order can actually vary from element to element. Manav Bhatia wrote: > Hi > I needed some help in understanding the order of the > variable that we add to a system and that of the > elements. > As I would guess, the former has to be less than or > equal to the latter. But I can not understand the > following: > -- what would happen if the mesh has elements of mixed > order, say first and second, and then we add a > variable of order first? > -- what would happen if we have to variables in the > same system of the same order? > -- are there any specific guidelines about choosing > the variable's order in such mixed cases? > > Thanks in advance. > > Regards > Manav > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - 50x more storage than other providers! > http://promotions.yahoo.com/new_mail > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Libmesh-users mailing list > Libmesh-users@... > https://lists.sourceforge.net/lists/listinfo/libmesh-users ```