9void p_0_basis_value_2d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &result_0){
11auto x=uv.col(0).array();
12auto y=uv.col(1).array();
14result_0.resize(
x.size(),1);
16 case 0: {result_0.setOnes();}
break;
17 default: assert(
false);
19void p_0_basis_grad_value_2d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val){
21auto x=uv.col(0).array();
22auto y=uv.col(1).array();
24val.resize(uv.rows(), uv.cols());
25 Eigen::ArrayXd result_0(uv.rows());
27 case 0: {{result_0.setZero();
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }}
break;
28 default: assert(
false);
32void p_0_nodes_2d(Eigen::MatrixXd &res) {
33 res.resize(1, 2); res <<
340.33333333333333331, 0.33333333333333331;
38void p_1_basis_value_2d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &result_0){
40auto x=uv.col(0).array();
41auto y=uv.col(1).array();
44 case 0: {result_0 = -
x -
y + 1;}
break;
45 case 1: {result_0 =
x;}
break;
46 case 2: {result_0 =
y;}
break;
47 default: assert(
false);
49void p_1_basis_grad_value_2d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val){
51auto x=uv.col(0).array();
52auto y=uv.col(1).array();
54val.resize(uv.rows(), uv.cols());
55 Eigen::ArrayXd result_0(uv.rows());
57 case 0: {{result_0.setConstant(-1);
val.col(0) = result_0; }{result_0.setConstant(-1);
val.col(1) = result_0; }}
break;
58 case 1: {{result_0.setOnes();
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }}
break;
59 case 2: {{result_0.setZero();
val.col(0) = result_0; }{result_0.setOnes();
val.col(1) = result_0; }}
break;
60 default: assert(
false);
64void p_1_nodes_2d(Eigen::MatrixXd &res) {
65 res.resize(3, 2); res <<
72void p_2_basis_value_2d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &result_0){
74auto x=uv.col(0).array();
75auto y=uv.col(1).array();
78 case 0: {result_0 = (
x +
y - 1)*(2*
x + 2*
y - 1);}
break;
79 case 1: {result_0 =
x*(2*
x - 1);}
break;
80 case 2: {result_0 =
y*(2*
y - 1);}
break;
81 case 3: {result_0 = -4*
x*(
x +
y - 1);}
break;
82 case 4: {result_0 = 4*
x*
y;}
break;
83 case 5: {result_0 = -4*
y*(
x +
y - 1);}
break;
84 default: assert(
false);
86void p_2_basis_grad_value_2d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val){
88auto x=uv.col(0).array();
89auto y=uv.col(1).array();
91val.resize(uv.rows(), uv.cols());
92 Eigen::ArrayXd result_0(uv.rows());
94 case 0: {{result_0 = 4*
x + 4*
y - 3;
val.col(0) = result_0; }{result_0 = 4*
x + 4*
y - 3;
val.col(1) = result_0; }}
break;
95 case 1: {{result_0 = 4*
x - 1;
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }}
break;
96 case 2: {{result_0.setZero();
val.col(0) = result_0; }{result_0 = 4*
y - 1;
val.col(1) = result_0; }}
break;
97 case 3: {{result_0 = 4*(-2*
x -
y + 1);
val.col(0) = result_0; }{result_0 = -4*
x;
val.col(1) = result_0; }}
break;
98 case 4: {{result_0 = 4*
y;
val.col(0) = result_0; }{result_0 = 4*
x;
val.col(1) = result_0; }}
break;
99 case 5: {{result_0 = -4*
y;
val.col(0) = result_0; }{result_0 = 4*(-
x - 2*
y + 1);
val.col(1) = result_0; }}
break;
100 default: assert(
false);
104void p_2_nodes_2d(Eigen::MatrixXd &res) {
105 res.resize(6, 2); res <<
115void p_3_basis_value_2d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &result_0){
117auto x=uv.col(0).array();
118auto y=uv.col(1).array();
121 case 0: {
const auto helper_0 = pow(
x, 2);
122const auto helper_1 = pow(
y, 2);
123result_0 = -27.0/2.0*helper_0*
y + 9*helper_0 - 27.0/2.0*helper_1*
x + 9*helper_1 - 9.0/2.0*pow(
x, 3) + 18*
x*
y - 11.0/2.0*
x - 9.0/2.0*pow(
y, 3) - 11.0/2.0*
y + 1;}
break;
124 case 1: {result_0 = (1.0/2.0)*
x*(9*pow(
x, 2) - 9*
x + 2);}
break;
125 case 2: {result_0 = (1.0/2.0)*
y*(9*pow(
y, 2) - 9*
y + 2);}
break;
126 case 3: {result_0 = (9.0/2.0)*
x*(
x +
y - 1)*(3*
x + 3*
y - 2);}
break;
127 case 4: {result_0 = -9.0/2.0*
x*(3*pow(
x, 2) + 3*
x*
y - 4*
x -
y + 1);}
break;
128 case 5: {result_0 = (9.0/2.0)*
x*
y*(3*
x - 1);}
break;
129 case 6: {result_0 = (9.0/2.0)*
x*
y*(3*
y - 1);}
break;
130 case 7: {result_0 = -9.0/2.0*
y*(3*
x*
y -
x + 3*pow(
y, 2) - 4*
y + 1);}
break;
131 case 8: {result_0 = (9.0/2.0)*
y*(
x +
y - 1)*(3*
x + 3*
y - 2);}
break;
132 case 9: {result_0 = -27*
x*
y*(
x +
y - 1);}
break;
133 default: assert(
false);
135void p_3_basis_grad_value_2d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val){
137auto x=uv.col(0).array();
138auto y=uv.col(1).array();
140val.resize(uv.rows(), uv.cols());
141 Eigen::ArrayXd result_0(uv.rows());
143 case 0: {{result_0 = -27.0/2.0*pow(
x, 2) - 27*
x*
y + 18*
x - 27.0/2.0*pow(
y, 2) + 18*
y - 11.0/2.0;
val.col(0) = result_0; }{result_0 = -27.0/2.0*pow(
x, 2) - 27*
x*
y + 18*
x - 27.0/2.0*pow(
y, 2) + 18*
y - 11.0/2.0;
val.col(1) = result_0; }}
break;
144 case 1: {{result_0 = (27.0/2.0)*pow(
x, 2) - 9*
x + 1;
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }}
break;
145 case 2: {{result_0.setZero();
val.col(0) = result_0; }{result_0 = (27.0/2.0)*pow(
y, 2) - 9*
y + 1;
val.col(1) = result_0; }}
break;
146 case 3: {{result_0 = 9*((9.0/2.0)*pow(
x, 2) + 6*
x*
y - 5*
x + (3.0/2.0)*pow(
y, 2) - 5.0/2.0*
y + 1);
val.col(0) = result_0; }{result_0 = (9.0/2.0)*
x*(6*
x + 6*
y - 5);
val.col(1) = result_0; }}
break;
147 case 4: {{result_0 = 9*(-9.0/2.0*pow(
x, 2) - 3*
x*
y + 4*
x + (1.0/2.0)*
y - 1.0/2.0);
val.col(0) = result_0; }{result_0 = -9.0/2.0*
x*(3*
x - 1);
val.col(1) = result_0; }}
break;
148 case 5: {{result_0 = (9.0/2.0)*
y*(6*
x - 1);
val.col(0) = result_0; }{result_0 = (9.0/2.0)*
x*(3*
x - 1);
val.col(1) = result_0; }}
break;
149 case 6: {{result_0 = (9.0/2.0)*
y*(3*
y - 1);
val.col(0) = result_0; }{result_0 = (9.0/2.0)*
x*(6*
y - 1);
val.col(1) = result_0; }}
break;
150 case 7: {{result_0 = -9.0/2.0*
y*(3*
y - 1);
val.col(0) = result_0; }{result_0 = 9*(-3*
x*
y + (1.0/2.0)*
x - 9.0/2.0*pow(
y, 2) + 4*
y - 1.0/2.0);
val.col(1) = result_0; }}
break;
151 case 8: {{result_0 = (9.0/2.0)*
y*(6*
x + 6*
y - 5);
val.col(0) = result_0; }{result_0 = 9*((3.0/2.0)*pow(
x, 2) + 6*
x*
y - 5.0/2.0*
x + (9.0/2.0)*pow(
y, 2) - 5*
y + 1);
val.col(1) = result_0; }}
break;
152 case 9: {{result_0 = -27*
y*(2*
x +
y - 1);
val.col(0) = result_0; }{result_0 = -27*
x*(
x + 2*
y - 1);
val.col(1) = result_0; }}
break;
153 default: assert(
false);
157void p_3_nodes_2d(Eigen::MatrixXd &res) {
158 res.resize(10, 2); res <<
172void p_4_basis_value_2d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &result_0){
174auto x=uv.col(0).array();
175auto y=uv.col(1).array();
178 case 0: {
const auto helper_0 = pow(
x, 2);
179const auto helper_1 = pow(
x, 3);
180const auto helper_2 = pow(
y, 2);
181const auto helper_3 = pow(
y, 3);
182result_0 = 64*helper_0*helper_2 - 80*helper_0*
y + (70.0/3.0)*helper_0 + (128.0/3.0)*helper_1*
y - 80.0/3.0*helper_1 - 80*helper_2*
x + (70.0/3.0)*helper_2 + (128.0/3.0)*helper_3*
x - 80.0/3.0*helper_3 + (32.0/3.0)*pow(
x, 4) + (140.0/3.0)*
x*
y - 25.0/3.0*
x + (32.0/3.0)*pow(
y, 4) - 25.0/3.0*
y + 1;}
break;
183 case 1: {result_0 = (1.0/3.0)*
x*(32*pow(
x, 3) - 48*pow(
x, 2) + 22*
x - 3);}
break;
184 case 2: {result_0 = (1.0/3.0)*
y*(32*pow(
y, 3) - 48*pow(
y, 2) + 22*
y - 3);}
break;
185 case 3: {
const auto helper_0 = pow(
x, 2);
186const auto helper_1 = pow(
y, 2);
187result_0 = -16.0/3.0*
x*(24*helper_0*
y - 18*helper_0 + 24*helper_1*
x - 18*helper_1 + 8*pow(
x, 3) - 36*
x*
y + 13*
x + 8*pow(
y, 3) + 13*
y - 3);}
break;
188 case 4: {
const auto helper_0 = 32*pow(
x, 2);
189const auto helper_1 = pow(
y, 2);
190result_0 = 4*
x*(helper_0*
y - helper_0 + 16*helper_1*
x - 4*helper_1 + 16*pow(
x, 3) - 36*
x*
y + 19*
x + 7*
y - 3);}
break;
191 case 5: {
const auto helper_0 = pow(
x, 2);
192result_0 = -16.0/3.0*
x*(8*helper_0*
y - 14*helper_0 + 8*pow(
x, 3) - 6*
x*
y + 7*
x +
y - 1);}
break;
193 case 6: {result_0 = (16.0/3.0)*
x*
y*(8*pow(
x, 2) - 6*
x + 1);}
break;
194 case 7: {
const auto helper_0 = 4*
x;
195result_0 = helper_0*
y*(-helper_0 + 16*
x*
y - 4*
y + 1);}
break;
196 case 8: {result_0 = (16.0/3.0)*
x*
y*(8*pow(
y, 2) - 6*
y + 1);}
break;
197 case 9: {
const auto helper_0 = pow(
y, 2);
198result_0 = -16.0/3.0*
y*(8*helper_0*
x - 14*helper_0 - 6*
x*
y +
x + 8*pow(
y, 3) + 7*
y - 1);}
break;
199 case 10: {
const auto helper_0 = pow(
x, 2);
200const auto helper_1 = 32*pow(
y, 2);
201result_0 = 4*
y*(16*helper_0*
y - 4*helper_0 + helper_1*
x - helper_1 - 36*
x*
y + 7*
x + 16*pow(
y, 3) + 19*
y - 3);}
break;
202 case 11: {
const auto helper_0 = pow(
x, 2);
203const auto helper_1 = pow(
y, 2);
204result_0 = -16.0/3.0*
y*(24*helper_0*
y - 18*helper_0 + 24*helper_1*
x - 18*helper_1 + 8*pow(
x, 3) - 36*
x*
y + 13*
x + 8*pow(
y, 3) + 13*
y - 3);}
break;
205 case 12: {result_0 = 32*
x*
y*(
x +
y - 1)*(4*
x + 4*
y - 3);}
break;
206 case 13: {result_0 = -32*
x*
y*(4*
y - 1)*(
x +
y - 1);}
break;
207 case 14: {result_0 = -32*
x*
y*(4*
x - 1)*(
x +
y - 1);}
break;
208 default: assert(
false);
210void p_4_basis_grad_value_2d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val){
212auto x=uv.col(0).array();
213auto y=uv.col(1).array();
215val.resize(uv.rows(), uv.cols());
216 Eigen::ArrayXd result_0(uv.rows());
218 case 0: {{
const auto helper_0 = pow(
x, 2);
219const auto helper_1 = pow(
y, 2);
220result_0 = 128*helper_0*
y - 80*helper_0 + 128*helper_1*
x - 80*helper_1 + (128.0/3.0)*pow(
x, 3) - 160*
x*
y + (140.0/3.0)*
x + (128.0/3.0)*pow(
y, 3) + (140.0/3.0)*
y - 25.0/3.0;
val.col(0) = result_0; }{
const auto helper_0 = pow(
x, 2);
221const auto helper_1 = pow(
y, 2);
222result_0 = 128*helper_0*
y - 80*helper_0 + 128*helper_1*
x - 80*helper_1 + (128.0/3.0)*pow(
x, 3) - 160*
x*
y + (140.0/3.0)*
x + (128.0/3.0)*pow(
y, 3) + (140.0/3.0)*
y - 25.0/3.0;
val.col(1) = result_0; }}
break;
223 case 1: {{result_0 = (128.0/3.0)*pow(
x, 3) - 48*pow(
x, 2) + (44.0/3.0)*
x - 1;
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }}
break;
224 case 2: {{result_0.setZero();
val.col(0) = result_0; }{result_0 = (128.0/3.0)*pow(
y, 3) - 48*pow(
y, 2) + (44.0/3.0)*
y - 1;
val.col(1) = result_0; }}
break;
225 case 3: {{
const auto helper_0 = pow(
x, 2);
226const auto helper_1 = pow(
y, 2);
227result_0 = -384*helper_0*
y + 288*helper_0 - 256*helper_1*
x + 96*helper_1 - 512.0/3.0*pow(
x, 3) + 384*
x*
y - 416.0/3.0*
x - 128.0/3.0*pow(
y, 3) - 208.0/3.0*
y + 16;
val.col(0) = result_0; }{result_0 = -16.0/3.0*
x*(24*pow(
x, 2) + 48*
x*
y - 36*
x + 24*pow(
y, 2) - 36*
y + 13);
val.col(1) = result_0; }}
break;
228 case 4: {{
const auto helper_0 = 96*pow(
x, 2);
229const auto helper_1 = pow(
y, 2);
230result_0 = 4*helper_0*
y - 4*helper_0 + 128*helper_1*
x - 16*helper_1 + 256*pow(
x, 3) - 288*
x*
y + 152*
x + 28*
y - 12;
val.col(0) = result_0; }{result_0 = 4*
x*(32*pow(
x, 2) + 32*
x*
y - 36*
x - 8*
y + 7);
val.col(1) = result_0; }}
break;
231 case 5: {{
const auto helper_0 = pow(
x, 2);
232result_0 = -128*helper_0*
y + 224*helper_0 - 512.0/3.0*pow(
x, 3) + 64*
x*
y - 224.0/3.0*
x - 16.0/3.0*
y + 16.0/3.0;
val.col(0) = result_0; }{result_0 = -16.0/3.0*
x*(8*pow(
x, 2) - 6*
x + 1);
val.col(1) = result_0; }}
break;
233 case 6: {{result_0 = (16.0/3.0)*
y*(24*pow(
x, 2) - 12*
x + 1);
val.col(0) = result_0; }{result_0 = (16.0/3.0)*
x*(8*pow(
x, 2) - 6*
x + 1);
val.col(1) = result_0; }}
break;
234 case 7: {{
const auto helper_0 = 4*
y;
235result_0 = helper_0*(-helper_0 + 32*
x*
y - 8*
x + 1);
val.col(0) = result_0; }{
const auto helper_0 = 4*
x;
236result_0 = helper_0*(-helper_0 + 32*
x*
y - 8*
y + 1);
val.col(1) = result_0; }}
break;
237 case 8: {{result_0 = (16.0/3.0)*
y*(8*pow(
y, 2) - 6*
y + 1);
val.col(0) = result_0; }{result_0 = (16.0/3.0)*
x*(24*pow(
y, 2) - 12*
y + 1);
val.col(1) = result_0; }}
break;
238 case 9: {{result_0 = -16.0/3.0*
y*(8*pow(
y, 2) - 6*
y + 1);
val.col(0) = result_0; }{
const auto helper_0 = pow(
y, 2);
239result_0 = -128*helper_0*
x + 224*helper_0 + 64*
x*
y - 16.0/3.0*
x - 512.0/3.0*pow(
y, 3) - 224.0/3.0*
y + 16.0/3.0;
val.col(1) = result_0; }}
break;
240 case 10: {{result_0 = 4*
y*(32*
x*
y - 8*
x + 32*pow(
y, 2) - 36*
y + 7);
val.col(0) = result_0; }{
const auto helper_0 = pow(
x, 2);
241const auto helper_1 = 96*pow(
y, 2);
242result_0 = 128*helper_0*
y - 16*helper_0 + 4*helper_1*
x - 4*helper_1 - 288*
x*
y + 28*
x + 256*pow(
y, 3) + 152*
y - 12;
val.col(1) = result_0; }}
break;
243 case 11: {{result_0 = -16.0/3.0*
y*(24*pow(
x, 2) + 48*
x*
y - 36*
x + 24*pow(
y, 2) - 36*
y + 13);
val.col(0) = result_0; }{
const auto helper_0 = pow(
x, 2);
244const auto helper_1 = pow(
y, 2);
245result_0 = -256*helper_0*
y + 96*helper_0 - 384*helper_1*
x + 288*helper_1 - 128.0/3.0*pow(
x, 3) + 384*
x*
y - 208.0/3.0*
x - 512.0/3.0*pow(
y, 3) - 416.0/3.0*
y + 16;
val.col(1) = result_0; }}
break;
246 case 12: {{result_0 = 32*
y*(12*pow(
x, 2) + 16*
x*
y - 14*
x + 4*pow(
y, 2) - 7*
y + 3);
val.col(0) = result_0; }{result_0 = 32*
x*(4*pow(
x, 2) + 16*
x*
y - 7*
x + 12*pow(
y, 2) - 14*
y + 3);
val.col(1) = result_0; }}
break;
247 case 13: {{result_0 = -32*
y*(8*
x*
y - 2*
x + 4*pow(
y, 2) - 5*
y + 1);
val.col(0) = result_0; }{result_0 = -32*
x*(8*
x*
y -
x + 12*pow(
y, 2) - 10*
y + 1);
val.col(1) = result_0; }}
break;
248 case 14: {{result_0 = -32*
y*(12*pow(
x, 2) + 8*
x*
y - 10*
x -
y + 1);
val.col(0) = result_0; }{result_0 = -32*
x*(4*pow(
x, 2) + 8*
x*
y - 5*
x - 2*
y + 1);
val.col(1) = result_0; }}
break;
249 default: assert(
false);
253void p_4_nodes_2d(Eigen::MatrixXd &res) {
254 res.resize(15, 2); res <<
277 case 0: p_0_nodes_2d(
val);
break;
278 case 1: p_1_nodes_2d(
val);
break;
279 case 2: p_2_nodes_2d(
val);
break;
280 case 3: p_3_nodes_2d(
val);
break;
281 case 4: p_4_nodes_2d(
val);
break;
284void p_basis_value_2d(
const bool bernstein,
const int p,
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val){
289 case 0: p_0_basis_value_2d(local_index, uv,
val);
break;
290 case 1: p_1_basis_value_2d(local_index, uv,
val);
break;
291 case 2: p_2_basis_value_2d(local_index, uv,
val);
break;
292 case 3: p_3_basis_value_2d(local_index, uv,
val);
break;
293 case 4: p_4_basis_value_2d(local_index, uv,
val);
break;
284void p_basis_value_2d(
const bool bernstein,
const int p,
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val) {
…}
297void p_grad_basis_value_2d(
const bool bernstein,
const int p,
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val){
302 case 0: p_0_basis_grad_value_2d(local_index, uv,
val);
break;
303 case 1: p_1_basis_grad_value_2d(local_index, uv,
val);
break;
304 case 2: p_2_basis_grad_value_2d(local_index, uv,
val);
break;
305 case 3: p_3_basis_grad_value_2d(local_index, uv,
val);
break;
306 case 4: p_4_basis_grad_value_2d(local_index, uv,
val);
break;
297void p_grad_basis_value_2d(
const bool bernstein,
const int p,
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val) {
…}
311void p_0_basis_value_3d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &result_0){
313auto x=uv.col(0).array();
314auto y=uv.col(1).array();
315auto z=uv.col(2).array();
317result_0.resize(
x.size(),1);
319 case 0: {result_0.setOnes();}
break;
320 default: assert(
false);
322void p_0_basis_grad_value_3d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val){
324auto x=uv.col(0).array();
325auto y=uv.col(1).array();
326auto z=uv.col(2).array();
328val.resize(uv.rows(), uv.cols());
329 Eigen::ArrayXd result_0(uv.rows());
331 case 0: {{result_0.setZero();
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }{result_0.setZero();
val.col(2) = result_0; }}
break;
332 default: assert(
false);
336void p_0_nodes_3d(Eigen::MatrixXd &res) {
337 res.resize(1, 3); res <<
3380.33333333333333331, 0.33333333333333331, 0.33333333333333331;
342void p_1_basis_value_3d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &result_0){
344auto x=uv.col(0).array();
345auto y=uv.col(1).array();
346auto z=uv.col(2).array();
349 case 0: {result_0 = -
x -
y -
z + 1;}
break;
350 case 1: {result_0 =
x;}
break;
351 case 2: {result_0 =
y;}
break;
352 case 3: {result_0 =
z;}
break;
353 default: assert(
false);
355void p_1_basis_grad_value_3d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val){
357auto x=uv.col(0).array();
358auto y=uv.col(1).array();
359auto z=uv.col(2).array();
361val.resize(uv.rows(), uv.cols());
362 Eigen::ArrayXd result_0(uv.rows());
364 case 0: {{result_0.setConstant(-1);
val.col(0) = result_0; }{result_0.setConstant(-1);
val.col(1) = result_0; }{result_0.setConstant(-1);
val.col(2) = result_0; }}
break;
365 case 1: {{result_0.setOnes();
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }{result_0.setZero();
val.col(2) = result_0; }}
break;
366 case 2: {{result_0.setZero();
val.col(0) = result_0; }{result_0.setOnes();
val.col(1) = result_0; }{result_0.setZero();
val.col(2) = result_0; }}
break;
367 case 3: {{result_0.setZero();
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }{result_0.setOnes();
val.col(2) = result_0; }}
break;
368 default: assert(
false);
372void p_1_nodes_3d(Eigen::MatrixXd &res) {
373 res.resize(4, 3); res <<
381void p_2_basis_value_3d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &result_0){
383auto x=uv.col(0).array();
384auto y=uv.col(1).array();
385auto z=uv.col(2).array();
388 case 0: {result_0 = (
x +
y +
z - 1)*(2*
x + 2*
y + 2*
z - 1);}
break;
389 case 1: {result_0 =
x*(2*
x - 1);}
break;
390 case 2: {result_0 =
y*(2*
y - 1);}
break;
391 case 3: {result_0 =
z*(2*
z - 1);}
break;
392 case 4: {result_0 = -4*
x*(
x +
y +
z - 1);}
break;
393 case 5: {result_0 = 4*
x*
y;}
break;
394 case 6: {result_0 = -4*
y*(
x +
y +
z - 1);}
break;
395 case 7: {result_0 = -4*
z*(
x +
y +
z - 1);}
break;
396 case 8: {result_0 = 4*
x*
z;}
break;
397 case 9: {result_0 = 4*
y*
z;}
break;
398 default: assert(
false);
400void p_2_basis_grad_value_3d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val){
402auto x=uv.col(0).array();
403auto y=uv.col(1).array();
404auto z=uv.col(2).array();
406val.resize(uv.rows(), uv.cols());
407 Eigen::ArrayXd result_0(uv.rows());
409 case 0: {{result_0 = 4*
x + 4*
y + 4*
z - 3;
val.col(0) = result_0; }{result_0 = 4*
x + 4*
y + 4*
z - 3;
val.col(1) = result_0; }{result_0 = 4*
x + 4*
y + 4*
z - 3;
val.col(2) = result_0; }}
break;
410 case 1: {{result_0 = 4*
x - 1;
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }{result_0.setZero();
val.col(2) = result_0; }}
break;
411 case 2: {{result_0.setZero();
val.col(0) = result_0; }{result_0 = 4*
y - 1;
val.col(1) = result_0; }{result_0.setZero();
val.col(2) = result_0; }}
break;
412 case 3: {{result_0.setZero();
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }{result_0 = 4*
z - 1;
val.col(2) = result_0; }}
break;
413 case 4: {{result_0 = 4*(-2*
x -
y -
z + 1);
val.col(0) = result_0; }{result_0 = -4*
x;
val.col(1) = result_0; }{result_0 = -4*
x;
val.col(2) = result_0; }}
break;
414 case 5: {{result_0 = 4*
y;
val.col(0) = result_0; }{result_0 = 4*
x;
val.col(1) = result_0; }{result_0.setZero();
val.col(2) = result_0; }}
break;
415 case 6: {{result_0 = -4*
y;
val.col(0) = result_0; }{result_0 = 4*(-
x - 2*
y -
z + 1);
val.col(1) = result_0; }{result_0 = -4*
y;
val.col(2) = result_0; }}
break;
416 case 7: {{result_0 = -4*
z;
val.col(0) = result_0; }{result_0 = -4*
z;
val.col(1) = result_0; }{result_0 = 4*(-
x -
y - 2*
z + 1);
val.col(2) = result_0; }}
break;
417 case 8: {{result_0 = 4*
z;
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }{result_0 = 4*
x;
val.col(2) = result_0; }}
break;
418 case 9: {{result_0.setZero();
val.col(0) = result_0; }{result_0 = 4*
z;
val.col(1) = result_0; }{result_0 = 4*
y;
val.col(2) = result_0; }}
break;
419 default: assert(
false);
423void p_2_nodes_3d(Eigen::MatrixXd &res) {
424 res.resize(10, 3); res <<
438void p_3_basis_value_3d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &result_0){
440auto x=uv.col(0).array();
441auto y=uv.col(1).array();
442auto z=uv.col(2).array();
445 case 0: {
const auto helper_0 = pow(
x, 2);
446const auto helper_1 = pow(
y, 2);
447const auto helper_2 = pow(
z, 2);
448const auto helper_3 = (27.0/2.0)*
x;
449const auto helper_4 = (27.0/2.0)*
y;
450const auto helper_5 = (27.0/2.0)*
z;
451result_0 = -helper_0*helper_4 - helper_0*helper_5 + 9*helper_0 - helper_1*helper_3 - helper_1*helper_5 + 9*helper_1 - helper_2*helper_3 - helper_2*helper_4 + 9*helper_2 - 9.0/2.0*pow(
x, 3) - 27*
x*
y*
z + 18*
x*
y + 18*
x*
z - 11.0/2.0*
x - 9.0/2.0*pow(
y, 3) + 18*
y*
z - 11.0/2.0*
y - 9.0/2.0*pow(
z, 3) - 11.0/2.0*
z + 1;}
break;
452 case 1: {result_0 = (1.0/2.0)*
x*(9*pow(
x, 2) - 9*
x + 2);}
break;
453 case 2: {result_0 = (1.0/2.0)*
y*(9*pow(
y, 2) - 9*
y + 2);}
break;
454 case 3: {result_0 = (1.0/2.0)*
z*(9*pow(
z, 2) - 9*
z + 2);}
break;
455 case 4: {result_0 = (9.0/2.0)*
x*(
x +
y +
z - 1)*(3*
x + 3*
y + 3*
z - 2);}
break;
456 case 5: {
const auto helper_0 = 3*
x;
457result_0 = -9.0/2.0*
x*(helper_0*
y + helper_0*
z + 3*pow(
x, 2) - 4*
x -
y -
z + 1);}
break;
458 case 6: {result_0 = (9.0/2.0)*
x*
y*(3*
x - 1);}
break;
459 case 7: {result_0 = (9.0/2.0)*
x*
y*(3*
y - 1);}
break;
460 case 8: {
const auto helper_0 = 3*
y;
461result_0 = -9.0/2.0*
y*(helper_0*
x + helper_0*
z -
x + 3*pow(
y, 2) - 4*
y -
z + 1);}
break;
462 case 9: {result_0 = (9.0/2.0)*
y*(
x +
y +
z - 1)*(3*
x + 3*
y + 3*
z - 2);}
break;
463 case 10: {result_0 = (9.0/2.0)*
z*(
x +
y +
z - 1)*(3*
x + 3*
y + 3*
z - 2);}
break;
464 case 11: {
const auto helper_0 = 3*
z;
465result_0 = -9.0/2.0*
z*(helper_0*
x + helper_0*
y -
x -
y + 3*pow(
z, 2) - 4*
z + 1);}
break;
466 case 12: {result_0 = (9.0/2.0)*
x*
z*(3*
x - 1);}
break;
467 case 13: {result_0 = (9.0/2.0)*
x*
z*(3*
z - 1);}
break;
468 case 14: {result_0 = (9.0/2.0)*
y*
z*(3*
y - 1);}
break;
469 case 15: {result_0 = (9.0/2.0)*
y*
z*(3*
z - 1);}
break;
470 case 16: {result_0 = -27*
x*
y*(
x +
y +
z - 1);}
break;
471 case 17: {result_0 = -27*
x*
z*(
x +
y +
z - 1);}
break;
472 case 18: {result_0 = 27*
x*
y*
z;}
break;
473 case 19: {result_0 = -27*
y*
z*(
x +
y +
z - 1);}
break;
474 default: assert(
false);
476void p_3_basis_grad_value_3d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val){
478auto x=uv.col(0).array();
479auto y=uv.col(1).array();
480auto z=uv.col(2).array();
482val.resize(uv.rows(), uv.cols());
483 Eigen::ArrayXd result_0(uv.rows());
485 case 0: {{
const auto helper_0 = 27*
x;
486result_0 = -helper_0*
y - helper_0*
z - 27.0/2.0*pow(
x, 2) + 18*
x - 27.0/2.0*pow(
y, 2) - 27*
y*
z + 18*
y - 27.0/2.0*pow(
z, 2) + 18*
z - 11.0/2.0;
val.col(0) = result_0; }{
const auto helper_0 = 27*
x;
487result_0 = -helper_0*
y - helper_0*
z - 27.0/2.0*pow(
x, 2) + 18*
x - 27.0/2.0*pow(
y, 2) - 27*
y*
z + 18*
y - 27.0/2.0*pow(
z, 2) + 18*
z - 11.0/2.0;
val.col(1) = result_0; }{
const auto helper_0 = 27*
x;
488result_0 = -helper_0*
y - helper_0*
z - 27.0/2.0*pow(
x, 2) + 18*
x - 27.0/2.0*pow(
y, 2) - 27*
y*
z + 18*
y - 27.0/2.0*pow(
z, 2) + 18*
z - 11.0/2.0;
val.col(2) = result_0; }}
break;
489 case 1: {{result_0 = (27.0/2.0)*pow(
x, 2) - 9*
x + 1;
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }{result_0.setZero();
val.col(2) = result_0; }}
break;
490 case 2: {{result_0.setZero();
val.col(0) = result_0; }{result_0 = (27.0/2.0)*pow(
y, 2) - 9*
y + 1;
val.col(1) = result_0; }{result_0.setZero();
val.col(2) = result_0; }}
break;
491 case 3: {{result_0.setZero();
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }{result_0 = (27.0/2.0)*pow(
z, 2) - 9*
z + 1;
val.col(2) = result_0; }}
break;
492 case 4: {{
const auto helper_0 = 6*
x;
493result_0 = 9*helper_0*
y + 9*helper_0*
z + (81.0/2.0)*pow(
x, 2) - 45*
x + (27.0/2.0)*pow(
y, 2) + 27*
y*
z - 45.0/2.0*
y + (27.0/2.0)*pow(
z, 2) - 45.0/2.0*
z + 9;
val.col(0) = result_0; }{result_0 = (9.0/2.0)*
x*(6*
x + 6*
y + 6*
z - 5);
val.col(1) = result_0; }{result_0 = (9.0/2.0)*
x*(6*
x + 6*
y + 6*
z - 5);
val.col(2) = result_0; }}
break;
494 case 5: {{
const auto helper_0 = 3*
x;
495result_0 = -9*helper_0*
y - 9*helper_0*
z - 81.0/2.0*pow(
x, 2) + 36*
x + (9.0/2.0)*
y + (9.0/2.0)*
z - 9.0/2.0;
val.col(0) = result_0; }{result_0 = -9.0/2.0*
x*(3*
x - 1);
val.col(1) = result_0; }{result_0 = -9.0/2.0*
x*(3*
x - 1);
val.col(2) = result_0; }}
break;
496 case 6: {{result_0 = (9.0/2.0)*
y*(6*
x - 1);
val.col(0) = result_0; }{result_0 = (9.0/2.0)*
x*(3*
x - 1);
val.col(1) = result_0; }{result_0.setZero();
val.col(2) = result_0; }}
break;
497 case 7: {{result_0 = (9.0/2.0)*
y*(3*
y - 1);
val.col(0) = result_0; }{result_0 = (9.0/2.0)*
x*(6*
y - 1);
val.col(1) = result_0; }{result_0.setZero();
val.col(2) = result_0; }}
break;
498 case 8: {{result_0 = -9.0/2.0*
y*(3*
y - 1);
val.col(0) = result_0; }{
const auto helper_0 = 3*
y;
499result_0 = -9*helper_0*
x - 9*helper_0*
z + (9.0/2.0)*
x - 81.0/2.0*pow(
y, 2) + 36*
y + (9.0/2.0)*
z - 9.0/2.0;
val.col(1) = result_0; }{result_0 = -9.0/2.0*
y*(3*
y - 1);
val.col(2) = result_0; }}
break;
500 case 9: {{result_0 = (9.0/2.0)*
y*(6*
x + 6*
y + 6*
z - 5);
val.col(0) = result_0; }{
const auto helper_0 = 6*
y;
501result_0 = 9*helper_0*
x + 9*helper_0*
z + (27.0/2.0)*pow(
x, 2) + 27*
x*
z - 45.0/2.0*
x + (81.0/2.0)*pow(
y, 2) - 45*
y + (27.0/2.0)*pow(
z, 2) - 45.0/2.0*
z + 9;
val.col(1) = result_0; }{result_0 = (9.0/2.0)*
y*(6*
x + 6*
y + 6*
z - 5);
val.col(2) = result_0; }}
break;
502 case 10: {{result_0 = (9.0/2.0)*
z*(6*
x + 6*
y + 6*
z - 5);
val.col(0) = result_0; }{result_0 = (9.0/2.0)*
z*(6*
x + 6*
y + 6*
z - 5);
val.col(1) = result_0; }{
const auto helper_0 = 6*
z;
503result_0 = 9*helper_0*
x + 9*helper_0*
y + (27.0/2.0)*pow(
x, 2) + 27*
x*
y - 45.0/2.0*
x + (27.0/2.0)*pow(
y, 2) - 45.0/2.0*
y + (81.0/2.0)*pow(
z, 2) - 45*
z + 9;
val.col(2) = result_0; }}
break;
504 case 11: {{result_0 = -9.0/2.0*
z*(3*
z - 1);
val.col(0) = result_0; }{result_0 = -9.0/2.0*
z*(3*
z - 1);
val.col(1) = result_0; }{
const auto helper_0 = 3*
z;
505result_0 = -9*helper_0*
x - 9*helper_0*
y + (9.0/2.0)*
x + (9.0/2.0)*
y - 81.0/2.0*pow(
z, 2) + 36*
z - 9.0/2.0;
val.col(2) = result_0; }}
break;
506 case 12: {{result_0 = (9.0/2.0)*
z*(6*
x - 1);
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }{result_0 = (9.0/2.0)*
x*(3*
x - 1);
val.col(2) = result_0; }}
break;
507 case 13: {{result_0 = (9.0/2.0)*
z*(3*
z - 1);
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }{result_0 = (9.0/2.0)*
x*(6*
z - 1);
val.col(2) = result_0; }}
break;
508 case 14: {{result_0.setZero();
val.col(0) = result_0; }{result_0 = (9.0/2.0)*
z*(6*
y - 1);
val.col(1) = result_0; }{result_0 = (9.0/2.0)*
y*(3*
y - 1);
val.col(2) = result_0; }}
break;
509 case 15: {{result_0.setZero();
val.col(0) = result_0; }{result_0 = (9.0/2.0)*
z*(3*
z - 1);
val.col(1) = result_0; }{result_0 = (9.0/2.0)*
y*(6*
z - 1);
val.col(2) = result_0; }}
break;
510 case 16: {{result_0 = -27*
y*(2*
x +
y +
z - 1);
val.col(0) = result_0; }{result_0 = -27*
x*(
x + 2*
y +
z - 1);
val.col(1) = result_0; }{result_0 = -27*
x*
y;
val.col(2) = result_0; }}
break;
511 case 17: {{result_0 = -27*
z*(2*
x +
y +
z - 1);
val.col(0) = result_0; }{result_0 = -27*
x*
z;
val.col(1) = result_0; }{result_0 = -27*
x*(
x +
y + 2*
z - 1);
val.col(2) = result_0; }}
break;
512 case 18: {{result_0 = 27*
y*
z;
val.col(0) = result_0; }{result_0 = 27*
x*
z;
val.col(1) = result_0; }{result_0 = 27*
x*
y;
val.col(2) = result_0; }}
break;
513 case 19: {{result_0 = -27*
y*
z;
val.col(0) = result_0; }{result_0 = -27*
z*(
x + 2*
y +
z - 1);
val.col(1) = result_0; }{result_0 = -27*
y*(
x +
y + 2*
z - 1);
val.col(2) = result_0; }}
break;
514 default: assert(
false);
518void p_3_nodes_3d(Eigen::MatrixXd &res) {
519 res.resize(20, 3); res <<
5381.0/3.0, 1.0/3.0, 1.0/3.0,
543void p_4_basis_value_3d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &result_0){
545auto x=uv.col(0).array();
546auto y=uv.col(1).array();
547auto z=uv.col(2).array();
550 case 0: {
const auto helper_0 =
x +
y +
z - 1;
551const auto helper_1 =
x*
y;
552const auto helper_2 = pow(
y, 2);
553const auto helper_3 = 9*
x;
554const auto helper_4 = pow(
z, 2);
555const auto helper_5 = pow(
x, 2);
556const auto helper_6 = 9*
y;
557const auto helper_7 = 9*
z;
558const auto helper_8 = 26*helper_0;
559const auto helper_9 = helper_8*
z;
560const auto helper_10 = 13*pow(helper_0, 2);
561const auto helper_11 = 13*helper_0;
562result_0 = (1.0/3.0)*helper_0*(3*pow(helper_0, 3) + helper_1*helper_8 + 18*helper_1*
z + helper_10*
x + helper_10*
y + helper_10*
z + helper_11*helper_2 + helper_11*helper_4 + helper_11*helper_5 + helper_2*helper_3 + helper_2*helper_7 + helper_3*helper_4 + helper_4*helper_6 + helper_5*helper_6 + helper_5*helper_7 + helper_9*
x + helper_9*
y + 3*pow(
x, 3) + 3*pow(
y, 3) + 3*pow(
z, 3));}
break;
563 case 1: {result_0 = (1.0/3.0)*
x*(32*pow(
x, 3) - 48*pow(
x, 2) + 22*
x - 3);}
break;
564 case 2: {result_0 = (1.0/3.0)*
y*(32*pow(
y, 3) - 48*pow(
y, 2) + 22*
y - 3);}
break;
565 case 3: {result_0 = (1.0/3.0)*
z*(32*pow(
z, 3) - 48*pow(
z, 2) + 22*
z - 3);}
break;
566 case 4: {
const auto helper_0 = 36*
x;
567const auto helper_1 =
y*
z;
568const auto helper_2 = pow(
x, 2);
569const auto helper_3 = pow(
y, 2);
570const auto helper_4 = pow(
z, 2);
571const auto helper_5 = 24*
x;
572const auto helper_6 = 24*
y;
573const auto helper_7 = 24*
z;
574result_0 = -16.0/3.0*
x*(-helper_0*
y - helper_0*
z + 48*helper_1*
x - 36*helper_1 + helper_2*helper_6 + helper_2*helper_7 - 18*helper_2 + helper_3*helper_5 + helper_3*helper_7 - 18*helper_3 + helper_4*helper_5 + helper_4*helper_6 - 18*helper_4 + 8*pow(
x, 3) + 13*
x + 8*pow(
y, 3) + 13*
y + 8*pow(
z, 3) + 13*
z - 3);}
break;
575 case 5: {
const auto helper_0 = 2*
y;
576const auto helper_1 = 2*
z;
577const auto helper_2 =
x +
y +
z - 1;
578const auto helper_3 = helper_2*
x;
579result_0 = 4*helper_3*(-helper_0*helper_2 + helper_0*
x - helper_0*
z - helper_1*helper_2 + helper_1*
x + 3*pow(helper_2, 2) + 10*helper_3 + 3*pow(
x, 2) - pow(
y, 2) - pow(
z, 2));}
break;
580 case 6: {
const auto helper_0 = 6*
x;
581const auto helper_1 = pow(
x, 2);
582const auto helper_2 = 8*helper_1;
583result_0 = -16.0/3.0*
x*(-helper_0*
y - helper_0*
z - 14*helper_1 + helper_2*
y + helper_2*
z + 8*pow(
x, 3) + 7*
x +
y +
z - 1);}
break;
584 case 7: {result_0 = (16.0/3.0)*
x*
y*(8*pow(
x, 2) - 6*
x + 1);}
break;
585 case 8: {
const auto helper_0 = 4*
x;
586result_0 = helper_0*
y*(-helper_0 + 16*
x*
y - 4*
y + 1);}
break;
587 case 9: {result_0 = (16.0/3.0)*
x*
y*(8*pow(
y, 2) - 6*
y + 1);}
break;
588 case 10: {
const auto helper_0 = 6*
y;
589const auto helper_1 = pow(
y, 2);
590const auto helper_2 = 8*helper_1;
591result_0 = -16.0/3.0*
y*(-helper_0*
x - helper_0*
z - 14*helper_1 + helper_2*
x + helper_2*
z +
x + 8*pow(
y, 3) + 7*
y +
z - 1);}
break;
592 case 11: {
const auto helper_0 = 2*
y;
593const auto helper_1 = 2*
x;
594const auto helper_2 =
x +
y +
z - 1;
595const auto helper_3 = helper_2*
y;
596result_0 = -4*helper_3*(-helper_0*
x - helper_0*
z + helper_1*helper_2 + helper_1*
z - 3*pow(helper_2, 2) + 2*helper_2*
z - 10*helper_3 + pow(
x, 2) - 3*pow(
y, 2) + pow(
z, 2));}
break;
597 case 12: {
const auto helper_0 = 36*
x;
598const auto helper_1 =
y*
z;
599const auto helper_2 = pow(
x, 2);
600const auto helper_3 = pow(
y, 2);
601const auto helper_4 = pow(
z, 2);
602const auto helper_5 = 24*
x;
603const auto helper_6 = 24*
y;
604const auto helper_7 = 24*
z;
605result_0 = -16.0/3.0*
y*(-helper_0*
y - helper_0*
z + 48*helper_1*
x - 36*helper_1 + helper_2*helper_6 + helper_2*helper_7 - 18*helper_2 + helper_3*helper_5 + helper_3*helper_7 - 18*helper_3 + helper_4*helper_5 + helper_4*helper_6 - 18*helper_4 + 8*pow(
x, 3) + 13*
x + 8*pow(
y, 3) + 13*
y + 8*pow(
z, 3) + 13*
z - 3);}
break;
606 case 13: {
const auto helper_0 = 36*
x;
607const auto helper_1 =
y*
z;
608const auto helper_2 = pow(
x, 2);
609const auto helper_3 = pow(
y, 2);
610const auto helper_4 = pow(
z, 2);
611const auto helper_5 = 24*
x;
612const auto helper_6 = 24*
y;
613const auto helper_7 = 24*
z;
614result_0 = -16.0/3.0*
z*(-helper_0*
y - helper_0*
z + 48*helper_1*
x - 36*helper_1 + helper_2*helper_6 + helper_2*helper_7 - 18*helper_2 + helper_3*helper_5 + helper_3*helper_7 - 18*helper_3 + helper_4*helper_5 + helper_4*helper_6 - 18*helper_4 + 8*pow(
x, 3) + 13*
x + 8*pow(
y, 3) + 13*
y + 8*pow(
z, 3) + 13*
z - 3);}
break;
615 case 14: {
const auto helper_0 = 2*
x;
616const auto helper_1 = 2*
z;
617const auto helper_2 =
x +
y +
z - 1;
618const auto helper_3 = helper_2*
z;
619result_0 = -4*helper_3*(helper_0*helper_2 + helper_0*
y - helper_1*
x - helper_1*
y - 3*pow(helper_2, 2) + 2*helper_2*
y - 10*helper_3 + pow(
x, 2) + pow(
y, 2) - 3*pow(
z, 2));}
break;
620 case 15: {
const auto helper_0 = 6*
z;
621const auto helper_1 = pow(
z, 2);
622const auto helper_2 = 8*helper_1;
623result_0 = -16.0/3.0*
z*(-helper_0*
x - helper_0*
y - 14*helper_1 + helper_2*
x + helper_2*
y +
x +
y + 8*pow(
z, 3) + 7*
z - 1);}
break;
624 case 16: {result_0 = (16.0/3.0)*
x*
z*(8*pow(
x, 2) - 6*
x + 1);}
break;
625 case 17: {
const auto helper_0 = 4*
x;
626result_0 = helper_0*
z*(-helper_0 + 16*
x*
z - 4*
z + 1);}
break;
627 case 18: {result_0 = (16.0/3.0)*
x*
z*(8*pow(
z, 2) - 6*
z + 1);}
break;
628 case 19: {result_0 = (16.0/3.0)*
y*
z*(8*pow(
y, 2) - 6*
y + 1);}
break;
629 case 20: {
const auto helper_0 = 4*
y;
630result_0 = helper_0*
z*(-helper_0 + 16*
y*
z - 4*
z + 1);}
break;
631 case 21: {result_0 = (16.0/3.0)*
y*
z*(8*pow(
z, 2) - 6*
z + 1);}
break;
632 case 22: {result_0 = 32*
x*
y*(
x +
y +
z - 1)*(4*
x + 4*
y + 4*
z - 3);}
break;
633 case 23: {result_0 = -32*
x*
y*(4*
y - 1)*(
x +
y +
z - 1);}
break;
634 case 24: {result_0 = -32*
x*
y*(4*
x - 1)*(
x +
y +
z - 1);}
break;
635 case 25: {result_0 = 32*
x*
z*(
x +
y +
z - 1)*(4*
x + 4*
y + 4*
z - 3);}
break;
636 case 26: {result_0 = -32*
x*
z*(4*
z - 1)*(
x +
y +
z - 1);}
break;
637 case 27: {result_0 = -32*
x*
z*(4*
x - 1)*(
x +
y +
z - 1);}
break;
638 case 28: {result_0 = 32*
x*
y*
z*(4*
x - 1);}
break;
639 case 29: {result_0 = 32*
x*
y*
z*(4*
z - 1);}
break;
640 case 30: {result_0 = 32*
x*
y*
z*(4*
y - 1);}
break;
641 case 31: {result_0 = -32*
y*
z*(4*
y - 1)*(
x +
y +
z - 1);}
break;
642 case 32: {result_0 = -32*
y*
z*(4*
z - 1)*(
x +
y +
z - 1);}
break;
643 case 33: {result_0 = 32*
y*
z*(
x +
y +
z - 1)*(4*
x + 4*
y + 4*
z - 3);}
break;
644 case 34: {result_0 = -256*
x*
y*
z*(
x +
y +
z - 1);}
break;
645 default: assert(
false);
647void p_4_basis_grad_value_3d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val){
649auto x=uv.col(0).array();
650auto y=uv.col(1).array();
651auto z=uv.col(2).array();
653val.resize(uv.rows(), uv.cols());
654 Eigen::ArrayXd result_0(uv.rows());
656 case 0: {{
const auto helper_0 = 160*
x;
657const auto helper_1 =
y*
z;
658const auto helper_2 = pow(
x, 2);
659const auto helper_3 = pow(
y, 2);
660const auto helper_4 = pow(
z, 2);
661const auto helper_5 = 128*
x;
662const auto helper_6 = 128*
y;
663const auto helper_7 = 128*
z;
664result_0 = -helper_0*
y - helper_0*
z + 256*helper_1*
x - 160*helper_1 + helper_2*helper_6 + helper_2*helper_7 - 80*helper_2 + helper_3*helper_5 + helper_3*helper_7 - 80*helper_3 + helper_4*helper_5 + helper_4*helper_6 - 80*helper_4 + (128.0/3.0)*pow(
x, 3) + (140.0/3.0)*
x + (128.0/3.0)*pow(
y, 3) + (140.0/3.0)*
y + (128.0/3.0)*pow(
z, 3) + (140.0/3.0)*
z - 25.0/3.0;
val.col(0) = result_0; }{
const auto helper_0 = 160*
x;
665const auto helper_1 =
y*
z;
666const auto helper_2 = pow(
x, 2);
667const auto helper_3 = pow(
y, 2);
668const auto helper_4 = pow(
z, 2);
669const auto helper_5 = 128*
x;
670const auto helper_6 = 128*
y;
671const auto helper_7 = 128*
z;
672result_0 = -helper_0*
y - helper_0*
z + 256*helper_1*
x - 160*helper_1 + helper_2*helper_6 + helper_2*helper_7 - 80*helper_2 + helper_3*helper_5 + helper_3*helper_7 - 80*helper_3 + helper_4*helper_5 + helper_4*helper_6 - 80*helper_4 + (128.0/3.0)*pow(
x, 3) + (140.0/3.0)*
x + (128.0/3.0)*pow(
y, 3) + (140.0/3.0)*
y + (128.0/3.0)*pow(
z, 3) + (140.0/3.0)*
z - 25.0/3.0;
val.col(1) = result_0; }{
const auto helper_0 = 160*
x;
673const auto helper_1 =
y*
z;
674const auto helper_2 = pow(
x, 2);
675const auto helper_3 = pow(
y, 2);
676const auto helper_4 = pow(
z, 2);
677const auto helper_5 = 128*
x;
678const auto helper_6 = 128*
y;
679const auto helper_7 = 128*
z;
680result_0 = -helper_0*
y - helper_0*
z + 256*helper_1*
x - 160*helper_1 + helper_2*helper_6 + helper_2*helper_7 - 80*helper_2 + helper_3*helper_5 + helper_3*helper_7 - 80*helper_3 + helper_4*helper_5 + helper_4*helper_6 - 80*helper_4 + (128.0/3.0)*pow(
x, 3) + (140.0/3.0)*
x + (128.0/3.0)*pow(
y, 3) + (140.0/3.0)*
y + (128.0/3.0)*pow(
z, 3) + (140.0/3.0)*
z - 25.0/3.0;
val.col(2) = result_0; }}
break;
681 case 1: {{result_0 = (128.0/3.0)*pow(
x, 3) - 48*pow(
x, 2) + (44.0/3.0)*
x - 1;
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }{result_0.setZero();
val.col(2) = result_0; }}
break;
682 case 2: {{result_0.setZero();
val.col(0) = result_0; }{result_0 = (128.0/3.0)*pow(
y, 3) - 48*pow(
y, 2) + (44.0/3.0)*
y - 1;
val.col(1) = result_0; }{result_0.setZero();
val.col(2) = result_0; }}
break;
683 case 3: {{result_0.setZero();
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }{result_0 = (128.0/3.0)*pow(
z, 3) - 48*pow(
z, 2) + (44.0/3.0)*
z - 1;
val.col(2) = result_0; }}
break;
684 case 4: {{
const auto helper_0 = pow(
x, 2);
685const auto helper_1 = pow(
y, 2);
686const auto helper_2 = pow(
z, 2);
687const auto helper_3 = 16*
x;
688const auto helper_4 = 24*helper_0;
689result_0 = 288*helper_0 - 16*helper_1*helper_3 - 128*helper_1*
z + 96*helper_1 - 16*helper_2*helper_3 - 128*helper_2*
y + 96*helper_2 - 16*helper_4*
y - 16*helper_4*
z - 512.0/3.0*pow(
x, 3) - 512*
x*
y*
z + 384*
x*
y + 384*
x*
z - 416.0/3.0*
x - 128.0/3.0*pow(
y, 3) + 192*
y*
z - 208.0/3.0*
y - 128.0/3.0*pow(
z, 3) - 208.0/3.0*
z + 16;
val.col(0) = result_0; }{
const auto helper_0 = 48*
x;
690result_0 = -16.0/3.0*
x*(helper_0*
y + helper_0*
z + 24*pow(
x, 2) - 36*
x + 24*pow(
y, 2) + 48*
y*
z - 36*
y + 24*pow(
z, 2) - 36*
z + 13);
val.col(1) = result_0; }{
const auto helper_0 = 48*
x;
691result_0 = -16.0/3.0*
x*(helper_0*
y + helper_0*
z + 24*pow(
x, 2) - 36*
x + 24*pow(
y, 2) + 48*
y*
z - 36*
y + 24*pow(
z, 2) - 36*
z + 13);
val.col(2) = result_0; }}
break;
692 case 5: {{
const auto helper_0 = 72*
x;
693const auto helper_1 =
y*
z;
694const auto helper_2 = 96*pow(
x, 2);
695const auto helper_3 = pow(
y, 2);
696const auto helper_4 = pow(
z, 2);
697const auto helper_5 = 32*
x;
698result_0 = -4*helper_0*
y - 4*helper_0*
z + 256*helper_1*
x - 32*helper_1 + 4*helper_2*
y + 4*helper_2*
z - 4*helper_2 + 4*helper_3*helper_5 - 16*helper_3 + 4*helper_4*helper_5 - 16*helper_4 + 256*pow(
x, 3) + 152*
x + 28*
y + 28*
z - 12;
val.col(0) = result_0; }{
const auto helper_0 = 32*
x;
699result_0 = 4*
x*(helper_0*
y + helper_0*
z + 32*pow(
x, 2) - 36*
x - 8*
y - 8*
z + 7);
val.col(1) = result_0; }{
const auto helper_0 = 32*
x;
700result_0 = 4*
x*(helper_0*
y + helper_0*
z + 32*pow(
x, 2) - 36*
x - 8*
y - 8*
z + 7);
val.col(2) = result_0; }}
break;
701 case 6: {{
const auto helper_0 = pow(
x, 2);
702const auto helper_1 = 8*helper_0;
703result_0 = 224*helper_0 - 16*helper_1*
y - 16*helper_1*
z - 512.0/3.0*pow(
x, 3) + 64*
x*
y + 64*
x*
z - 224.0/3.0*
x - 16.0/3.0*
y - 16.0/3.0*
z + 16.0/3.0;
val.col(0) = result_0; }{result_0 = -16.0/3.0*
x*(8*pow(
x, 2) - 6*
x + 1);
val.col(1) = result_0; }{result_0 = -16.0/3.0*
x*(8*pow(
x, 2) - 6*
x + 1);
val.col(2) = result_0; }}
break;
704 case 7: {{result_0 = (16.0/3.0)*
y*(24*pow(
x, 2) - 12*
x + 1);
val.col(0) = result_0; }{result_0 = (16.0/3.0)*
x*(8*pow(
x, 2) - 6*
x + 1);
val.col(1) = result_0; }{result_0.setZero();
val.col(2) = result_0; }}
break;
705 case 8: {{
const auto helper_0 = 4*
y;
706result_0 = helper_0*(-helper_0 + 32*
x*
y - 8*
x + 1);
val.col(0) = result_0; }{
const auto helper_0 = 4*
x;
707result_0 = helper_0*(-helper_0 + 32*
x*
y - 8*
y + 1);
val.col(1) = result_0; }{result_0.setZero();
val.col(2) = result_0; }}
break;
708 case 9: {{result_0 = (16.0/3.0)*
y*(8*pow(
y, 2) - 6*
y + 1);
val.col(0) = result_0; }{result_0 = (16.0/3.0)*
x*(24*pow(
y, 2) - 12*
y + 1);
val.col(1) = result_0; }{result_0.setZero();
val.col(2) = result_0; }}
break;
709 case 10: {{result_0 = -16.0/3.0*
y*(8*pow(
y, 2) - 6*
y + 1);
val.col(0) = result_0; }{
const auto helper_0 = pow(
y, 2);
710const auto helper_1 = 8*helper_0;
711result_0 = 224*helper_0 - 16*helper_1*
x - 16*helper_1*
z + 64*
x*
y - 16.0/3.0*
x - 512.0/3.0*pow(
y, 3) + 64*
y*
z - 224.0/3.0*
y - 16.0/3.0*
z + 16.0/3.0;
val.col(1) = result_0; }{result_0 = -16.0/3.0*
y*(8*pow(
y, 2) - 6*
y + 1);
val.col(2) = result_0; }}
break;
712 case 11: {{
const auto helper_0 = 32*
y;
713result_0 = 4*
y*(helper_0*
x + helper_0*
z - 8*
x + 32*pow(
y, 2) - 36*
y - 8*
z + 7);
val.col(0) = result_0; }{
const auto helper_0 = 72*
y;
714const auto helper_1 =
x*
z;
715const auto helper_2 = pow(
x, 2);
716const auto helper_3 = 96*pow(
y, 2);
717const auto helper_4 = pow(
z, 2);
718const auto helper_5 = 32*
y;
719result_0 = -4*helper_0*
x - 4*helper_0*
z + 256*helper_1*
y - 32*helper_1 + 4*helper_2*helper_5 - 16*helper_2 + 4*helper_3*
x + 4*helper_3*
z - 4*helper_3 + 4*helper_4*helper_5 - 16*helper_4 + 28*
x + 256*pow(
y, 3) + 152*
y + 28*
z - 12;
val.col(1) = result_0; }{
const auto helper_0 = 32*
y;
720result_0 = 4*
y*(helper_0*
x + helper_0*
z - 8*
x + 32*pow(
y, 2) - 36*
y - 8*
z + 7);
val.col(2) = result_0; }}
break;
721 case 12: {{
const auto helper_0 = 48*
x;
722result_0 = -16.0/3.0*
y*(helper_0*
y + helper_0*
z + 24*pow(
x, 2) - 36*
x + 24*pow(
y, 2) + 48*
y*
z - 36*
y + 24*pow(
z, 2) - 36*
z + 13);
val.col(0) = result_0; }{
const auto helper_0 = pow(
x, 2);
723const auto helper_1 = pow(
y, 2);
724const auto helper_2 = pow(
z, 2);
725const auto helper_3 = 24*helper_1;
726const auto helper_4 = 16*
y;
727result_0 = -16*helper_0*helper_4 - 128*helper_0*
z + 96*helper_0 + 288*helper_1 - 16*helper_2*helper_4 - 128*helper_2*
x + 96*helper_2 - 16*helper_3*
x - 16*helper_3*
z - 128.0/3.0*pow(
x, 3) - 512*
x*
y*
z + 384*
x*
y + 192*
x*
z - 208.0/3.0*
x - 512.0/3.0*pow(
y, 3) + 384*
y*
z - 416.0/3.0*
y - 128.0/3.0*pow(
z, 3) - 208.0/3.0*
z + 16;
val.col(1) = result_0; }{
const auto helper_0 = 48*
x;
728result_0 = -16.0/3.0*
y*(helper_0*
y + helper_0*
z + 24*pow(
x, 2) - 36*
x + 24*pow(
y, 2) + 48*
y*
z - 36*
y + 24*pow(
z, 2) - 36*
z + 13);
val.col(2) = result_0; }}
break;
729 case 13: {{
const auto helper_0 = 48*
x;
730result_0 = -16.0/3.0*
z*(helper_0*
y + helper_0*
z + 24*pow(
x, 2) - 36*
x + 24*pow(
y, 2) + 48*
y*
z - 36*
y + 24*pow(
z, 2) - 36*
z + 13);
val.col(0) = result_0; }{
const auto helper_0 = 48*
x;
731result_0 = -16.0/3.0*
z*(helper_0*
y + helper_0*
z + 24*pow(
x, 2) - 36*
x + 24*pow(
y, 2) + 48*
y*
z - 36*
y + 24*pow(
z, 2) - 36*
z + 13);
val.col(1) = result_0; }{
const auto helper_0 = pow(
x, 2);
732const auto helper_1 = pow(
y, 2);
733const auto helper_2 = pow(
z, 2);
734const auto helper_3 = 24*helper_2;
735const auto helper_4 = 16*
z;
736result_0 = -16*helper_0*helper_4 - 128*helper_0*
y + 96*helper_0 - 16*helper_1*helper_4 - 128*helper_1*
x + 96*helper_1 + 288*helper_2 - 16*helper_3*
x - 16*helper_3*
y - 128.0/3.0*pow(
x, 3) - 512*
x*
y*
z + 192*
x*
y + 384*
x*
z - 208.0/3.0*
x - 128.0/3.0*pow(
y, 3) + 384*
y*
z - 208.0/3.0*
y - 512.0/3.0*pow(
z, 3) - 416.0/3.0*
z + 16;
val.col(2) = result_0; }}
break;
737 case 14: {{
const auto helper_0 = 32*
z;
738result_0 = 4*
z*(helper_0*
x + helper_0*
y - 8*
x - 8*
y + 32*pow(
z, 2) - 36*
z + 7);
val.col(0) = result_0; }{
const auto helper_0 = 32*
z;
739result_0 = 4*
z*(helper_0*
x + helper_0*
y - 8*
x - 8*
y + 32*pow(
z, 2) - 36*
z + 7);
val.col(1) = result_0; }{
const auto helper_0 =
x*
y;
740const auto helper_1 = 72*
z;
741const auto helper_2 = pow(
x, 2);
742const auto helper_3 = pow(
y, 2);
743const auto helper_4 = 96*pow(
z, 2);
744const auto helper_5 = 32*
z;
745result_0 = 256*helper_0*
z - 32*helper_0 - 4*helper_1*
x - 4*helper_1*
y + 4*helper_2*helper_5 - 16*helper_2 + 4*helper_3*helper_5 - 16*helper_3 + 4*helper_4*
x + 4*helper_4*
y - 4*helper_4 + 28*
x + 28*
y + 256*pow(
z, 3) + 152*
z - 12;
val.col(2) = result_0; }}
break;
746 case 15: {{result_0 = -16.0/3.0*
z*(8*pow(
z, 2) - 6*
z + 1);
val.col(0) = result_0; }{result_0 = -16.0/3.0*
z*(8*pow(
z, 2) - 6*
z + 1);
val.col(1) = result_0; }{
const auto helper_0 = pow(
z, 2);
747const auto helper_1 = 8*helper_0;
748result_0 = 224*helper_0 - 16*helper_1*
x - 16*helper_1*
y + 64*
x*
z - 16.0/3.0*
x + 64*
y*
z - 16.0/3.0*
y - 512.0/3.0*pow(
z, 3) - 224.0/3.0*
z + 16.0/3.0;
val.col(2) = result_0; }}
break;
749 case 16: {{result_0 = (16.0/3.0)*
z*(24*pow(
x, 2) - 12*
x + 1);
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }{result_0 = (16.0/3.0)*
x*(8*pow(
x, 2) - 6*
x + 1);
val.col(2) = result_0; }}
break;
750 case 17: {{
const auto helper_0 = 4*
z;
751result_0 = helper_0*(-helper_0 + 32*
x*
z - 8*
x + 1);
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }{
const auto helper_0 = 4*
x;
752result_0 = helper_0*(-helper_0 + 32*
x*
z - 8*
z + 1);
val.col(2) = result_0; }}
break;
753 case 18: {{result_0 = (16.0/3.0)*
z*(8*pow(
z, 2) - 6*
z + 1);
val.col(0) = result_0; }{result_0.setZero();
val.col(1) = result_0; }{result_0 = (16.0/3.0)*
x*(24*pow(
z, 2) - 12*
z + 1);
val.col(2) = result_0; }}
break;
754 case 19: {{result_0.setZero();
val.col(0) = result_0; }{result_0 = (16.0/3.0)*
z*(24*pow(
y, 2) - 12*
y + 1);
val.col(1) = result_0; }{result_0 = (16.0/3.0)*
y*(8*pow(
y, 2) - 6*
y + 1);
val.col(2) = result_0; }}
break;
755 case 20: {{result_0.setZero();
val.col(0) = result_0; }{
const auto helper_0 = 4*
z;
756result_0 = helper_0*(-helper_0 + 32*
y*
z - 8*
y + 1);
val.col(1) = result_0; }{
const auto helper_0 = 4*
y;
757result_0 = helper_0*(-helper_0 + 32*
y*
z - 8*
z + 1);
val.col(2) = result_0; }}
break;
758 case 21: {{result_0.setZero();
val.col(0) = result_0; }{result_0 = (16.0/3.0)*
z*(8*pow(
z, 2) - 6*
z + 1);
val.col(1) = result_0; }{result_0 = (16.0/3.0)*
y*(24*pow(
z, 2) - 12*
z + 1);
val.col(2) = result_0; }}
break;
759 case 22: {{
const auto helper_0 = 16*
x;
760result_0 = 32*
y*(helper_0*
y + helper_0*
z + 12*pow(
x, 2) - 14*
x + 4*pow(
y, 2) + 8*
y*
z - 7*
y + 4*pow(
z, 2) - 7*
z + 3);
val.col(0) = result_0; }{
const auto helper_0 = 16*
y;
761result_0 = 32*
x*(helper_0*
x + helper_0*
z + 4*pow(
x, 2) + 8*
x*
z - 7*
x + 12*pow(
y, 2) - 14*
y + 4*pow(
z, 2) - 7*
z + 3);
val.col(1) = result_0; }{result_0 = 32*
x*
y*(8*
x + 8*
y + 8*
z - 7);
val.col(2) = result_0; }}
break;
762 case 23: {{result_0 = -32*
y*(8*
x*
y - 2*
x + 4*pow(
y, 2) + 4*
y*
z - 5*
y -
z + 1);
val.col(0) = result_0; }{
const auto helper_0 = 8*
y;
763result_0 = -32*
x*(helper_0*
x + helper_0*
z -
x + 12*pow(
y, 2) - 10*
y -
z + 1);
val.col(1) = result_0; }{result_0 = -32*
x*
y*(4*
y - 1);
val.col(2) = result_0; }}
break;
764 case 24: {{
const auto helper_0 = 8*
x;
765result_0 = -32*
y*(helper_0*
y + helper_0*
z + 12*pow(
x, 2) - 10*
x -
y -
z + 1);
val.col(0) = result_0; }{result_0 = -32*
x*(4*pow(
x, 2) + 8*
x*
y + 4*
x*
z - 5*
x - 2*
y -
z + 1);
val.col(1) = result_0; }{result_0 = -32*
x*
y*(4*
x - 1);
val.col(2) = result_0; }}
break;
766 case 25: {{
const auto helper_0 = 16*
x;
767result_0 = 32*
z*(helper_0*
y + helper_0*
z + 12*pow(
x, 2) - 14*
x + 4*pow(
y, 2) + 8*
y*
z - 7*
y + 4*pow(
z, 2) - 7*
z + 3);
val.col(0) = result_0; }{result_0 = 32*
x*
z*(8*
x + 8*
y + 8*
z - 7);
val.col(1) = result_0; }{
const auto helper_0 = 16*
z;
768result_0 = 32*
x*(helper_0*
x + helper_0*
y + 4*pow(
x, 2) + 8*
x*
y - 7*
x + 4*pow(
y, 2) - 7*
y + 12*pow(
z, 2) - 14*
z + 3);
val.col(2) = result_0; }}
break;
769 case 26: {{result_0 = -32*
z*(8*
x*
z - 2*
x + 4*
y*
z -
y + 4*pow(
z, 2) - 5*
z + 1);
val.col(0) = result_0; }{result_0 = -32*
x*
z*(4*
z - 1);
val.col(1) = result_0; }{
const auto helper_0 = 8*
z;
770result_0 = -32*
x*(helper_0*
x + helper_0*
y -
x -
y + 12*pow(
z, 2) - 10*
z + 1);
val.col(2) = result_0; }}
break;
771 case 27: {{
const auto helper_0 = 8*
x;
772result_0 = -32*
z*(helper_0*
y + helper_0*
z + 12*pow(
x, 2) - 10*
x -
y -
z + 1);
val.col(0) = result_0; }{result_0 = -32*
x*
z*(4*
x - 1);
val.col(1) = result_0; }{result_0 = -32*
x*(4*pow(
x, 2) + 4*
x*
y + 8*
x*
z - 5*
x -
y - 2*
z + 1);
val.col(2) = result_0; }}
break;
773 case 28: {{result_0 = 32*
y*
z*(8*
x - 1);
val.col(0) = result_0; }{result_0 = 32*
x*
z*(4*
x - 1);
val.col(1) = result_0; }{result_0 = 32*
x*
y*(4*
x - 1);
val.col(2) = result_0; }}
break;
774 case 29: {{result_0 = 32*
y*
z*(4*
z - 1);
val.col(0) = result_0; }{result_0 = 32*
x*
z*(4*
z - 1);
val.col(1) = result_0; }{result_0 = 32*
x*
y*(8*
z - 1);
val.col(2) = result_0; }}
break;
775 case 30: {{result_0 = 32*
y*
z*(4*
y - 1);
val.col(0) = result_0; }{result_0 = 32*
x*
z*(8*
y - 1);
val.col(1) = result_0; }{result_0 = 32*
x*
y*(4*
y - 1);
val.col(2) = result_0; }}
break;
776 case 31: {{result_0 = -32*
y*
z*(4*
y - 1);
val.col(0) = result_0; }{
const auto helper_0 = 8*
y;
777result_0 = -32*
z*(helper_0*
x + helper_0*
z -
x + 12*pow(
y, 2) - 10*
y -
z + 1);
val.col(1) = result_0; }{result_0 = -32*
y*(4*
x*
y -
x + 4*pow(
y, 2) + 8*
y*
z - 5*
y - 2*
z + 1);
val.col(2) = result_0; }}
break;
778 case 32: {{result_0 = -32*
y*
z*(4*
z - 1);
val.col(0) = result_0; }{result_0 = -32*
z*(4*
x*
z -
x + 8*
y*
z - 2*
y + 4*pow(
z, 2) - 5*
z + 1);
val.col(1) = result_0; }{
const auto helper_0 = 8*
z;
779result_0 = -32*
y*(helper_0*
x + helper_0*
y -
x -
y + 12*pow(
z, 2) - 10*
z + 1);
val.col(2) = result_0; }}
break;
780 case 33: {{result_0 = 32*
y*
z*(8*
x + 8*
y + 8*
z - 7);
val.col(0) = result_0; }{
const auto helper_0 = 16*
y;
781result_0 = 32*
z*(helper_0*
x + helper_0*
z + 4*pow(
x, 2) + 8*
x*
z - 7*
x + 12*pow(
y, 2) - 14*
y + 4*pow(
z, 2) - 7*
z + 3);
val.col(1) = result_0; }{
const auto helper_0 = 16*
z;
782result_0 = 32*
y*(helper_0*
x + helper_0*
y + 4*pow(
x, 2) + 8*
x*
y - 7*
x + 4*pow(
y, 2) - 7*
y + 12*pow(
z, 2) - 14*
z + 3);
val.col(2) = result_0; }}
break;
783 case 34: {{result_0 = -256*
y*
z*(2*
x +
y +
z - 1);
val.col(0) = result_0; }{result_0 = -256*
x*
z*(
x + 2*
y +
z - 1);
val.col(1) = result_0; }{result_0 = -256*
x*
y*(
x +
y + 2*
z - 1);
val.col(2) = result_0; }}
break;
784 default: assert(
false);
788void p_4_nodes_3d(Eigen::MatrixXd &res) {
789 res.resize(35, 3); res <<
8181.0/2.0, 1.0/4.0, 1.0/4.0,
8191.0/4.0, 1.0/4.0, 1.0/2.0,
8201.0/4.0, 1.0/2.0, 1.0/4.0,
8241.0/4.0, 1.0/4.0, 1.0/4.0;
832 case 0: p_0_nodes_3d(
val);
break;
833 case 1: p_1_nodes_3d(
val);
break;
834 case 2: p_2_nodes_3d(
val);
break;
835 case 3: p_3_nodes_3d(
val);
break;
836 case 4: p_4_nodes_3d(
val);
break;
839void p_basis_value_3d(
const bool bernstein,
const int p,
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val){
844 case 0: p_0_basis_value_3d(local_index, uv,
val);
break;
845 case 1: p_1_basis_value_3d(local_index, uv,
val);
break;
846 case 2: p_2_basis_value_3d(local_index, uv,
val);
break;
847 case 3: p_3_basis_value_3d(local_index, uv,
val);
break;
848 case 4: p_4_basis_value_3d(local_index, uv,
val);
break;
839void p_basis_value_3d(
const bool bernstein,
const int p,
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val) {
…}
852void p_grad_basis_value_3d(
const bool bernstein,
const int p,
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val){
857 case 0: p_0_basis_grad_value_3d(local_index, uv,
val);
break;
858 case 1: p_1_basis_grad_value_3d(local_index, uv,
val);
break;
859 case 2: p_2_basis_grad_value_3d(local_index, uv,
val);
break;
860 case 3: p_3_basis_grad_value_3d(local_index, uv,
val);
break;
861 case 4: p_4_basis_grad_value_3d(local_index, uv,
val);
break;
852void p_grad_basis_value_3d(
const bool bernstein,
const int p,
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val) {
…}
void b_basis_value_3d(const int b, const int local_index, const Eigen::MatrixXd &uv, Eigen::MatrixXd &val)
void p_grad_basis_value_2d(const bool bernstein, const int p, const int local_index, const Eigen::MatrixXd &uv, Eigen::MatrixXd &val)
void p_n_nodes_3d(const int p, Eigen::MatrixXd &val)
void p_n_basis_grad_value_2d(const int p, const int local_index, const Eigen::MatrixXd &uv, Eigen::MatrixXd &val)
void p_n_basis_grad_value_3d(const int p, const int local_index, const Eigen::MatrixXd &uv, Eigen::MatrixXd &val)
void p_grad_basis_value_3d(const bool bernstein, const int p, const int local_index, const Eigen::MatrixXd &uv, Eigen::MatrixXd &val)
void p_nodes_2d(const int p, Eigen::MatrixXd &val)
void p_nodes_3d(const int p, Eigen::MatrixXd &val)
void b_grad_basis_value_3d(const int b, const int local_index, const Eigen::MatrixXd &uv, Eigen::MatrixXd &val)
void p_n_basis_value_3d(const int p, const int local_index, const Eigen::MatrixXd &uv, Eigen::MatrixXd &val)
void b_basis_value_2d(const int b, const int local_index, const Eigen::MatrixXd &uv, Eigen::MatrixXd &val)
void p_n_basis_value_2d(const int p, const int local_index, const Eigen::MatrixXd &uv, Eigen::MatrixXd &val)
void p_basis_value_3d(const bool bernstein, const int p, const int local_index, const Eigen::MatrixXd &uv, Eigen::MatrixXd &val)
void b_grad_basis_value_2d(const int b, const int local_index, const Eigen::MatrixXd &uv, Eigen::MatrixXd &val)
void p_n_nodes_2d(const int p, Eigen::MatrixXd &val)
void p_basis_value_2d(const bool bernstein, const int p, const int local_index, const Eigen::MatrixXd &uv, Eigen::MatrixXd &val)