Skip to content
Snippets Groups Projects

flyspray/FS#1147: Fix NaN behaviour of infinity_norm() for istl classes

Merged Elias Pipping requested to merge (removed):feature/FS1147-norm-of-vectors-with-nan into master

This is an extension of the work related to flyspray/FS#1147 (closed) to dune-istl.

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
1810
1811 real_type norm = 0;
1812 for (auto const &x : *this) {
1813 real_type sum = 0;
1814 for (auto const &y : x)
1815 sum += y.infinity_norm();
1816 norm = max(sum, norm);
1816 1817 }
1817 return max;
1818 return norm;
1818 1819 }
1819 1820
1820 1821 //! simplified infinity norm (uses Manhattan norm for complex values)
1821 typename FieldTraits<field_type>::real_type infinity_norm_real () const
1822 {
1823 #ifdef DUNE_ISTL_WITH_CHECKING
  • Author Developer

    The DUNE_ISTL_WITH_CHECKING guard around the ready != built check appears in infinity_norm_real but not infinity_norm; that's probably not how it was meant to be...

    Edited by Elias Pipping
  • Elias Pipping Added 1 commit:

    Added 1 commit:

    • fbc82a7f - matrix: Fix NaN behaviour of infinity_norm()
  • Elias Pipping Title changed from [WIP] flyspray/FS#1147 (closed): Fix NaN behaviour of infinity_norm() for istl classes to flyspray/FS#1147 (closed): Fix NaN behaviour of infinity_norm() for istl classes

    Title changed from [WIP] flyspray/FS#1147 (closed): Fix NaN behaviour of infinity_norm() for istl classes to flyspray/FS#1147 (closed): Fix NaN behaviour of infinity_norm() for istl classes

  • Author Developer

    Done :)

  • Tests go through for me. Looks good.

  • Christian Engwer Status changed to merged

    Status changed to merged

  • mentioned in commit c8ad7196

  • Please register or sign in to reply
    Loading