PolyFEM
Loading...
Searching...
No Matches
auto_q_bases_3d_grad_-2.cpp
Go to the documentation of this file.
1#include <Eigen/Dense>
2#include <cassert>
3 namespace polyfem {
4namespace autogen {void q_m2_basis_grad_value_3d(const int local_index, const Eigen::MatrixXd &uv, Eigen::MatrixXd &val){
5
6auto x=uv.col(0).array();
7auto y=uv.col(1).array();
8auto z=uv.col(2).array();
9
10val.resize(uv.rows(), uv.cols());
11 Eigen::ArrayXd result_0(uv.rows());
12switch(local_index){
13 case 0: {{result_0 = (y - 1)*(z - 1)*(4.0*x + 2*y + 2*z - 3.0);val.col(0) = result_0; }{result_0 = (x - 1)*(z - 1)*(2.0*x + 4.0*y + 2.0*z - 3.0);val.col(1) = result_0; }{result_0 = (x - 1)*(y - 1)*(2.0*x + 2.0*y + 4.0*z - 3.0);val.col(2) = result_0; }} break;
14 case 1: {{result_0 = -(y - 1)*(z - 1)*(-4.0*x + 2.0*y + 2.0*z + 1.0);val.col(0) = result_0; }{result_0 = x*(z - 1)*(2.0*x - 4.0*y - 2.0*z + 1.0);val.col(1) = result_0; }{result_0 = x*(y - 1)*(2.0*x - 2.0*y - 4.0*z + 1.0);val.col(2) = result_0; }} break;
15 case 2: {{result_0 = -y*(z - 1)*(4.0*x + 2.0*y - 2.0*z - 3.0);val.col(0) = result_0; }{result_0 = -x*(z - 1)*(2.0*x + 4.0*y - 2.0*z - 3.0);val.col(1) = result_0; }{result_0 = -x*y*(2.0*x + 2.0*y - 4.0*z - 1.0);val.col(2) = result_0; }} break;
16 case 3: {{result_0 = -y*(z - 1)*(4.0*x - 2.0*y + 2.0*z - 1.0);val.col(0) = result_0; }{result_0 = -(x - 1)*(z - 1)*(2.0*x - 4.0*y + 2.0*z + 1.0);val.col(1) = result_0; }{result_0 = -y*(x - 1)*(2.0*x - 2.0*y + 4.0*z - 1.0);val.col(2) = result_0; }} break;
17 case 4: {{result_0 = -z*(y - 1)*(4.0*x + 2.0*y - 2.0*z - 1.0);val.col(0) = result_0; }{result_0 = -z*(x - 1)*(2.0*x + 4.0*y - 2.0*z - 1.0);val.col(1) = result_0; }{result_0 = -(x - 1)*(y - 1)*(2.0*x + 2.0*y - 4.0*z + 1.0);val.col(2) = result_0; }} break;
18 case 5: {{result_0 = -z*(y - 1)*(4.0*x - 2.0*y + 2.0*z - 3.0);val.col(0) = result_0; }{result_0 = -x*z*(2.0*x - 4.0*y + 2.0*z - 1.0);val.col(1) = result_0; }{result_0 = -x*(y - 1)*(2.0*x - 2.0*y + 4.0*z - 3.0);val.col(2) = result_0; }} break;
19 case 6: {{result_0 = y*z*(4.0*x + 2.0*y + 2.0*z - 5.0);val.col(0) = result_0; }{result_0 = x*z*(2.0*x + 4.0*y + 2.0*z - 5.0);val.col(1) = result_0; }{result_0 = x*y*(2.0*x + 2.0*y + 4.0*z - 5.0);val.col(2) = result_0; }} break;
20 case 7: {{result_0 = y*z*(4.0*x - 2.0*y - 2.0*z + 1.0);val.col(0) = result_0; }{result_0 = z*(x - 1)*(2.0*x - 4.0*y - 2.0*z + 3.0);val.col(1) = result_0; }{result_0 = y*(x - 1)*(2.0*x - 2.0*y - 4.0*z + 3.0);val.col(2) = result_0; }} break;
21 case 8: {{result_0 = -4*(2*x - 1)*(y - 1)*(z - 1);val.col(0) = result_0; }{result_0 = -4*x*(x - 1)*(z - 1);val.col(1) = result_0; }{result_0 = -4*x*(x - 1)*(y - 1);val.col(2) = result_0; }} break;
22 case 9: {{result_0 = 4*y*(y - 1)*(z - 1);val.col(0) = result_0; }{result_0 = 4*x*(2*y - 1)*(z - 1);val.col(1) = result_0; }{result_0 = 4*x*y*(y - 1);val.col(2) = result_0; }} break;
23 case 10: {{result_0 = 4*y*(2*x - 1)*(z - 1);val.col(0) = result_0; }{result_0 = 4*x*(x - 1)*(z - 1);val.col(1) = result_0; }{result_0 = 4*x*y*(x - 1);val.col(2) = result_0; }} break;
24 case 11: {{result_0 = -4*y*(y - 1)*(z - 1);val.col(0) = result_0; }{result_0 = -4*(x - 1)*(2*y - 1)*(z - 1);val.col(1) = result_0; }{result_0 = -4*y*(x - 1)*(y - 1);val.col(2) = result_0; }} break;
25 case 12: {{result_0 = -4*z*(y - 1)*(z - 1);val.col(0) = result_0; }{result_0 = -4*z*(x - 1)*(z - 1);val.col(1) = result_0; }{result_0 = -4*(x - 1)*(y - 1)*(2*z - 1);val.col(2) = result_0; }} break;
26 case 13: {{result_0 = 4*z*(y - 1)*(z - 1);val.col(0) = result_0; }{result_0 = 4*x*z*(z - 1);val.col(1) = result_0; }{result_0 = 4*x*(y - 1)*(2*z - 1);val.col(2) = result_0; }} break;
27 case 14: {{result_0 = -4*y*z*(z - 1);val.col(0) = result_0; }{result_0 = -4*x*z*(z - 1);val.col(1) = result_0; }{result_0 = -4*x*y*(2*z - 1);val.col(2) = result_0; }} break;
28 case 15: {{result_0 = 4*y*z*(z - 1);val.col(0) = result_0; }{result_0 = 4*z*(x - 1)*(z - 1);val.col(1) = result_0; }{result_0 = 4*y*(x - 1)*(2*z - 1);val.col(2) = result_0; }} break;
29 case 16: {{result_0 = 4*z*(2*x - 1)*(y - 1);val.col(0) = result_0; }{result_0 = 4*x*z*(x - 1);val.col(1) = result_0; }{result_0 = 4*x*(x - 1)*(y - 1);val.col(2) = result_0; }} break;
30 case 17: {{result_0 = -4*y*z*(y - 1);val.col(0) = result_0; }{result_0 = -4*x*z*(2*y - 1);val.col(1) = result_0; }{result_0 = -4*x*y*(y - 1);val.col(2) = result_0; }} break;
31 case 18: {{result_0 = -4*y*z*(2*x - 1);val.col(0) = result_0; }{result_0 = -4*x*z*(x - 1);val.col(1) = result_0; }{result_0 = -4*x*y*(x - 1);val.col(2) = result_0; }} break;
32 case 19: {{result_0 = 4*y*z*(y - 1);val.col(0) = result_0; }{result_0 = 4*z*(x - 1)*(2*y - 1);val.col(1) = result_0; }{result_0 = 4*y*(x - 1)*(y - 1);val.col(2) = result_0; }} break;
33 default: assert(false);
34}}
35
36}}
double val
Definition Assembler.cpp:86
int y
int z
int x
void q_m2_basis_grad_value_3d(const int local_index, const Eigen::MatrixXd &uv, Eigen::MatrixXd &val)