Skip to content
Snippets Groups Projects
Commit 1096e4bd authored by Steffen Müthing's avatar Steffen Müthing
Browse files

[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.
parent f12a5e1e
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment