Change default-construction to explicit construction of treecontainer
Summary
Change default-construction to explicit construction of treecontainer in DiscreteGlobalBasisFunction. This is required, since a TreeContainer could have dynamic "nodes" that need a runtime information about its size.
Example
The TreeContainer could be of type std::vector<Data>
. If it would be only default constructed, it has size zero and access by tree-paths would result in a runtime-error. If this container corresponds to a (dynamic)power node, its size should be initialized by the degree of that node. This is done in the constructor that gets the tree.
Discussion
I'm not sure about the copy-constructor. Should we also default-construct the treecontainer or copy-construct? If we do copy-construction, we could make the whole copy-constructor default
.
Edited by Simon Praetorius