ikarus-project / ikarus

Ikarus is a C++-based library that uses DUNE modules to solve partial differential equations with the finite element method and more.
https://ikarus-project.github.io/
Other
5 stars 3 forks source link

merge FETraits and TraitsFromFE to avoid code duplication #249

Closed tarun-mitruka closed 7 months ago

tarun-mitruka commented 7 months ago

This PR focuses on merging FETraits and TraitsFromFE to avoid duplication of code. It also now handles basis.flat() in PowerBasisFE and ScalarFieldFE such that this need not be repeated in the constructor of every finite element.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (2d37f50) 91.77% compared to head (ca46d5e) 91.77%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #249 +/- ## ======================================= Coverage 91.77% 91.77% ======================================= Files 54 54 Lines 1970 1970 ======================================= Hits 1808 1808 Misses 162 162 ``` | [Flag](https://app.codecov.io/gh/ikarus-project/ikarus/pull/249/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ikarus-project) | Coverage Δ | | |---|---|---| | [tests](https://app.codecov.io/gh/ikarus-project/ikarus/pull/249/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ikarus-project) | `91.77% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ikarus-project#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

rath3t commented 7 months ago

Again you mixed the refactoring of the traits and the usage of PowerBasisFE Basis template. This should be again avoided next time.

tarun-mitruka commented 7 months ago

Again you mixed the refactoring of the traits and the usage of PowerBasisFE Basis template. This should be again avoided next time.

Yes. I mixed it as FETraits takes in the GlobalBasis as template parameter for the finite elements and PowerBasisFE only directly had the FlatBasis. Since I wanted to generalize this, I had to do it in the same PR to make it work. Could there have been a better solution? @rath3t

rath3t commented 7 months ago

Ah i missed that! Then its ok to do it like that!