29 #ifndef CORE_BASIS_TETWEIGHTS_H
30 #define CORE_BASIS_TETWEIGHTS_H 1
39 template <
class VECTOR>
42 const double x =
static_cast<double>(coords[0]), y = static_cast<double>(coords[1]), z =
static_cast<double>(coords[2]);
43 w[0] = (1. - x - y - z);
50 template <
class VECTOR>
68 template<
class VECTOR>
71 const double x=
static_cast<double>(coords[0]), y=static_cast<double>(coords[1]), z=
static_cast<double>(coords[2]);
72 w[0] = (1 + 2*x*x + 2*y*y - 3*z + 2*z*z + y*(-3 + 4*z) + x*(-3 + 4*y + 4*z));
76 w[4] = -4*x*(-1 + x + y + z);
78 w[6] = -4*y*(-1 + x + y + z);
79 w[7] = -4*z*(-1 + x + y + z);
85 template<
class VECTOR>
88 const double x=
static_cast<double>(coords[0]), y=static_cast<double>(coords[1]), z=
static_cast<double>(coords[2]);
89 w[0] = (-3 + 4*x + 4*y + 4*z);
93 w[4] = -4*(-1 + 2*x + y + z);
99 w[10] = (-3 + 4*x + 4*y + 4*z);
105 w[16] = -4*(-1 + x + 2*y + z);
109 w[20] = (-3 + 4*x + 4*y + 4*z);
116 w[27] = -4*(-1 + x + y + 2*z);
122 template <
class VECTOR>
125 const double x=
static_cast<double>(coords[0]), y=static_cast<double>(coords[1]), z=
static_cast<double>(coords[2]);
126 w[0] = (-3*x*x + 2*x*x*x - 3*y*y + 2*y*y*y + (z-1)*(z-1)*(1 + 2*z));
127 w[1] = +x*(1 + x*x + x*(-2 + y) - y - z*z);
128 w[2] = +y*(-x*x + (-1 + y)*(-1 + y + z));
129 w[3] = +(-y*y + x*(-1 + z) + (z-1)*(z-1))*z;
130 w[4] = +(3 - 2*x)*x*x;
131 w[5] = +(-1 + x)*x*x;
133 w[7] = -(x*(-1 + z)*z);
134 w[8] = +(3 - 2*y)*y*y;
135 w[9] = -((-1 + x)*x*y);
136 w[10] = +(-1 + y)*y*y;
138 w[12] = +(3 - 2*z)*z*z;
140 w[14] = -((-1 + y)*y*z);
141 w[15] = +(-1 + z)*z*z;
145 template <
class VECTOR>
148 const double x=
static_cast<double>(coords[0]), y=static_cast<double>(coords[1]), z=
static_cast<double>(coords[2]);
150 w[1] = +(1 + 3*x*x + 2*x*(-2 + y) - y - z*z);
153 w[4] = -6*(-1 + x)*x;
154 w[5] = +x*(-2 + 3*x);
156 w[7] = -((-1 + z)*z);
165 w[16] = 6*(-1 + y)*y;
167 w[18] = (1 - x*x + 3*y*y + 2*y*(-2 + z) - z);
173 w[24] = -6*(-1 + y)*y;
174 w[25] = -((-1 + x)*x);
175 w[26] = +y*(-2 + 3*y);
181 w[32] = 6*(-1 + z)*z;
184 w[35] = (1 - x - y*y - 4*z + 2*x*z + 3*z*z);
193 w[44] = -6*(-1 + z)*z;
195 w[46] = -((-1 + y)*y);
196 w[47] = z*(-2 + 3*z);
int num_quadratic_derivate_weights()
Definition: TetElementWeights.h:204
void get_quadratic_weights(const VECTOR &coords, double *w) const
get weight factors at parametric coordinate
Definition: TetElementWeights.h:69
int num_linear_weights()
Definition: TetElementWeights.h:199
Definition: TetElementWeights.h:36
void get_linear_weights(const VECTOR &coords, double *w) const
Definition: TetElementWeights.h:40
int num_derivs()
Definition: TetElementWeights.h:207
void get_linear_derivate_weights(const VECTOR &, double *w) const
get derivative weight factors at parametric coordinate
Definition: TetElementWeights.h:51
int num_hderivs()
Definition: TetElementWeights.h:208
void get_cubic_derivate_weights(const VECTOR &coords, double *w) const
get derivative weight factors at parametric coordinate
Definition: TetElementWeights.h:146
int num_cubic_derivate_weights()
Definition: TetElementWeights.h:205
void get_cubic_weights(const VECTOR &coords, double *w) const
Definition: TetElementWeights.h:123
int num_linear_derivate_weights()
Definition: TetElementWeights.h:203
int num_quadratic_weights()
Definition: TetElementWeights.h:200
void get_quadratic_derivate_weights(const VECTOR &coords, double *w) const
get weight factors of derivative at parametric coordinate
Definition: TetElementWeights.h:86
int num_cubic_weights()
Definition: TetElementWeights.h:201