29 #ifndef CORE_BASIS_QUADWEIGHTS_H
30 #define CORE_BASIS_QUADWEIGHTS_H 1
39 template <
class VECTOR>
42 const double x =
static_cast<double>(coords[0]), y = static_cast<double>(coords[1]);
43 w[0] = (-1 + x) * (-1 + y);
50 template <
class VECTOR>
53 const double x=
static_cast<double>(coords[0]), y=static_cast<double>(coords[1]);
65 template<
class VECTOR>
68 const double x=
static_cast<double>(coords[0]), y=static_cast<double>(coords[1]);
70 w[0] = -((-1 + x)*(-1 + y)*(-1 + 2*x + 2*y));
71 w[1] = -(x*(-1 + 2*x - 2*y)*(-1 +y));
72 w[2] = +x*y*(-3 + 2*x + 2*y);
73 w[3] = +(-1 + x)*(1 + 2*x - 2*y)*y;
74 w[4] = +4*(-1 + x)*x*(-1 + y);
75 w[5] = -4*x*(-1 + y)*y;
76 w[6] = -4*(-1 + x)*x*y;
77 w[7] = +4*(-1 + x)*(-1 + y)*y;
81 template<
class VECTOR>
84 const double x=
static_cast<double>(coords[0]), y=static_cast<double>(coords[1]);
86 w[0]= -((-1 + y)*(-3 + 4*x + 2*y));
87 w[1]= -((-1 + 4*x - 2*y)*(-1 + y));
88 w[2]= +y*(-3+ 4*x + 2*y);
89 w[3]= +(-1 + 4*x - 2*y)*y;
90 w[4]= +4*(-1 + 2*x)*(-1 + y);
94 w[8]= -((-1 + x)*(-3 + 2*x +4*y));
95 w[9]= +x*(-1 - 2*x + 4*y);
96 w[10]= +x*(-3 + 2*x + 4*y);
97 w[11]= +(-1 + x)*(1 + 2*x -4*y);
100 w[14]= -4*(-1 + x)*x;
101 w[15]= +4*(-1 + x)*(-1 +2*y);
105 template <
class VECTOR>
108 const double x=
static_cast<double>(coords[0]), y=static_cast<double>(coords[1]);
109 w[0] = -((-1 + x)*(-1 + y)*(-1 - x + 2*x*x - y + 2*y*y));
110 w[1] = -((x-1)*(x-1)*x*(-1 + y));
111 w[2] = -((-1 + x)*(y-1)*(y-1)*y);
112 w[3] = +x*(-1 + y)*(-3*x + 2*x*x + y*(-1 + 2*y));
113 w[4] = +x*x*(-1 + x + y - x*y);
114 w[5] = +x*(y-1)*(y-1)*y;
115 w[6] = +x*y*(-1 + 3*x - 2*x*x + 3*y - 2*y*y);
116 w[7] = +(-1 + x)*x*x*y;
117 w[8] = +x*(-1 + y)*y*y;
118 w[9] = +(-1 + x)*y*(-x + 2*x*x + y*(-3 + 2*y));
119 w[10] = +(x-1)*(x-1)*x*y;
120 w[11] = +y*y*(-1 + x + y - x*y);
124 template <
class VECTOR>
127 const double x=
static_cast<double>(coords[0]), y=static_cast<double>(coords[1]);
128 w[0]= -((-1 + y)*(-6*x + 6*x*x + y*(-1 + 2*y)));
129 w[1]= -((1 - 4*x + 3*x*x)*(-1 + y));
130 w[2]= -((y-1)*(y-1)*y);
131 w[3]= +(-1 + y)*(-6*x + 6*x*x + y*(-1 + 2*y));
132 w[4]= -(x*(-2 + 3*x)*(-1 + y));
133 w[5]= +(y-1)*(y-1)*y;
134 w[6]= +y*(-1 + 6*x - 6*x*x + 3*y - 2*y*y);
135 w[7]= +x*(-2 + 3*x)*y;
137 w[9]= +y*(1 - 6*x + 6*x*x - 3*y + 2*y*y);
138 w[10]= +(1 - 4*x + 3*x*x)*y;
139 w[11]= -((-1 + y)*y*y);
140 w[12]= -((-1 + x)*(-x + 2*x*x + 6*(-1 + y)*y));
141 w[13]= -((x-1)*(x-1)*x);
142 w[14]= -((-1 + x)*(1 - 4*y + 3*y*y));
143 w[15]= +x*(1 - 3*x + 2*x*x - 6*y + 6*y*y);
144 w[16]= -((-1 + x)*x*x);
145 w[17]= +x*(1 - 4*y + 3*y*y);
146 w[18]= +x*(-1 + 3*x - 2*x*x + 6*y - 6*y*y);
147 w[19]= +(-1 + x)*x*x;
148 w[20]= +x*y*(-2 + 3*y);
149 w[21]= +(-1 + x)*(-x + 2*x*x + 6*(-1 + y)*y);
150 w[22]= +(x-1)*(x-1)*x;
151 w[23]= -((-1 + x)*y*(-2 + 3*y));
int num_linear_weights()
Definition: QuadElementWeights.h:155
int num_cubic_derivate_weights()
Definition: QuadElementWeights.h:161
int num_quadratic_derivate_weights()
Definition: QuadElementWeights.h:160
int num_derivs()
Definition: QuadElementWeights.h:163
void get_quadratic_derivate_weights(const VECTOR &coords, double *w) const
get weight factors of derivative at parametric coordinate
Definition: QuadElementWeights.h:82
Definition: QuadElementWeights.h:36
void get_linear_derivate_weights(const VECTOR &coords, double *w) const
get derivative weight factors at parametric coordinate
Definition: QuadElementWeights.h:51
int num_linear_derivate_weights()
Definition: QuadElementWeights.h:159
void get_cubic_derivate_weights(const VECTOR &coords, double *w) const
get derivative weight factors at parametric coordinate
Definition: QuadElementWeights.h:125
void get_quadratic_weights(const VECTOR &coords, double *w) const
get weight factors at parametric coordinate
Definition: QuadElementWeights.h:66
int num_hderivs()
Definition: QuadElementWeights.h:164
int num_cubic_weights()
Definition: QuadElementWeights.h:157
int num_quadratic_weights()
Definition: QuadElementWeights.h:156
void get_linear_weights(const VECTOR &coords, double *w) const
Definition: QuadElementWeights.h:40
void get_cubic_weights(const VECTOR &coords, double *w) const
Definition: QuadElementWeights.h:106