Skip to content
Snippets Groups Projects
  • Jonathan Youett's avatar
    8349b4fb
    [bugfix] Fixes assignment of BCRSMatrix with nonmatching number of rows. · 8349b4fb
    Jonathan Youett authored and Markus Blatt's avatar Markus Blatt committed
    When assigning a BCRSMatrix to another BCRSMatrix which was setup for
    a different size/pattern, it segfaulted and I got the following
    Exception:
    
    "InvalidStateException [allocate:.../dune/istl/bcrsmatrix.hh:2108]:
    Rows have already been allocated, cannot allocate a second time."
    
    The problem was, that inside the assignment operator the rows (r) were
    never deallocated. This commit fixes this and adds a testcase.
    
    Testcase slightly modified by Markus.
    8349b4fb
    History
    [bugfix] Fixes assignment of BCRSMatrix with nonmatching number of rows.
    Jonathan Youett authored and Markus Blatt's avatar Markus Blatt committed
    When assigning a BCRSMatrix to another BCRSMatrix which was setup for
    a different size/pattern, it segfaulted and I got the following
    Exception:
    
    "InvalidStateException [allocate:.../dune/istl/bcrsmatrix.hh:2108]:
    Rows have already been allocated, cannot allocate a second time."
    
    The problem was, that inside the assignment operator the rows (r) were
    never deallocated. This commit fixes this and adds a testcase.
    
    Testcase slightly modified by Markus.