15 const std::vector<util::Point> &nodes,
bool derivatives) {
16 for (
auto &qd : qds) {
17 const auto n = qd.d_shapes.size();
18 if (qd.d_derShapes.size() != n || n == 0 || qd.d_derShapes[0].empty())
20 const int dim =
static_cast<int>(qd.d_derShapes[0].size());
22 std::vector<std::vector<double>> J(dim, std::vector<double>(dim, 0.));
23 for (
int a = 0; a < static_cast<int>(n); a++)
24 for (
int alpha = 0; alpha < dim; alpha++)
25 for (
int j = 0; j < dim; j++)
26 J[alpha][j] += qd.d_derShapes[a][alpha] * nodes[a][j];
33 for (
size_t a = 0; a < n; a++)
34 for (
int j = 0; j < dim; j++)
35 qd.d_p[j] += qd.d_shapes[a] * nodes[a][j];
41 for (
size_t a = 0; a < n; a++)
42 qd.d_derShapes[a] =
util::dot(Jinv, qd.d_derShapes[a]);
std::vector< double > dot(const std::vector< std::vector< double > > &m, const std::vector< double > &v)
Computes the dot product between matrix and vector.