Skip to content

Add constants to mesh element classes

I'd like to access element constants (dimension, the number of nodes) at compiling time in order to use fixed size local matrices for FEM calculations. Currently getDimension() and getNNodes() in Element class are only interfaces to get those constants but are defined as virtual functions, i.e. non-static.

Therefore my proposal is adding public static const member variables to element classes. To get an agreement with you, I prepared a first implementation of the idea only for Quad element. Please take a look and tell me your opinion or suggest me a better way if you know. Once we reach an agreement, I'll extend the implementation to other elements.

Merge request reports