Skip to content
Snippets Groups Projects

Add explicit template instantiation of class FoamGrid

Closed Simon Praetorius requested to merge feature/explicit-template-instantiation-foamgrid into master

Summary

This MR fixes some problems with explicit template instantiation of the class FoamGrid. And a library including these explicit instantiations is added.

Details

The problems come from explicit specializations of methods for some entity dimensions. If these methods are instantiated for all grid dimensions it crashes. Instead of this explicit overloads, I have added templated member functions that are instantiated only for the correct dimensions.

Some additional commits in the MR:

  • Fix missing forward declaration of types used in friend declarations
  • Rename foamgrid.cc to foamgrid.impl.hh since it was not a source file, but a header file of template implementations. Instead a new file foamgrid.cc is added, containing just the template instantiations.
  • Move the include of foamgrid.impl.hh out of the Dune namespace and add include guards.
Edited by Timo Koch

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
  • Timo Koch
  • Timo Koch
  • added 1 commit

    • 78c507f6 - Apply 2 suggestion(s) to 1 file(s)

    Compare with previous version

  • Simon Praetorius added 2 commits

    added 2 commits

    • 7c80d5e5 - make specializations more explicit
    • 3877a2f0 - resolved merge conflicts

    Compare with previous version

  • added 1 commit

    • bbbdb456 - Apply 4 suggestion(s) to 1 file(s)

    Compare with previous version

  • Simon Praetorius resolved all threads

    resolved all threads

  • Timo Koch added 15 commits

    added 15 commits

    • bbbdb456...692e5936 - 10 commits from branch master
    • b5ce6f29 - Add explici template instantiation of clss FoamGrid
    • ed9d9904 - Cleanup CMakeLists.txt
    • 0454a728 - Add missing forward declaration of GridFactory
    • 14389b42 - make specializations more explicit
    • 681140f4 - Apply 4 suggestion(s) to 1 file(s)

    Compare with previous version

  • Timo Koch added 1 commit

    added 1 commit

    • f7684cea - Add explici template instantiation of clss FoamGrid

    Compare with previous version

  • Timo Koch added 1 commit

    added 1 commit

    • 19c96e60 - Add explici template instantiation of clss FoamGrid

    Compare with previous version

  • Timo Koch added 3 commits

    added 3 commits

    Compare with previous version

  • Timo Koch changed the description

    changed the description

  • Timo Koch added 1 commit

    added 1 commit

    • 3982001c - [lib] Add foamgrid library as module library

    Compare with previous version

  • @simon.praetorius I get a linker error with your version (something related to Dune::Exception) which disappears after my last commit. Is there something wrong with this approach?

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading