29 #ifndef CORE_BASIS_PRISMWEIGHTS_H
30 #define CORE_BASIS_PRISMWEIGHTS_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) * (-1 + z);
44 w[1] = - (x * (-1 + z));
45 w[2] = - (y * (-1 + z));
46 w[3] = - ((-1 + x + y) * z);
52 template <
class VECTOR>
55 const double x =
static_cast<double>(coords[0]), y = static_cast<double>(coords[1]), z =
static_cast<double>(coords[2]);
77 template<
class VECTOR>
80 const double x=
static_cast<double>(coords[0]), y=static_cast<double>(coords[1]), z=
static_cast<double>(coords[2]);
81 w[0] = -((-1 + x + y)*(-1 + z)*(-1 + 2*x + 2*y + 2*z));
82 w[1] = -(x*(-1 + 2*x -2*z)*(-1 + z));
83 w[2] = -(y*(-1 + 2*y - 2*z)*(-1 + z));
84 w[3] = (-1 + x + y)*(1 + 2*x + 2*y - 2*z)*z;
85 w[4] = +x*z*(-3 + 2*x + 2*z);
86 w[5] = y*z*(-3 + 2*y + 2*z);
87 w[6] = +4*x*(-1 + x + y)*(-1 + z);
88 w[7] = -4*x*y*(-1 + z);
89 w[8] = +4*y*(-1 + x + y)*(-1 + z);
90 w[9] = +4*(-1 + x + y)*(-1 + z)*z;
91 w[10] = -4*x*(-1 + z)*z;
92 w[11] = -4*y*(-1 + z)*z;
93 w[12] = -4*x*(-1 + x +y)*z;
95 w[14] = -4*y*(-1 + x + y)*z;
99 template<
class VECTOR>
102 const double x=
static_cast<double>(coords[0]), y=static_cast<double>(coords[1]), z=
static_cast<double>(coords[2]);
103 w[0]=-(-1 + z)*(-3 + 4*x + 4*y + 2*z);
104 w[1]=-(-1 + 4*x - 2*z)*(-1 + z);
106 w[3]=+(-1 + 4*x + 4*y - 2*z)*z;
107 w[4]=+z*(-3 + 4*x + 2*z);
109 w[6]=+4*(-1 + 2*x + y)*(-1 +z);
115 w[12]=-4*(-1 + 2*x + y)*z;
118 w[15]=-((-1 + z)*(-3 + 4*x + 4*y + 2*z));
120 w[17]=-((-1 + 4*y - 2*z)*(-1 + z));
121 w[18]=+(-1 + 4*x + 4*y - 2*z)*z;
123 w[20]=+z*(-3 + 4*y + 2*z);
126 w[23]=+4*(-1 + x + 2*y)*(-1 + z);
132 w[29]=-4*(-1 + x + 2*y)*z;
133 w[30]=-((-1 + x + y)*(-3 + 2*x + 2*y + 4*z));
134 w[31]=+x*(-1 - 2*x + 4*z);
135 w[32]=+y*(-1 - 2*y + 4*z);
136 w[33]=+(-1 + x + y)*(1 + 2*x + 2*y - 4*z);
137 w[34]=+x*(-3 + 2*x + 4*z);
138 w[35]=+y*(-3 + 2*y + 4*z);
139 w[36]=+4*x*(-1 + x + y);
141 w[38]=+4*y*(-1 + x + y);
142 w[39]=+4*(-1 + x + y)*(-1 + 2*z);
145 w[42]=-4*x*(-1 + x + y);
147 w[44]=-4*y*(-1 + x + y);
151 template <
class VECTOR>
154 const double x=
static_cast<double>(coords[0]), y=static_cast<double>(coords[1]), z=
static_cast<double>(coords[2]);
158 const double y12=(y-1)*(y-1);
159 const double z12=(z-1)*(z-1);
161 w[0] = -((-1 + x + y)*(-1 + z)*(-1 + 2*x2 - y + 2*y2 - x*(1 + 2*y) - z + 2*z2));
162 w[1] = -(x*(1 - 2*x + x2 - y2)*(-1 + z));
163 w[2] = +(x2 - y12)*y*(-1 + z);
164 w[3] = -((-1 + x + y)*z12*z);
165 w[4] = +x*(-1 + z)*(-3*x + 2*x2 + z*(-1 + 2*z));
166 w[5] = +x2*(-1 + x + z - x*z);
167 w[6] = -(x2*y*(-1 + z));
169 w[8] = +y*(-1 + z)*(-3*y + 2*y2 + z*(-1 + 2*z));
170 w[9] = -(x*y2*(-1 + z));
171 w[10] = +y2*(-1 + y + z - y*z);
173 w[12] = +(-1 + x + y)*z*(2*x2 - y + 2*y2 - x*(1 + 2*y) + z*(-3 + 2*z));
174 w[13] = +x*(1 - 2*x + x2 - y2)*z;
175 w[14] = +(-x2 + y12)*y*z;
176 w[15] = -((-1 + x + y)*(-1 + z)*z2);
177 w[16] = +x*z*(-1 + 3*x - 2*x2 + 3*z - 2*z2);
178 w[17] = +(-1 + x)*x2*z;
180 w[19] = x*(-1 + z)*z2;
181 w[20] = +y*z*(-1 + 3*y - 2*y2 + 3*z - 2*z2);
183 w[22] = +(-1 + y)*y2*z;
184 w[23] = +y*(-1 + z)*z2;
188 template <
class VECTOR>
191 const double x=
static_cast<double>(coords[0]), y=static_cast<double>(coords[1]), z=
static_cast<double>(coords[2]);
195 const double y12=(y-1)*(y-1);
196 const double z12=(z-1)*(z-1);
197 w[0]=-((-1 + z)*(-6*x + 6*x2 + z*(-1 + 2*z)));
198 w[1]=-((1 - 4*x + 3*x2 - y2)*(-1 + z));
199 w[2]=+2*x*y*(-1 + z);
201 w[4]=+(-1 + z)*(-6*x + 6*x2 + z*(-1 + 2*z));
202 w[5]=-(x*(-2 + 3*x)*(-1 + z));
203 w[6]=-2*x*y*(-1 + z);
209 w[12]=z*(1- 6*x + 6*x2 - 3*z + 2*z2);
210 w[13]=+(1 - 4*x + 3*x2 - y2)*z;
212 w[15]=-((-1 + z)*z2);
213 w[16]=+z*(-1 + 6*x - 6*x2 + 3*z - 2*z2);
214 w[17]=+x*(-2 + 3*x)*z;
221 w[24]=-((-1 + z)*(-6*y + 6*y2 + z*(-1 + 2*z)));
222 w[25]=+2*x*y*(-1 + z);
223 w[26]=+(-1 + x2 + 4*y - 3*y2)*(-1 + z);
227 w[30]=-(x2*(-1 + z));
229 w[32]=+(-1 + z)*(-6*y + 6*y2 + z*(-1 + 2*z));
230 w[33]=-2*x*y*(-1 + z);
231 w[34]=-(y*(-2 + 3*y)*(-1 + z));
233 w[36]=+z*(1 - 6*y + 6*y2 - 3*z + 2*z2);
235 w[38]=-((-1 + x2 + 4*y - 3*y2)*z);
236 w[39]=-((-1 + z)*z2);
241 w[44]=z*(-1 + 6*y - 6*y2 + 3*z - 2*z2);
243 w[46]=y*(-2 + 3*y)*z;
245 w[48]=-((-1 + x + y)*(2*x2 - y + 2*y2 - x*(1 + 2*y) + 6*(-1 + z)*z));
246 w[49]=x*(-1 + 2*x - x2 + y2);
248 w[51]=-((-1 + x + y)*(1 - 4*z + 3*z2));
249 w[52]=+x*(1 - 3*x + 2*x2 - 6*z + 6*z2);
250 w[53]=-((-1 + x)*x2);
252 w[55]=+x*(1 - 4*z + 3*z2);
253 w[56]=+y*(1 - 3*y + 2*y2 - 6*z + 6*z2);
255 w[58]=-((-1 + y)*y2);
256 w[59]=+y*(1 - 4*z + 3*z2);
257 w[60]=+(-1 + x + y)*(2*x2 - y + 2*y2 - x*(1 + 2*y) + 6*(-1 + z)*z);
258 w[61]=+x*(1 - 2*x + x2 - y2);
259 w[62]=+(-x2 + y12)*y;
260 w[63]=-((-1 + x + y)*z*(-2 + 3*z));
261 w[64]=+x*(-1 + 3*x - 2*x2 + 6*z - 6*z2);
264 w[67]=+x*z*(-2 + 3*z);
265 w[68]=+y*(-1 + 3*y - 2*y2 + 6*z - 6*z2);
268 w[71]=+y*z*(-2 + 3*z);
void get_quadratic_derivate_weights(const VECTOR &coords, double *w) const
get weight factors of derivative at parametric coordinate
Definition: PrismElementWeights.h:100
void get_linear_derivate_weights(const VECTOR &coords, double *w) const
get derivative weight factors at parametric coordinate
Definition: PrismElementWeights.h:53
int num_cubic_weights()
Definition: PrismElementWeights.h:273
void get_linear_weights(const VECTOR &coords, double *w) const
Definition: PrismElementWeights.h:40
void get_cubic_weights(const VECTOR &coords, double *w) const
Definition: PrismElementWeights.h:152
void get_quadratic_weights(const VECTOR &coords, double *w) const
get weight factors at parametric coordinate
Definition: PrismElementWeights.h:78
int num_linear_derivate_weights()
Definition: PrismElementWeights.h:275
int num_cubic_derivate_weights()
Definition: PrismElementWeights.h:277
int num_linear_weights()
Definition: PrismElementWeights.h:271
Definition: PrismElementWeights.h:36
int num_quadratic_weights()
Definition: PrismElementWeights.h:272
int num_hderivs()
Definition: PrismElementWeights.h:281
void get_cubic_derivate_weights(const VECTOR &coords, double *w) const
get derivative weight factors at parametric coordinate
Definition: PrismElementWeights.h:189
int num_quadratic_derivate_weights()
Definition: PrismElementWeights.h:276
int num_derivs()
Definition: PrismElementWeights.h:280