28 "Wrong sizes for Lagrange coefficients generation %d %d -- %d %d",
33 int ndofs = monomial.
size1();
34 int dim = monomial.
size2();
37 for(
int i = 0; i < ndofs; i++) {
38 for(
int j = 0; j < ndofs; j++) {
40 for(
int k = 0; k < dim; k++) dd *=
pow_int(point(j, k), monomial(i, k));
41 Vandermonde(i, j) = dd;
46 Vandermonde.invert(coefficient);
140 for(
int iPoint = 0; iPoint < coord.
size1(); iPoint++) {
142 coord.
size2() > 1 ? coord(iPoint, 1) : 0,
143 coord.
size2() > 2 ? coord(iPoint, 2) : 0, p);
155 Msg::Error(
"Node out of range for polynomial basis");
172 int dimCoord = coord.
size2();
173 for(
int iPoint = 0; iPoint < coord.
size1(); iPoint++) {
174 df(coord(iPoint, 0), dimCoord > 1 ? coord(iPoint, 1) : 0.,
175 dimCoord > 2 ? coord(iPoint, 2) : 0., dfv);
177 dfm(iPoint * 3 + 0, i) = dfv[i][0];
178 dfm(iPoint * 3 + 1, i) = dfv[i][1];
179 dfm(iPoint * 3 + 2, i) = dfv[i][2];
241 double grad[3])
const
244 Msg::Error(
"Node out of range for polynomial basis gradient");
295 double hess[][3][3])
const
300 hess[i][0][0] = hess[i][0][1] = hess[i][0][2] = 0;
301 hess[i][1][0] = hess[i][1][1] = hess[i][1][2] = 0;
302 hess[i][2][0] = hess[i][2][1] = hess[i][2][2] = 0;
314 hess[i][0][0] = hess[i][0][1] = hess[i][0][2] = 0;
315 hess[i][1][0] = hess[i][1][1] = hess[i][1][2] = 0;
316 hess[i][2][0] = hess[i][2][1] = hess[i][2][2] = 0;
331 hess[i][1][0] = hess[i][0][1];
336 hess[i][0][0] = hess[i][0][1] = hess[i][0][2] = 0;
337 hess[i][1][0] = hess[i][1][1] = hess[i][1][2] = 0;
338 hess[i][2][0] = hess[i][2][1] = hess[i][2][2] = 0;
370 hess[i][1][0] = hess[i][0][1];
371 hess[i][2][0] = hess[i][0][2];
372 hess[i][2][1] = hess[i][1][2];
379 double third[][3][3][3])
const
384 for(
int p = 0; p < 3; p++)
385 for(
int q = 0; q < 3; q++)
386 for(
int r = 0; r < 3; r++) third[i][p][q][r] = 0.;
398 for(
int p = 0; p < 3; p++)
399 for(
int q = 0; q < 3; q++)
400 for(
int r = 0; r < 3; r++) third[i][p][q][r] = 0.;
423 third[i][0][1][0] = third[i][0][0][1];
424 third[i][1][0][0] = third[i][0][0][1];
425 third[i][1][0][1] = third[i][0][1][1];
426 third[i][1][1][0] = third[i][0][1][1];
431 for(
int p = 0; p < 3; p++)
432 for(
int q = 0; q < 3; q++)
433 for(
int r = 0; r < 3; r++) third[i][p][q][r] = 0.;
502 third[i][0][1][0] = third[i][0][0][1];
503 third[i][1][0][0] = third[i][0][0][1];
505 third[i][2][0][0] = third[i][0][0][2];
506 third[i][0][2][0] = third[i][0][0][2];
508 third[i][1][0][1] = third[i][0][1][1];
509 third[i][1][1][0] = third[i][0][1][1];
511 third[i][0][2][1] = third[i][0][1][2];
512 third[i][1][0][2] = third[i][0][1][2];
513 third[i][1][2][0] = third[i][0][1][2];
514 third[i][2][1][0] = third[i][0][1][2];
515 third[i][2][0][1] = third[i][0][1][2];
517 third[i][2][2][0] = third[i][0][2][2];
518 third[i][2][0][2] = third[i][0][2][2];
520 third[i][1][2][1] = third[i][1][1][2];
521 third[i][2][1][1] = third[i][1][1][2];
523 third[i][2][2][1] = third[i][1][2][2];
524 third[i][2][1][2] = third[i][1][2][2];