Kratos icon indicating copy to clipboard operation
Kratos copied to clipboard

Extending the element size calculator to quadratic elements

Open jgonzalezusua opened this issue 3 years ago • 6 comments

📝 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

jgonzalezusua avatar Jul 22 '22 10:07 jgonzalezusua

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

jgonzalezusua avatar Jul 22 '22 11:07 jgonzalezusua

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

jgonzalezusua avatar Jul 23 '22 11:07 jgonzalezusua

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.

rubenzorrilla avatar Jul 23 '22 14:07 rubenzorrilla

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.

jgonzalezusua avatar Jul 23 '22 18:07 jgonzalezusua

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.

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.

rubenzorrilla avatar Jul 24 '22 08:07 rubenzorrilla

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.

sunethwarna avatar Jul 28 '22 07:07 sunethwarna

It passes the tests in my local machine (even in debug mode). @rubenzorrilla, @sunethwarna. I hope everything it's OK.

jgonzalezusua avatar Oct 04 '22 15:10 jgonzalezusua

@loumalouomega, do you agree with the changes?

jgonzalezusua avatar Oct 05 '22 10:10 jgonzalezusua

Thanks, @loumalouomega. Could you approve?

jgonzalezusua avatar Oct 05 '22 12:10 jgonzalezusua