[Dune] Short question about quadrature

Aleksejs Fomins aleksejs.fomins at lspr.ch
Fri Jul 17 15:40:25 CEST 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear Dune,

I am currently interested in optimizing the speed of my code. I make a large amount of expensive integrals using Dune simplex quadrature rules.

Currently, every time I compute an integral, I initialize my quadrature rule via
const QuadratureRule & rule = QuadratureRules::rule(gt, order);
then I use the iterator and get positions and weights of quadrature points.

I was wondering?

1) Is the above operation QuadratureRules::rule(gt, order) expensive to call every time or just the first time?

2) Thus, would one get performance advantage from initializing std::vector<QuadratureRule> for all rules that will ever be used in the code once?

3) Are the operations iter->position() and iter->weight() expensive for any of the quadratures? Would it make sense to pre-compute quadrature points themselves?

Kind regards,
Aleksejs Fomins
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBAgAGBQJVqQXIAAoJEDkNM7UOEwMZCeUP/2rcGCvFgl03Y812HK/xErF0
C1J53P28E+EM6vxLm/g+SeUd13zIDjvJN7yM5ftw+q2IAgo8wKQhkfiES7qvNIpO
SSzRmxi080pRYSF9wsf/biLL46s3GxQ1ArXwPgJfNIogn4ROUqU1Aco6Vs6Z0bSP
xkFKxL22DSjhaXlxqk/wIkK8xKVuhDvAu55msX9DFgbM3fEZOBYDhoA7NaeQ534+
9/OYoQjaiFSqbHTt2PXjGp8ztbDdwgAxI9xRIAzzjEyDpqXdYS3+8lsEm3gYiHEy
vAk8hCFXBpEhqlDQ43NHYsckGK9VWO1sowhtNkWp2sz1Yvfl6LiidQTtZ18HNGNn
FHqnZZlg2szykA4yIJfGTJaYYLX6gHJv1kIM7c6+Zz5D7HYnWNCu6Dcuh2egqI7M
dqnehusW9mv3oZ154uvykSKsvZchRTcO3z0A7Ga99hbM7awJ03sIBi/+kJBx7Krm
MYgUsT+/8o4USTbbFQiK+JkCti981jjDVMxf/gdbUL4DDqfVQosDJa9/wwMdOcuY
1HNOiau94rS9mUy2nUfWUSt9dhoaOh0JRs7HTXxepqbZ4Si8TNVfttg2gS5W+zfR
xTb98zfE16nrdCtz3uy6CnI2jaK6cQnpsynjcnqsbcantl+hGEUWn28Orx2EltRm
Y8jsjMyNFUxfdo2sJesu
=sxbi
-----END PGP SIGNATURE-----




More information about the Dune mailing list