MatrixFree ShapeInfo: Move some code to UnivariateShapeData #15905
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes some code more object-oriented by moving the code that computes a bunch of stuff to the surrounding struct,
UnivariateShapeData
, rather than the outer classShapeInfo
where we had to create aliasesauto &shape_gradients_collocation = univariate_shape_data.shape_gradients_collocation;
and similarly. This was initially introduced in #9655 when we added the univariate shape data, but we somehow did not recognize that object-oriented programming allows us to do much better.I then also break out a new function
evaluate_collocation_space
for the same reason. This shrinksShapeInfo::reinit()
a bit, but it is still a spaghetti function of more than 650 lines after this PR. Apart from the interface, this reduces code by around 30 lines, which is a good sign that the new approach is better. I will use this function in a follow-up function for Raviart-Thomas cleanup.