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.
At present, in the element hierarchy of GeoMechanicsApplication there are two branches of U-Pw elements: one for non-diff order elements (starting from UPwBaseElement) and the other one for diff order elements (starting from SmallStrainUPwDiffOrderElement). The problem with this design is that code is duplicated, since the common ancestor class is Element, which doesn't provide any geomechanics-specific functionality. When we would make SmallStrainUPwDiffOrderElement a subclass of UPwBaseElement, the relationships start to make more sense and also we can get rid of some code duplication. A practical issue here is that UPwBaseElement is a class template, whereas SmallStrainUPwDiffOrderElement isn't.
Acceptance Criteria
Class UPwBaseElement is no longer a class template. In other words, its template parameters TDim and TNumNodes must have been eliminated.
Implementation Details
In order to achieve what has been described above, the following action points have to be carried out:
[ ] Remove the template parameters TDim and TNumNodes from the member function signatures.
[ ] Where TDim is being referenced, use the value returned by this->GetGeometry().WorkingSpaceDimension(). Note that also constexpr will need to be removed (when present), since this value can no longer be evaluated at compile time.
[ ] Where TNumNodes is being referenced, use the value returned by this->GetGeometry().PointsNumber().
[ ] Function template GeoElementUtilities::GetNodalVariableMatrix needs to be modified such that it also no longer has any template parameters. Since we pass the element's geometry as an argument to this function, we can obtain the element's dimension as well as the number of nodes as described above for TDim and TNumNodes, respectively.
[ ] Remove the explicit class instantiations from the implementation file.
Background
At present, in the element hierarchy of GeoMechanicsApplication there are two branches of U-Pw elements: one for non-diff order elements (starting from
UPwBaseElement
) and the other one for diff order elements (starting fromSmallStrainUPwDiffOrderElement
). The problem with this design is that code is duplicated, since the common ancestor class isElement
, which doesn't provide any geomechanics-specific functionality. When we would makeSmallStrainUPwDiffOrderElement
a subclass ofUPwBaseElement
, the relationships start to make more sense and also we can get rid of some code duplication. A practical issue here is thatUPwBaseElement
is a class template, whereasSmallStrainUPwDiffOrderElement
isn't.Acceptance Criteria
Class
UPwBaseElement
is no longer a class template. In other words, its template parametersTDim
andTNumNodes
must have been eliminated.Implementation Details
In order to achieve what has been described above, the following action points have to be carried out:
TDim
andTNumNodes
from the member function signatures.TDim
is being referenced, use the value returned bythis->GetGeometry().WorkingSpaceDimension()
. Note that alsoconstexpr
will need to be removed (when present), since this value can no longer be evaluated at compile time.TNumNodes
is being referenced, use the value returned bythis->GetGeometry().PointsNumber()
.GeoElementUtilities::GetNodalVariableMatrix
needs to be modified such that it also no longer has any template parameters. Since we pass the element's geometry as an argument to this function, we can obtain the element's dimension as well as the number of nodes as described above forTDim
andTNumNodes
, respectively.