[Dune] Short question about quadrature
christi at dune-project.org
christi at dune-project.org
Fri Jul 17 21:50:49 CEST 2015
Hi Aleksejs,
> 1) Is the above operation QuadratureRules::rule(gt, order) expensive to call every time or just the first time?
no
> 2) Thus, would one get performance advantage from initializing std::vector<QuadratureRule> for all rules that will ever be used in the code once?
no
> 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?
no
the iterator is n iterator over an std::vector and the quadraturepoint
is basically an std::pair with meaningful names. When a quadraturerule
is requested for the first time the vector is initialized and in an
later call it isjust returned. There only two things that could bite:
if you use lowest order rules and compute hardly anything (a) the
lock that protects the singleton can become the performance issue and
(b) the dynamic memory management of the vector and thus the
additional cacheline with hardly any information might become a
limiting factor.
Christian
More information about the Dune
mailing list