Number of quadrature points

Hi, everyone!
I am solving a planar problem using quad elements and the number of quadrature points bothers me a little. A minimal [interactive] working example would be like this:
In [1]: from sfepy.discrete import Integral In [2]: i = Integral('i', 1) In [3]: i.get_qp('2_4') Out[3]: (array([[0.90824829, 0.5 ], [0.29587585, 0.85355339], [0.29587585, 0.14644661]]), array([0.33333333, 0.33333333, 0.33333333]))
In [4]: i = Integral('i', 2) In [5]: i.get_qp('2_4') Out[5]: (array([[0.84156503, 0.5 ], [0.15843497, 0.5 ], [0.5 , 0.84156503], [0.5 , 0.15843497], [0.94095855, 0.94095855], [0.94095855, 0.05904145], [0.05904145, 0.94095855], [0.05904145, 0.05904145]]), array([0.20408163, 0.20408163, 0.20408163, 0.20408163, 0.04591837, 0.04591837, 0.04591837, 0.04591837]))
In [6]: i = Integral('i', 3) In [7]: i.get_qp('2_4') Out[7]: (array([[0.21132487, 0.21132487], [0.78867513, 0.21132487], [0.21132487, 0.78867513], [0.78867513, 0.78867513]]), array([0.25, 0.25, 0.25, 0.25]))
Why do I get 8 QPs for order 2 and 4 QPs for order 3? How does the order of the integral relate to the keys in quadrature_tables
[1]?
Best regards, Jan
[1] http://sfepy.org/doc-devel/_modules/sfepy/discrete/quadratures.html

Hi Jan,
On 12/1/18 11:52 PM, Jan Heczko wrote:
Hi, everyone!
I am solving a planar problem using quad elements and the number of quadrature points bothers me a little.
There are two things to note:
- the order in tensor-product elements corresponds to the 1D integral order:
Integral('i', 1) means 2D order 2, Integral('i', 2) means 2D order 4 etc.
- if a quadrature is not found in the geometry-specific table (e.g. '2_4') in
sfepy/discrete/quadratures.py, a product of 1D quadratures (key '1_2') is taken instead.
A minimal [interactive] working example would be like this:
In [1]: from sfepy.discrete import Integral In [2]: i = Integral('i', 1) In [3]: i.get_qp('2_4') Out[3]: (array([[0.90824829, 0.5 ], [0.29587585, 0.85355339], [0.29587585, 0.14644661]]), array([0.33333333, 0.33333333, 0.33333333]))
In [4]: i = Integral('i', 2) In [5]: i.get_qp('2_4') Out[5]: (array([[0.84156503, 0.5 ], [0.15843497, 0.5 ], [0.5 , 0.84156503], [0.5 , 0.15843497], [0.94095855, 0.94095855], [0.94095855, 0.05904145], [0.05904145, 0.94095855], [0.05904145, 0.05904145]]), array([0.20408163, 0.20408163, 0.20408163, 0.20408163, 0.04591837, 0.04591837, 0.04591837, 0.04591837]))
So this seeks order 4 in '2_4' table and finds the order 5.
In [6]: i = Integral('i', 3) In [7]: i.get_qp('2_4') Out[7]: (array([[0.21132487, 0.21132487], [0.78867513, 0.21132487], [0.21132487, 0.78867513], [0.78867513, 0.78867513]]), array([0.25, 0.25, 0.25, 0.25]))
This seeks order 6, which is not there, so a product of two 1_2 rules of order 3 is used instead.
Why do I get 8 QPs for order 2 and 4 QPs for order 3? How does the order of the integral relate to the keys in
quadrature_tables
[1]?
Well, I have in my TODO notes: "check 2_4, 3_8 quadratures in quadrature_tables
- might have much higher order", so this might be a particular manifestation.
Also: a product of d 1D rules of order k can integrate products of polynomials of order k, so while it is a polynomial of the order k*d, it has not this power applied to a single coordinate. I suspect that the special tensor product rules in the table might have this higher accuracy.
So do not worry that you are under-integrating. The only problem is, that the tensor product rules in the table have higher accuracy than advertised by their keys.
r.
Best regards, Jan
[1] http://sfepy.org/doc-devel/_modules/sfepy/discrete/quadratures.html _______________________________________________ SfePy mailing list -- sfepy@python.org To unsubscribe send an email to sfepy-leave@python.org https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
participants (2)
-
Jan Heczko
-
Robert Cimrman