PolyFEM
Loading...
Searching...
No Matches
auto_q_bases_3d_grad_1.cpp
Go to the documentation of this file.
1#include <Eigen/Dense>
2#include <cassert>
3 namespace polyfem {
4namespace autogen {void q_1_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 = -1.0*(y - 1)*(z - 1);val.col(0) = result_0; }{result_0 = -1.0*(x - 1)*(z - 1);val.col(1) = result_0; }{result_0 = -1.0*(x - 1)*(y - 1);val.col(2) = result_0; }} break;
14 case 1: {{result_0 = 1.0*(y - 1)*(z - 1);val.col(0) = result_0; }{result_0 = 1.0*x*(z - 1);val.col(1) = result_0; }{result_0 = 1.0*x*(y - 1);val.col(2) = result_0; }} break;
15 case 2: {{result_0 = -1.0*y*(z - 1);val.col(0) = result_0; }{result_0 = -1.0*x*(z - 1);val.col(1) = result_0; }{result_0 = -1.0*x*y;val.col(2) = result_0; }} break;
16 case 3: {{result_0 = 1.0*y*(z - 1);val.col(0) = result_0; }{result_0 = 1.0*(x - 1)*(z - 1);val.col(1) = result_0; }{result_0 = 1.0*y*(x - 1);val.col(2) = result_0; }} break;
17 case 4: {{result_0 = 1.0*z*(y - 1);val.col(0) = result_0; }{result_0 = 1.0*z*(x - 1);val.col(1) = result_0; }{result_0 = 1.0*(x - 1)*(y - 1);val.col(2) = result_0; }} break;
18 case 5: {{result_0 = -1.0*z*(y - 1);val.col(0) = result_0; }{result_0 = -1.0*x*z;val.col(1) = result_0; }{result_0 = -1.0*x*(y - 1);val.col(2) = result_0; }} break;
19 case 6: {{result_0 = 1.0*y*z;val.col(0) = result_0; }{result_0 = 1.0*x*z;val.col(1) = result_0; }{result_0 = 1.0*x*y;val.col(2) = result_0; }} break;
20 case 7: {{result_0 = -1.0*y*z;val.col(0) = result_0; }{result_0 = -1.0*z*(x - 1);val.col(1) = result_0; }{result_0 = -1.0*y*(x - 1);val.col(2) = result_0; }} break;
21 default: assert(false);
22}}
23
24}}
double val
Definition Assembler.cpp:86
int y
int z
int x
void q_1_basis_grad_value_3d(const int local_index, const Eigen::MatrixXd &uv, Eigen::MatrixXd &val)