Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D dune-geometry
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 19
    • Merge requests 19
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Core Modules
  • dune-geometry
  • Merge requests
  • !103

Draft: Step 2 of redesign of quadrature rules

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Simon Praetorius requested to merge simon.praetorius/dune-geometry:feature/redesign-quadrature-rules-step2 into master Jul 22, 2018
  • Overview 0
  • Commits 13
  • Pipelines 6
  • Changes 17

Summary

The classes QuadratureRule, QuadratureRules and QuadratureRuleFactory are cleaned up in style, using static map for storing rules and modern enum classes. The quadrature rules are put into a common programming style, e.g. no intermediate point/weight construction, but directly storing coefficients in the quadrature rule.

Details

Four major changes are introduced in this MR:

  1. Quadrature rules (points and weights) are constructed directly and not via an intermediate c-array.
  2. The quadrature rules are stored in a cache in form of a thread_local std::map. This allows to easily extend the key types (currently to topology-id, the quadrature order and quadrature type). In some initial tests there was no performance different measurable. It could be discussed whether it would be better to use a static std::map + locking, or whether another map, like an std::unordered_map would be the better choice.
  3. The QuadratureType enum is now an enum class. This might be a breaking change in some use-code, if the quadrature type is stored somewhere. Needed changes in user code: replace Dune::QuadratureType::Enum by Dune::QuadratureType.
  4. Instead of repeating all quarature points and weights for flating-point numbers and for string construction, a utility function/macro DUNE_NUMBER -> Dune::Impl::number is introduced to cover both cases at once. The macro takes a type and a floating-point literal and expands the latter into a double and a const char*. In the Dune::Impl::number template, it is then decided whether to construct from a string or returning the double value directly.

Motivation

This is the second step of a cleanup and redesign of the quadrature rules: 1.) put all rules into a similar structure. 2.) cleanup of the classes QuadratureRules and QuadratureFactory, 3.) Automatically generate coefficients for all rules with higher precision

The implementation intends to establish a common style that can be generated automatically in step 3 from a database.

Remarks

The simplexquadraturerule is transform from the old code using the attached python convert_rule.py and some postprocessing.

Edited Jul 04, 2021 by Simon Praetorius
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: feature/redesign-quadrature-rules-step2