Skip to content
Snippets Groups Projects

Easy access to quadraturerule and referenceelement

This adds new functions quadratureRule() and referenceElement() to reduce the amount of boiler plate code in the local operators as well as new wrappers around Dune::ReferenceElement and Dune::QuadratureRule. These wrappers have value semantics and can be copied around freely.

The freestanding functions are also injected into the Dune namespace to enable ADL lookup. This is important to allow for forward compatibility once the functions appear in the core modules.

Use it like this:

#include <dune/pdelab/common/singletonaccess.hh>

auto geo = eg.geometry();
auto ref_el = referenceElement(geo); // capture by value!

std::size_t quadrature_order = 4;
for (auto& ip : quadratureRule(geo,quadrature_order))
{
  // loop over points
}

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • And I'm happy that you implemented the wrapper also for the refElements. I think this really improves the usability.

  • Steffen Müthing Added 1 commit:

    Added 1 commit:

    • 0b060780 - [Cleanup] Split header singletonaccess.hh into separate files with clearer names
  • Steffen Müthing Added 1 commit:

    Added 1 commit:

    • e82871e1 - [Bugfix] Clean up includes in convectiondiffusionfem.hha
  • Steffen Müthing Added 1 commit:

    Added 1 commit:

    • e9bd695f - [Bugfix] Clean up includes in convectiondiffusionfem.hha
  • mentioned in commit 2ed480f7

  • Steffen Müthing Status changed to merged

    Status changed to merged

  • mentioned in commit 2d3ea8f9

  • backported to 2.4 in 2d3ea8f9

  • :thumbsup: Looking forward to update my local operators to PDELab 2.4! Thanks for this improvement.

  • Please register or sign in to reply
    Loading