14 const double x =
xyz[0];
15 const double y =
xyz[1];
16 const double z =
xyz[2];
19 const double gz = 1.0 - fz;
21 const double gr = 1.0 -
fr;
24 for (
int i = 0;
i < 2; ++
i) {
36 const double c(
x * invr);
37 const double s(
y * invr);
44 std::array<double, 2> dBdz{};
45 std::array<double, 2> dBdr{};
46 for (
int j = 0; j < 2; ++j) {
54 const double cc =
c *
c;
55 const double cs =
c *
s;
56 const double ss =
s *
s;
57 const double sinvr =
s * invr;
58 const double cinvr =
c * invr;
59 deriv[0] =
cc * dBdr[1] + sinvr *
B[1];
60 deriv[1] = cs * dBdr[1] - cinvr *
B[1];
61 deriv[2] =
c * dBdz[1];
62 deriv[3] = cs * dBdr[1] - sinvr *
B[0];
63 deriv[4] =
ss * dBdr[1] + cinvr *
B[0];
64 deriv[5] =
s * dBdz[1];
65 deriv[6] =
c * dBdr[0];
66 deriv[7] =
s * dBdr[0];