Reference documentation for deal.II version 9.2.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
tensor_product_polynomials.cc
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2000 - 2019 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
21 
22 #include <boost/container/small_vector.hpp>
23 
24 #include <array>
25 
27 
28 
29 
30 /* ------------------- TensorProductPolynomials -------------- */
31 
32 
33 namespace internal
34 {
35  namespace
36  {
37  template <std::size_t dim>
38  inline void
39  compute_tensor_index(const unsigned int,
40  const unsigned int,
41  const unsigned int,
42  std::array<unsigned int, dim> &)
43  {
44  Assert(false, ExcNotImplemented());
45  }
46 
47  inline void
48  compute_tensor_index(const unsigned int n,
49  const unsigned int,
50  const unsigned int,
51  std::array<unsigned int, 1> &indices)
52  {
53  indices[0] = n;
54  }
55 
56  inline void
57  compute_tensor_index(const unsigned int n,
58  const unsigned int n_pols_0,
59  const unsigned int,
60  std::array<unsigned int, 2> &indices)
61  {
62  indices[0] = n % n_pols_0;
63  indices[1] = n / n_pols_0;
64  }
65 
66  inline void
67  compute_tensor_index(const unsigned int n,
68  const unsigned int n_pols_0,
69  const unsigned int n_pols_1,
70  std::array<unsigned int, 3> &indices)
71  {
72  indices[0] = n % n_pols_0;
73  indices[1] = (n / n_pols_0) % n_pols_1;
74  indices[2] = n / (n_pols_0 * n_pols_1);
75  }
76  } // namespace
77 } // namespace internal
78 
79 
80 
81 template <int dim, typename PolynomialType>
82 inline void
84  const unsigned int i,
85  std::array<unsigned int, dim> &indices) const
86 {
87  Assert(i < Utilities::fixed_power<dim>(polynomials.size()),
89  internal::compute_tensor_index(index_map[i],
90  polynomials.size(),
91  polynomials.size(),
92  indices);
93 }
94 
95 
96 
97 template <int dim, typename PolynomialType>
98 void
100  std::ostream &out) const
101 {
102  std::array<unsigned int, dim> ix;
103  for (unsigned int i = 0; i < this->n(); ++i)
104  {
105  compute_index(i, ix);
106  out << i << "\t";
107  for (unsigned int d = 0; d < dim; ++d)
108  out << ix[d] << " ";
109  out << std::endl;
110  }
111 }
112 
113 
114 
115 template <int dim, typename PolynomialType>
116 void
118  const std::vector<unsigned int> &renumber)
119 {
120  Assert(renumber.size() == index_map.size(),
121  ExcDimensionMismatch(renumber.size(), index_map.size()));
122 
123  index_map = renumber;
124  for (unsigned int i = 0; i < index_map.size(); ++i)
125  index_map_inverse[index_map[i]] = i;
126 }
127 
128 
129 
130 template <>
131 double
133  const unsigned int,
134  const Point<0> &) const
135 {
136  Assert(false, ExcNotImplemented());
137  return 0;
138 }
139 
140 
141 
142 template <int dim, typename PolynomialType>
143 double
145  const unsigned int i,
146  const Point<dim> & p) const
147 {
148  Assert(dim > 0, ExcNotImplemented());
149 
150  std::array<unsigned int, dim> indices;
151  compute_index(i, indices);
152 
153  double value = 1.;
154  for (unsigned int d = 0; d < dim; ++d)
155  value *= polynomials[indices[d]].value(p(d));
156 
157  return value;
158 }
159 
160 
161 
162 template <int dim, typename PolynomialType>
165  const unsigned int i,
166  const Point<dim> & p) const
167 {
168  std::array<unsigned int, dim> indices;
169  compute_index(i, indices);
170 
171  // compute values and
172  // uni-directional derivatives at
173  // the given point in each
174  // co-ordinate direction
175  std::array<std::array<double, 2>, dim> v;
176  {
177  std::vector<double> tmp(2);
178  for (unsigned int d = 0; d < dim; ++d)
179  {
180  polynomials[indices[d]].value(p(d), tmp);
181  v[d][0] = tmp[0];
182  v[d][1] = tmp[1];
183  }
184  }
185 
186  Tensor<1, dim> grad;
187  for (unsigned int d = 0; d < dim; ++d)
188  {
189  grad[d] = 1.;
190  for (unsigned int x = 0; x < dim; ++x)
191  grad[d] *= v[x][d == x];
192  }
193 
194  return grad;
195 }
196 
197 
198 
199 template <>
202  const unsigned int,
203  const Point<0> &) const
204 {
205  return Tensor<1, 0>();
206 }
207 
208 
209 
210 template <int dim, typename PolynomialType>
213  const unsigned int i,
214  const Point<dim> & p) const
215 {
216  std::array<unsigned int, dim> indices;
217  compute_index(i, indices);
218 
219  std::array<std::array<double, 3>, dim> v;
220  {
221  std::vector<double> tmp(3);
222  for (unsigned int d = 0; d < dim; ++d)
223  {
224  polynomials[indices[d]].value(p(d), tmp);
225  v[d][0] = tmp[0];
226  v[d][1] = tmp[1];
227  v[d][2] = tmp[2];
228  }
229  }
230 
231  Tensor<2, dim> grad_grad;
232  for (unsigned int d1 = 0; d1 < dim; ++d1)
233  for (unsigned int d2 = 0; d2 < dim; ++d2)
234  {
235  grad_grad[d1][d2] = 1.;
236  for (unsigned int x = 0; x < dim; ++x)
237  {
238  unsigned int derivative = 0;
239  if (d1 == x || d2 == x)
240  {
241  if (d1 == d2)
242  derivative = 2;
243  else
244  derivative = 1;
245  }
246  grad_grad[d1][d2] *= v[x][derivative];
247  }
248  }
249 
250  return grad_grad;
251 }
252 
253 
254 
255 template <>
258  const unsigned int,
259  const Point<0> &) const
260 {
261  return Tensor<2, 0>();
262 }
263 
264 
265 
266 template <int dim, typename PolynomialType>
267 void
269  const Point<dim> & p,
270  std::vector<double> & values,
271  std::vector<Tensor<1, dim>> &grads,
272  std::vector<Tensor<2, dim>> &grad_grads,
273  std::vector<Tensor<3, dim>> &third_derivatives,
274  std::vector<Tensor<4, dim>> &fourth_derivatives) const
275 {
276  Assert(dim <= 3, ExcNotImplemented());
277  Assert(values.size() == this->n() || values.size() == 0,
278  ExcDimensionMismatch2(values.size(), this->n(), 0));
279  Assert(grads.size() == this->n() || grads.size() == 0,
280  ExcDimensionMismatch2(grads.size(), this->n(), 0));
281  Assert(grad_grads.size() == this->n() || grad_grads.size() == 0,
282  ExcDimensionMismatch2(grad_grads.size(), this->n(), 0));
283  Assert(third_derivatives.size() == this->n() || third_derivatives.size() == 0,
284  ExcDimensionMismatch2(third_derivatives.size(), this->n(), 0));
285  Assert(fourth_derivatives.size() == this->n() ||
286  fourth_derivatives.size() == 0,
287  ExcDimensionMismatch2(fourth_derivatives.size(), this->n(), 0));
288 
289  const bool update_values = (values.size() == this->n()),
290  update_grads = (grads.size() == this->n()),
291  update_grad_grads = (grad_grads.size() == this->n()),
292  update_3rd_derivatives = (third_derivatives.size() == this->n()),
293  update_4th_derivatives = (fourth_derivatives.size() == this->n());
294 
295  // check how many values/derivatives we have to compute
296  unsigned int n_values_and_derivatives = 0;
297  if (update_values)
298  n_values_and_derivatives = 1;
299  if (update_grads)
300  n_values_and_derivatives = 2;
301  if (update_grad_grads)
302  n_values_and_derivatives = 3;
304  n_values_and_derivatives = 4;
305  if (update_4th_derivatives)
306  n_values_and_derivatives = 5;
307 
308  // Compute the values (and derivatives, if necessary) of all 1D polynomials
309  // at this evaluation point. We need to compute dim*n_polynomials
310  // evaluations, involving an evaluation of each polynomial for each
311  // coordinate direction. Once we have those values, we perform the
312  // multiplications for the tensor product in the arbitrary dimension.
313  const unsigned int n_polynomials = polynomials.size();
314  boost::container::small_vector<std::array<std::array<double, 5>, dim>, 20>
315  values_1d(n_polynomials);
316  if (n_values_and_derivatives == 1)
317  for (unsigned int i = 0; i < n_polynomials; ++i)
318  for (unsigned int d = 0; d < dim; ++d)
319  values_1d[i][d][0] = polynomials[i].value(p(d));
320  else
321  for (unsigned int i = 0; i < n_polynomials; ++i)
322  for (unsigned d = 0; d < dim; ++d)
323  polynomials[i].value(p(d),
324  n_values_and_derivatives,
325  values_1d[i][d].data());
326 
327  unsigned int indices[3];
328  unsigned int ind = 0;
329  for (indices[2] = 0; indices[2] < (dim > 2 ? n_polynomials : 1); ++indices[2])
330  for (indices[1] = 0; indices[1] < (dim > 1 ? n_polynomials : 1);
331  ++indices[1])
332  if (n_values_and_derivatives == 1)
333  for (indices[0] = 0; indices[0] < n_polynomials; ++indices[0], ++ind)
334  {
335  double value = values_1d[indices[0]][0][0];
336  for (unsigned int d = 1; d < dim; ++d)
337  value *= values_1d[indices[d]][d][0];
338  values[index_map_inverse[ind]] = value;
339  }
340  else
341  for (indices[0] = 0; indices[0] < n_polynomials; ++indices[0], ++ind)
342  {
343  unsigned int i = index_map_inverse[ind];
344 
345  if (update_values)
346  {
347  double value = values_1d[indices[0]][0][0];
348  for (unsigned int x = 1; x < dim; ++x)
349  value *= values_1d[indices[x]][x][0];
350  values[i] = value;
351  }
352 
353  if (update_grads)
354  for (unsigned int d = 0; d < dim; ++d)
355  {
356  double grad = 1.;
357  for (unsigned int x = 0; x < dim; ++x)
358  grad *= values_1d[indices[x]][x][(d == x) ? 1 : 0];
359  grads[i][d] = grad;
360  }
361 
362  if (update_grad_grads)
363  for (unsigned int d1 = 0; d1 < dim; ++d1)
364  for (unsigned int d2 = 0; d2 < dim; ++d2)
365  {
366  double der2 = 1.;
367  for (unsigned int x = 0; x < dim; ++x)
368  {
369  unsigned int derivative = 0;
370  if (d1 == x)
371  ++derivative;
372  if (d2 == x)
373  ++derivative;
374 
375  der2 *= values_1d[indices[x]][x][derivative];
376  }
377  grad_grads[i][d1][d2] = der2;
378  }
379 
381  for (unsigned int d1 = 0; d1 < dim; ++d1)
382  for (unsigned int d2 = 0; d2 < dim; ++d2)
383  for (unsigned int d3 = 0; d3 < dim; ++d3)
384  {
385  double der3 = 1.;
386  for (unsigned int x = 0; x < dim; ++x)
387  {
388  unsigned int derivative = 0;
389  if (d1 == x)
390  ++derivative;
391  if (d2 == x)
392  ++derivative;
393  if (d3 == x)
394  ++derivative;
395 
396  der3 *= values_1d[indices[x]][x][derivative];
397  }
398  third_derivatives[i][d1][d2][d3] = der3;
399  }
400 
401  if (update_4th_derivatives)
402  for (unsigned int d1 = 0; d1 < dim; ++d1)
403  for (unsigned int d2 = 0; d2 < dim; ++d2)
404  for (unsigned int d3 = 0; d3 < dim; ++d3)
405  for (unsigned int d4 = 0; d4 < dim; ++d4)
406  {
407  double der4 = 1.;
408  for (unsigned int x = 0; x < dim; ++x)
409  {
410  unsigned int derivative = 0;
411  if (d1 == x)
412  ++derivative;
413  if (d2 == x)
414  ++derivative;
415  if (d3 == x)
416  ++derivative;
417  if (d4 == x)
418  ++derivative;
419 
420  der4 *= values_1d[indices[x]][x][derivative];
421  }
422  fourth_derivatives[i][d1][d2][d3][d4] = der4;
423  }
424  }
425 }
426 
427 
428 
429 template <int dim, typename PolynomialType>
430 std::unique_ptr<ScalarPolynomialsBase<dim>>
432 {
433  return std_cxx14::make_unique<TensorProductPolynomials<dim, PolynomialType>>(
434  *this);
435 }
436 
437 
438 
439 template <int dim, typename PolynomialType>
440 std::size_t
442 {
443  return (MemoryConsumption::memory_consumption(polynomials) +
445  MemoryConsumption::memory_consumption(index_map_inverse));
446 }
447 
448 
449 
450 /* ------------------- AnisotropicPolynomials -------------- */
451 
452 
453 template <int dim>
455  const std::vector<std::vector<Polynomials::Polynomial<double>>> &pols)
456  : ScalarPolynomialsBase<dim>(1, get_n_tensor_pols(pols))
457  , polynomials(pols)
458 {
459  Assert(pols.size() == dim, ExcDimensionMismatch(pols.size(), dim));
460  for (unsigned int d = 0; d < dim; ++d)
461  Assert(pols[d].size() > 0,
462  ExcMessage("The number of polynomials must be larger than zero "
463  "for all coordinate directions."));
464 }
465 
466 
467 
468 template <int dim>
469 void
471  const unsigned int i,
472  std::array<unsigned int, dim> &indices) const
473 {
474 #ifdef DEBUG
475  unsigned int n_poly = 1;
476  for (unsigned int d = 0; d < dim; ++d)
477  n_poly *= polynomials[d].size();
478  Assert(i < n_poly, ExcInternalError());
479 #endif
480 
481  if (dim == 0)
482  {
483  }
484  else if (dim == 1)
485  internal::compute_tensor_index(i,
486  polynomials[0].size(),
487  0 /*not used*/,
488  indices);
489  else
490  internal::compute_tensor_index(i,
491  polynomials[0].size(),
492  polynomials[1].size(),
493  indices);
494 }
495 
496 
497 
498 template <int dim>
499 double
501  const Point<dim> & p) const
502 {
503  std::array<unsigned int, dim> indices;
504  compute_index(i, indices);
505 
506  double value = 1.;
507  for (unsigned int d = 0; d < dim; ++d)
508  value *= polynomials[d][indices[d]].value(p(d));
509 
510  return value;
511 }
512 
513 
514 template <int dim>
517  const Point<dim> & p) const
518 {
519  std::array<unsigned int, dim> indices;
520  compute_index(i, indices);
521 
522  // compute values and
523  // uni-directional derivatives at
524  // the given point in each
525  // co-ordinate direction
526  std::vector<std::vector<double>> v(dim, std::vector<double>(2));
527  for (unsigned int d = 0; d < dim; ++d)
528  polynomials[d][indices[d]].value(p(d), v[d]);
529 
530  Tensor<1, dim> grad;
531  for (unsigned int d = 0; d < dim; ++d)
532  {
533  grad[d] = 1.;
534  for (unsigned int x = 0; x < dim; ++x)
535  grad[d] *= v[x][d == x];
536  }
537 
538  return grad;
539 }
540 
541 
542 template <int dim>
545  const Point<dim> & p) const
546 {
547  std::array<unsigned int, dim> indices;
548  compute_index(i, indices);
549 
550  std::vector<std::vector<double>> v(dim, std::vector<double>(3));
551  for (unsigned int d = 0; d < dim; ++d)
552  polynomials[d][indices[d]].value(p(d), v[d]);
553 
554  Tensor<2, dim> grad_grad;
555  for (unsigned int d1 = 0; d1 < dim; ++d1)
556  for (unsigned int d2 = 0; d2 < dim; ++d2)
557  {
558  grad_grad[d1][d2] = 1.;
559  for (unsigned int x = 0; x < dim; ++x)
560  {
561  unsigned int derivative = 0;
562  if (d1 == x || d2 == x)
563  {
564  if (d1 == d2)
565  derivative = 2;
566  else
567  derivative = 1;
568  }
569  grad_grad[d1][d2] *= v[x][derivative];
570  }
571  }
572 
573  return grad_grad;
574 }
575 
576 
577 
578 template <int dim>
579 void
581  const Point<dim> & p,
582  std::vector<double> & values,
583  std::vector<Tensor<1, dim>> &grads,
584  std::vector<Tensor<2, dim>> &grad_grads,
585  std::vector<Tensor<3, dim>> &third_derivatives,
586  std::vector<Tensor<4, dim>> &fourth_derivatives) const
587 {
588  Assert(values.size() == this->n() || values.size() == 0,
589  ExcDimensionMismatch2(values.size(), this->n(), 0));
590  Assert(grads.size() == this->n() || grads.size() == 0,
591  ExcDimensionMismatch2(grads.size(), this->n(), 0));
592  Assert(grad_grads.size() == this->n() || grad_grads.size() == 0,
593  ExcDimensionMismatch2(grad_grads.size(), this->n(), 0));
594  Assert(third_derivatives.size() == this->n() || third_derivatives.size() == 0,
595  ExcDimensionMismatch2(third_derivatives.size(), this->n(), 0));
596  Assert(fourth_derivatives.size() == this->n() ||
597  fourth_derivatives.size() == 0,
598  ExcDimensionMismatch2(fourth_derivatives.size(), this->n(), 0));
599 
600  const bool update_values = (values.size() == this->n()),
601  update_grads = (grads.size() == this->n()),
602  update_grad_grads = (grad_grads.size() == this->n()),
603  update_3rd_derivatives = (third_derivatives.size() == this->n()),
604  update_4th_derivatives = (fourth_derivatives.size() == this->n());
605 
606  // check how many
607  // values/derivatives we have to
608  // compute
609  unsigned int n_values_and_derivatives = 0;
610  if (update_values)
611  n_values_and_derivatives = 1;
612  if (update_grads)
613  n_values_and_derivatives = 2;
614  if (update_grad_grads)
615  n_values_and_derivatives = 3;
617  n_values_and_derivatives = 4;
618  if (update_4th_derivatives)
619  n_values_and_derivatives = 5;
620 
621  // compute the values (and
622  // derivatives, if necessary) of
623  // all polynomials at this
624  // evaluation point
625  std::vector<std::vector<std::vector<double>>> v(dim);
626  for (unsigned int d = 0; d < dim; ++d)
627  {
628  v[d].resize(polynomials[d].size());
629  for (unsigned int i = 0; i < polynomials[d].size(); ++i)
630  {
631  v[d][i].resize(n_values_and_derivatives, 0.);
632  polynomials[d][i].value(p(d), v[d][i]);
633  }
634  }
635 
636  for (unsigned int i = 0; i < this->n(); ++i)
637  {
638  // first get the
639  // one-dimensional indices of
640  // this particular tensor
641  // product polynomial
642  std::array<unsigned int, dim> indices;
643  compute_index(i, indices);
644 
645  if (update_values)
646  {
647  values[i] = 1;
648  for (unsigned int x = 0; x < dim; ++x)
649  values[i] *= v[x][indices[x]][0];
650  }
651 
652  if (update_grads)
653  for (unsigned int d = 0; d < dim; ++d)
654  {
655  grads[i][d] = 1.;
656  for (unsigned int x = 0; x < dim; ++x)
657  grads[i][d] *= v[x][indices[x]][d == x ? 1 : 0];
658  }
659 
660  if (update_grad_grads)
661  for (unsigned int d1 = 0; d1 < dim; ++d1)
662  for (unsigned int d2 = 0; d2 < dim; ++d2)
663  {
664  grad_grads[i][d1][d2] = 1.;
665  for (unsigned int x = 0; x < dim; ++x)
666  {
667  unsigned int derivative = 0;
668  if (d1 == x)
669  ++derivative;
670  if (d2 == x)
671  ++derivative;
672 
673  grad_grads[i][d1][d2] *= v[x][indices[x]][derivative];
674  }
675  }
676 
678  for (unsigned int d1 = 0; d1 < dim; ++d1)
679  for (unsigned int d2 = 0; d2 < dim; ++d2)
680  for (unsigned int d3 = 0; d3 < dim; ++d3)
681  {
682  third_derivatives[i][d1][d2][d3] = 1.;
683  for (unsigned int x = 0; x < dim; ++x)
684  {
685  unsigned int derivative = 0;
686  if (d1 == x)
687  ++derivative;
688  if (d2 == x)
689  ++derivative;
690  if (d3 == x)
691  ++derivative;
692 
693  third_derivatives[i][d1][d2][d3] *=
694  v[x][indices[x]][derivative];
695  }
696  }
697 
698  if (update_4th_derivatives)
699  for (unsigned int d1 = 0; d1 < dim; ++d1)
700  for (unsigned int d2 = 0; d2 < dim; ++d2)
701  for (unsigned int d3 = 0; d3 < dim; ++d3)
702  for (unsigned int d4 = 0; d4 < dim; ++d4)
703  {
704  fourth_derivatives[i][d1][d2][d3][d4] = 1.;
705  for (unsigned int x = 0; x < dim; ++x)
706  {
707  unsigned int derivative = 0;
708  if (d1 == x)
709  ++derivative;
710  if (d2 == x)
711  ++derivative;
712  if (d3 == x)
713  ++derivative;
714  if (d4 == x)
715  ++derivative;
716 
717  fourth_derivatives[i][d1][d2][d3][d4] *=
718  v[x][indices[x]][derivative];
719  }
720  }
721  }
722 }
723 
724 
725 template <int dim>
726 unsigned int
728  const std::vector<std::vector<Polynomials::Polynomial<double>>> &pols)
729 {
730  unsigned int y = 1;
731  for (unsigned int d = 0; d < dim; ++d)
732  y *= pols[d].size();
733  return y;
734 }
735 
736 
737 template <int dim>
738 std::unique_ptr<ScalarPolynomialsBase<dim>>
740 {
741  return std_cxx14::make_unique<AnisotropicPolynomials<dim>>(*this);
742 }
743 
744 
745 
746 /* ------------------- explicit instantiations -------------- */
751 
752 template class TensorProductPolynomials<
753  1,
755 template class TensorProductPolynomials<
756  2,
757  Polynomials::PiecewisePolynomial<double>>;
758 template class TensorProductPolynomials<
759  3,
760  Polynomials::PiecewisePolynomial<double>>;
761 
762 template class AnisotropicPolynomials<0>;
763 template class AnisotropicPolynomials<1>;
764 template class AnisotropicPolynomials<2>;
765 template class AnisotropicPolynomials<3>;
766 
Tensor< 1, dim > compute_grad(const unsigned int i, const Point< dim > &p) const
Shape function values.
Tensor< 1, dim > compute_grad(const unsigned int i, const Point< dim > &p) const
static ::ExceptionBase & ExcDimensionMismatch2(int arg1, int arg2, int arg3)
void evaluate(const Point< dim > &unit_point, std::vector< double > &values, std::vector< Tensor< 1, dim >> &grads, std::vector< Tensor< 2, dim >> &grad_grads, std::vector< Tensor< 3, dim >> &third_derivatives, std::vector< Tensor< 4, dim >> &fourth_derivatives) const override
void output_indices(std::ostream &out) const
void set_numbering(const std::vector< unsigned int > &renumber)
static unsigned int get_n_tensor_pols(const std::vector< std::vector< Polynomials::Polynomial< double >>> &pols)
Definition: point.h:111
static ::ExceptionBase & ExcMessage(std::string arg1)
Third derivatives of shape functions.
#define Assert(cond, exc)
Definition: exceptions.h:1419
void evaluate(const Point< dim > &unit_point, std::vector< double > &values, std::vector< Tensor< 1, dim >> &grads, std::vector< Tensor< 2, dim >> &grad_grads, std::vector< Tensor< 3, dim >> &third_derivatives, std::vector< Tensor< 4, dim >> &fourth_derivatives) const override
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
virtual std::unique_ptr< ScalarPolynomialsBase< dim > > clone() const override
virtual std::size_t memory_consumption() const override
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
const std::vector< std::vector< Polynomials::Polynomial< double > > > polynomials
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
void compute_index(const unsigned int i, std::array< unsigned int, dim > &indices) const
unsigned int compute_index()
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
double compute_value(const unsigned int i, const Point< dim > &p) const
static ::ExceptionBase & ExcNotImplemented()
AnisotropicPolynomials(const std::vector< std::vector< Polynomials::Polynomial< double >>> &base_polynomials)
void compute_index(const unsigned int i, std::array< unsigned int, dim > &indices) const
Tensor< 2, dim > compute_grad_grad(const unsigned int i, const Point< dim > &p) const
double compute_value(const unsigned int i, const Point< dim > &p) const
virtual std::unique_ptr< ScalarPolynomialsBase< dim > > clone() const override
static const bool value
Tensor< 2, dim > compute_grad_grad(const unsigned int i, const Point< dim > &p) const
std::enable_if< std::is_fundamental< T >::value, std::size_t >::type memory_consumption(const T &t)
static ::ExceptionBase & ExcInternalError()