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.
📝 Description
Reduced the number of differences between template classes UPwBaseElement and UPwSmallStrainElement on the one hand and class SmallStrainUPwDiffOrderElement on the other hand. Lines have been reordered, redundant comments have been removed, names have been made consistent. This helps to make it more visible where the duplicated code is (which will be removed in small increments), but also where the actual differences are (whether they were intended or not).
🆕 Changelog
Changes include:
Removed several redundant size checks to decide whether a container needs to be resized or not. This check is also done by the resize operation itself, so there is no need to explicitly repeat the check.
Replaced several explicit type names by auto.
Renamed several local variables to comply with the Kratos Style Guide.
Removed some redundant comments.
Removed several redundant resize operations (ones that were immediately followed by an assignment operation). Also removed some noalias usages that wouldn't yield any performance benefits.
Eliminated a few intermediate variables, by replacing their usages by calls to functions that retrieve their (constant) values.
Reused GetVoigtSize when initializing a UPwBaseElement instance rather than repeating the logic it encapsulates.
Removed a few empty statements.
Removed two unused member functions of class template UPwBaseElement.
Reformatted some code using clang-format.
Make sure each variable definition is at its own line (avoid C-style declarations).
Removed data member VoigtVector from class UPwSmallStrainElement::ElementVariables. Its usages have been replaced by calling GetVoigtVector directly.
Added member function GetNumberOfDOF to class SmallStrainUPwDiffOrderElement.
📝 Description Reduced the number of differences between template classes
UPwBaseElement
andUPwSmallStrainElement
on the one hand and classSmallStrainUPwDiffOrderElement
on the other hand. Lines have been reordered, redundant comments have been removed, names have been made consistent. This helps to make it more visible where the duplicated code is (which will be removed in small increments), but also where the actual differences are (whether they were intended or not).🆕 Changelog Changes include:
resize
operation itself, so there is no need to explicitly repeat the check.auto
.resize
operations (ones that were immediately followed by an assignment operation). Also removed somenoalias
usages that wouldn't yield any performance benefits.GetVoigtSize
when initializing aUPwBaseElement
instance rather than repeating the logic it encapsulates.UPwBaseElement
.VoigtVector
from classUPwSmallStrainElement::ElementVariables
. Its usages have been replaced by callingGetVoigtVector
directly.GetNumberOfDOF
to classSmallStrainUPwDiffOrderElement
.