31 (order - 1) * (order - 2) * order +
32 (order - 1) * order * (order + 1) / 2;
35 for(
int i = 0; i < 3; i++) {
40 for(
int i = 0; i < 9; i++) {
_pOrderEdge[i] = order; }
56 case(1):
return 0.5 * (1 + v);
57 case(2):
return -0.5 * (u + v);
58 case(3):
return 0.5 * (1 + u);
59 case(4):
return 0.5 * (1 + w);
60 case(5):
return 0.5 * (1 - w);
61 default:
throw std::runtime_error(
"j must be : 1<=j<=5");
67 const std::vector<double> &u2)
69 return u1[0] * u2[0] + u1[1] * u2[1];
73 const double &a,
const std::vector<double> &u, std::vector<double> &result)
75 result[0] = a * 2 * u[0];
76 result[1] = a * 2 * u[1];
80 double const &u,
double const &v,
double const &w,
81 std::vector<std::vector<double> > &edgeBasis,
82 std::vector<std::vector<double> > &faceBasis,
83 std::vector<std::vector<double> > &bubbleBasis)
87 double uc = 2 * u - 1;
88 double vc = 2 * v - 1;
97 std::vector<double> t1 = std::vector<double>(3, 0);
99 std::vector<double> t2 = std::vector<double>(3, 0);
102 std::vector<double> t3 = std::vector<double>(3, 0);
104 std::vector<double> n1 = std::vector<double>(3, 0);
106 std::vector<double> n2 = std::vector<double>(3, 0);
109 std::vector<double> n3 = std::vector<double>(3, 0);
112 std::vector<std::vector<double> > psie_0(3, std::vector<double>(3, 0));
113 std::vector<std::vector<double> > psie_1(3, std::vector<double>(3, 0));
114 for(
int i = 0; i < 3; i++) {
115 psie_0[0][i] = lambda3 * n2[i] /
dotProduct(n2, t1) +
117 psie_0[1][i] = lambda1 * n3[i] /
dotProduct(n3, t2) +
119 psie_0[2][i] = lambda2 * n1[i] /
dotProduct(n1, t3) +
122 psie_1[0][i] = lambda3 * n2[i] /
dotProduct(n2, t1) -
124 psie_1[1][i] = lambda1 * n3[i] /
dotProduct(n3, t2) -
126 psie_1[2][i] = -lambda2 * n1[i] /
dotProduct(n1, t3) +
129 double subl3l2 = lambda3 - lambda2;
130 double subl1l3 = lambda1 - lambda3;
131 double subl1l2 = lambda1 - lambda2;
132 double subl2l1 = lambda2 - lambda1;
133 std::vector<double> sub(4, 0);
134 sub[0] = subl3l2, sub[1] = subl1l3, sub[2] = subl1l2, sub[3] = subl2l1;
135 std::vector<std::vector<double> > legendreVector(4);
136 legendreVector[0] = std::vector<double>(
144 legendreVector[1] = std::vector<double>(
152 legendreVector[2] = std::vector<double>(
156 legendreVector[3] = std::vector<double>(
161 for(
unsigned int k = 0; k < legendreVector[0].size(); k++) {
164 for(
unsigned int k = 0; k < legendreVector[1].size(); k++) {
167 for(
unsigned int k = 0; k < legendreVector[2].size(); k++) {
170 for(
unsigned int k = 0; k < legendreVector[3].size(); k++) {
174 std::vector<double> legendreW(
175 std::max(std::max(std::max(std::max(std::max(std::max(
_pOrderEdge[2] + 1,
183 std::vector<double> lobattoW(
189 for(
unsigned int k = 0; k < legendreW.size(); k++) {
192 for(
unsigned int k = 0; k < lobattoW.size(); k++) {
198 for(
int i = 0; i <
_nedge; i++) {
208 if(i == 0 || i == 1 || i == 3) { lambda = lambda5; }
212 if(i == 0 || i == 6) { index = 0; }
213 if(i == 1 || i == 7) { index = 2; }
214 if(i == 3 || i == 8) { index = 1; }
220 for(
int iedge = 2; iedge <=
_pOrderEdge[i]; iedge++) {
221 for(
int j = 0; j < 3; j++) {
222 edgeBasis[edgeIt][j] =
223 (2 * float(iedge) - 1) /
float(iedge) *
224 legendreVector[index][iedge - 1] * psie_1[index][j] -
225 (float(iedge) - 1) /
float(iedge) *
226 legendreVector[index][iedge - 2] * psie_0[index][j];
238 if(i == 2) { lamb = lambda2; }
239 if(i == 4) { lamb = lambda3; }
240 if(i == 5) { lamb = lambda1; }
241 for(
int iedge = 0; iedge <=
_pOrderEdge[i]; iedge++) {
242 edgeBasis[edgeIt][0] = 0;
243 edgeBasis[edgeIt][1] = 0;
244 edgeBasis[edgeIt][2] = lamb * legendreW[iedge];
254 for(
int iFace = 0; iFace <
_nfaceQuad; iFace++) {
260 prod = lambda2 * lambda3;
264 prod = lambda1 * lambda2;
268 prod = lambda1 * lambda3;
273 std::vector<double> facePsi(3, 0);
275 facePsi[0] = psie_0[index][0], facePsi[1] = psie_0[index][1],
276 facePsi[2] = psie_0[index][2];
279 facePsi[0] = psie_1[index][0], facePsi[1] = psie_1[index][1],
280 facePsi[2] = psie_1[index][2];
283 for(
int j = 0; j < 3; j++) {
284 facePsi[j] = (2 * float(n1) - 1) /
float(n1) *
285 legendreVector[index][n1 - 1] * psie_1[index][j] -
286 (float(n1) - 1) /
float(n1) *
287 legendreVector[index][n1 - 2] * psie_0[index][j];
302 faceBasis[faceIt][0] = 0;
303 faceBasis[faceIt][1] = 0;
304 faceBasis[faceIt][2] = phie * legendreW[n2];
311 for(
int iFace = 0; iFace < 2; iFace++) {
313 if(iFace == 0) { lambda = lambda5; }
317 for(
int i = 0; i < 3; i++) {
319 std::vector<double> nD(3, 0);
323 prod = lambda2 * lambda3;
328 prod = lambda1 * lambda3;
334 prod = lambda1 * lambda2;
342 prod * legendreVector[index][n1 - 2] * lambda, nD, faceBasis[faceIt]);
347 double product = lambda1 * lambda2 * lambda3;
348 int faceIt2 = faceIt;
351 faceBasis[faceIt][0] = 0.5 * lambda * product * legendreVector[0][n1] *
352 legendreVector[3][n2];
353 faceBasis[faceIt][1] = 0;
354 faceBasis[faceIt][2] = 0;
361 faceBasis[faceIt][0] = 0;
362 faceBasis[faceIt][1] = faceBasis[faceIt2][0];
363 faceBasis[faceIt][2] = 0;
372 for(
int iFace = 0; iFace <
_nfaceQuad; iFace++) {
375 std::vector<double> nD(3, 0);
380 prod = lambda2 * lambda3;
384 prod = lambda1 * lambda2;
389 prod = lambda1 * lambda3;
394 for(
int n1 = 2; n1 <=
_pb1; n1++) {
395 for(
int n2 = 2; n2 <=
_pb2 + 1; n2++) {
397 legendreVector[index][n1 - 2],
398 nD, bubbleBasis[bubbleIt]);
404 double product = lambda1 * lambda2 * lambda3;
405 int bubbleIt2 = bubbleIt;
406 for(
int n1 = 0; n1 <
_pb1 - 2; n1++) {
407 for(
int n2 = 0; n2 <
_pb1 - 2 - n1; n2++) {
408 std::vector<double> term(3, 0);
409 term[0] = product * legendreVector[0][n1] * legendreVector[3][n2];
410 for(
int n3 = 2; n3 <=
_pb2 + 1; n3++) {
412 bubbleBasis[bubbleIt]);
417 for(
int n1 = 0; n1 <
_pb1 - 2; n1++) {
418 for(
int n2 = 0; n2 <
_pb1 - 2 - n1; n2++) {
419 for(
int n3 = 2; n3 <=
_pb2 + 1; n3++) {
420 bubbleBasis[bubbleIt][1] = -bubbleBasis[bubbleIt2][0];
427 for(
int n1 = 0; n1 <
_pb1 - 1; n1++) {
428 for(
int n2 = 0; n2 <
_pb1 - 1 - n1; n2++) {
429 double term = product * legendreVector[0][n1] * legendreVector[3][n2];
430 for(
int n3 = 0; n3 <=
_pb2; n3++) {
431 bubbleBasis[bubbleIt][0] = 0;
432 bubbleBasis[bubbleIt][1] = 0;
433 bubbleBasis[bubbleIt][2] = term * legendreW[n3];
441 int const &flagOrientation,
int const &edgeNumber,
442 std::vector<std::vector<double> > &edgeFunctions,
443 const std::vector<std::vector<double> > &eTablePositiveFlag,
444 const std::vector<std::vector<double> > &eTableNegativeFlag)
446 if(flagOrientation == -1) {
449 for(
int i = 0; i <= edgeNumber; i++) { constant2 +=
_pOrderEdge[i] + 1; }
450 constant2 = constant2 - 1;
452 for(
int k = constant1; k <= constant2; k++) {
453 edgeFunctions[k][0] = eTableNegativeFlag[k][0];
454 edgeFunctions[k][1] = eTableNegativeFlag[k][1];
455 edgeFunctions[k][2] = eTableNegativeFlag[k][2];
461 for(
int i = 0; i <= edgeNumber; i++) { constant2 +=
_pOrderEdge[i] + 1; }
462 constant2 = constant2 - 1;
464 for(
int k = constant1; k <= constant2; k++) {
465 edgeFunctions[k][0] = eTablePositiveFlag[k][0];
466 edgeFunctions[k][1] = eTablePositiveFlag[k][1];
467 edgeFunctions[k][2] = eTablePositiveFlag[k][2];
472 std::vector<std::vector<double> > &edgeFunctions)
476 for(
int edgeNumber = 0; edgeNumber <
_nedge; edgeNumber++) {
479 for(
int i = 0; i <= edgeNumber; i++) { constant2 +=
_pOrderEdge[i] + 1; }
480 constant2 = constant2 - 1;
482 for(
int k = constant1; k <= constant2; k++) {
483 if((k - constant1) % 2 == 0) {
484 edgeFunctions[k][0] = edgeFunctions[k][0] * (-1);
485 edgeFunctions[k][1] = edgeFunctions[k][1] * (-1);
486 edgeFunctions[k][2] = edgeFunctions[k][2] * (-1);
492 double const &u,
double const &v,
double const &w,
int const &flag1,
493 int const &flag2,
int const &flag3,
int const &faceNumber,
494 std::vector<std::vector<double> > &faceFunctions, std::string typeFunction)
497 if(!(flag1 == 1 && flag2 == 1 && flag3 == 1)) {
499 for(
int k = 0; k < faceNumber; k++) {
508 if(flag1 == -1 && it1 % 2 == 0) { impactFlag1 = -1; }
509 if(flag2 == -1 && it2 % 2 != 0) { impactFlag2 = -1; }
510 faceFunctions[iterator][0] =
511 faceFunctions[iterator][0] * impactFlag1 * impactFlag2;
512 faceFunctions[iterator][1] =
513 faceFunctions[iterator][1] * impactFlag1 * impactFlag2;
514 faceFunctions[iterator][2] =
515 faceFunctions[iterator][2] * impactFlag1 * impactFlag2;
523 if(flag1 == -1 && it1 % 2 != 0) { impactFlag1 = -1; }
524 if(flag2 == -1 && it2 % 2 == 0) { impactFlag2 = -1; }
525 faceFunctions[iterator][0] =
526 faceFunctions[iterator][0] * impactFlag1 * impactFlag2;
527 faceFunctions[iterator][1] =
528 faceFunctions[iterator][1] * impactFlag1 * impactFlag2;
529 faceFunctions[iterator][2] =
530 faceFunctions[iterator][2] * impactFlag1 * impactFlag2;
536 if(typeFunction ==
"HcurlLegendre") {
538 double uc = 2 * u - 1;
539 double vc = 2 * v - 1;
545 std::vector<double> psie_0(2, 0);
546 std::vector<double> psie_1(2, 0);
551 prod = lambda2 * lambda3;
552 sub = lambda3 - lambda2;
553 psie_0[0] = lambda3 + lambda2;
561 prod = lambda1 * lambda2;
562 sub = lambda1 - lambda2;
564 psie_0[1] = lambda1 + lambda2;
571 prod = lambda1 * lambda3;
572 sub = lambda1 - lambda3;
573 psie_0[0] = -lambda1;
575 psie_1[0] = -lambda1;
576 psie_1[1] = -lambda3;
581 for(
unsigned int i = 0; i < LSub.size(); i++) {
588 if(flag2 == -1 && it1 % 2 == 0) { impactFlag1 = -1; }
591 if(flag1 == -1 && it2 % 2 != 0) { impactFlag2 = -1; }
592 faceFunctions[iterator][0] = 0;
593 faceFunctions[iterator][1] = 0;
594 faceFunctions[iterator][2] =
595 impactFlag1 * impactFlag2 * phi[it2 - 2] * Lw;
602 if(flag2 == -1 && it1 % 2 != 0) { impactFlag1 = -1; }
604 faceFunctions[iterator][0] =
605 -jacob * impactFlag1 * lw * psie_0[0];
606 faceFunctions[iterator][1] =
607 -jacob * impactFlag1 * lw * psie_0[1];
608 faceFunctions[iterator][2] = 0;
610 faceFunctions[iterator][0] = jacob * impactFlag1 * lw * psie_1[0];
611 faceFunctions[iterator][1] = jacob * impactFlag1 * lw * psie_1[1];
612 faceFunctions[iterator][2] = 0;
616 faceFunctions[iterator][0] = jacob * impactFlag1 * lw * psie_0[0];
617 faceFunctions[iterator][1] = jacob * impactFlag1 * lw * psie_0[1];
618 faceFunctions[iterator][2] = 0;
620 faceFunctions[iterator][0] = jacob * impactFlag1 * lw * psie_1[0];
621 faceFunctions[iterator][1] = jacob * impactFlag1 * lw * psie_1[1];
622 faceFunctions[iterator][2] = 0;
628 if(flag1 == -1 && it2 % 2 == 0) { impactFlag2 = -1; }
629 for(
int j = 0; j < 2; j++) {
630 faceFunctions[iterator][j] =
631 impactFlag1 * impactFlag2 * lw * jacob *
632 ((2 * float(it2) - 1) /
float(it2) * LSub[it2 - 1] *
634 (float(it2) - 1) /
float(it2) * LSub[it2 - 2] * psie_0[j]);
636 faceFunctions[iterator][2] = 0;
641 else if(
"CurlHcurlLegendre" == typeFunction) {
643 double uc = 2 * u - 1;
644 double vc = 2 * v - 1;
651 std::vector<double> dsub(2, 0);
652 std::vector<double> dProd(2, 0);
653 std::vector<double> psie_0(2, 0);
654 std::vector<double> psie_1(2, 0);
655 double curlpsie_0 = 1;
660 prod = lambda2 * lambda3;
661 sub = lambda3 - lambda2;
662 psie_0[0] = lambda3 + lambda2;
666 dProd[0] = 0.5 * (lambda2 - lambda3);
667 dProd[1] = -0.5 * lambda3;
674 prod = lambda1 * lambda2;
675 sub = lambda1 - lambda2;
677 psie_0[1] = lambda1 + lambda2;
682 dProd[0] = -0.5 * lambda1;
683 dProd[1] = 0.5 * (lambda2 - lambda1);
689 prod = lambda1 * lambda3;
690 sub = lambda1 - lambda3;
691 psie_0[0] = -lambda1;
693 psie_1[0] = -lambda1;
694 psie_1[1] = -lambda3;
695 dProd[0] = 0.5 * lambda1;
696 dProd[1] = 0.5 * lambda3;
706 for(
unsigned int i = 0; i < Lsub.size(); i++) {
715 if(flag2 == -1 && it1 % 2 == 0) { impactFlag1 = -1; }
718 if(flag1 == -1 && it2 % 2 != 0) { impactFlag2 = -1; }
719 std::vector<double> dphie(2, 0);
721 dProd[0] * phi[it2 - 2] + prod * dsub[0] * dphi[it2 - 2];
723 dProd[1] * phi[it2 - 2] + prod * dsub[1] * dphi[it2 - 2];
724 faceFunctions[iterator][0] =
725 detJacob * impactFlag1 * impactFlag2 * Lw * dphie[1];
726 faceFunctions[iterator][1] =
727 -detJacob * impactFlag1 * impactFlag2 * Lw * dphie[0];
728 faceFunctions[iterator][2] = 0;
736 if(flag2 == -1 && it1 % 2 != 0) { impactFlag1 = -1; }
738 faceFunctions[iterator][0] =
739 detJacob * impactFlag1 * dlw * psie_0[1];
740 faceFunctions[iterator][1] =
741 -detJacob * impactFlag1 * dlw * psie_0[0];
742 faceFunctions[iterator][2] = -det * lw * curlpsie_0 * impactFlag1;
744 faceFunctions[iterator][0] =
745 -detJacob * impactFlag1 * dlw * psie_1[1];
746 faceFunctions[iterator][1] =
747 detJacob * impactFlag1 * dlw * psie_1[0];
748 faceFunctions[iterator][2] = 0;
752 faceFunctions[iterator][0] =
753 -detJacob * impactFlag1 * dlw * psie_0[1];
754 faceFunctions[iterator][1] =
755 detJacob * impactFlag1 * dlw * psie_0[0];
756 faceFunctions[iterator][2] = det * lw * curlpsie_0 * impactFlag1;
758 faceFunctions[iterator][0] =
759 -detJacob * impactFlag1 * dlw * psie_1[1];
760 faceFunctions[iterator][1] =
761 detJacob * impactFlag1 * dlw * psie_1[0];
762 faceFunctions[iterator][2] = 0;
767 std::vector<double> psie(2, 0);
768 for(
int j = 0; j < 2; j++) {
770 (2 * float(it2) - 1) /
float(it2) * Lsub[it2 - 1] *
772 (float(it2) - 1) /
float(it2) * Lsub[it2 - 2] * psie_0[j];
774 double curlpsie = (2 * float(it2) - 1) /
float(it2) *
775 (dsub[0] * dLsub[it2 - 1] * psie_1[1] -
776 dsub[1] * dLsub[it2 - 1] * psie_1[0]) -
777 (
float(it2) - 1) /
float(it2) *
778 (curlpsie_0 * Lsub[it2 - 2] +
779 dsub[0] * dLsub[it2 - 2] * psie_0[1] -
780 dsub[1] * dLsub[it2 - 2] * psie_0[0]);
781 if(flag1 == -1 && it2 % 2 == 0) { impactFlag2 = -1; }
782 faceFunctions[iterator][0] =
783 -impactFlag1 * impactFlag2 * dlw * detJacob * psie[1];
785 faceFunctions[iterator][1] =
786 impactFlag1 * impactFlag2 * dlw * detJacob * psie[0];
788 faceFunctions[iterator][2] =
789 impactFlag1 * impactFlag2 * lw * det * curlpsie;
796 throw std::runtime_error(
"unknown typeFunction");
804 for(
int k = 0; k < 3; k++) {
808 if(typeFunction ==
"HcurlLegendre") {
810 double uc = 2 * u - 1;
811 double vc = 2 * v - 1;
824 std::vector<double> lambda(3);
825 std::vector<std::vector<double> > dlambda(3, std::vector<double>(3, 0));
829 dlambda[0][0] = -0.5;
830 dlambda[0][1] = -0.5;
833 if(flag1 == 1 && flag2 == -1) {
834 double copy = lambda[0];
835 lambda[0] = lambda[1];
837 std::vector<double> dcopy = dlambda[0];
838 dlambda[0] = dlambda[1];
841 else if(flag1 == 0 && flag2 == -1) {
842 double copy = lambda[2];
843 lambda[2] = lambda[1];
845 std::vector<double> dcopy = dlambda[2];
846 dlambda[2] = dlambda[1];
849 else if(flag1 == 2 && flag2 == -1) {
850 double copy = lambda[2];
851 lambda[2] = lambda[0];
853 std::vector<double> dcopy = dlambda[2];
854 dlambda[2] = dlambda[0];
857 else if(flag1 == 1 && flag2 == 1) {
858 double copy = lambda[0];
859 lambda[0] = lambda[1];
860 lambda[1] = lambda[2];
862 std::vector<double> dcopy = dlambda[0];
863 dlambda[0] = dlambda[1];
864 dlambda[1] = dlambda[2];
867 else if(flag1 == 2 && flag2 == 1) {
868 double copy = lambda[0];
869 lambda[0] = lambda[2];
870 lambda[2] = lambda[1];
872 std::vector<double> dcopy = dlambda[0];
873 dlambda[0] = dlambda[2];
874 dlambda[2] = dlambda[1];
877 std::vector<double> sub(3);
878 sub[0] = lambda[1] - lambda[0];
879 sub[1] = lambda[2] - lambda[1];
880 sub[2] = lambda[0] - lambda[2];
881 std::vector<double> n1 = std::vector<double>(3, 0);
882 n1[0] = dlambda[2][0];
883 n1[1] = dlambda[2][1];
884 std::vector<double> n2 = std::vector<double>(3, 0);
885 n2[0] = dlambda[0][0];
886 n2[1] = dlambda[0][1];
887 std::vector<double> n3 = std::vector<double>(3, 0);
888 n3[0] = dlambda[1][0];
889 n3[1] = dlambda[1][1];
890 for(
int i = 0; i < 3; i++) {
892 std::vector<double> *normal(
nullptr);
895 product2 = lambda[1] * lambda[0];
899 product2 = lambda[1] * lambda[2];
903 product2 = lambda[2] * lambda[0];
908 faceFunctions[it][0] = jacob * product2 * lambda45 * (*normal)[0] *
910 faceFunctions[it][1] = jacob * product2 * lambda45 * (*normal)[1] *
912 faceFunctions[it][2] = 0;
916 double sub1 = sub[0];
917 double sub2 = sub[2];
922 double product = lambda[0] * lambda[1] * lambda[2];
930 for(
int n2 = 0; n2 <
_pOrderTriFace[faceNumber - 3] - 2 - n1; n2++) {
931 copy[it1] = jacob * product * LSub1 * LSub2[n2] * lambda45;
932 for(
int i = 0; i < 3; i++) {
933 faceFunctions[it][i] =
copy[it1] * dlambda[1][i];
941 for(
int n2 = 0; n2 <
_pOrderTriFace[faceNumber - 3] - 2 - n1; n2++) {
942 for(
int i = 0; i < 3; i++) {
943 faceFunctions[it][i] =
copy[it1] * dlambda[2][i];
950 else if(
"CurlHcurlLegendre" == typeFunction) {
952 double uc = 2 * u - 1;
953 double vc = 2 * v - 1;
959 double dlambda45 = 0;
972 std::vector<double> lambda(3);
973 std::vector<std::vector<double> > dlambda(3, std::vector<double>(3, 0));
977 dlambda[0][0] = -0.5;
978 dlambda[0][1] = -0.5;
981 if(flag1 == 1 && flag2 == -1) {
982 double copy = lambda[0];
983 lambda[0] = lambda[1];
985 std::vector<double> dcopy = dlambda[0];
986 dlambda[0] = dlambda[1];
989 else if(flag1 == 0 && flag2 == -1) {
990 double copy = lambda[2];
991 lambda[2] = lambda[1];
993 std::vector<double> dcopy = dlambda[2];
994 dlambda[2] = dlambda[1];
997 else if(flag1 == 2 && flag2 == -1) {
998 double copy = lambda[2];
999 lambda[2] = lambda[0];
1001 std::vector<double> dcopy = dlambda[2];
1002 dlambda[2] = dlambda[0];
1005 else if(flag1 == 1 && flag2 == 1) {
1006 double copy = lambda[0];
1007 lambda[0] = lambda[1];
1008 lambda[1] = lambda[2];
1010 std::vector<double> dcopy = dlambda[0];
1011 dlambda[0] = dlambda[1];
1012 dlambda[1] = dlambda[2];
1015 else if(flag1 == 2 && flag2 == 1) {
1016 double copy = lambda[0];
1017 lambda[0] = lambda[2];
1018 lambda[2] = lambda[1];
1020 std::vector<double> dcopy = dlambda[0];
1021 dlambda[0] = dlambda[2];
1022 dlambda[2] = dlambda[1];
1025 std::vector<double> n1 = std::vector<double>(3, 0);
1026 n1[0] = dlambda[2][0];
1027 n1[1] = dlambda[2][1];
1028 std::vector<double> n2 = std::vector<double>(3, 0);
1029 n2[0] = dlambda[0][0];
1030 n2[1] = dlambda[0][1];
1031 std::vector<double> n3 = std::vector<double>(3, 0);
1032 n3[0] = dlambda[1][0];
1033 n3[1] = dlambda[1][1];
1034 std::vector<double> sub(3);
1035 sub[0] = lambda[1] - lambda[0];
1036 sub[1] = lambda[2] - lambda[1];
1037 sub[2] = lambda[0] - lambda[2];
1038 std::vector<std::vector<double> > dsub(3, std::vector<double>(3, 0));
1039 for(
int p = 0; p < 3; p++) {
1040 dsub[0][p] = dlambda[1][p] - dlambda[0][p];
1041 dsub[1][p] = dlambda[2][p] - dlambda[1][p];
1042 dsub[2][p] = dlambda[0][p] - dlambda[2][p];
1045 dlambda[0][0] * lambda[1] + dlambda[1][0] * lambda[0];
1047 dlambda[0][1] * lambda[1] + dlambda[1][1] * lambda[0];
1048 double prod32 = lambda[0] * lambda[1];
1050 faceFunctions[it][0] = -detJacob * n1[1] * dlambda45 * prod32 *
1052 faceFunctions[it][1] = detJacob * n1[0] * dlambda45 * prod32 *
1055 faceFunctions[it][2] =
1059 prod32 * dsub[0][0] *
1064 prod32 * dsub[0][1] *
1071 dlambda[2][0] * lambda[1] + dlambda[1][0] * lambda[2];
1073 dlambda[2][1] * lambda[1] + dlambda[1][1] * lambda[2];
1074 double prod13 = lambda[2] * lambda[1];
1076 faceFunctions[it][0] = -detJacob * n2[1] * dlambda45 * prod13 *
1078 faceFunctions[it][1] = detJacob * n2[0] * dlambda45 * prod13 *
1081 faceFunctions[it][2] =
1085 prod13 * dsub[1][0] *
1090 prod13 * dsub[1][1] *
1096 dlambda[2][0] * lambda[0] + dlambda[0][0] * lambda[2];
1098 dlambda[2][1] * lambda[0] + dlambda[0][1] * lambda[2];
1099 double prod12 = lambda[0] * lambda[2];
1102 faceFunctions[it][0] = -detJacob * n3[1] * dlambda45 * prod12 *
1104 faceFunctions[it][1] = detJacob * n3[0] * dlambda45 * prod12 *
1107 faceFunctions[it][2] =
1111 prod12 * dsub[2][0] *
1116 prod12 * dsub[2][1] *
1123 double subBA = sub[0];
1124 double subAC = sub[2];
1125 std::vector<double> dsubBA(3, 0);
1126 std::vector<double> dsubAC(3, 0);
1127 for(
int i = 0; i < 3; i++) {
1128 dsubBA[i] = dsub[0][i];
1129 dsubAC[i] = dsub[2][i];
1143 std::vector<double> dProduct(3, 0);
1144 for(
int i = 0; i < 3; i++) {
1145 dProduct[i] = dlambda[0][i] * lambda[1] * lambda[2] +
1146 dlambda[1][i] * lambda[0] * lambda[2] +
1147 dlambda[2][i] * lambda[1] * lambda[0];
1149 double product = lambda[0] * lambda[1] * lambda[2];
1151 for(
int n2 = 0; n2 <
_pOrderTriFace[faceNumber - 3] - 2 - n1; n2++) {
1152 faceFunctions[it][0] = -detJacob * dlambda[1][1] * dlambda45 *
1153 product * LSubBA[n1] * LSubAC[n2];
1154 faceFunctions[it][1] = detJacob * dlambda[1][0] * dlambda45 *
1155 product * LSubBA[n1] * LSubAC[n2];
1156 faceFunctions[it][2] =
1158 ((dProduct[0] * LSubAC[n2] * LSubBA[n1] +
1159 product * dsubBA[0] * LSubAC[n2] * dLSubBA[n1] +
1160 product * dsubAC[0] * dLSubAC[n2] * LSubBA[n1]) *
1163 (dProduct[1] * LSubAC[n2] * LSubBA[n1] +
1164 product * dsubBA[1] * LSubAC[n2] * dLSubBA[n1] +
1165 product * dsubAC[1] * dLSubAC[n2] * LSubBA[n1]));
1171 for(
int n2 = 0; n2 <
_pOrderTriFace[faceNumber - 3] - 2 - n1; n2++) {
1172 faceFunctions[it][0] = -detJacob * dlambda[2][1] * dlambda45 *
1173 product * LSubBA[n1] * LSubAC[n2];
1174 faceFunctions[it][1] = detJacob * dlambda[2][0] * dlambda45 *
1175 product * LSubBA[n1] * LSubAC[n2];
1176 faceFunctions[it][2] =
1178 ((dProduct[0] * LSubAC[n2] * LSubBA[n1] +
1179 product * dsubBA[0] * LSubAC[n2] * dLSubBA[n1] +
1180 product * dsubAC[0] * dLSubAC[n2] * LSubBA[n1]) *
1183 (dProduct[1] * LSubAC[n2] * LSubBA[n1] +
1184 product * dsubBA[1] * LSubAC[n2] * dLSubBA[n1] +
1185 product * dsubAC[1] * dLSubAC[n2] * LSubBA[n1]));
1191 throw std::runtime_error(
"unknown typeFunction");
1197 int const &flag1,
int const &flag2,
int const &flag3,
int const &faceNumber,
1198 const std::vector<std::vector<double> > &quadFaceFunctionsAllOrientation,
1199 const std::vector<std::vector<double> > &triFaceFunctionsAllOrientation,
1200 std::vector<std::vector<double> > &fTableCopy)
1202 if(faceNumber < 3) {
1204 for(
int i = 0; i < faceNumber; i++) {
1208 int numFaceFunctions =
1213 int offset2 = iterator + numFaceFunctions;
1214 for(
int i = iterator; i < offset2; i++) {
1215 fTableCopy[i][0] = quadFaceFunctionsAllOrientation[i + offset][0];
1216 fTableCopy[i][1] = quadFaceFunctionsAllOrientation[i + offset][1];
1217 fTableCopy[i][2] = quadFaceFunctionsAllOrientation[i + offset][2];
1222 int numface = faceNumber - 3;
1223 for(
int i = 0; i < numface; i++) {
1227 int numFaceFunctions =
1232 int offset2 = iterator + numFaceFunctions;
1233 for(
int i = iterator; i < offset2; i++) {
1234 fTableCopy[i][0] = triFaceFunctionsAllOrientation[i + offset][0];
1235 fTableCopy[i][1] = triFaceFunctionsAllOrientation[i + offset][1];
1236 fTableCopy[i][2] = triFaceFunctionsAllOrientation[i + offset][2];
1242 std::vector<double> &result)
1244 result[0] = 2 * result[0];
1245 result[1] = 2 * result[1];
1246 result[2] = 4 * result[2];
1250 double const &u,
double const &v,
double const &w,
1251 std::vector<std::vector<double> > &edgeBasis,
1252 std::vector<std::vector<double> > &faceBasis,
1253 std::vector<std::vector<double> > &bubbleBasis)
1257 double uc = 2 * u - 1;
1258 double vc = 2 * v - 1;
1267 double dlambda5 = -0.5;
1268 double dlambda4 = 0.5;
1269 std::vector<double> t1 = std::vector<double>(3, 0);
1271 std::vector<double> t2 = std::vector<double>(3, 0);
1274 std::vector<double> t3 = std::vector<double>(3, 0);
1276 std::vector<double> n1 = std::vector<double>(3, 0);
1278 std::vector<double> n2 = std::vector<double>(3, 0);
1281 std::vector<double> n3 = std::vector<double>(3, 0);
1284 std::vector<std::vector<double> > psie_0(3, std::vector<double>(3, 0));
1285 std::vector<std::vector<double> > psie_1(3, std::vector<double>(3, 0));
1286 for(
int i = 0; i < 3; i++) {
1287 psie_0[0][i] = lambda3 * n2[i] /
dotProduct(n2, t1) +
1289 psie_0[1][i] = lambda1 * n3[i] /
dotProduct(n3, t2) +
1291 psie_0[2][i] = lambda2 * n1[i] /
dotProduct(n1, t3) +
1294 psie_1[0][i] = lambda3 * n2[i] /
dotProduct(n2, t1) -
1296 psie_1[1][i] = lambda1 * n3[i] /
dotProduct(n3, t2) -
1302 double subl3l2 = lambda3 - lambda2;
1303 double subl1l3 = lambda1 - lambda3;
1304 double subl1l2 = lambda1 - lambda2;
1305 double subl2l1 = lambda2 - lambda1;
1306 std::vector<double> sub(4, 0);
1307 sub[0] = subl3l2, sub[1] = subl1l3, sub[2] = subl1l2, sub[3] = subl2l1;
1308 std::vector<std::vector<double> > legendreVector(4);
1309 std::vector<std::vector<double> > dlegendreVector(4);
1310 legendreVector[0] = std::vector<double>(
1318 dlegendreVector[0] = std::vector<double>(
1326 legendreVector[1] = std::vector<double>(
1334 dlegendreVector[1] = std::vector<double>(
1342 legendreVector[2] = std::vector<double>(
1346 dlegendreVector[2] = std::vector<double>(
1350 legendreVector[3] = std::vector<double>(
1355 dlegendreVector[3] = std::vector<double>(
1360 for(
unsigned int k = 0; k < legendreVector[0].size(); k++) {
1364 for(
unsigned int k = 0; k < legendreVector[1].size(); k++) {
1368 for(
unsigned int k = 0; k < legendreVector[2].size(); k++) {
1372 for(
unsigned int k = 0; k < legendreVector[3].size(); k++) {
1376 std::vector<double> curlpsie_0(3, 1);
1378 std::vector<double> curlpsie_1(3, 0);
1379 std::vector<std::vector<double> > dsubtraction(4, std::vector<double>(2, 0));
1380 dsubtraction[0][0] = 1;
1381 dsubtraction[0][1] = 0.5;
1382 dsubtraction[1][0] = -0.5;
1383 dsubtraction[1][1] = 0.5;
1384 dsubtraction[2][0] = 0.5;
1385 dsubtraction[2][1] = 1;
1386 dsubtraction[3][0] = -0.5;
1387 dsubtraction[3][1] = -1;
1388 std::vector<double> legendreW(
1389 std::max(std::max(std::max(std::max(std::max(std::max(
_pOrderEdge[2] + 1,
1397 std::vector<double> lobattoW(
1403 std::vector<double> dlobattoW(
1409 for(
unsigned int k = 0; k < legendreW.size(); k++) {
1412 for(
unsigned int k = 0; k < lobattoW.size(); k++) {
1419 for(
int i = 0; i <
_nedge; i++) {
1430 if(i == 0 || i == 1 || i == 3) {
1438 if(i == 0 || i == 6) { index = 0; }
1439 if(i == 1 || i == 7) { index = 2; }
1440 if(i == 3 || i == 8) { index = 1; }
1442 edgeBasis[edgeIt][0] = -dlambda * psie_0[index][1];
1443 edgeBasis[edgeIt][1] = dlambda * psie_0[index][0];
1444 edgeBasis[edgeIt][2] = lambda * curlpsie_0[index];
1448 edgeBasis[edgeIt][0] = -dlambda * psie_1[index][1];
1449 edgeBasis[edgeIt][1] = dlambda * psie_1[index][0];
1450 edgeBasis[edgeIt][2] = 0;
1453 for(
int iedge = 2; iedge <=
_pOrderEdge[i]; iedge++) {
1455 (2 * float(iedge) - 1) /
float(iedge) *
1456 (dsubtraction[index][0] * dlegendreVector[index][iedge - 1] *
1458 dsubtraction[index][1] * dlegendreVector[index][iedge - 1] *
1460 (
float(iedge) - 1) /
float(iedge) *
1461 (curlpsie_0[index] * legendreVector[index][iedge - 2] +
1462 dsubtraction[index][0] * dlegendreVector[index][iedge - 2] *
1464 dsubtraction[index][1] * dlegendreVector[index][iedge - 2] *
1466 std::vector<double> psi(3, 0);
1467 for(
int j = 0; j < 2; j++) {
1468 psi[j] = (2 * float(iedge) - 1) /
float(iedge) *
1469 legendreVector[index][iedge - 1] * psie_1[index][j] -
1470 (float(iedge) - 1) /
float(iedge) *
1471 legendreVector[index][iedge - 2] * psie_0[index][j];
1473 edgeBasis[edgeIt][0] = -dlambda * psi[1];
1474 edgeBasis[edgeIt][1] = dlambda * psi[0];
1475 edgeBasis[edgeIt][2] = lambda * curlpsie;
1490 if(i == 4) { dlambU = 0.5; }
1491 if(i == 5) { dlambV = 0.5; }
1492 for(
int iedge = 0; iedge <=
_pOrderEdge[i]; iedge++) {
1493 edgeBasis[edgeIt][0] = dlambV * legendreW[iedge];
1494 edgeBasis[edgeIt][1] = -dlambU * legendreW[iedge];
1495 edgeBasis[edgeIt][2] = 0;
1506 for(
int iFace = 0; iFace <
_nfaceQuad; iFace++) {
1509 std::vector<double> dProd(2, 0);
1513 prod = lambda2 * lambda3;
1514 dProd[0] = 0.5 * (lambda2 - lambda3);
1515 dProd[1] = -0.5 * lambda3;
1519 prod = lambda1 * lambda2;
1520 dProd[0] = -0.5 * lambda1;
1521 dProd[1] = 0.5 * (lambda2 - lambda1);
1525 prod = lambda1 * lambda3;
1526 dProd[0] = 0.5 * lambda1;
1527 dProd[1] = 0.5 * lambda3;
1532 double curlpsie = 0;
1533 std::vector<double> psie(2, 0);
1535 curlpsie = curlpsie_0[index];
1536 psie[0] = psie_0[index][0];
1537 psie[1] = psie_0[index][1];
1541 psie[0] = psie_1[index][0];
1542 psie[1] = psie_1[index][1];
1545 for(
int j = 0; j < 2; j++) {
1546 psie[j] = (2 * float(n1) - 1) /
float(n1) *
1547 legendreVector[index][n1 - 1] * psie_1[index][j] -
1548 (float(n1) - 1) /
float(n1) *
1549 legendreVector[index][n1 - 2] * psie_0[index][j];
1551 curlpsie = (2 * float(n1) - 1) /
float(n1) *
1552 (dsubtraction[index][0] *
1553 dlegendreVector[index][n1 - 1] * psie_1[index][1] -
1554 dsubtraction[index][1] *
1555 dlegendreVector[index][n1 - 1] * psie_1[index][0]) -
1556 (
float(n1) - 1) /
float(n1) *
1557 (curlpsie_0[index] * legendreVector[index][n1 - 2] +
1558 dsubtraction[index][0] *
1559 dlegendreVector[index][n1 - 2] * psie_0[index][1] -
1560 dsubtraction[index][1] *
1561 dlegendreVector[index][n1 - 2] * psie_0[index][0]);
1564 faceBasis[faceIt][0] = -dlobattoW[n2] * psie[1];
1565 faceBasis[faceIt][1] = dlobattoW[n2] * psie[0];
1566 faceBasis[faceIt][2] = lobattoW[n2] * curlpsie;
1572 std::vector<double> dphie(2, 0);
1575 prod * dsubtraction[index][0] *
1579 prod * dsubtraction[index][1] *
1582 faceBasis[faceIt][0] = dphie[1] * legendreW[n2];
1583 faceBasis[faceIt][1] = -dphie[0] * legendreW[n2];
1584 faceBasis[faceIt][2] = 0;
1593 double prod123 = lambda1 * lambda2 * lambda3;
1594 double dlambda123U = 0.5 * lambda1 * (lambda2 - lambda3);
1595 double dlambda123V = 0.5 * lambda3 * (lambda2 - lambda1);
1596 for(
int iFace = 0; iFace < 2; iFace++) {
1607 for(
int i = 0; i < 3; i++) {
1610 double prod = lambda2 * lambda3;
1611 double dProdU = 0.5 * (lambda2 - lambda3);
1614 faceBasis[faceIt][0] =
1615 -0.5 * dlambda * prod * legendreVector[i][n1 - 2];
1616 faceBasis[faceIt][1] = 0;
1617 faceBasis[faceIt][2] =
1619 (dProdU * legendreVector[i][n1 - 2] +
1620 prod * dsubtraction[i][0] * dlegendreVector[i][n1 - 2]);
1626 double prod = lambda1 * lambda3;
1627 double dProdU = 0.5 * lambda1;
1628 double dProdV = 0.5 * lambda3;
1630 faceBasis[faceIt][0] =
1631 0.5 * dlambda * prod * legendreVector[i][n1 - 2];
1632 faceBasis[faceIt][1] = -faceBasis[faceIt][0];
1633 faceBasis[faceIt][2] =
1635 (dProdU * legendreVector[i][n1 - 2] +
1636 prod * dsubtraction[i][0] * dlegendreVector[i][n1 - 2] -
1637 (dProdV * legendreVector[i][n1 - 2] +
1638 prod * dsubtraction[i][1] * dlegendreVector[i][n1 - 2]));
1645 double prod = lambda1 * lambda2;
1646 double dProdV = 0.5 * (lambda2 - lambda1);
1649 faceBasis[faceIt][0] = 0;
1650 faceBasis[faceIt][1] =
1651 0.5 * dlambda * prod * legendreVector[3][n1 - 2];
1652 faceBasis[faceIt][2] =
1653 -0.5 * (dProdV * legendreVector[3][n1 - 2] +
1654 prod * dsubtraction[3][1] * dlegendreVector[3][n1 - 2]);
1665 faceBasis[faceIt][0] = 0;
1666 faceBasis[faceIt][1] = 0.5 * dlambda * prod123 * legendreVector[0][n1] *
1667 legendreVector[3][n2];
1668 faceBasis[faceIt][2] =
1670 (dlambda123V * legendreVector[0][n1] * legendreVector[3][n2] +
1671 prod123 * dsubtraction[0][1] * dlegendreVector[0][n1] *
1672 legendreVector[3][n2] +
1673 prod123 * dsubtraction[3][1] * legendreVector[0][n1] *
1674 dlegendreVector[3][n2]);
1681 faceBasis[faceIt][0] = -0.5 * dlambda * prod123 *
1682 legendreVector[0][n1] * legendreVector[3][n2];
1683 faceBasis[faceIt][1] = 0;
1684 faceBasis[faceIt][2] =
1686 (dlambda123U * legendreVector[0][n1] * legendreVector[3][n2] +
1687 prod123 * dsubtraction[0][0] * dlegendreVector[0][n1] *
1688 legendreVector[3][n2] +
1689 prod123 * dsubtraction[3][0] * legendreVector[0][n1] *
1690 dlegendreVector[3][n2]);
1699 for(
int iFace = 0; iFace <
_nfaceQuad; iFace++) {
1706 prod = lambda2 * lambda3;
1707 dProdU = 0.5 * (lambda2 - lambda3);
1709 for(
int n1 = 2; n1 <=
_pb1; n1++) {
1710 double phi = prod * legendreVector[index][n1 - 2];
1712 (dProdU * legendreVector[index][n1 - 2] +
1713 prod * dsubtraction[index][0] * dlegendreVector[index][n1 - 2]);
1714 for(
int n2 = 2; n2 <=
_pb2 + 1; n2++) {
1715 bubbleBasis[bubbleIt][0] = -0.5 * dlobattoW[n2] * phi;
1716 bubbleBasis[bubbleIt][1] = 0;
1717 bubbleBasis[bubbleIt][2] = 0.5 * lobattoW[n2] * dphiU;
1725 prod = lambda1 * lambda2;
1726 dProdV = 0.5 * (lambda2 - lambda1);
1727 for(
int n1 = 2; n1 <=
_pb1; n1++) {
1728 double phi = prod * legendreVector[index][n1 - 2];
1730 dProdV * legendreVector[index][n1 - 2] +
1731 prod * dsubtraction[index][1] * dlegendreVector[index][n1 - 2];
1732 for(
int n2 = 2; n2 <=
_pb2 + 1; n2++) {
1733 bubbleBasis[bubbleIt][0] = 0;
1734 bubbleBasis[bubbleIt][1] = 0.5 * dlobattoW[n2] * phi;
1735 bubbleBasis[bubbleIt][2] = -0.5 * lobattoW[n2] * dphiV;
1743 prod = lambda1 * lambda3;
1744 dProdU = 0.5 * lambda1;
1745 dProdV = 0.5 * lambda3;
1746 for(
int n1 = 2; n1 <=
_pb1; n1++) {
1747 double phi = prod * legendreVector[index][n1 - 2];
1749 (dProdU * legendreVector[index][n1 - 2] +
1750 prod * dsubtraction[index][0] * dlegendreVector[index][n1 - 2] -
1751 (dProdV * legendreVector[index][n1 - 2] +
1752 prod * dsubtraction[index][1] * dlegendreVector[index][n1 - 2]));
1753 for(
int n2 = 2; n2 <=
_pb2 + 1; n2++) {
1754 bubbleBasis[bubbleIt][0] = 0.5 * phi * dlobattoW[n2];
1755 bubbleBasis[bubbleIt][1] = -0.5 * phi * dlobattoW[n2];
1756 bubbleBasis[bubbleIt][2] = -0.5 * lobattoW[n2] * dphi;
1766 for(
int n1 = 0; n1 <
_pb1 - 2; n1++) {
1767 for(
int n2 = 0; n2 <
_pb1 - 2 - n1; n2++) {
1768 double phi = prod123 * legendreVector[0][n1] * legendreVector[3][n2];
1770 -(dlambda123V * legendreVector[0][n1] * legendreVector[3][n2] +
1771 prod123 * dsubtraction[0][1] * dlegendreVector[0][n1] *
1772 legendreVector[3][n2] +
1773 prod123 * dsubtraction[3][1] * legendreVector[0][n1] *
1774 dlegendreVector[3][n2]);
1775 for(
int n3 = 2; n3 <=
_pb2 + 1; n3++) {
1776 bubbleBasis[bubbleIt][0] = 0;
1777 bubbleBasis[bubbleIt][1] = dlobattoW[n3] * phi;
1778 bubbleBasis[bubbleIt][2] = lobattoW[n3] * dphiV;
1784 for(
int n1 = 0; n1 <
_pb1 - 2; n1++) {
1785 for(
int n2 = 0; n2 <
_pb1 - 2 - n1; n2++) {
1786 double phi = prod123 * legendreVector[0][n1] * legendreVector[3][n2];
1788 -(dlambda123U * legendreVector[0][n1] * legendreVector[3][n2] +
1789 prod123 * dsubtraction[0][0] * dlegendreVector[0][n1] *
1790 legendreVector[3][n2] +
1791 prod123 * dsubtraction[3][0] * legendreVector[0][n1] *
1792 dlegendreVector[3][n2]);
1793 for(
int n3 = 2; n3 <=
_pb2 + 1; n3++) {
1794 bubbleBasis[bubbleIt][0] = dlobattoW[n3] * phi;
1795 bubbleBasis[bubbleIt][1] = 0;
1796 bubbleBasis[bubbleIt][2] = lobattoW[n3] * dphiU;
1803 for(
int n1 = 0; n1 <
_pb1 - 1; n1++) {
1804 for(
int n2 = 0; n2 <
_pb1 - 1 - n1; n2++) {
1806 -(dlambda123U * legendreVector[0][n1] * legendreVector[3][n2] +
1807 prod123 * dsubtraction[0][0] * dlegendreVector[0][n1] *
1808 legendreVector[3][n2] +
1809 prod123 * dsubtraction[3][0] * legendreVector[0][n1] *
1810 dlegendreVector[3][n2]);
1812 dlambda123V * legendreVector[0][n1] * legendreVector[3][n2] +
1813 prod123 * dsubtraction[0][1] * dlegendreVector[0][n1] *
1814 legendreVector[3][n2] +
1815 prod123 * dsubtraction[3][1] * legendreVector[0][n1] *
1816 dlegendreVector[3][n2];
1817 for(
int n3 = 0; n3 <=
_pb2; n3++) {
1818 bubbleBasis[bubbleIt][0] = dphiV * legendreW[n3];
1819 bubbleBasis[bubbleIt][1] = dphiU * legendreW[n3];
1820 bubbleBasis[bubbleIt][2] = 0;
1829 std::vector<int> &orderInfo)
1832 for(
int numEdge = 0; numEdge < 9; numEdge++) {
1834 functionTypeInfo[it] = 1;
1839 for(
int iFace = 0; iFace <
_nfaceQuad; iFace++) {
1842 functionTypeInfo[it] = 2;
1843 orderInfo[it] = std::max(n1, n2);
1849 functionTypeInfo[it] = 2;
1850 orderInfo[it] = std::max(n1, n2);
1855 for(
int iFace = 0; iFace < 2; iFace++) {
1856 for(
int i = 0; i < 3; i++) {
1858 functionTypeInfo[it] = 2;
1865 functionTypeInfo[it] = 2;
1866 orderInfo[it] = n1 + n2 + 1;
1872 functionTypeInfo[it] = 2;
1873 orderInfo[it] = n1 + n2 + 1;
1878 for(
int iFace = 0; iFace <
_nfaceQuad; iFace++) {
1879 for(
int n1 = 2; n1 <=
_pb1; n1++) {
1880 for(
int n2 = 2; n2 <=
_pb2 + 1; n2++) {
1881 functionTypeInfo[it] = 3;
1882 orderInfo[it] = std::max(n1, n2);
1887 for(
int n1 = 1; n1 <
_pb1 - 1; n1++) {
1888 for(
int n2 = 1; n2 <=
_pb1 - 1 - n1; n2++) {
1889 for(
int n3 = 2; n3 <=
_pb2 + 1; n3++) {
1890 functionTypeInfo[it] = 3;
1891 orderInfo[it] = std::max(n1 + n2 + 1, n3);
1896 for(
int n1 = 1; n1 <
_pb1 - 1; n1++) {
1897 for(
int n2 = 1; n2 <=
_pb1 - 1 - n1; n2++) {
1898 for(
int n3 = 2; n3 <=
_pb2 + 1; n3++) {
1899 functionTypeInfo[it] = 3;
1900 orderInfo[it] = std::max(n1 + n2 + 1, n3);
1905 for(
int n1 = 1; n1 <=
_pb1 - 1; n1++) {
1906 for(
int n2 = 1; n2 <=
_pb1 - n1; n2++) {
1907 for(
int n3 = 0; n3 <=
_pb2; n3++) {
1908 functionTypeInfo[it] = 3;
1909 orderInfo[it] = std::max(n1 + n2 + 1, n3);