Kratos
Kratos copied to clipboard
Extending the element size calculator to quadratic elements
📝 Description
This PR is aimed to include quadratic elements support to element_size_calculator.cpp.
Tags:
- Core, Features
🆕 Changelog
- Triangle2D6, Quadrilateral2D9, Tetrahedra3D10, Hexahedra3D27 in
element_size_calculator.cpp. - Added tests for these elements
I defined the ProjectedElementSize functions for quadratic elements but I have not implemented nothing in them. This is something especific from FIC elements, so the extension to quadratic elements should be implemented for FIC developers
All quadratic geometries implementations are copied and pasted. This can be avoided by calling the corresponding linear geometries methods.
Yes, it is true. I think that I can define only the some nodes (in the vertices) of the quadratic elements to run the cpp tests
All quadratic geometries implementations are copied and pasted. This can be avoided by calling the corresponding linear geometries methods.
Yes, it is true. I think that I can define only the some nodes (in the vertices) of the quadratic elements to run the cpp tests
Exactly. What I'd do is to specialize the templates for the quadratic geometries but these only interface the "old" linear geometries methods.
All quadratic geometries implementations are copied and pasted. This can be avoided by calling the corresponding linear geometries methods.
Yes, it is true. I think that I can define only the some nodes (in the vertices) of the quadratic elements to run the cpp tests
Exactly. What I'd do is to specialize the templates for the quadratic geometries but these only interface the "old" linear geometries methods.
I think this will work with the calculation of the element size, but not with ElementSizeDerivatives since it checks the number of nodes of the element.
All quadratic geometries implementations are copied and pasted. This can be avoided by calling the corresponding linear geometries methods.
Yes, it is true. I think that I can define only the some nodes (in the vertices) of the quadratic elements to run the cpp tests
Exactly. What I'd do is to specialize the templates for the quadratic geometries but these only interface the "old" linear geometries methods.
I think this will work with the calculation of the element size, but not with
ElementSizeDerivativessince it checks the number of nodes of the element.
About the derivatives I'd like to hear @sunethwarna 's opinion before merging. He is the one that really knows what's going on in there. In any case, you can move the implementation to an auxiliary private method which is called after the check.
The existing derivative implementation will work for existing number of nodes only. For the higher order elements even though they don't use the additional nodes for element size calculations, the derivatives w.r.t. those nodes should be defined. All the tests created in this PR will fail in debug mode. Therefore I would create new templated methods for all the derivatives and call the corresponding existing derivative method for lower node indices and return zero for higher node indices.
It passes the tests in my local machine (even in debug mode). @rubenzorrilla, @sunethwarna. I hope everything it's OK.
@loumalouomega, do you agree with the changes?
Thanks, @loumalouomega. Could you approve?