[Bugfix][GridFunctionSpace] Make sure to allocate new Ordering in GFS copy constructor
The ordering object of the leaf GridFunctionSpace contains a callback pointer to the GridFunctionSpace that is used to e.g. determine the size of the ordering. As the ordering is stored in a shared_ptr, a trivial copy constructor will cause the new and the old GFS to share the same ordering, but all callbacks will go to the old space. Surprisingly, this broken setup continues to work as long as the space does not change, but after calling update() on the copy, the size information of the GFS and the ordering becomes out of sync, creating a horrible mess. So make sure to create a new ordering when copying a leaf GFS.
Loading
Please register or sign in to comment