Skip to content

Commit

Permalink
change ordering of template
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroCornejo committed Dec 2, 2024
1 parent cb355d0 commit 32e5deb
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ namespace Kratos
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
void LinearTrussElement<TNNodes, TDimension>::Initialize(const ProcessInfo& rCurrentProcessInfo)
template <SizeType TDimension, SizeType TNNodes>
void LinearTrussElement<TDimension, TNNodes>::Initialize(const ProcessInfo& rCurrentProcessInfo)
{
KRATOS_TRY

Expand Down Expand Up @@ -55,8 +55,8 @@ void LinearTrussElement<TNNodes, TDimension>::Initialize(const ProcessInfo& rCur
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
void LinearTrussElement<TNNodes, TDimension>::InitializeMaterial()
template <SizeType TDimension, SizeType TNNodes>
void LinearTrussElement<TDimension, TNNodes>::InitializeMaterial()
{
KRATOS_TRY
const auto &r_props = GetProperties();
Expand All @@ -77,15 +77,15 @@ void LinearTrussElement<TNNodes, TDimension>::InitializeMaterial()
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
Element::Pointer LinearTrussElement<TNNodes, TDimension>::Clone(
template <SizeType TDimension, SizeType TNNodes>
Element::Pointer LinearTrussElement<TDimension, TNNodes>::Clone(
IndexType NewId,
NodesArrayType const& rThisNodes
) const
{
KRATOS_TRY

LinearTrussElement<TNNodes, TDimension>::Pointer p_new_elem = Kratos::make_intrusive<LinearTrussElement<TNNodes, TDimension>>(NewId, GetGeometry().Create(rThisNodes), pGetProperties());
LinearTrussElement<TDimension, TNNodes>::Pointer p_new_elem = Kratos::make_intrusive<LinearTrussElement<TDimension, TNNodes>>(NewId, GetGeometry().Create(rThisNodes), pGetProperties());
p_new_elem->SetData(this->GetData());
p_new_elem->Set(Flags(*this));

Expand All @@ -103,8 +103,8 @@ Element::Pointer LinearTrussElement<TNNodes, TDimension>::Clone(
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
void LinearTrussElement<TNNodes, TDimension>::EquationIdVector(
template <SizeType TDimension, SizeType TNNodes>
void LinearTrussElement<TDimension, TNNodes>::EquationIdVector(
EquationIdVectorType& rResult,
const ProcessInfo& rCurrentProcessInfo
) const
Expand All @@ -130,8 +130,8 @@ void LinearTrussElement<TNNodes, TDimension>::EquationIdVector(
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
void LinearTrussElement<TNNodes, TDimension>::GetDofList(
template <SizeType TDimension, SizeType TNNodes>
void LinearTrussElement<TDimension, TNNodes>::GetDofList(
DofsVectorType& rElementalDofList,
const ProcessInfo& rCurrentProcessInfo
) const
Expand All @@ -156,8 +156,8 @@ void LinearTrussElement<TNNodes, TDimension>::GetDofList(
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
void LinearTrussElement<TNNodes, TDimension>::GetShapeFunctionsValues(
template <SizeType TDimension, SizeType TNNodes>
void LinearTrussElement<TDimension, TNNodes>::GetShapeFunctionsValues(
SystemSizeBoundedArrayType& rN,
const double Length,
const double xi
Expand Down Expand Up @@ -195,8 +195,8 @@ void LinearTrussElement<TNNodes, TDimension>::GetShapeFunctionsValues(
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
void LinearTrussElement<TNNodes, TDimension>::GetShapeFunctionsValuesY(
template <SizeType TDimension, SizeType TNNodes>
void LinearTrussElement<TDimension, TNNodes>::GetShapeFunctionsValuesY(
SystemSizeBoundedArrayType& rN,
const double Length,
const double xi
Expand Down Expand Up @@ -233,8 +233,8 @@ void LinearTrussElement<TNNodes, TDimension>::GetShapeFunctionsValuesY(
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
void LinearTrussElement<TNNodes, TDimension>::GetShapeFunctionsValuesZ(
template <SizeType TDimension, SizeType TNNodes>
void LinearTrussElement<TDimension, TNNodes>::GetShapeFunctionsValuesZ(
SystemSizeBoundedArrayType& rN,
const double Length,
const double xi
Expand Down Expand Up @@ -262,8 +262,8 @@ void LinearTrussElement<TNNodes, TDimension>::GetShapeFunctionsValuesZ(
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
void LinearTrussElement<TNNodes, TDimension>::GetFirstDerivativesShapeFunctionsValues(
template <SizeType TDimension, SizeType TNNodes>
void LinearTrussElement<TDimension, TNNodes>::GetFirstDerivativesShapeFunctionsValues(
SystemSizeBoundedArrayType& rdN_dX,
const double Length,
const double xi
Expand Down Expand Up @@ -302,8 +302,8 @@ void LinearTrussElement<TNNodes, TDimension>::GetFirstDerivativesShapeFunctionsV
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
BoundedMatrix<double, 3, 3> LinearTrussElement<TNNodes, TDimension>::GetFrenetSerretMatrix() const
template <SizeType TDimension, SizeType TNNodes>
BoundedMatrix<double, 3, 3> LinearTrussElement<TDimension, TNNodes>::GetFrenetSerretMatrix() const
{
const auto &r_geom = GetGeometry();
BoundedMatrix<double, 3, 3> T;
Expand Down Expand Up @@ -349,8 +349,8 @@ BoundedMatrix<double, 3, 3> LinearTrussElement<TNNodes, TDimension>::GetFrenetSe
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
void LinearTrussElement<TNNodes, TDimension>::GetNodalValuesVector(SystemSizeBoundedArrayType& rNodalValues) const
template <SizeType TDimension, SizeType TNNodes>
void LinearTrussElement<TDimension, TNNodes>::GetNodalValuesVector(SystemSizeBoundedArrayType& rNodalValues) const
{
if (rNodalValues.size() != SystemSize)
rNodalValues.resize(SystemSize, false);
Expand Down Expand Up @@ -398,8 +398,8 @@ void LinearTrussElement<TNNodes, TDimension>::GetNodalValuesVector(SystemSizeBou
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
array_1d<double, 3> LinearTrussElement<TNNodes, TDimension>::GetLocalAxesBodyForce(
template <SizeType TDimension, SizeType TNNodes>
array_1d<double, 3> LinearTrussElement<TDimension, TNNodes>::GetLocalAxesBodyForce(
const Element &rElement,
const GeometryType::IntegrationPointsArrayType &rIntegrationPoints,
const IndexType PointNumber
Expand Down Expand Up @@ -427,8 +427,8 @@ array_1d<double, 3> LinearTrussElement<TNNodes, TDimension>::GetLocalAxesBodyFor
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
void LinearTrussElement<TNNodes, TDimension>::CalculateLocalSystem(
template <SizeType TDimension, SizeType TNNodes>
void LinearTrussElement<TDimension, TNNodes>::CalculateLocalSystem(
MatrixType& rLHS,
VectorType& rRHS,
const ProcessInfo& rProcessInfo
Expand Down Expand Up @@ -503,8 +503,8 @@ void LinearTrussElement<TNNodes, TDimension>::CalculateLocalSystem(
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
void LinearTrussElement<TNNodes, TDimension>::CalculateLeftHandSide(
template <SizeType TDimension, SizeType TNNodes>
void LinearTrussElement<TDimension, TNNodes>::CalculateLeftHandSide(
MatrixType& rLHS,
const ProcessInfo& rProcessInfo
)
Expand Down Expand Up @@ -564,8 +564,8 @@ void LinearTrussElement<TNNodes, TDimension>::CalculateLeftHandSide(
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
void LinearTrussElement<TNNodes, TDimension>::CalculateRightHandSide(
template <SizeType TDimension, SizeType TNNodes>
void LinearTrussElement<TDimension, TNNodes>::CalculateRightHandSide(
VectorType& rRHS,
const ProcessInfo& rProcessInfo
)
Expand Down Expand Up @@ -632,8 +632,8 @@ void LinearTrussElement<TNNodes, TDimension>::CalculateRightHandSide(
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
void LinearTrussElement<TNNodes, TDimension>::RotateLHS(
template <SizeType TDimension, SizeType TNNodes>
void LinearTrussElement<TDimension, TNNodes>::RotateLHS(
MatrixType& rLHS
)
{
Expand Down Expand Up @@ -664,8 +664,8 @@ void LinearTrussElement<TNNodes, TDimension>::RotateLHS(
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
void LinearTrussElement<TNNodes, TDimension>::RotateRHS(
template <SizeType TDimension, SizeType TNNodes>
void LinearTrussElement<TDimension, TNNodes>::RotateRHS(
VectorType& rRHS
)
{
Expand Down Expand Up @@ -697,8 +697,8 @@ void LinearTrussElement<TNNodes, TDimension>::RotateRHS(
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
void LinearTrussElement<TNNodes, TDimension>::RotateAll(
template <SizeType TDimension, SizeType TNNodes>
void LinearTrussElement<TDimension, TNNodes>::RotateAll(
MatrixType& rLHS,
VectorType& rRHS
)
Expand Down Expand Up @@ -736,8 +736,8 @@ void LinearTrussElement<TNNodes, TDimension>::RotateAll(
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
void LinearTrussElement<TNNodes, TDimension>::CalculateOnIntegrationPoints(
template <SizeType TDimension, SizeType TNNodes>
void LinearTrussElement<TDimension, TNNodes>::CalculateOnIntegrationPoints(
const Variable<double>& rVariable,
std::vector<double>& rOutput,
const ProcessInfo& rProcessInfo
Expand Down Expand Up @@ -815,8 +815,8 @@ void LinearTrussElement<TNNodes, TDimension>::CalculateOnIntegrationPoints(
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
void LinearTrussElement<TNNodes, TDimension>::CalculateOnIntegrationPoints(
template <SizeType TDimension, SizeType TNNodes>
void LinearTrussElement<TDimension, TNNodes>::CalculateOnIntegrationPoints(
const Variable<ConstitutiveLaw::Pointer>& rVariable,
std::vector<ConstitutiveLaw::Pointer>& rValues,
const ProcessInfo& rCurrentProcessInfo
Expand All @@ -836,8 +836,8 @@ void LinearTrussElement<TNNodes, TDimension>::CalculateOnIntegrationPoints(
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
int LinearTrussElement<TNNodes, TDimension>::Check(const ProcessInfo& rCurrentProcessInfo) const
template <SizeType TDimension, SizeType TNNodes>
int LinearTrussElement<TDimension, TNNodes>::Check(const ProcessInfo& rCurrentProcessInfo) const
{
KRATOS_TRY;

Expand All @@ -850,8 +850,8 @@ int LinearTrussElement<TNNodes, TDimension>::Check(const ProcessInfo& rCurrentPr
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
void LinearTrussElement<TNNodes, TDimension>::save(Serializer& rSerializer) const
template <SizeType TDimension, SizeType TNNodes>
void LinearTrussElement<TDimension, TNNodes>::save(Serializer& rSerializer) const
{
KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, Element);
int IntMethod = int(this->GetIntegrationMethod());
Expand All @@ -862,8 +862,8 @@ void LinearTrussElement<TNNodes, TDimension>::save(Serializer& rSerializer) cons
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
void LinearTrussElement<TNNodes, TDimension>::load(Serializer& rSerializer)
template <SizeType TDimension, SizeType TNNodes>
void LinearTrussElement<TDimension, TNNodes>::load(Serializer& rSerializer)
{
KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, Element);
int IntMethod;
Expand All @@ -875,8 +875,8 @@ void LinearTrussElement<TNNodes, TDimension>::load(Serializer& rSerializer)
/***********************************************************************************/
/***********************************************************************************/

template<SizeType TNNodes, SizeType TDimension>
array_1d<double, TNNodes> LinearTrussElement<TNNodes, TDimension>::GetBaseShapeFunctions(const double xi) const
template <SizeType TDimension, SizeType TNNodes>
array_1d<double, TNNodes> LinearTrussElement<TDimension, TNNodes>::GetBaseShapeFunctions(const double xi) const
{
array_1d<double, TNNodes> N;

Expand All @@ -895,8 +895,8 @@ array_1d<double, TNNodes> LinearTrussElement<TNNodes, TDimension>::GetBaseShapeF
/***********************************************************************************/

template class LinearTrussElement<2, 2>;
template class LinearTrussElement<3, 2>;
template class LinearTrussElement<2, 3>;
template class LinearTrussElement<3, 2>;
template class LinearTrussElement<3, 3>;

} // Namespace Kratos
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ using SizeType = std::size_t;
* 0 1 0 2 1
* @author Alejandro Cornejo
*/
template <SizeType TNNodes, SizeType TDimension>
template <SizeType TDimension, SizeType TNNodes>
class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) LinearTrussElement
: public Element
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) KratosStructuralMechanicsAppl
const TrussElementLinear3D2N mTrussLinearElement3D2N;
const CableElement3D2N mCableElement3D2N;
const LinearTrussElement<2, 2> mLinearTrussElement2D2N;
const LinearTrussElement<3, 2> mLinearTrussElement2D3N;
const LinearTrussElement<2, 3> mLinearTrussElement3D2N;
const LinearTrussElement<2, 3> mLinearTrussElement2D3N;
const LinearTrussElement<3, 2> mLinearTrussElement3D2N;
const LinearTrussElement<3, 3> mLinearTrussElement3D3N;

// Adding the beam element
Expand Down

0 comments on commit 32e5deb

Please sign in to comment.