Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • dune-functions dune-functions
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 26
    • Issues 26
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 32
    • Merge requests 32
  • 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

Be aware that the dune-project.org domain and its name server will have some updates between February 6, 8:00 UTC (9:00 CET) and 10:00 UTC (11:00 CET) as we will be performing services relocation during this time.

  • staging
  • dune-functionsdune-functions
  • Merge requests
  • !347

Draft: Cleanup implementation of grid-functions

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Simon Praetorius requested to merge feature/cleanup-grid-functions into master Dec 26, 2021
  • Overview 10
  • Commits 4
  • Pipelines 12
  • Changes 11

Summary

This is an extraction of some code changes from !345 (merged) to improve the readability and consistency of the code in the directory gridfunctions/

Major stylistic changes

  • Use class instead of typename in templates
  • Use std::size_t instead of unprefixed size_t
  • No spaces between function name and argument list
  • Spaces around assignment = sign
  • Prefer using over typedef
  • If possible (and not automatically provided) write deduction guide for class templates

Not consistently enforced styles

  • Use curly braces for class instantiation instead of round braces (universal initialization), see http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-list
  • share_ptr that are stored in a class should be passed by value to the constructor and then moved into the instance variable, see https://stackoverflow.com/questions/12002480/passing-stdshared-ptr-to-constructors?noredirect=1&lq=1 and https://herbsutter.com/2013/06/05/gotw-91-solution-smart-pointer-parameters/

Other changes

  • Implement global evaluation function for CompositeGridFunction.
  • Move implementation detail closestFaceIndex into the class FaceNormalGridFunction where it is used.
Edited Jan 11, 2022 by Simon Praetorius
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feature/cleanup-grid-functions