Closed Psirus closed 6 years ago
I am not sure about this one:
InterpolationSimple
interface, these will be dynamic.What if, for now, we provide them as static functions in the corresponding classes like:
// class InterpolaitonTriangleLinear
static Eigen::Fix ShapeFunctions(ip){...}
Eigen::Dynamic GetShapeFunctions(ip) const override
{
return ShapeFunctions(ip);
}
The big file is gone, the change is also mainly copy-paste and we keep the option on fixed size calculations. edit: Plus, we would have them available as static functions, which can be handy, e.g. in tests
It adds a bit of extra code, since everything is now there twice (see InterpolationTriangleLinear.h and InterpolationTriangleLinear.cpp), but I think its fine.
Why can't these methods that return shape functions and derivatives be always static?
They have to implement the InterpolationInterface
. And virtual methods cannot be static.
The files are deleted in #250. Most content moved to the respective interpolation classes.
I think this
ElementShapeFunctions.h/cpp
file is way to big, and collects all shape functions for no good reason. And it shows in names likeDerivativeShapeFunctionsTriangleOrder1
, which could just be namedDerivativeShapeFunctions
at the appropriate interpolation class. So I think moving that there is the nicer approach. In 23b8c23a I have tried that forTriangleLinear
. Does anyone see a problem with continuing that?