17 #include <deal.II/base/polynomials_adini.h> 19 #define ENTER_COEFFICIENTS(koefs,z,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) \ 20 koefs(0, z)= a0; koefs(1, z)=a1; koefs(2, z)=a2; koefs(3, z)=a3; koefs( 4, z)=a4 ; koefs( 5, z)=a5 ; \ 21 koefs(6, z)= a6; koefs(7, z)=a7; koefs(8, z)=a8; koefs(9, z)=a9; koefs(10, z)=a10; koefs(11, z)=a11; 24 DEAL_II_NAMESPACE_OPEN
37 ENTER_COEFFICIENTS(
coef, 0, 1, 0, 0,-3,-3,-1, 2, 2, 3, 3,-2,-2);
38 ENTER_COEFFICIENTS(
coef, 1, 0, 1, 0,-2, 0,-1, 1, 0, 0, 2,-1, 0);
39 ENTER_COEFFICIENTS(
coef, 2, 0, 0, 1, 0,-2,-1, 0, 1, 2, 0, 0,-1);
40 ENTER_COEFFICIENTS(
coef, 3, 0, 0, 0, 3, 0, 1,-2, 0,-3,-3, 2, 2);
41 ENTER_COEFFICIENTS(
coef, 4, 0, 0, 0,-1, 0, 0, 1, 0, 0, 1,-1, 0);
42 ENTER_COEFFICIENTS(
coef, 5, 0, 0, 0, 0, 0, 1, 0, 0,-2, 0, 0, 1);
43 ENTER_COEFFICIENTS(
coef, 6, 0, 0, 0, 0, 3, 1, 0,-2,-3,-3, 2, 2);
44 ENTER_COEFFICIENTS(
coef, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0,-2, 1, 0);
45 ENTER_COEFFICIENTS(
coef, 8, 0, 0, 0, 0,-1, 0, 0, 1, 1, 0, 0,-1);
46 ENTER_COEFFICIENTS(
coef, 9, 0, 0, 0, 0, 0,-1, 0, 0, 3, 3,-2,-2);
47 ENTER_COEFFICIENTS(
coef, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0,-1, 1, 0);
48 ENTER_COEFFICIENTS(
coef, 11, 0, 0, 0, 0, 0, 0, 0, 0,-1, 0, 0, 1);
50 ENTER_COEFFICIENTS(
dx, 0, 0,-6,-1, 6, 3, 6, 0,-2, 0,-6, 0, 0);
51 ENTER_COEFFICIENTS(
dx, 1, 1,-4,-1, 3, 0, 4, 0, 0, 0,-3, 0, 0);
52 ENTER_COEFFICIENTS(
dx, 2, 0, 0,-1, 0, 2, 0, 0,-1, 0, 0, 0, 0);
53 ENTER_COEFFICIENTS(
dx, 3, 0, 6, 1,-6,-3,-6, 0, 2, 0, 6, 0, 0);
54 ENTER_COEFFICIENTS(
dx, 4, 0,-2, 0, 3, 0, 2, 0, 0, 0,-3, 0, 0);
55 ENTER_COEFFICIENTS(
dx, 5, 0, 0, 1, 0,-2, 0, 0, 1, 0, 0, 0, 0);
56 ENTER_COEFFICIENTS(
dx, 6, 0, 0, 1, 0,-3,-6, 0, 2, 0, 6, 0, 0);
57 ENTER_COEFFICIENTS(
dx, 7, 0, 0, 1, 0, 0,-4, 0, 0, 0, 3, 0, 0);
58 ENTER_COEFFICIENTS(
dx, 8, 0, 0, 0, 0, 1, 0, 0,-1, 0, 0, 0, 0);
59 ENTER_COEFFICIENTS(
dx, 9, 0, 0,-1, 0, 3, 6, 0,-2, 0,-6, 0, 0);
60 ENTER_COEFFICIENTS(
dx, 10, 0, 0, 0, 0, 0,-2, 0, 0, 0, 3, 0, 0);
61 ENTER_COEFFICIENTS(
dx, 11, 0, 0, 0, 0,-1, 0, 0, 1, 0, 0, 0, 0);
63 ENTER_COEFFICIENTS(
dy, 0, 0,-1,-6, 3, 6, 6,-2, 0,-6, 0, 0, 0);
64 ENTER_COEFFICIENTS(
dy, 1, 0,-1, 0, 2, 0, 0,-1, 0, 0, 0, 0, 0);
65 ENTER_COEFFICIENTS(
dy, 2, 1,-1,-4, 0, 3, 4, 0, 0,-3, 0, 0, 0);
66 ENTER_COEFFICIENTS(
dy, 3, 0, 1, 0,-3, 0,-6, 2, 0, 6, 0, 0, 0);
67 ENTER_COEFFICIENTS(
dy, 4, 0, 0, 0, 1, 0, 0,-1, 0, 0, 0, 0, 0);
68 ENTER_COEFFICIENTS(
dy, 5, 0, 1, 0, 0, 0,-4, 0, 0, 3, 0, 0, 0);
69 ENTER_COEFFICIENTS(
dy, 6, 0, 1, 6,-3,-6,-6, 2, 0, 6, 0, 0, 0);
70 ENTER_COEFFICIENTS(
dy, 7, 0, 1, 0,-2, 0, 0, 1, 0, 0, 0, 0, 0);
71 ENTER_COEFFICIENTS(
dy, 8, 0, 0,-2, 0, 3, 2, 0, 0,-3, 0, 0, 0);
72 ENTER_COEFFICIENTS(
dy, 9, 0,-1, 0, 3, 0, 6,-2, 0,-6, 0, 0, 0);
73 ENTER_COEFFICIENTS(
dy, 10, 0, 0, 0,-1, 0, 0, 1, 0, 0, 0, 0, 0);
74 ENTER_COEFFICIENTS(
dy, 11, 0, 0, 0, 0, 0,-2, 0, 0, 3, 0, 0, 0);
77 ENTER_COEFFICIENTS(
dxx, 0,-6, 12, 6, 0, 0,-12, 0, 0, 0, 0, 0, 0);
78 ENTER_COEFFICIENTS(
dxx, 1,-4, 6, 4, 0, 0, -6, 0, 0, 0, 0, 0, 0);
79 ENTER_COEFFICIENTS(
dxx, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
80 ENTER_COEFFICIENTS(
dxx, 3, 6,-12,-6, 0, 0, 12, 0, 0, 0, 0, 0, 0);
81 ENTER_COEFFICIENTS(
dxx, 4,-2, 6, 2, 0, 0, -6, 0, 0, 0, 0, 0, 0);
82 ENTER_COEFFICIENTS(
dxx, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
83 ENTER_COEFFICIENTS(
dxx, 6, 0, 0,-6, 0, 0, 12, 0, 0, 0, 0, 0, 0);
84 ENTER_COEFFICIENTS(
dxx, 7, 0, 0,-4, 0, 0, 6, 0, 0, 0, 0, 0, 0);
85 ENTER_COEFFICIENTS(
dxx, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
86 ENTER_COEFFICIENTS(
dxx, 9, 0, 0, 6, 0, 0,-12, 0, 0, 0, 0, 0, 0);
87 ENTER_COEFFICIENTS(
dxx, 10, 0, 0,-2, 0, 0, 6, 0, 0, 0, 0, 0, 0);
88 ENTER_COEFFICIENTS(
dxx, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
90 ENTER_COEFFICIENTS(
dyy, 0,-6, 6, 12, 0, 0,-12, 0, 0, 0, 0, 0, 0);
91 ENTER_COEFFICIENTS(
dyy, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
92 ENTER_COEFFICIENTS(
dyy, 2,-4, 4, 6, 0, 0, -6, 0, 0, 0, 0, 0, 0);
93 ENTER_COEFFICIENTS(
dyy, 3, 0,-6, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0);
94 ENTER_COEFFICIENTS(
dyy, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
95 ENTER_COEFFICIENTS(
dyy, 5, 0,-4, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0);
96 ENTER_COEFFICIENTS(
dyy, 6, 6,-6,-12, 0, 0, 12, 0, 0, 0, 0, 0, 0);
97 ENTER_COEFFICIENTS(
dyy, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
98 ENTER_COEFFICIENTS(
dyy, 8,-2, 2, 6, 0, 0, -6, 0,-0, 0, 0, 0, 0);
99 ENTER_COEFFICIENTS(
dyy, 9, 0, 6, 0, 0, 0,-12, 0, 0, 0, 0, 0, 0);
100 ENTER_COEFFICIENTS(
dyy, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
101 ENTER_COEFFICIENTS(
dyy, 11, 0,-2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0);
103 ENTER_COEFFICIENTS(
dxy, 0,-1, 6, 6,-6,-6, 0, 0, 0, 0, 0, 0, 0);
104 ENTER_COEFFICIENTS(
dxy, 1,-1, 4, 0,-3, 0, 0, 0, 0, 0, 0, 0, 0);
105 ENTER_COEFFICIENTS(
dxy, 2,-1, 0, 4, 0,-3, 0, 0, 0, 0, 0, 0, 0);
106 ENTER_COEFFICIENTS(
dxy, 3, 1,-6,-6, 6, 6, 0, 0, 0, 0, 0, 0, 0);
107 ENTER_COEFFICIENTS(
dxy, 4, 0, 2, 0,-3, 0, 0, 0, 0, 0, 0, 0, 0);
108 ENTER_COEFFICIENTS(
dxy, 5, 1, 0,-4, 0, 3, 0, 0, 0, 0, 0, 0, 0);
109 ENTER_COEFFICIENTS(
dxy, 6, 1,-6,-6, 6, 6, 0, 0, 0, 0, 0, 0, 0);
110 ENTER_COEFFICIENTS(
dxy, 7, 1,-4, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0);
111 ENTER_COEFFICIENTS(
dxy, 8, 0, 0, 2, 0,-3, 0, 0, 0, 0, 0, 0, 0);
112 ENTER_COEFFICIENTS(
dxy, 9,-1, 6, 6,-6,-6, 0, 0, 0, 0, 0, 0, 0);
113 ENTER_COEFFICIENTS(
dxy, 10, 0,-2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0);
114 ENTER_COEFFICIENTS(
dxy, 11, 0, 0,-2, 0, 3, 0, 0, 0, 0, 0, 0, 0);
119 std::vector<double> &values,
123 if (values.empty() ==
false)
125 for (
unsigned int i=0; i<values.size(); ++i)
131 if (grads.empty() ==
false)
133 for (
unsigned int i=0; i<grads.size(); ++i)
139 if (grad_grads.empty() ==
false)
141 for (
unsigned int i=0; i<grad_grads.size(); ++i)
151 const double x = p(0);
152 const double y = p(1);
169 const double x = p(0);
170 const double y = p(1);
172 tensor[0]=
dx( 0,i) +
185 tensor[1]=
dy( 0,i) +
202 const double x = p(0);
203 const double y = p(1);
205 tensor[0][0]=
dxx( 0,i) +
217 tensor[0][1]=
dxy( 0,i) +
229 tensor[1][0]= tensor[0][1];
230 tensor[1][1]=
dyy( 0,i) +
246 DEAL_II_NAMESPACE_CLOSE
double compute_value(const unsigned int i, const Point< 2 > &p) const
Tensor< 2, 2 > compute_grad_grad(const unsigned int i, const Point< 2 > &p) const
void compute(const Point< 2 > &unit_point, std::vector< double > &values, std::vector< Tensor< 1, 2 > > &grads, std::vector< Tensor< 2, 2 > > &grad_grads) const
Tensor< 1, 2 > compute_grad(const unsigned int i, const Point< 2 > &p) const