29 #ifndef CORE_BASIS_TRIWEIGHTS_H
30 #define CORE_BASIS_TRIWEIGHTS_H 1
39 template <
class VECTOR>
42 const double x =
static_cast<double>(coords[0]), y = static_cast<double>(coords[1]);
50 template <
class VECTOR>
62 template<
class VECTOR>
65 const double x=
static_cast<double>(coords[0]), y=static_cast<double>(coords[1]);
66 w[0] = (1 + 2*x*x - 3*y + 2*y*y + x*(-3 + 4*y));
69 w[3] = -4*x*(-1 + x + y);
71 w[5] = -4*y*(-1 + x + y);
75 template<
class VECTOR>
78 const double x=
static_cast<double>(coords[0]), y=static_cast<double>(coords[1]);
79 w[0] = (-3 + 4*x + 4*y);
82 w[3] = -4*(-1 + 2*x + y);
85 w[6] = (-3 + 4*x + 4*y);
90 w[11] = -4*(-1 + x +2*y);
94 template <
class VECTOR>
97 const double x=
static_cast<double>(coords[0]), y=static_cast<double>(coords[1]);
98 const double x2=x*x, x3=x2*x, y2=y*y, y3=y2*y;
100 w[0] = (-1 + x + y)*(-1 - x + 2*x2 - y - 2*x*y + 2*y2);
101 w[1] = x*(1 - 2*x + x2 - 3*y2 + 2*y3);
102 w[2] = y*(1 - 3*x2 + 2*x3 - 2*y + y2);
103 w[3] = x*y*(1 - 2*x + x2 - 2*y + y2);
104 w[4] = -(x2*(-3 + 2*x));
106 w[6] = -(x2*(-3 + 2*x)*y);
107 w[7] = (-1 + x)*x2*y;
108 w[8] = -y2*(-3 + 2*y);
109 w[9] = -(x*y2*(-3 + 2*y));
111 w[11] = x*(-1 + y)*y2;
115 template <
class VECTOR>
118 const double x=
static_cast<double>(coords[0]), y=static_cast<double>(coords[1]);
119 const double x2=x*x, x3=x2*x, y2=y*y;
120 const double y12=(y-1)*(y-1);
123 w[1] = (-4*x + 3*x2 + y12*(1 + 2*y));
124 w[2] = 6*(-1 + x)*x*y;
125 w[3] = (-4*x + 3*x2 + y12)*y;
126 w[4] = -6*(-1 + x)*x;
128 w[6] = -6*(-1 + x)*x*y;
129 w[7] = x*(-2 + 3*x)*y;
135 w[12] = 6*(-1 + y)*y;
136 w[13] = 6*x*(-1 + y)*y;
137 w[14] = (1 - 3*x2 + 2*x3 - 4*y + 3*y2);
138 w[15] = x*(1 - 2*x + x2 - 4*y + 3*y2);
141 w[18] = (3 - 2*x)*x2;
143 w[20] = -6*(-1 + y)*y;
144 w[21] = -6*x*(-1 + y);
145 w[22] = y*(-2 + 3*y);
146 w[23] = x*y*(-2 + 3*y);
void get_cubic_derivate_weights(const VECTOR &coords, double *w) const
get derivative weight factors at parametric coordinate
Definition: TriElementWeights.h:116
void get_quadratic_derivate_weights(const VECTOR &coords, double *w) const
get weight factors of derivative at parametric coordinate
Definition: TriElementWeights.h:76
int num_quadratic_weights()
Definition: TriElementWeights.h:150
void get_linear_derivate_weights(const VECTOR &, double *w) const
get derivative weight factors at parametric coordinate
Definition: TriElementWeights.h:51
int num_hderivs()
Definition: TriElementWeights.h:158
int num_cubic_weights()
Definition: TriElementWeights.h:151
void get_quadratic_weights(const VECTOR &coords, double *w) const
get weight factors at parametric coordinate
Definition: TriElementWeights.h:63
void get_linear_weights(const VECTOR &coords, double *w) const
Definition: TriElementWeights.h:40
void get_cubic_weights(const VECTOR &coords, double *w) const
Definition: TriElementWeights.h:95
int num_linear_derivate_weights()
Definition: TriElementWeights.h:153
Definition: TriElementWeights.h:36
int num_quadratic_derivate_weights()
Definition: TriElementWeights.h:154
int num_derivs()
Definition: TriElementWeights.h:157
int num_cubic_derivate_weights()
Definition: TriElementWeights.h:155
int num_linear_weights()
Definition: TriElementWeights.h:149