KratosMultiphysics / Kratos

Kratos Multiphysics (A.K.A Kratos) is a framework for building parallel multi-disciplinary simulation software. Modularity, extensibility and HPC are the main objectives. Kratos has BSD license and is written in C++ with extensive Python interface.
https://kratosmultiphysics.github.io/Kratos/
Other
1.01k stars 244 forks source link

operator[] , operator() and iterators in Geometry should not be virtual!! #8826

Closed RiccardoRossi closed 3 years ago

RiccardoRossi commented 3 years ago

Description By profiling code we (well @maceligueta ) discovered that the access operators to the nodes of the geometry were recently made virtual. For a simple element (in implicit!) this means around 5% of the total execution time. That would be much more in explicit.

the change was introduced to allow overriding the operators in brep_geometry.

the point is how to get rid of this without breaking (at least not too much) the brep usage.

Scope any time one uses the geometry

To Reproduce any use of operator [] () or of the iterators of a geometry

Expected behavior remove the virtual from the base class

Environment any

RiccardoRossi commented 3 years ago

looks like @tteschemacher already has a fix for this

https://github.com/KratosMultiphysics/Kratos/pull/8684