Skip to content

Commit 864a095

Browse files
committed
Use template specifier on dependent names
1 parent fccab79 commit 864a095

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

source/pbat/math/linalg/mini/Concepts.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef PBAT_MATH_LINALG_MINI_CONCEPTS_CUH
2-
#define PBAT_MATH_LINALG_MINI_CONCEPTS_CUH
1+
#ifndef PBAT_MATH_LINALG_MINI_CONCEPTS_H
2+
#define PBAT_MATH_LINALG_MINI_CONCEPTS_H
33

44
#include <concepts>
55
#include <type_traits>
@@ -131,4 +131,4 @@ concept CWriteableVectorizedMatrix = CMatrix<TMatrix>;
131131
return kCols; \
132132
}
133133

134-
#endif // PBAT_MATH_LINALG_MINI_CONCEPTS_CUH
134+
#endif // PBAT_MATH_LINALG_MINI_CONCEPTS_H

source/pbat/sim/xpbd/Kernels.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,19 @@ PBAT_HOST_DEVICE void ProjectBlockNeoHookean(
9393
#pragma nv_diag_suppress 174
9494
#endif
9595
// Compute deviatoric+hydrostatic elasticity
96-
SMatrix<ScalarType, 3, 3> F = (xc.Slice<3, 3>(0, 1) - Repeat<1, 3>(xc.Col(0))) * DmInv;
96+
SMatrix<ScalarType, 3, 3> F = (xc.template Slice<3, 3>(0, 1) - Repeat<1, 3>(xc.Col(0))) * DmInv;
9797
ScalarType CD = Norm(F);
9898
SMatrix<ScalarType, 3, 4> gradCD{};
99-
gradCD.Slice<3, 3>(0, 1) = (F * DmInv.Transpose()) / (CD /*+ 1e-8*/);
100-
gradCD.Col(0) = -(gradCD.Col(1) + gradCD.Col(2) + gradCD.Col(3));
101-
ScalarType CH = Determinant(F) - gammaSNHc;
99+
gradCD.template Slice<3, 3>(0, 1) = (F * DmInv.Transpose()) / (CD /*+ 1e-8*/);
100+
gradCD.Col(0) = -(gradCD.Col(1) + gradCD.Col(2) + gradCD.Col(3));
101+
ScalarType CH = Determinant(F) - gammaSNHc;
102102
SMatrix<ScalarType, 3, 3> PH{};
103103
PH.Col(0) = Cross(F.Col(1), F.Col(2));
104104
PH.Col(1) = Cross(F.Col(2), F.Col(0));
105105
PH.Col(2) = Cross(F.Col(0), F.Col(1));
106106
SMatrix<ScalarType, 3, 4> gradCH{};
107-
gradCH.Slice<3, 3>(0, 1) = PH * DmInv.Transpose();
108-
gradCH.Col(0) = -(gradCH.Col(1) + gradCH.Col(2) + gradCH.Col(3));
107+
gradCH.template Slice<3, 3>(0, 1) = PH * DmInv.Transpose();
108+
gradCH.Col(0) = -(gradCH.Col(1) + gradCH.Col(2) + gradCH.Col(3));
109109
#if defined(CUDART_VERSION)
110110
#pragma nv_diag_default 174
111111
#endif

0 commit comments

Comments
 (0)