27 KOKKOS_INLINE_FUNCTION T
30 return x >= 0.0 ? 1.0 : -1.0;
41 KOKKOS_INLINE_FUNCTION
const T *
42 find(
const T & target,
const T *
const begin,
const T *
const end)
52 auto mid = left + (right - left) / 2;
56 else if (*mid < target)
73 KOKKOS_INLINE_FUNCTION
void 74 choleskySolve(Real *
const A, Real *
const x, Real *
const b,
const unsigned int n)
76 for (
unsigned int i = 0; i < n; ++i)
78 for (
unsigned int j = 0; j <= i; ++j)
80 Real sum = A[j + n * i];
82 for (
unsigned int k = 0; k < j; ++k)
83 sum -= A[k + n * i] * A[k + n * j];
88 A[j + n * i] = sum / A[j + n * j];
92 for (
unsigned int i = 0; i < n; ++i)
96 for (
unsigned int j = 0; j < i; ++j)
97 sum -= A[j + n * i] * b[j];
99 b[i] = sum / A[i + n * i];
102 for (
int i = n - 1; i >= 0; --i)
106 for (
unsigned int j = i + 1; j < n; ++j)
107 sum -= A[i + n * j] * b[j];
109 x[i] = sum / A[i + n * i];
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
KOKKOS_INLINE_FUNCTION void choleskySolve(Real *const A, Real *const x, Real *const b, const unsigned int n)
Perform an in-place linear solve using Cholesky decomposition Matrix and right-hand-side vector are m...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
KOKKOS_INLINE_FUNCTION T sign(T x)
Returns the sign of a value.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...