7void q_0_basis_value_2d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &result_0){
9auto x=uv.col(0).array();
10auto y=uv.col(1).array();
12result_0.resize(
x.size(),1);
14 case 0: {result_0.setOnes();}
break;
15 default: assert(
false);
17void q_1_basis_value_2d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &result_0){
19auto x=uv.col(0).array();
20auto y=uv.col(1).array();
23 case 0: {result_0 = 1.0*(
x - 1)*(
y - 1);}
break;
24 case 1: {result_0 = -1.0*
x*(
y - 1);}
break;
25 case 2: {result_0 = 1.0*
x*
y;}
break;
26 case 3: {result_0 = -1.0*
y*(
x - 1);}
break;
27 default: assert(
false);
29void q_2_basis_value_2d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &result_0){
31auto x=uv.col(0).array();
32auto y=uv.col(1).array();
35 case 0: {result_0 = 1.0*(
x - 1)*(2.0*
x - 1.0)*(
y - 1)*(2.0*
y - 1.0);}
break;
36 case 1: {result_0 = 1.0*
x*(2.0*
x - 1.0)*(
y - 1)*(2.0*
y - 1.0);}
break;
37 case 2: {result_0 = 1.0*
x*
y*(2.0*
x - 1.0)*(2.0*
y - 1.0);}
break;
38 case 3: {result_0 = 1.0*
y*(
x - 1)*(2.0*
x - 1.0)*(2.0*
y - 1.0);}
break;
39 case 4: {result_0 = -4.0*
x*(
x - 1)*(
y - 1)*(2.0*
y - 1.0);}
break;
40 case 5: {result_0 = -4.0*
x*
y*(2.0*
x - 1.0)*(
y - 1);}
break;
41 case 6: {result_0 = -4.0*
x*
y*(
x - 1)*(2.0*
y - 1.0);}
break;
42 case 7: {result_0 = -4.0*
y*(
x - 1)*(2.0*
x - 1.0)*(
y - 1);}
break;
43 case 8: {result_0 = 16.0*
x*
y*(
x - 1)*(
y - 1);}
break;
44 default: assert(
false);
46void q_3_basis_value_2d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &result_0){
48auto x=uv.col(0).array();
49auto y=uv.col(1).array();
52 case 0: {result_0 = 1.0*(
x - 1)*(1.5*
x - 1.0)*(3.0*
x - 1.0)*(
y - 1)*(1.5*
y - 1.0)*(3.0*
y - 1.0);}
break;
53 case 1: {result_0 = -1.0*
x*(1.4999999999999998*
x - 0.49999999999999989)*(2.9999999999999996*
x - 1.9999999999999996)*(
y - 1)*(1.5*
y - 1.0)*(3.0*
y - 1.0);}
break;
54 case 2: {result_0 = 1.0*
x*
y*(1.4999999999999998*
x - 0.49999999999999989)*(2.9999999999999996*
x - 1.9999999999999996)*(1.4999999999999998*
y - 0.49999999999999989)*(2.9999999999999996*
y - 1.9999999999999996);}
break;
55 case 3: {result_0 = -1.0*
y*(
x - 1)*(1.5*
x - 1.0)*(3.0*
x - 1.0)*(1.4999999999999998*
y - 0.49999999999999989)*(2.9999999999999996*
y - 1.9999999999999996);}
break;
56 case 4: {result_0 = -4.4999999999999991*
x*(
x - 1)*(3.0*
x - 2.0)*(
y - 1)*(1.5*
y - 1.0)*(3.0*
y - 1.0);}
break;
57 case 5: {result_0 = 4.4999999999999991*
x*(
x - 1)*(3.0*
x - 1.0)*(
y - 1)*(1.5*
y - 1.0)*(3.0*
y - 1.0);}
break;
58 case 6: {result_0 = 4.4999999999999991*
x*
y*(1.4999999999999998*
x - 0.49999999999999989)*(2.9999999999999996*
x - 1.9999999999999996)*(
y - 1)*(3.0*
y - 2.0);}
break;
59 case 7: {result_0 = -4.4999999999999991*
x*
y*(1.4999999999999998*
x - 0.49999999999999989)*(2.9999999999999996*
x - 1.9999999999999996)*(
y - 1)*(3.0*
y - 1.0);}
break;
60 case 8: {result_0 = -4.4999999999999991*
x*
y*(
x - 1)*(3.0*
x - 1.0)*(1.4999999999999998*
y - 0.49999999999999989)*(2.9999999999999996*
y - 1.9999999999999996);}
break;
61 case 9: {result_0 = 4.4999999999999991*
x*
y*(
x - 1)*(3.0*
x - 2.0)*(1.4999999999999998*
y - 0.49999999999999989)*(2.9999999999999996*
y - 1.9999999999999996);}
break;
62 case 10: {result_0 = 4.4999999999999991*
y*(
x - 1)*(1.5*
x - 1.0)*(3.0*
x - 1.0)*(
y - 1)*(3.0*
y - 1.0);}
break;
63 case 11: {result_0 = -4.4999999999999991*
y*(
x - 1)*(1.5*
x - 1.0)*(3.0*
x - 1.0)*(
y - 1)*(3.0*
y - 2.0);}
break;
64 case 12: {result_0 = 20.249999999999993*
x*
y*(
x - 1)*(3.0*
x - 2.0)*(
y - 1)*(3.0*
y - 2.0);}
break;
65 case 13: {result_0 = -20.249999999999993*
x*
y*(
x - 1)*(3.0*
x - 2.0)*(
y - 1)*(3.0*
y - 1.0);}
break;
66 case 14: {result_0 = -20.249999999999993*
x*
y*(
x - 1)*(3.0*
x - 1.0)*(
y - 1)*(3.0*
y - 2.0);}
break;
67 case 15: {result_0 = 20.249999999999993*
x*
y*(
x - 1)*(3.0*
x - 1.0)*(
y - 1)*(3.0*
y - 1.0);}
break;
68 default: assert(
false);
70void q_m2_basis_value_2d(
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &result_0){
72auto x=uv.col(0).array();
73auto y=uv.col(1).array();
76 case 0: {result_0 = -1.0*(
x - 1)*(
y - 1)*(2*
x + 2*
y - 1);}
break;
77 case 1: {result_0 = 1.0*
x*(
y - 1)*(-2*
x + 2*
y + 1);}
break;
78 case 2: {result_0 =
x*
y*(2.0*
x + 2.0*
y - 3.0);}
break;
79 case 3: {result_0 = 1.0*
y*(
x - 1)*(2*
x - 2*
y + 1);}
break;
80 case 4: {result_0 = 4*
x*(
x - 1)*(
y - 1);}
break;
81 case 5: {result_0 = -4*
x*
y*(
y - 1);}
break;
82 case 6: {result_0 = -4*
x*
y*(
x - 1);}
break;
83 case 7: {result_0 = 4*
y*(
x - 1)*(
y - 1);}
break;
84 default: assert(
false);
88void q_basis_value_2d(
const int q,
const int local_index,
const Eigen::MatrixXd &uv, Eigen::MatrixXd &
val){
90 case 0: q_0_basis_value_2d(local_index, uv,
val);
break;
91 case 1: q_1_basis_value_2d(local_index, uv,
val);
break;
92 case 2: q_2_basis_value_2d(local_index, uv,
val);
break;
93 case 3: q_3_basis_value_2d(local_index, uv,
val);
break;
94 case -2: q_m2_basis_value_2d(local_index, uv,
val);
break;
95 default: assert(
false);
void q_basis_value_2d(const int q, const int local_index, const Eigen::MatrixXd &uv, Eigen::MatrixXd &val)