gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
polynomialBasis.cpp
Go to the documentation of this file.
1 // Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
2 //
3 // See the LICENSE.txt file in the Gmsh root directory for license information.
4 // Please report all issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
5 //
6 // Contributor(s):
7 // Koen Hillewaert
8 // Jonathan Lambrechts
9 //
10 
11 #include <stdlib.h>
12 #include <cmath>
13 #include "GmshDefines.h"
14 #include "GmshMessage.h"
15 #include "polynomialBasis.h"
16 #include "GaussIntegration.h"
17 #include "pointsGenerators.h"
18 #include "Numeric.h"
19 #include <limits>
20 
21 namespace {
23  generateLagrangeMonomialCoefficients(const fullMatrix<double> &monomial,
24  const fullMatrix<double> &point)
25  {
26  if(monomial.size1() != point.size1() || monomial.size2() != point.size2()) {
27  Msg::Error(
28  "Wrong sizes for Lagrange coefficients generation %d %d -- %d %d",
29  monomial.size1(), point.size1(), monomial.size2(), point.size2());
30  return fullMatrix<double>(1, 1);
31  }
32 
33  int ndofs = monomial.size1();
34  int dim = monomial.size2();
35 
36  fullMatrix<double> Vandermonde(ndofs, ndofs);
37  for(int i = 0; i < ndofs; i++) {
38  for(int j = 0; j < ndofs; j++) {
39  double dd = 1.;
40  for(int k = 0; k < dim; k++) dd *= pow_int(point(j, k), monomial(i, k));
41  Vandermonde(i, j) = dd;
42  }
43  }
44 
45  fullMatrix<double> coefficient(ndofs, ndofs);
46  Vandermonde.invert(coefficient);
47 
48  return coefficient;
49  }
50 
51  /*
52  void printClosure(polynomialBasis::clCont &fullClosure,
53  std::vector<int> &closureRef,
54  polynomialBasis::clCont &closures)
55  {
56  for(std::size_t i = 0; i < closures.size(); i++){
57  printf("%3i (%2i): ", i, closureRef[i]);
58  if(closureRef[i]==-1){
59  printf("\n");
60  continue;
61  }
62  for(std::size_t j = 0; j < fullClosure[i].size(); j++){
63  printf("%2i ", fullClosure[i][j]);
64  }
65  printf (" -- ");
66  for(std::size_t j = 0; j < closures[closureRef[i]].size(); j++){
67  std::string equalSign = "-";
68  if(fullClosure[i][closures[closureRef[i]][j]] != closures[i][j])
69  equalSign = "#";
70  printf("%2i%s%2i ",
71  fullClosure[i][closures[closureRef[i]][j]],equalSign.c_str(), closures[i][j]);
72  }
73  printf("\n");
74  }
75  }
76  */
77 } // namespace
78 
80 {
81  switch(parentType) {
84  case TYPE_TRI:
86  break;
87  case TYPE_QUA:
90  break;
91  case TYPE_TET:
93  break;
94  case TYPE_PRI:
97  break;
98  case TYPE_HEX:
101  break;
102  }
103 
104  coefficients = generateLagrangeMonomialCoefficients(monomials, points);
105 }
106 
108 
109 void polynomialBasis::evaluateMonomials(double u, double v, double w,
110  double p[]) const
111 {
112  for(int j = 0; j < monomials.size1(); ++j) {
113  p[j] = 1.;
114  switch(dimension) {
115  case 3: p[j] *= pow_int(w, monomials(j, 2));
116  case 2: p[j] *= pow_int(v, monomials(j, 1));
117  case 1: p[j] *= pow_int(u, monomials(j, 0));
118  default: break;
119  }
120  }
121 }
122 
123 void polynomialBasis::f(double u, double v, double w, double *sf) const
124 {
125  double p[1256];
126  evaluateMonomials(u, v, w, p);
127  for(int i = 0; i < coefficients.size1(); i++) {
128  sf[i] = 0.0;
129  for(int j = 0; j < coefficients.size2(); j++) {
130  sf[i] += coefficients(i, j) * p[j];
131  }
132  }
133 }
134 
136  fullMatrix<double> &sf) const
137 {
138  double p[1256];
139  sf.resize(coord.size1(), coefficients.size1());
140  for(int iPoint = 0; iPoint < coord.size1(); iPoint++) {
141  evaluateMonomials(coord(iPoint, 0),
142  coord.size2() > 1 ? coord(iPoint, 1) : 0,
143  coord.size2() > 2 ? coord(iPoint, 2) : 0, p);
144  for(int i = 0; i < coefficients.size1(); i++) {
145  sf(iPoint, i) = 0.;
146  for(int j = 0; j < coefficients.size2(); j++)
147  sf(iPoint, i) += coefficients(i, j) * p[j];
148  }
149  }
150 }
151 
152 void polynomialBasis::f(double u, double v, double w, int i, double *sf) const
153 {
154  if(i < 0 || i >= coefficients.size1()) {
155  Msg::Error("Node out of range for polynomial basis");
156  return;
157  }
158 
159  double p[1256];
160  evaluateMonomials(u, v, w, p);
161  *sf = 0.0;
162  for(int j = 0; j < coefficients.size2(); j++) {
163  *sf += coefficients(i, j) * p[j];
164  }
165 }
166 
168  fullMatrix<double> &dfm) const
169 {
170  double dfv[1256][3];
171  dfm.resize(coord.size1() * 3, coefficients.size1(), false);
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);
176  for(int i = 0; i < coefficients.size1(); i++) {
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];
180  }
181  }
182 }
183 
184 void polynomialBasis::df(double u, double v, double w, double grads[][3]) const
185 {
186  switch(monomials.size2()) {
187  case 1:
188  for(int i = 0; i < coefficients.size1(); i++) {
189  grads[i][0] = 0;
190  grads[i][1] = 0;
191  grads[i][2] = 0;
192  for(int j = 0; j < coefficients.size2(); j++) {
193  if(monomials(j, 0) > 0)
194  grads[i][0] += coefficients(i, j) *
195  pow_int(u, (monomials(j, 0) - 1)) * monomials(j, 0);
196  }
197  }
198  break;
199  case 2:
200  for(int i = 0; i < coefficients.size1(); i++) {
201  grads[i][0] = 0;
202  grads[i][1] = 0;
203  grads[i][2] = 0;
204  for(int j = 0; j < coefficients.size2(); j++) {
205  if(monomials(j, 0) > 0)
206  grads[i][0] += coefficients(i, j) *
207  pow_int(u, (monomials(j, 0) - 1)) * monomials(j, 0) *
208  pow_int(v, monomials(j, 1));
209  if(monomials(j, 1) > 0)
210  grads[i][1] += coefficients(i, j) * pow_int(u, monomials(j, 0)) *
211  pow_int(v, (monomials(j, 1) - 1)) * monomials(j, 1);
212  }
213  }
214  break;
215  case 3:
216  for(int i = 0; i < coefficients.size1(); i++) {
217  grads[i][0] = 0;
218  grads[i][1] = 0;
219  grads[i][2] = 0;
220  for(int j = 0; j < coefficients.size2(); j++) {
221  if(monomials(j, 0) > 0)
222  grads[i][0] += coefficients(i, j) *
223  pow_int(u, (monomials(j, 0) - 1)) * monomials(j, 0) *
224  pow_int(v, monomials(j, 1)) *
225  pow_int(w, monomials(j, 2));
226  if(monomials(j, 1) > 0)
227  grads[i][1] += coefficients(i, j) * pow_int(u, monomials(j, 0)) *
228  pow_int(v, (monomials(j, 1) - 1)) * monomials(j, 1) *
229  pow_int(w, monomials(j, 2));
230  if(monomials(j, 2) > 0)
231  grads[i][2] += coefficients(i, j) * pow_int(u, monomials(j, 0)) *
232  pow_int(v, monomials(j, 1)) *
233  pow_int(w, (monomials(j, 2) - 1)) * monomials(j, 2);
234  }
235  }
236  break;
237  }
238 }
239 
240 void polynomialBasis::df(double u, double v, double w, int i,
241  double grad[3]) const
242 {
243  if(i < 0 || i >= coefficients.size1()) {
244  Msg::Error("Node out of range for polynomial basis gradient");
245  return;
246  }
247 
248  switch(monomials.size2()) {
249  case 1:
250  grad[0] = 0;
251  grad[1] = 0;
252  grad[2] = 0;
253  for(int j = 0; j < coefficients.size2(); j++) {
254  if(monomials(j, 0) > 0)
255  grad[0] += coefficients(i, j) * pow_int(u, (monomials(j, 0) - 1)) *
256  monomials(j, 0);
257  }
258  break;
259  case 2:
260  grad[0] = 0;
261  grad[1] = 0;
262  grad[2] = 0;
263  for(int j = 0; j < coefficients.size2(); j++) {
264  if(monomials(j, 0) > 0)
265  grad[0] += coefficients(i, j) * pow_int(u, (monomials(j, 0) - 1)) *
266  monomials(j, 0) * pow_int(v, monomials(j, 1));
267  if(monomials(j, 1) > 0)
268  grad[1] += coefficients(i, j) * pow_int(u, monomials(j, 0)) *
269  pow_int(v, (monomials(j, 1) - 1)) * monomials(j, 1);
270  }
271  break;
272  case 3:
273  grad[0] = 0;
274  grad[1] = 0;
275  grad[2] = 0;
276  for(int j = 0; j < coefficients.size2(); j++) {
277  if(monomials(j, 0) > 0)
278  grad[0] += coefficients(i, j) * pow_int(u, (monomials(j, 0) - 1)) *
279  monomials(j, 0) * pow_int(v, monomials(j, 1)) *
280  pow_int(w, monomials(j, 2));
281  if(monomials(j, 1) > 0)
282  grad[1] += coefficients(i, j) * pow_int(u, monomials(j, 0)) *
283  pow_int(v, (monomials(j, 1) - 1)) * monomials(j, 1) *
284  pow_int(w, monomials(j, 2));
285  if(monomials(j, 2) > 0)
286  grad[2] += coefficients(i, j) * pow_int(u, monomials(j, 0)) *
287  pow_int(v, monomials(j, 1)) *
288  pow_int(w, (monomials(j, 2) - 1)) * monomials(j, 2);
289  }
290  break;
291  }
292 }
293 
294 void polynomialBasis::ddf(double u, double v, double w,
295  double hess[][3][3]) const
296 {
297  switch(monomials.size2()) {
298  case 1:
299  for(int i = 0; i < coefficients.size1(); i++) {
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;
303 
304  for(int j = 0; j < coefficients.size2(); j++) {
305  if(monomials(j, 0) > 1) // second derivative !=0
306  hess[i][0][0] += coefficients(i, j) *
307  pow_int(u, (monomials(j, 0) - 2)) * monomials(j, 0) *
308  (monomials(j, 0) - 1);
309  }
310  }
311  break;
312  case 2:
313  for(int i = 0; i < coefficients.size1(); i++) {
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;
317  for(int j = 0; j < coefficients.size2(); j++) {
318  if(monomials(j, 0) > 1) // second derivative !=0
319  hess[i][0][0] += coefficients(i, j) *
320  pow_int(u, (monomials(j, 0) - 2)) * monomials(j, 0) *
321  (monomials(j, 0) - 1) * pow_int(v, monomials(j, 1));
322  if((monomials(j, 1) > 0) && (monomials(j, 0) > 0))
323  hess[i][0][1] += coefficients(i, j) *
324  pow_int(u, monomials(j, 0) - 1) * monomials(j, 0) *
325  pow_int(v, monomials(j, 1) - 1) * monomials(j, 1);
326  if(monomials(j, 1) > 1)
327  hess[i][1][1] += coefficients(i, j) * pow_int(u, monomials(j, 0)) *
328  pow_int(v, monomials(j, 1) - 2) * monomials(j, 1) *
329  (monomials(j, 1) - 1);
330  }
331  hess[i][1][0] = hess[i][0][1];
332  }
333  break;
334  case 3:
335  for(int i = 0; i < coefficients.size1(); i++) {
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;
339  for(int j = 0; j < coefficients.size2(); j++) {
340  if(monomials(j, 0) > 1)
341  hess[i][0][0] += coefficients(i, j) *
342  pow_int(u, monomials(j, 0) - 2) * monomials(j, 0) *
343  (monomials(j, 0) - 1) * pow_int(v, monomials(j, 1)) *
344  pow_int(w, monomials(j, 2));
345 
346  if((monomials(j, 0) > 0) && (monomials(j, 1) > 0))
347  hess[i][0][1] += coefficients(i, j) *
348  pow_int(u, monomials(j, 0) - 1) * monomials(j, 0) *
349  pow_int(v, monomials(j, 1) - 1) * monomials(j, 1) *
350  pow_int(w, monomials(j, 2));
351  if((monomials(j, 0) > 0) && (monomials(j, 2) > 0))
352  hess[i][0][2] += coefficients(i, j) *
353  pow_int(u, monomials(j, 0) - 1) * monomials(j, 0) *
354  pow_int(v, monomials(j, 1)) *
355  pow_int(w, monomials(j, 2) - 1) * monomials(j, 2);
356  if(monomials(j, 1) > 1)
357  hess[i][1][1] += coefficients(i, j) * pow_int(u, monomials(j, 0)) *
358  pow_int(v, monomials(j, 1) - 2) * monomials(j, 1) *
359  (monomials(j, 1) - 1) * pow_int(w, monomials(j, 2));
360  if((monomials(j, 1) > 0) && (monomials(j, 2) > 0))
361  hess[i][1][2] += coefficients(i, j) * pow_int(u, monomials(j, 0)) *
362  pow_int(v, monomials(j, 1) - 1) * monomials(j, 1) *
363  pow_int(w, monomials(j, 2) - 1) * monomials(j, 2);
364  if(monomials(j, 2) > 1)
365  hess[i][2][2] += coefficients(i, j) * pow_int(u, monomials(j, 0)) *
366  pow_int(v, monomials(j, 1)) *
367  pow_int(w, monomials(j, 2) - 2) * monomials(j, 2) *
368  (monomials(j, 2) - 1);
369  }
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];
373  }
374  break;
375  }
376 }
377 
378 void polynomialBasis::dddf(double u, double v, double w,
379  double third[][3][3][3]) const
380 {
381  switch(monomials.size2()) {
382  case 1:
383  for(int i = 0; i < coefficients.size1(); i++) {
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.;
387 
388  for(int j = 0; j < coefficients.size2(); j++) {
389  if(monomials(j, 0) > 2) // third derivative !=0
390  third[i][0][0][0] +=
391  coefficients(i, j) * pow_int(u, (monomials(j, 0) - 3)) *
392  monomials(j, 0) * (monomials(j, 0) - 1) * (monomials(j, 0) - 2);
393  }
394  }
395  break;
396  case 2:
397  for(int i = 0; i < coefficients.size1(); i++) {
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.;
401  for(int j = 0; j < coefficients.size2(); j++) {
402  if(monomials(j, 0) > 2) // second derivative !=0
403  third[i][0][0][0] +=
404  coefficients(i, j) * pow_int(u, (monomials(j, 0) - 3)) *
405  monomials(j, 0) * (monomials(j, 0) - 1) * (monomials(j, 0) - 2) *
406  pow_int(v, monomials(j, 1));
407  if((monomials(j, 0) > 1) && (monomials(j, 1) > 0))
408  third[i][0][0][1] +=
409  coefficients(i, j) * pow_int(u, monomials(j, 0) - 2) *
410  monomials(j, 0) * (monomials(j, 0) - 1) *
411  pow_int(v, monomials(j, 1) - 1) * monomials(j, 1);
412  if((monomials(j, 0) > 0) && (monomials(j, 1) > 1))
413  third[i][0][1][1] +=
414  coefficients(i, j) * pow_int(u, monomials(j, 0) - 1) *
415  monomials(j, 0) * pow_int(v, monomials(j, 1) - 2) *
416  monomials(j, 1) * (monomials(j, 1) - 1);
417  if(monomials(j, 1) > 2)
418  third[i][1][1][1] +=
419  coefficients(i, j) * pow_int(u, monomials(j, 0)) *
420  pow_int(v, monomials(j, 1) - 3) * monomials(j, 1) *
421  (monomials(j, 1) - 1) * (monomials(j, 1) - 2);
422  }
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];
427  }
428  break;
429  case 3:
430  for(int i = 0; i < coefficients.size1(); i++) {
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.;
434  for(int j = 0; j < coefficients.size2(); j++) {
435  if(monomials(j, 0) > 2) // second derivative !=0
436  third[i][0][0][0] +=
437  coefficients(i, j) * pow_int(u, (monomials(j, 0) - 3)) *
438  monomials(j, 0) * (monomials(j, 0) - 1) * (monomials(j, 0) - 2) *
439  pow_int(v, monomials(j, 1)) * pow_int(w, monomials(j, 2));
440 
441  if((monomials(j, 0) > 1) && (monomials(j, 1) > 0))
442  third[i][0][0][1] += coefficients(i, j) *
443  pow_int(u, monomials(j, 0) - 2) *
444  monomials(j, 0) * (monomials(j, 0) - 1) *
445  pow_int(v, monomials(j, 1) - 1) *
446  monomials(j, 1) * pow_int(w, monomials(j, 2));
447 
448  if((monomials(j, 0) > 1) && (monomials(j, 2) > 0))
449  third[i][0][0][2] +=
450  coefficients(i, j) * pow_int(u, monomials(j, 0) - 2) *
451  monomials(j, 0) * (monomials(j, 0) - 1) *
452  pow_int(v, monomials(j, 1)) * pow_int(w, monomials(j, 2) - 1) *
453  monomials(j, 2);
454 
455  if((monomials(j, 0) > 0) && (monomials(j, 1) > 1))
456  third[i][0][1][1] +=
457  coefficients(i, j) * pow_int(u, monomials(j, 0) - 1) *
458  monomials(j, 0) * pow_int(v, monomials(j, 1) - 2) *
459  monomials(j, 1) * (monomials(j, 1) - 1) *
460  pow_int(w, monomials(j, 2));
461 
462  if((monomials(j, 0) > 0) && (monomials(j, 1) > 0) &&
463  (monomials(j, 2) > 0))
464  third[i][0][1][2] +=
465  coefficients(i, j) * pow_int(u, monomials(j, 0) - 1) *
466  monomials(j, 0) * pow_int(v, monomials(j, 1) - 1) *
467  monomials(j, 1) * pow_int(w, monomials(j, 2) - 1) * monomials(j, 2);
468 
469  if((monomials(j, 0) > 0) && (monomials(j, 2) > 1))
470  third[i][0][2][2] += coefficients(i, j) *
471  pow_int(u, monomials(j, 0) - 1) *
472  monomials(j, 0) * pow_int(v, monomials(j, 1)) *
473  pow_int(w, monomials(j, 2) - 2) *
474  monomials(j, 2) * (monomials(j, 2) - 1);
475  if((monomials(j, 1) > 2))
476  third[i][1][1][1] +=
477  coefficients(i, j) * pow_int(u, monomials(j, 0)) *
478  pow_int(v, monomials(j, 1) - 3) * monomials(j, 1) *
479  (monomials(j, 1) - 1) * (monomials(j, 1) - 2) *
480  pow_int(w, monomials(j, 2));
481 
482  if((monomials(j, 1) > 1) && (monomials(j, 2) > 0))
483  third[i][1][1][2] +=
484  coefficients(i, j) * pow_int(u, monomials(j, 0)) *
485  pow_int(v, monomials(j, 1) - 2) * monomials(j, 1) *
486  (monomials(j, 1) - 1) * pow_int(w, monomials(j, 2) - 1) *
487  monomials(j, 2);
488 
489  if((monomials(j, 1) > 0) && (monomials(j, 2) > 1))
490  third[i][1][2][2] +=
491  coefficients(i, j) * pow_int(u, monomials(j, 0)) *
492  pow_int(v, monomials(j, 1) - 1) * monomials(j, 1) *
493  pow_int(w, monomials(j, 2) - 2) * monomials(j, 2) *
494  (monomials(j, 2) - 1);
495 
496  if((monomials(j, 2) > 2))
497  third[i][2][2][2] +=
498  coefficients(i, j) * pow_int(u, monomials(j, 0)) *
499  pow_int(v, monomials(j, 1)) * pow_int(w, monomials(j, 2) - 3) *
500  monomials(j, 2) * (monomials(j, 2) - 1) * (monomials(j, 2) - 2);
501  }
502  third[i][0][1][0] = third[i][0][0][1];
503  third[i][1][0][0] = third[i][0][0][1];
504 
505  third[i][2][0][0] = third[i][0][0][2];
506  third[i][0][2][0] = third[i][0][0][2];
507 
508  third[i][1][0][1] = third[i][0][1][1];
509  third[i][1][1][0] = third[i][0][1][1];
510 
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];
516 
517  third[i][2][2][0] = third[i][0][2][2];
518  third[i][2][0][2] = third[i][0][2][2];
519 
520  third[i][1][2][1] = third[i][1][1][2];
521  third[i][2][1][1] = third[i][1][1][2];
522 
523  third[i][2][2][1] = third[i][1][2][2];
524  third[i][2][1][2] = third[i][1][2][2];
525  }
526  break;
527  }
528 }
nodalBasis::points
fullMatrix< double > points
Definition: nodalBasis.h:16
gmshGenerateMonomialsHexaSerendipity
fullMatrix< double > gmshGenerateMonomialsHexaSerendipity(int order)
Definition: pointsGenerators.cpp:678
polynomialBasis::monomials
fullMatrix< double > monomials
Definition: polynomialBasis.h:20
gmshGenerateMonomialsTriangle
fullMatrix< double > gmshGenerateMonomialsTriangle(int order, bool serendip)
Definition: pointsGenerators.cpp:182
TYPE_LIN
#define TYPE_LIN
Definition: GmshDefines.h:65
polynomialBasis::df
virtual void df(const fullMatrix< double > &coord, fullMatrix< double > &dfm) const
Definition: polynomialBasis.cpp:167
Msg::Error
static void Error(const char *fmt,...)
Definition: GmshMessage.cpp:482
TYPE_PNT
#define TYPE_PNT
Definition: GmshDefines.h:64
TYPE_TRI
#define TYPE_TRI
Definition: GmshDefines.h:66
GaussIntegration.h
nodalBasis::parentType
int parentType
Definition: nodalBasis.h:14
GmshMessage.h
polynomialBasis::polynomialBasis
polynomialBasis()
Definition: polynomialBasis.h:23
TYPE_PRI
#define TYPE_PRI
Definition: GmshDefines.h:70
nodalBasis::serendip
bool serendip
Definition: nodalBasis.h:15
fullMatrix< double >
polynomialBasis::ddf
virtual void ddf(double u, double v, double w, double hess[][3][3]) const
Definition: polynomialBasis.cpp:294
nodalBasis::order
int order
Definition: nodalBasis.h:14
pow_int
double pow_int(const double &a, const int &n)
Definition: Numeric.h:39
gmshGenerateMonomialsPrismSerendipity
fullMatrix< double > gmshGenerateMonomialsPrismSerendipity(int order)
Definition: pointsGenerators.cpp:517
polynomialBasis::~polynomialBasis
~polynomialBasis()
Definition: polynomialBasis.cpp:107
Numeric.h
polynomialBasis::evaluateMonomials
void evaluateMonomials(double u, double v, double w, double p[]) const
Definition: polynomialBasis.cpp:109
GmshDefines.h
polynomialBasis::coefficients
fullMatrix< double > coefficients
Definition: polynomialBasis.h:21
polynomialBasis::dddf
virtual void dddf(double u, double v, double w, double third[][3][3][3]) const
Definition: polynomialBasis.cpp:378
gmshGenerateMonomialsQuadSerendipity
fullMatrix< double > gmshGenerateMonomialsQuadSerendipity(int order)
Definition: pointsGenerators.cpp:276
nodalBasis::dimension
int dimension
Definition: nodalBasis.h:14
fullMatrix::size2
int size2() const
Definition: fullMatrix.h:275
TYPE_QUA
#define TYPE_QUA
Definition: GmshDefines.h:67
polynomialBasis.h
nodalBasis
Definition: nodalBasis.h:12
fullMatrix::size1
int size1() const
Definition: fullMatrix.h:274
gmshGenerateMonomialsLine
fullMatrix< double > gmshGenerateMonomialsLine(int order, bool serendip)
Definition: pointsGenerators.cpp:171
polynomialBasis::f
virtual void f(double u, double v, double w, double *sf) const
Definition: polynomialBasis.cpp:123
TYPE_HEX
#define TYPE_HEX
Definition: GmshDefines.h:71
TYPE_TET
#define TYPE_TET
Definition: GmshDefines.h:68
pointsGenerators.h
gmshGenerateMonomialsTetrahedron
fullMatrix< double > gmshGenerateMonomialsTetrahedron(int order, bool serendip)
Definition: pointsGenerators.cpp:317
fullMatrix::resize
bool resize(int r, int c, bool resetValue=true)
Definition: fullMatrix.h:307
gmshGenerateMonomialsPrism
fullMatrix< double > gmshGenerateMonomialsPrism(int order, bool forSerendipPoints)
Definition: pointsGenerators.cpp:402
gmshGenerateMonomialsQuadrangle
fullMatrix< double > gmshGenerateMonomialsQuadrangle(int order, bool forSerendipPoints)
Definition: pointsGenerators.cpp:222
gmshGenerateMonomialsHexahedron
fullMatrix< double > gmshGenerateMonomialsHexahedron(int order, bool forSerendipPoints)
Definition: pointsGenerators.cpp:583