38 case(1):
return 0.5 * (1 + u);
39 case(2):
return 0.5 * (1 - u);
40 default:
throw std::runtime_error(
"j must be : 1<=j<=2");
45 const std::vector<double> &v)
47 return u[0] * v[0] + u[1] * v[1] + u[2] * v[2];
50 double const &u,
double const &v,
double const &w,
51 std::vector<std::vector<double> > &edgeBasis,
52 std::vector<std::vector<double> > &faceBasis,
53 std::vector<std::vector<double> > &bubbleBasis)
57 std::vector<double> t1 = std::vector<double>(3, 0);
59 std::vector<double> n1 = std::vector<double>(3, 0);
61 std::vector<double> n2 = std::vector<double>(3, 0);
64 std::vector<double> psie_0(3, 0);
65 std::vector<double> psie_1(3, 0);
66 for(
int i = 0; i < 3; i++) {
67 psie_0[i] = lambda1 * n2[i] /
dotProduct(n2, t1) +
69 psie_1[i] = lambda1 * n2[i] /
dotProduct(n2, t1) -
72 double sub = lambda1 - lambda2;
74 std::vector<double> legendreVector(
_pe, 0);
75 for(
unsigned int k = 0; k < legendreVector.size(); k++) {
79 for(
int j = 0; j < 3; j++) { edgeBasis[edgeIt][j] = psie_0[j]; }
82 for(
int j = 0; j < 3; j++) { edgeBasis[edgeIt][j] = psie_1[j]; }
84 for(
int iedge = 2; iedge <=
_pe; iedge++) {
85 for(
int j = 0; j < 3; j++) {
86 edgeBasis[edgeIt][j] = (2 * float(iedge) - 1) /
float(iedge) *
87 legendreVector[iedge - 1] * psie_1[j] -
88 (float(iedge) - 1) /
float(iedge) *
89 legendreVector[iedge - 2] * psie_0[j];
96 int const &flagOrientation,
int const &edgeNumber,
97 std::vector<std::vector<double> > &edgeFunctions,
98 const std::vector<std::vector<double> > &eTablePositiveFlag,
99 const std::vector<std::vector<double> > &eTableNegativeFlag)
101 if(flagOrientation == -1) {
102 for(
int k = 0; k <=
_pe; k++) {
103 edgeFunctions[k][0] = eTableNegativeFlag[k][0];
104 edgeFunctions[k][1] = eTableNegativeFlag[k][1];
105 edgeFunctions[k][2] = eTableNegativeFlag[k][2];
109 for(
int k = 0; k <=
_pe; k++) {
110 edgeFunctions[k][0] = eTablePositiveFlag[k][0];
111 edgeFunctions[k][1] = eTablePositiveFlag[k][1];
112 edgeFunctions[k][2] = eTablePositiveFlag[k][2];
118 std::vector<std::vector<double> > &edgeFunctions)
120 for(
int k = 0; k <=
_pe; k++) {
122 edgeFunctions[k][0] = edgeFunctions[k][0] * (-1);
123 edgeFunctions[k][1] = edgeFunctions[k][1] * (-1);
124 edgeFunctions[k][2] = edgeFunctions[k][2] * (-1);
129 double const &u,
double const &v,
double const &w,
130 std::vector<std::vector<double> > &edgeBasis,
131 std::vector<std::vector<double> > &faceBasis,
132 std::vector<std::vector<double> > &bubbleBasis)
138 std::vector<int> &orderInfo)
140 for(
int k = 0; k <=
_pe; k++) {
142 functionTypeInfo[k] = 1;