83 shape(0) = 1. - ip.
x - ip.
y;
91 dshape(0,0) = -1.; dshape(0,1) = -1.;
92 dshape(1,0) = 1.; dshape(1,1) = 0.;
93 dshape(2,0) = 0.; dshape(2,1) = 1.;
118 shape(0) = (1. - ip.
x) * (1. - ip.
y) ;
119 shape(1) = ip.
x * (1. - ip.
y) ;
120 shape(2) = ip.
x * ip.
y ;
121 shape(3) = (1. - ip.
x) * ip.
y ;
127 dshape(0,0) = -1. + ip.
y; dshape(0,1) = -1. + ip.
x ;
128 dshape(1,0) = 1. - ip.
y; dshape(1,1) = -ip.
x ;
129 dshape(2,0) = ip.
y ; dshape(2,1) = ip.
x ;
130 dshape(3,0) = -ip.
y ; dshape(3,1) = 1. - ip.
x ;
136 h(0,0) = 0.; h(0,1) = 1.; h(0,2) = 0.;
137 h(1,0) = 0.; h(1,1) = -1.; h(1,2) = 0.;
138 h(2,0) = 0.; h(2,1) = 1.; h(2,2) = 0.;
139 h(3,0) = 0.; h(3,1) = -1.; h(3,2) = 0.;
159 shape(0) = 5./3. - 2. * (x + y);
160 shape(1) = 2. * (x - 1./6.);
161 shape(2) = 2. * (y - 1./6.);
167 dshape(0,0) = -2.; dshape(0,1) = -2.;
168 dshape(1,0) = 2.; dshape(1,1) = 0.;
169 dshape(2,0) = 0.; dshape(2,1) = 2.;
174 dofs(vertex) = 2./3.;
175 dofs((vertex+1)%3) = 1./6.;
176 dofs((vertex+2)%3) = 1./6.;
181const real_t GaussBiLinear2DFiniteElement::p[] =
182{ 0.2113248654051871177454256, 0.7886751345948128822545744 };
202 shape(0) = 3. * (p[1] - x) * (p[1] - y);
203 shape(1) = 3. * (x - p[0]) * (p[1] - y);
204 shape(2) = 3. * (x - p[0]) * (y - p[0]);
205 shape(3) = 3. * (p[1] - x) * (y - p[0]);
213 dshape(0,0) = 3. * (y - p[1]); dshape(0,1) = 3. * (x - p[1]);
214 dshape(1,0) = 3. * (p[1] - y); dshape(1,1) = 3. * (p[0] - x);
215 dshape(2,0) = 3. * (y - p[0]); dshape(2,1) = 3. * (x - p[0]);
216 dshape(3,0) = 3. * (p[0] - y); dshape(3,1) = 3. * (p[1] - x);
222 dofs(vertex) = p[1]*p[1];
223 dofs((vertex+1)%4) =
p[0]*
p[1];
224 dofs((vertex+2)%4) =
p[0]*
p[0];
225 dofs((vertex+3)%4) =
p[0]*
p[1];
246 shape(0) = 1. - ip.
x - ip.
y;
254 dshape(0,0) = -1.; dshape(0,1) = -1.;
255 dshape(1,0) = 1.; dshape(1,1) = 0.;
256 dshape(2,0) = 0.; dshape(2,1) = 1.;
272 real_t l1 = 1.0 - x, l2 = x, l3 = 2. * x - 1.;
274 shape(0) = l1 * (-l3);
276 shape(2) = 4. * l1 * l2;
284 dshape(0,0) = 4. * x - 3.;
285 dshape(1,0) = 4. * x - 1.;
286 dshape(2,0) = 4. - 8. * x;
311 real_t l1 = 1.-x-y, l2 = x, l3 = y;
313 shape(0) = l1 * (2. * l1 - 1.);
314 shape(1) = l2 * (2. * l2 - 1.);
315 shape(2) = l3 * (2. * l3 - 1.);
316 shape(3) = 4. * l1 * l2;
317 shape(4) = 4. * l2 * l3;
318 shape(5) = 4. * l3 * l1;
327 dshape(0,1) = 4. * (x + y) - 3.;
329 dshape(1,0) = 4. * x - 1.;
333 dshape(2,1) = 4. * y - 1.;
335 dshape(3,0) = -4. * (2. * x + y - 1.);
336 dshape(3,1) = -4. * x;
338 dshape(4,0) = 4. * y;
339 dshape(4,1) = 4. * x;
341 dshape(5,0) = -4. * y;
342 dshape(5,1) = -4. * (x + 2. * y - 1.);
382 case 0: dofs(3) = 0.25; dofs(5) = 0.25;
break;
383 case 1: dofs(3) = 0.25; dofs(4) = 0.25;
break;
384 case 2: dofs(4) = 0.25; dofs(5) = 0.25;
break;
390const real_t GaussQuad2DFiniteElement::p[] =
391{ 0.0915762135097707434595714634022015, 0.445948490915964886318329253883051 };
409 for (
int i = 0; i < 6; i++)
441 D(0,0) = 0.; D(0,1) = 0.;
442 D(1,0) = 1.; D(1,1) = 0.;
443 D(2,0) = 0.; D(2,1) = 1.;
444 D(3,0) = 2. * x; D(3,1) = 0.;
445 D(4,0) = y; D(4,1) = x;
446 D(5,0) = 0.; D(5,1) = 2. * y;
479 real_t l1x, l2x, l3x, l1y, l2y, l3y;
481 l1x = (x - 1.) * (2. * x - 1);
482 l2x = 4. * x * (1. - x);
483 l3x = x * (2. * x - 1.);
484 l1y = (y - 1.) * (2. * y - 1);
485 l2y = 4. * y * (1. - y);
486 l3y = y * (2. * y - 1.);
488 shape(0) = l1x * l1y;
489 shape(4) = l2x * l1y;
490 shape(1) = l3x * l1y;
491 shape(7) = l1x * l2y;
492 shape(8) = l2x * l2y;
493 shape(5) = l3x * l2y;
494 shape(3) = l1x * l3y;
495 shape(6) = l2x * l3y;
496 shape(2) = l3x * l3y;
503 real_t l1x, l2x, l3x, l1y, l2y, l3y;
504 real_t d1x, d2x, d3x, d1y, d2y, d3y;
506 l1x = (x - 1.) * (2. * x - 1);
507 l2x = 4. * x * (1. - x);
508 l3x = x * (2. * x - 1.);
509 l1y = (y - 1.) * (2. * y - 1);
510 l2y = 4. * y * (1. - y);
511 l3y = y * (2. * y - 1.);
520 dshape(0,0) = d1x * l1y;
521 dshape(0,1) = l1x * d1y;
523 dshape(4,0) = d2x * l1y;
524 dshape(4,1) = l2x * d1y;
526 dshape(1,0) = d3x * l1y;
527 dshape(1,1) = l3x * d1y;
529 dshape(7,0) = d1x * l2y;
530 dshape(7,1) = l1x * d2y;
532 dshape(8,0) = d2x * l2y;
533 dshape(8,1) = l2x * d2y;
535 dshape(5,0) = d3x * l2y;
536 dshape(5,1) = l3x * d2y;
538 dshape(3,0) = d1x * l3y;
539 dshape(3,1) = l1x * d3y;
541 dshape(6,0) = d2x * l3y;
542 dshape(6,1) = l2x * d3y;
544 dshape(2,0) = d3x * l3y;
545 dshape(2,1) = l3x * d3y;
557 case 0: dofs(4) = 0.25; dofs(7) = 0.25;
break;
558 case 1: dofs(4) = 0.25; dofs(5) = 0.25;
break;
559 case 2: dofs(5) = 0.25; dofs(6) = 0.25;
break;
560 case 3: dofs(6) = 0.25; dofs(7) = 0.25;
break;
570 const real_t p1 = 0.5*(1.-sqrt(3./5.));
596 const real_t p1 = 0.5*(1.-sqrt(3./5.));
599 real_t l1x, l2x, l3x, l1y, l2y, l3y;
601 l1x = (x - 1.) * (2. * x - 1);
602 l2x = 4. * x * (1. - x);
603 l3x = x * (2. * x - 1.);
604 l1y = (y - 1.) * (2. * y - 1);
605 l2y = 4. * y * (1. - y);
606 l3y = y * (2. * y - 1.);
608 shape(0) = l1x * l1y;
609 shape(4) = l2x * l1y;
610 shape(1) = l3x * l1y;
611 shape(7) = l1x * l2y;
612 shape(8) = l2x * l2y;
613 shape(5) = l3x * l2y;
614 shape(3) = l1x * l3y;
615 shape(6) = l2x * l3y;
616 shape(2) = l3x * l3y;
623 const real_t p1 = 0.5*(1.-sqrt(3./5.));
626 real_t l1x, l2x, l3x, l1y, l2y, l3y;
627 real_t d1x, d2x, d3x, d1y, d2y, d3y;
629 l1x = (x - 1.) * (2. * x - 1);
630 l2x = 4. * x * (1. - x);
631 l3x = x * (2. * x - 1.);
632 l1y = (y - 1.) * (2. * y - 1);
633 l2y = 4. * y * (1. - y);
634 l3y = y * (2. * y - 1.);
636 d1x =
a * (4. * x - 3.);
637 d2x =
a * (4. - 8. * x);
638 d3x =
a * (4. * x - 1.);
639 d1y =
a * (4. * y - 3.);
640 d2y =
a * (4. - 8. * y);
641 d3y =
a * (4. * y - 1.);
643 dshape(0,0) = d1x * l1y;
644 dshape(0,1) = l1x * d1y;
646 dshape(4,0) = d2x * l1y;
647 dshape(4,1) = l2x * d1y;
649 dshape(1,0) = d3x * l1y;
650 dshape(1,1) = l3x * d1y;
652 dshape(7,0) = d1x * l2y;
653 dshape(7,1) = l1x * d2y;
655 dshape(8,0) = d2x * l2y;
656 dshape(8,1) = l2x * d2y;
658 dshape(5,0) = d3x * l2y;
659 dshape(5,1) = l3x * d2y;
661 dshape(3,0) = d1x * l3y;
662 dshape(3,1) = l1x * d3y;
664 dshape(6,0) = d2x * l3y;
665 dshape(6,1) = l2x * d3y;
667 dshape(2,0) = d3x * l3y;
668 dshape(2,1) = l3x * d3y;
713 real_t w1x, w2x, w3x, w1y, w2y, w3y;
714 real_t l0x, l1x, l2x, l3x, l0y, l1y, l2y, l3y;
716 w1x = x - 1./3.; w2x = x - 2./3.; w3x = x - 1.;
717 w1y = y - 1./3.; w2y = y - 2./3.; w3y = y - 1.;
719 l0x = (- 4.5) * w1x * w2x * w3x;
720 l1x = ( 13.5) * x * w2x * w3x;
721 l2x = (-13.5) * x * w1x * w3x;
722 l3x = ( 4.5) * x * w1x * w2x;
724 l0y = (- 4.5) * w1y * w2y * w3y;
725 l1y = ( 13.5) * y * w2y * w3y;
726 l2y = (-13.5) * y * w1y * w3y;
727 l3y = ( 4.5) * y * w1y * w2y;
729 shape(0) = l0x * l0y;
730 shape(1) = l3x * l0y;
731 shape(2) = l3x * l3y;
732 shape(3) = l0x * l3y;
733 shape(4) = l1x * l0y;
734 shape(5) = l2x * l0y;
735 shape(6) = l3x * l1y;
736 shape(7) = l3x * l2y;
737 shape(8) = l2x * l3y;
738 shape(9) = l1x * l3y;
739 shape(10) = l0x * l2y;
740 shape(11) = l0x * l1y;
741 shape(12) = l1x * l1y;
742 shape(13) = l2x * l1y;
743 shape(14) = l1x * l2y;
744 shape(15) = l2x * l2y;
752 real_t w1x, w2x, w3x, w1y, w2y, w3y;
753 real_t l0x, l1x, l2x, l3x, l0y, l1y, l2y, l3y;
754 real_t d0x, d1x, d2x, d3x, d0y, d1y, d2y, d3y;
756 w1x = x - 1./3.; w2x = x - 2./3.; w3x = x - 1.;
757 w1y = y - 1./3.; w2y = y - 2./3.; w3y = y - 1.;
759 l0x = (- 4.5) * w1x * w2x * w3x;
760 l1x = ( 13.5) * x * w2x * w3x;
761 l2x = (-13.5) * x * w1x * w3x;
762 l3x = ( 4.5) * x * w1x * w2x;
764 l0y = (- 4.5) * w1y * w2y * w3y;
765 l1y = ( 13.5) * y * w2y * w3y;
766 l2y = (-13.5) * y * w1y * w3y;
767 l3y = ( 4.5) * y * w1y * w2y;
769 d0x = -5.5 + ( 18. - 13.5 * x) * x;
770 d1x = 9. + (-45. + 40.5 * x) * x;
771 d2x = -4.5 + ( 36. - 40.5 * x) * x;
772 d3x = 1. + (- 9. + 13.5 * x) * x;
774 d0y = -5.5 + ( 18. - 13.5 * y) * y;
775 d1y = 9. + (-45. + 40.5 * y) * y;
776 d2y = -4.5 + ( 36. - 40.5 * y) * y;
777 d3y = 1. + (- 9. + 13.5 * y) * y;
779 dshape( 0,0) = d0x * l0y; dshape( 0,1) = l0x * d0y;
780 dshape( 1,0) = d3x * l0y; dshape( 1,1) = l3x * d0y;
781 dshape( 2,0) = d3x * l3y; dshape( 2,1) = l3x * d3y;
782 dshape( 3,0) = d0x * l3y; dshape( 3,1) = l0x * d3y;
783 dshape( 4,0) = d1x * l0y; dshape( 4,1) = l1x * d0y;
784 dshape( 5,0) = d2x * l0y; dshape( 5,1) = l2x * d0y;
785 dshape( 6,0) = d3x * l1y; dshape( 6,1) = l3x * d1y;
786 dshape( 7,0) = d3x * l2y; dshape( 7,1) = l3x * d2y;
787 dshape( 8,0) = d2x * l3y; dshape( 8,1) = l2x * d3y;
788 dshape( 9,0) = d1x * l3y; dshape( 9,1) = l1x * d3y;
789 dshape(10,0) = d0x * l2y; dshape(10,1) = l0x * d2y;
790 dshape(11,0) = d0x * l1y; dshape(11,1) = l0x * d1y;
791 dshape(12,0) = d1x * l1y; dshape(12,1) = l1x * d1y;
792 dshape(13,0) = d2x * l1y; dshape(13,1) = l2x * d1y;
793 dshape(14,0) = d1x * l2y; dshape(14,1) = l1x * d2y;
794 dshape(15,0) = d2x * l2y; dshape(15,1) = l2x * d2y;
802 real_t w1x, w2x, w3x, w1y, w2y, w3y;
803 real_t l0x, l1x, l2x, l3x, l0y, l1y, l2y, l3y;
804 real_t d0x, d1x, d2x, d3x, d0y, d1y, d2y, d3y;
805 real_t h0x, h1x, h2x, h3x, h0y, h1y, h2y, h3y;
807 w1x = x - 1./3.; w2x = x - 2./3.; w3x = x - 1.;
808 w1y = y - 1./3.; w2y = y - 2./3.; w3y = y - 1.;
810 l0x = (- 4.5) * w1x * w2x * w3x;
811 l1x = ( 13.5) * x * w2x * w3x;
812 l2x = (-13.5) * x * w1x * w3x;
813 l3x = ( 4.5) * x * w1x * w2x;
815 l0y = (- 4.5) * w1y * w2y * w3y;
816 l1y = ( 13.5) * y * w2y * w3y;
817 l2y = (-13.5) * y * w1y * w3y;
818 l3y = ( 4.5) * y * w1y * w2y;
820 d0x = -5.5 + ( 18. - 13.5 * x) * x;
821 d1x = 9. + (-45. + 40.5 * x) * x;
822 d2x = -4.5 + ( 36. - 40.5 * x) * x;
823 d3x = 1. + (- 9. + 13.5 * x) * x;
825 d0y = -5.5 + ( 18. - 13.5 * y) * y;
826 d1y = 9. + (-45. + 40.5 * y) * y;
827 d2y = -4.5 + ( 36. - 40.5 * y) * y;
828 d3y = 1. + (- 9. + 13.5 * y) * y;
830 h0x = -27. * x + 18.;
832 h2x = -81. * x + 36.;
835 h0y = -27. * y + 18.;
837 h2y = -81. * y + 36.;
840 h( 0,0) = h0x * l0y; h( 0,1) = d0x * d0y; h( 0,2) = l0x * h0y;
841 h( 1,0) = h3x * l0y; h( 1,1) = d3x * d0y; h( 1,2) = l3x * h0y;
842 h( 2,0) = h3x * l3y; h( 2,1) = d3x * d3y; h( 2,2) = l3x * h3y;
843 h( 3,0) = h0x * l3y; h( 3,1) = d0x * d3y; h( 3,2) = l0x * h3y;
844 h( 4,0) = h1x * l0y; h( 4,1) = d1x * d0y; h( 4,2) = l1x * h0y;
845 h( 5,0) = h2x * l0y; h( 5,1) = d2x * d0y; h( 5,2) = l2x * h0y;
846 h( 6,0) = h3x * l1y; h( 6,1) = d3x * d1y; h( 6,2) = l3x * h1y;
847 h( 7,0) = h3x * l2y; h( 7,1) = d3x * d2y; h( 7,2) = l3x * h2y;
848 h( 8,0) = h2x * l3y; h( 8,1) = d2x * d3y; h( 8,2) = l2x * h3y;
849 h( 9,0) = h1x * l3y; h( 9,1) = d1x * d3y; h( 9,2) = l1x * h3y;
850 h(10,0) = h0x * l2y; h(10,1) = d0x * d2y; h(10,2) = l0x * h2y;
851 h(11,0) = h0x * l1y; h(11,1) = d0x * d1y; h(11,2) = l0x * h1y;
852 h(12,0) = h1x * l1y; h(12,1) = d1x * d1y; h(12,2) = l1x * h1y;
853 h(13,0) = h2x * l1y; h(13,1) = d2x * d1y; h(13,2) = l2x * h1y;
854 h(14,0) = h1x * l2y; h(14,1) = d1x * d2y; h(14,2) = l1x * h2y;
855 h(15,0) = h2x * l2y; h(15,1) = d2x * d2y; h(15,2) = l2x * h2y;
874 l3 = (0.33333333333333333333-x),
875 l4 = (0.66666666666666666667-x);
877 shape(0) = 4.5 * l2 * l3 * l4;
878 shape(1) = 4.5 * l1 * l3 * l4;
879 shape(2) = 13.5 * l1 * l2 * l4;
880 shape(3) = -13.5 * l1 * l2 * l3;
888 dshape(0,0) = -5.5 + x * (18. - 13.5 * x);
889 dshape(1,0) = 1. - x * (9. - 13.5 * x);
890 dshape(2,0) = 9. - x * (45. - 40.5 * x);
891 dshape(3,0) = -4.5 + x * (36. - 40.5 * x);
924 real_t l1 = (-1. + x + y),
928 shape(0) = -0.5*l1*(3.*l1 + 1.)*(3.*l1 + 2.);
929 shape(1) = 0.5*x*(lx - 1.)*lx;
930 shape(2) = 0.5*y*(-1. + ly)*ly;
931 shape(3) = 4.5*x*l1*(3.*l1 + 1.);
932 shape(4) = -4.5*x*lx*l1;
933 shape(5) = 4.5*x*lx*y;
934 shape(6) = 4.5*x*y*ly;
935 shape(7) = -4.5*y*l1*ly;
936 shape(8) = 4.5*y*l1*(1. + 3.*l1);
937 shape(9) = -27.*x*y*l1;
945 dshape(0,0) = 0.5*(-11. + 36.*y - 9.*(x*(-4. + 3.*x) + 6.*x*y + 3.*y*y));
946 dshape(1,0) = 1. + 4.5*x*(-2. + 3.*x);
948 dshape(3,0) = 4.5*(2. + 9.*x*x - 5.*y + 3.*y*y + 2.*x*(-5. + 6.*y));
949 dshape(4,0) = -4.5*(1. - 1.*y + x*(-8. + 9.*x + 6.*y));
950 dshape(5,0) = 4.5*(-1. + 6.*x)*y;
951 dshape(6,0) = 4.5*y*(-1. + 3.*y);
952 dshape(7,0) = 4.5*(1. - 3.*y)*y;
953 dshape(8,0) = 4.5*y*(-5. + 6.*x + 6.*y);
954 dshape(9,0) = -27.*y*(-1. + 2.*x + y);
956 dshape(0,1) = 0.5*(-11. + 36.*y - 9.*(x*(-4. + 3.*x) + 6.*x*y + 3.*y*y));
958 dshape(2,1) = 1. + 4.5*y*(-2. + 3.*y);
959 dshape(3,1) = 4.5*x*(-5. + 6.*x + 6.*y);
960 dshape(4,1) = 4.5*(1. - 3.*x)*x;
961 dshape(5,1) = 4.5*x*(-1. + 3.*x);
962 dshape(6,1) = 4.5*x*(-1. + 6.*y);
963 dshape(7,1) = -4.5*(1. + x*(-1. + 6.*y) + y*(-8. + 9.*y));
964 dshape(8,1) = 4.5*(2. + 3.*x*x + y*(-10. + 9.*y) + x*(-5. + 12.*y));
965 dshape(9,1) = -27.*x*(-1. + x + 2.*y);
973 h(0,0) = 18.-27.*(x+y);
974 h(0,1) = 18.-27.*(x+y);
975 h(0,2) = 18.-27.*(x+y);
985 h(3,0) = -45.+81.*x+54.*y;
986 h(3,1) = -22.5+54.*x+27.*y;
989 h(4,0) = 36.-81.*x-27.*y;
1003 h(7,2) = 36.-27.*x-81.*y;
1006 h(8,1) = -22.5+27.*x+54.*y;
1007 h(8,2) = -45.+54.*x+81.*y;
1010 h(9,1) = 27.-54.*(x+y);
1085 shape(0) = -((-1 + x + y + z)*(-2 + 3*x + 3*y + 3*z)*
1086 (-1 + 3*x + 3*y + 3*z))/2.;
1087 shape(4) = (9*x*(-1 + x + y + z)*(-2 + 3*x + 3*y + 3*z))/2.;
1088 shape(5) = (-9*x*(-1 + 3*x)*(-1 + x + y + z))/2.;
1089 shape(1) = (x*(2 + 9*(-1 + x)*x))/2.;
1090 shape(6) = (9*y*(-1 + x + y + z)*(-2 + 3*x + 3*y + 3*z))/2.;
1091 shape(19) = -27*x*y*(-1 + x + y + z);
1092 shape(10) = (9*x*(-1 + 3*x)*y)/2.;
1093 shape(7) = (-9*y*(-1 + 3*y)*(-1 + x + y + z))/2.;
1094 shape(11) = (9*x*y*(-1 + 3*y))/2.;
1095 shape(2) = (y*(2 + 9*(-1 + y)*y))/2.;
1096 shape(8) = (9*z*(-1 + x + y + z)*(-2 + 3*x + 3*y + 3*z))/2.;
1097 shape(18) = -27*x*z*(-1 + x + y + z);
1098 shape(12) = (9*x*(-1 + 3*x)*z)/2.;
1099 shape(17) = -27*y*z*(-1 + x + y + z);
1100 shape(16) = 27*x*y*z;
1101 shape(14) = (9*y*(-1 + 3*y)*z)/2.;
1102 shape(9) = (-9*z*(-1 + x + y + z)*(-1 + 3*z))/2.;
1103 shape(13) = (9*x*z*(-1 + 3*z))/2.;
1104 shape(15) = (9*y*z*(-1 + 3*z))/2.;
1105 shape(3) = (z*(2 + 9*(-1 + z)*z))/2.;
1113 dshape(0,0) = (-11 + 36*y + 36*z - 9*(3*pow(x,2) + 3*pow(y + z,2) +
1114 x*(-4 + 6*y + 6*z)))/2.;
1115 dshape(0,1) = (-11 + 36*y + 36*z - 9*(3*pow(x,2) + 3*pow(y + z,2) +
1116 x*(-4 + 6*y + 6*z)))/2.;
1117 dshape(0,2) = (-11 + 36*y + 36*z - 9*(3*pow(x,2) + 3*pow(y + z,2) +
1118 x*(-4 + 6*y + 6*z)))/2.;
1119 dshape(4,0) = (9*(9*pow(x,2) + (-1 + y + z)*(-2 + 3*y + 3*z) +
1120 2*x*(-5 + 6*y + 6*z)))/2.;
1121 dshape(4,1) = (9*x*(-5 + 6*x + 6*y + 6*z))/2.;
1122 dshape(4,2) = (9*x*(-5 + 6*x + 6*y + 6*z))/2.;
1123 dshape(5,0) = (-9*(1 - y - z + x*(-8 + 9*x + 6*y + 6*z)))/2.;
1124 dshape(5,1) = (9*(1 - 3*x)*x)/2.;
1125 dshape(5,2) = (9*(1 - 3*x)*x)/2.;
1126 dshape(1,0) = 1 + (9*x*(-2 + 3*x))/2.;
1129 dshape(6,0) = (9*y*(-5 + 6*x + 6*y + 6*z))/2.;
1130 dshape(6,1) = (9*(2 + 3*pow(x,2) - 10*y - 5*z + 3*(y + z)*(3*y + z) +
1131 x*(-5 + 12*y + 6*z)))/2.;
1132 dshape(6,2) = (9*y*(-5 + 6*x + 6*y + 6*z))/2.;
1133 dshape(19,0) = -27*y*(-1 + 2*x + y + z);
1134 dshape(19,1) = -27*x*(-1 + x + 2*y + z);
1135 dshape(19,2) = -27*x*y;
1136 dshape(10,0) = (9*(-1 + 6*x)*y)/2.;
1137 dshape(10,1) = (9*x*(-1 + 3*x))/2.;
1139 dshape(7,0) = (9*(1 - 3*y)*y)/2.;
1140 dshape(7,1) = (-9*(1 + x*(-1 + 6*y) - z + y*(-8 + 9*y + 6*z)))/2.;
1141 dshape(7,2) = (9*(1 - 3*y)*y)/2.;
1142 dshape(11,0) = (9*y*(-1 + 3*y))/2.;
1143 dshape(11,1) = (9*x*(-1 + 6*y))/2.;
1146 dshape(2,1) = 1 + (9*y*(-2 + 3*y))/2.;
1148 dshape(8,0) = (9*z*(-5 + 6*x + 6*y + 6*z))/2.;
1149 dshape(8,1) = (9*z*(-5 + 6*x + 6*y + 6*z))/2.;
1150 dshape(8,2) = (9*(2 + 3*pow(x,2) - 5*y - 10*z + 3*(y + z)*(y + 3*z) +
1151 x*(-5 + 6*y + 12*z)))/2.;
1152 dshape(18,0) = -27*z*(-1 + 2*x + y + z);
1153 dshape(18,1) = -27*x*z;
1154 dshape(18,2) = -27*x*(-1 + x + y + 2*z);
1155 dshape(12,0) = (9*(-1 + 6*x)*z)/2.;
1157 dshape(12,2) = (9*x*(-1 + 3*x))/2.;
1158 dshape(17,0) = -27*y*z;
1159 dshape(17,1) = -27*z*(-1 + x + 2*y + z);
1160 dshape(17,2) = -27*y*(-1 + x + y + 2*z);
1161 dshape(16,0) = 27*y*z;
1162 dshape(16,1) = 27*x*z;
1163 dshape(16,2) = 27*x*y;
1165 dshape(14,1) = (9*(-1 + 6*y)*z)/2.;
1166 dshape(14,2) = (9*y*(-1 + 3*y))/2.;
1167 dshape(9,0) = (9*(1 - 3*z)*z)/2.;
1168 dshape(9,1) = (9*(1 - 3*z)*z)/2.;
1169 dshape(9,2) = (9*(-1 + x + y + 8*z - 6*(x + y)*z - 9*pow(z,2)))/2.;
1170 dshape(13,0) = (9*z*(-1 + 3*z))/2.;
1172 dshape(13,2) = (9*x*(-1 + 6*z))/2.;
1174 dshape(15,1) = (9*z*(-1 + 3*z))/2.;
1175 dshape(15,2) = (9*y*(-1 + 6*z))/2.;
1178 dshape(3,2) = 1 + (9*z*(-2 + 3*z))/2.;
1244 shape(0) = 1. - ip.
x - ip.
y - ip.
z;
1253 if (dshape.
Height() == 4)
1255 real_t *A = &dshape(0,0);
1256 A[0] = -1.; A[4] = -1.; A[8] = -1.;
1257 A[1] = 1.; A[5] = 0.; A[9] = 0.;
1258 A[2] = 0.; A[6] = 1.; A[10] = 0.;
1259 A[3] = 0.; A[7] = 0.; A[11] = 1.;
1263 dshape(0,0) = -1.; dshape(0,1) = -1.; dshape(0,2) = -1.;
1264 dshape(1,0) = 1.; dshape(1,1) = 0.; dshape(1,2) = 0.;
1265 dshape(2,0) = 0.; dshape(2,1) = 1.; dshape(2,2) = 0.;
1266 dshape(3,0) = 0.; dshape(3,1) = 0.; dshape(3,2) = 1.;
1279 static int face_dofs[4][3] = {{1, 2, 3}, {0, 2, 3}, {0, 1, 3}, {0, 1, 2}};
1282 *dofs = face_dofs[face];
1313 shape(0) = (1. - ip.
x - ip.
y) * (1. - ip.
z);
1314 shape(1) = ip.
x * (1. - ip.
z);
1315 shape(2) = ip.
y * (1. - ip.
z);
1316 shape(3) = (1. - ip.
x - ip.
y) * ip.
z;
1317 shape(4) = ip.
x * ip.
z;
1318 shape(5) = ip.
y * ip.
z;
1324 dshape(0,0) = -1. + ip.
z;
1325 dshape(0,1) = -1. + ip.
z;
1326 dshape(0,2) = -1. + ip.
x + ip.
y;
1328 dshape(1,0) = 1. - ip.
z;
1330 dshape(1,2) = -ip.
x;
1333 dshape(2,1) = 1. - ip.
z;
1334 dshape(2,2) = -ip.
y;
1336 dshape(3,0) = -ip.
z;
1337 dshape(3,1) = -ip.
z;
1338 dshape(3,2) = 1. - ip.
x - ip.
y;
1352 static int face_dofs[5][4] =
1353 {{0, 2, 1, -1}, {3, 4, 5, -1}, {0, 1, 4, 3}, {1, 2, 5, 4}, {2, 0, 3, 5}};
1355 *ndofs = (face < 2) ? 3 : 4;
1356 *dofs = face_dofs[face];
1384 real_t ox = 1.-x-z, oy = 1.-y-z, oz = 1.-z;
1403 shape(0) = ox * oy * ozi;
1404 shape(1) = x * oy * ozi;
1405 shape(2) = x * y * ozi;
1406 shape(3) = ox * y * ozi;
1414 real_t ox = 1.-x-z, oy = 1.-y-z, oz = 1.-z;
1425 dshape(0,0) = - 0.5;
1426 dshape(0,1) = - 0.5;
1427 dshape(0,2) = - 0.75;
1430 dshape(1,1) = - 0.5;
1431 dshape(1,2) = - 0.25;
1437 dshape(3,0) = - 0.5;
1439 dshape(3,2) = - 0.25;
1450 dshape(0,0) = - oy * ozi;
1451 dshape(0,1) = - ox * ozi;
1452 dshape(0,2) = x * y * ozi * ozi - 1.;
1454 dshape(1,0) = oy * ozi;
1455 dshape(1,1) = - x * ozi;
1456 dshape(1,2) = - x * y * ozi * ozi;
1458 dshape(2,0) = y * ozi;
1459 dshape(2,1) = x * ozi;
1460 dshape(2,2) = x * y * ozi * ozi;
1462 dshape(3,0) = - y * ozi;
1463 dshape(3,1) = ox * ozi;
1464 dshape(3,2) = - x * y * ozi * ozi;
1474 static int face_dofs[5][4] =
1475 {{3, 2, 1, 0}, {0, 1, 4, -1}, {1, 2, 4, -1}, {2, 3, 4, -1}, {3, 0, 4, -1}};
1477 *ndofs = (face < 1) ? 4 : 3;
1478 *dofs = face_dofs[face];
1522 L0 = 1. - ip.
x - ip.
y - ip.
z;
1527 shape(0) = L0 * ( 2.0 * L0 - 1.0 );
1528 shape(1) = L1 * ( 2.0 * L1 - 1.0 );
1529 shape(2) = L2 * ( 2.0 * L2 - 1.0 );
1530 shape(3) = L3 * ( 2.0 * L3 - 1.0 );
1531 shape(4) = 4.0 * L0 * L1;
1532 shape(5) = 4.0 * L0 * L2;
1533 shape(6) = 4.0 * L0 * L3;
1534 shape(7) = 4.0 * L1 * L2;
1535 shape(8) = 4.0 * L1 * L3;
1536 shape(9) = 4.0 * L2 * L3;
1547 L0 = 1.0 - x - y - z;
1549 dshape(0,0) = dshape(0,1) = dshape(0,2) = 1.0 - 4.0 * L0;
1550 dshape(1,0) = -1.0 + 4.0 * x; dshape(1,1) = 0.0; dshape(1,2) = 0.0;
1551 dshape(2,0) = 0.0; dshape(2,1) = -1.0 + 4.0 * y; dshape(2,2) = 0.0;
1552 dshape(3,0) = dshape(3,1) = 0.0; dshape(3,2) = -1.0 + 4.0 * z;
1553 dshape(4,0) = 4.0 * (L0 - x); dshape(4,1) = dshape(4,2) = -4.0 * x;
1554 dshape(5,0) = dshape(5,2) = -4.0 * y; dshape(5,1) = 4.0 * (L0 - y);
1555 dshape(6,0) = dshape(6,1) = -4.0 * z; dshape(6,2) = 4.0 * (L0 - z);
1556 dshape(7,0) = 4.0 * y; dshape(7,1) = 4.0 * x; dshape(7,2) = 0.0;
1557 dshape(8,0) = 4.0 * z; dshape(8,1) = 0.0; dshape(8,2) = 4.0 * x;
1558 dshape(9,0) = 0.0; dshape(9,1) = 4.0 * z; dshape(9,2) = 4.0 * y;
1601 real_t ox = 1.-x, oy = 1.-y, oz = 1.-z;
1603 shape(0) = ox * oy * oz;
1604 shape(1) = x * oy * oz;
1605 shape(2) = x * y * oz;
1606 shape(3) = ox * y * oz;
1607 shape(4) = ox * oy * z;
1608 shape(5) = x * oy * z;
1609 shape(6) = x * y * z;
1610 shape(7) = ox * y * z;
1617 real_t ox = 1.-x, oy = 1.-y, oz = 1.-z;
1619 dshape(0,0) = - oy * oz;
1620 dshape(0,1) = - ox * oz;
1621 dshape(0,2) = - ox * oy;
1623 dshape(1,0) = oy * oz;
1624 dshape(1,1) = - x * oz;
1625 dshape(1,2) = - x * oy;
1627 dshape(2,0) = y * oz;
1628 dshape(2,1) = x * oz;
1629 dshape(2,2) = - x * y;
1631 dshape(3,0) = - y * oz;
1632 dshape(3,1) = ox * oz;
1633 dshape(3,2) = - ox * y;
1635 dshape(4,0) = - oy * z;
1636 dshape(4,1) = - ox * z;
1637 dshape(4,2) = ox * oy;
1639 dshape(5,0) = oy * z;
1640 dshape(5,1) = - x * z;
1641 dshape(5,2) = x * oy;
1643 dshape(6,0) = y * z;
1644 dshape(6,1) = x * z;
1645 dshape(6,2) = x * y;
1647 dshape(7,0) = - y * z;
1648 dshape(7,1) = ox * z;
1649 dshape(7,2) = ox * y;
1656 real_t ox = 1.-x, oy = 1.-y, oz = 1.-z;
1658 h(0,0) = 0.; h(0,1) = oz; h(0,2) = oy;
1659 h(0,3) = 0.; h(0,4) = ox; h(0,5) = 0.;
1661 h(1,0) = 0.; h(1,1) = -oz; h(1,2) = -oy;
1662 h(1,3) = 0.; h(1,4) = x; h(1,5) = 0.;
1664 h(2,0) = 0.; h(2,1) = oz; h(2,2) = -y;
1665 h(2,3) = 0.; h(2,4) = -x; h(2,5) = 0.;
1667 h(3,0) = 0.; h(3,1) = -oz; h(3,2) = y;
1668 h(3,3) = 0.; h(3,4) = -ox; h(3,5) = 0.;
1670 h(4,0) = 0.; h(4,1) = z; h(4,2) = -oy;
1671 h(4,3) = 0.; h(4,4) = -ox; h(4,5) = 0.;
1673 h(5,0) = 0.; h(5,1) = -z; h(5,2) = oy;
1674 h(5,3) = 0.; h(5,4) = -x; h(5,5) = 0.;
1676 h(6,0) = 0.; h(6,1) = z; h(6,2) = y;
1677 h(6,3) = 0.; h(6,4) = x; h(6,5) = 0.;
1679 h(7,0) = 0.; h(7,1) = -z; h(7,2) = -y;
1680 h(7,3) = 0.; h(7,4) = ox; h(7,5) = 0.;
1716 shape(0) = 1.0 - 2.0 * ip.
y;
1717 shape(1) = -1.0 + 2.0 * ( ip.
x + ip.
y );
1718 shape(2) = 1.0 - 2.0 * ip.
x;
1724 dshape(0,0) = 0.0; dshape(0,1) = -2.0;
1725 dshape(1,0) = 2.0; dshape(1,1) = 2.0;
1726 dshape(2,0) = -2.0; dshape(2,1) = 0.0;
1747 const real_t l1 = ip.
x+ip.
y-0.5, l2 = 1.-l1, l3 = ip.
x-ip.
y+0.5, l4 = 1.-l3;
1758 const real_t x2 = 2.*ip.
x, y2 = 2.*ip.
y;
1760 dshape(0,0) = 1. - x2; dshape(0,1) = -2. + y2;
1761 dshape(1,0) = x2; dshape(1,1) = 1. - y2;
1762 dshape(2,0) = 1. - x2; dshape(2,1) = y2;
1763 dshape(3,0) = -2. + x2; dshape(3,1) = 1. - y2;
1784 shape(0,1) = y - 1.;
1787 shape(2,0) = x - 1.;
1799const real_t RT0TriangleFiniteElement::nk[3][2] =
1800{ {0, -1}, {1, 1}, {-1, 0} };
1806#ifdef MFEM_THREAD_SAFE
1811 for (k = 0; k < 3; k++)
1814 for (j = 0; j < 3; j++)
1817 if (j == k) { d -= 1.0; }
1818 if (fabs(d) > 1.0e-12)
1820 mfem::err <<
"RT0TriangleFiniteElement::GetLocalInterpolation (...)\n"
1821 " k = " << k <<
", j = " << j <<
", d = " << d << endl;
1838 for (k = 0; k < 3; k++)
1841 ip.
x = vk[0]; ip.
y = vk[1];
1844 vk[0] = Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1];
1845 vk[1] = Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1];
1846 for (j = 0; j < 3; j++)
1847 if (fabs (I(k,j) =
vshape(j,0)*vk[0]+
vshape(j,1)*vk[1]) < 1.0e-12)
1861 for (
int k = 0; k < 3; k++)
1869 dofs(k) = (vk[0] * ( Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1] ) +
1870 vk[1] * ( Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1] ));
1894 shape(0,1) = y - 1.;
1899 shape(3,0) = x - 1.;
1912const real_t RT0QuadFiniteElement::nk[4][2] =
1913{ {0, -1}, {1, 0}, {0, 1}, {-1, 0} };
1919#ifdef MFEM_THREAD_SAFE
1924 for (k = 0; k < 4; k++)
1927 for (j = 0; j < 4; j++)
1930 if (j == k) { d -= 1.0; }
1931 if (fabs(d) > 1.0e-12)
1933 mfem::err <<
"RT0QuadFiniteElement::GetLocalInterpolation (...)\n"
1934 " k = " << k <<
", j = " << j <<
", d = " << d << endl;
1951 for (k = 0; k < 4; k++)
1954 ip.
x = vk[0]; ip.
y = vk[1];
1957 vk[0] = Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1];
1958 vk[1] = Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1];
1959 for (j = 0; j < 4; j++)
1960 if (fabs (I(k,j) =
vshape(j,0)*vk[0]+
vshape(j,1)*vk[1]) < 1.0e-12)
1974 for (
int k = 0; k < 4; k++)
1982 dofs(k) = (vk[0] * ( Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1] ) +
1983 vk[1] * ( Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1] ));
2013 shape(0,0) = -2 * x * (-1 + x + 2 * y);
2014 shape(0,1) = -2 * (-1 + y) * (-1 + x + 2 * y);
2015 shape(1,0) = 2 * x * (x - y);
2016 shape(1,1) = 2 * (x - y) * (-1 + y);
2017 shape(2,0) = 2 * x * (-1 + 2 * x + y);
2018 shape(2,1) = 2 * y * (-1 + 2 * x + y);
2019 shape(3,0) = 2 * x * (-1 + x + 2 * y);
2020 shape(3,1) = 2 * y * (-1 + x + 2 * y);
2021 shape(4,0) = -2 * (-1 + x) * (x - y);
2022 shape(4,1) = 2 * y * (-x + y);
2023 shape(5,0) = -2 * (-1 + x) * (-1 + 2 * x + y);
2024 shape(5,1) = -2 * y * (-1 + 2 * x + y);
2025 shape(6,0) = -3 * x * (-2 + 2 * x + y);
2026 shape(6,1) = -3 * y * (-1 + 2 * x + y);
2027 shape(7,0) = -3 * x * (-1 + x + 2 * y);
2028 shape(7,1) = -3 * y * (-2 + x + 2 * y);
2036 divshape(0) = -2 * (-4 + 3 * x + 6 * y);
2037 divshape(1) = 2 + 6 * x - 6 * y;
2038 divshape(2) = -4 + 12 * x + 6 * y;
2039 divshape(3) = -4 + 6 * x + 12 * y;
2040 divshape(4) = 2 - 6 * x + 6 * y;
2041 divshape(5) = -2 * (-4 + 6 * x + 3 * y);
2042 divshape(6) = -9 * (-1 + 2 * x + y);
2043 divshape(7) = -9 * (-1 + x + 2 * y);
2046const real_t RT1TriangleFiniteElement::nk[8][2] =
2058#ifdef MFEM_THREAD_SAFE
2063 for (k = 0; k < 8; k++)
2066 for (j = 0; j < 8; j++)
2069 if (j == k) { d -= 1.0; }
2070 if (fabs(d) > 1.0e-12)
2072 mfem::err <<
"RT1QuadFiniteElement::GetLocalInterpolation (...)\n"
2073 " k = " << k <<
", j = " << j <<
", d = " << d << endl;
2090 for (k = 0; k < 8; k++)
2093 ip.
x = vk[0]; ip.
y = vk[1];
2096 vk[0] = Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1];
2097 vk[1] = Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1];
2098 for (j = 0; j < 8; j++)
2099 if (fabs (I(k,j) =
vshape(j,0)*vk[0]+
vshape(j,1)*vk[1]) < 1.0e-12)
2112 for (
int k = 0; k < 8; k++)
2120 dofs(k) = (vk[0] * ( Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1] ) +
2121 vk[1] * ( Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1] ));
2169 shape(0,1) = -( 1. - 3.*y + 2.*y*y)*( 2. - 3.*x);
2171 shape(1,1) = -( 1. - 3.*y + 2.*y*y)*(-1. + 3.*x);
2173 shape(2,0) = (-x + 2.*x*x)*( 2. - 3.*y);
2175 shape(3,0) = (-x + 2.*x*x)*(-1. + 3.*y);
2179 shape(4,1) = (-y + 2.*y*y)*(-1. + 3.*x);
2181 shape(5,1) = (-y + 2.*y*y)*( 2. - 3.*x);
2183 shape(6,0) = -(1. - 3.*x + 2.*x*x)*(-1. + 3.*y);
2185 shape(7,0) = -(1. - 3.*x + 2.*x*x)*( 2. - 3.*y);
2188 shape(8,0) = (4.*x - 4.*x*x)*( 2. - 3.*y);
2190 shape(9,0) = (4.*x - 4.*x*x)*(-1. + 3.*y);
2194 shape(10,1) = (4.*y - 4.*y*y)*( 2. - 3.*x);
2196 shape(11,1) = (4.*y - 4.*y*y)*(-1. + 3.*x);
2204 divshape(0) = -(-3. + 4.*y)*( 2. - 3.*x);
2205 divshape(1) = -(-3. + 4.*y)*(-1. + 3.*x);
2206 divshape(2) = (-1. + 4.*x)*( 2. - 3.*y);
2207 divshape(3) = (-1. + 4.*x)*(-1. + 3.*y);
2208 divshape(4) = (-1. + 4.*y)*(-1. + 3.*x);
2209 divshape(5) = (-1. + 4.*y)*( 2. - 3.*x);
2210 divshape(6) = -(-3. + 4.*x)*(-1. + 3.*y);
2211 divshape(7) = -(-3. + 4.*x)*( 2. - 3.*y);
2212 divshape(8) = ( 4. - 8.*x)*( 2. - 3.*y);
2213 divshape(9) = ( 4. - 8.*x)*(-1. + 3.*y);
2214 divshape(10) = ( 4. - 8.*y)*( 2. - 3.*x);
2215 divshape(11) = ( 4. - 8.*y)*(-1. + 3.*x);
2218const real_t RT1QuadFiniteElement::nk[12][2] =
2238#ifdef MFEM_THREAD_SAFE
2243 for (k = 0; k < 12; k++)
2246 for (j = 0; j < 12; j++)
2249 if (j == k) { d -= 1.0; }
2250 if (fabs(d) > 1.0e-12)
2252 mfem::err <<
"RT1QuadFiniteElement::GetLocalInterpolation (...)\n"
2253 " k = " << k <<
", j = " << j <<
", d = " << d << endl;
2270 for (k = 0; k < 12; k++)
2273 ip.
x = vk[0]; ip.
y = vk[1];
2276 vk[0] = Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1];
2277 vk[1] = Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1];
2278 for (j = 0; j < 12; j++)
2279 if (fabs (I(k,j) =
vshape(j,0)*vk[0]+
vshape(j,1)*vk[1]) < 1.0e-12)
2292 for (
int k = 0; k < 12; k++)
2300 dofs(k) = (vk[0] * ( Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1] ) +
2301 vk[1] * ( Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1] ));
2305const real_t RT2TriangleFiniteElement::M[15][15] =
2309 0, -5.3237900077244501311, 5.3237900077244501311, 16.647580015448900262,
2310 0, 24.442740046346700787, -16.647580015448900262, -12.,
2311 -19.118950038622250656, -47.237900077244501311, 0, -34.414110069520051180,
2312 12., 30.590320061795601049, 15.295160030897800524
2315 0, 1.5, -1.5, -15., 0, 2.625, 15., 15., -4.125, 30., 0, -14.625, -15.,
2319 0, -0.67620999227554986889, 0.67620999227554986889, 7.3524199845510997378,
2320 0, -3.4427400463467007866, -7.3524199845510997378, -12.,
2321 4.1189500386222506555, -0.76209992275549868892, 0, 7.4141100695200511800,
2322 12., -6.5903200617956010489, -3.2951600308978005244
2325 0, 0, 1.5, 0, 0, 1.5, -11.471370023173350393, 0, 2.4713700231733503933,
2326 -11.471370023173350393, 0, 2.4713700231733503933, 15.295160030897800524,
2327 0, -3.2951600308978005244
2330 0, 0, 4.875, 0, 0, 4.875, -16.875, 0, -16.875, -16.875, 0, -16.875, 10.5,
2334 0, 0, 1.5, 0, 0, 1.5, 2.4713700231733503933, 0, -11.471370023173350393,
2335 2.4713700231733503933, 0, -11.471370023173350393, -3.2951600308978005244,
2336 0, 15.295160030897800524
2339 -0.67620999227554986889, 0, -3.4427400463467007866, 0,
2340 7.3524199845510997378, 0.67620999227554986889, 7.4141100695200511800, 0,
2341 -0.76209992275549868892, 4.1189500386222506555, -12.,
2342 -7.3524199845510997378, -3.2951600308978005244, -6.5903200617956010489,
2346 1.5, 0, 2.625, 0, -15., -1.5, -14.625, 0, 30., -4.125, 15., 15., 10.5,
2350 -5.3237900077244501311, 0, 24.442740046346700787, 0, 16.647580015448900262,
2351 5.3237900077244501311, -34.414110069520051180, 0, -47.237900077244501311,
2352 -19.118950038622250656, -12., -16.647580015448900262, 15.295160030897800524,
2353 30.590320061795601049, 12.
2355 { 0, 0, 18., 0, 0, 6., -42., 0, -30., -26., 0, -14., 24., 32., 8.},
2356 { 0, 0, 6., 0, 0, 18., -14., 0, -26., -30., 0, -42., 8., 32., 24.},
2357 { 0, 0, -6., 0, 0, -4., 30., 0, 4., 22., 0, 4., -24., -16., 0},
2358 { 0, 0, -4., 0, 0, -8., 20., 0, 8., 36., 0, 8., -16., -32., 0},
2359 { 0, 0, -8., 0, 0, -4., 8., 0, 36., 8., 0, 20., 0, -32., -16.},
2360 { 0, 0, -4., 0, 0, -6., 4., 0, 22., 4., 0, 30., 0, -16., -24.}
2367 const real_t p = 0.11270166537925831148;
2406 real_t Bx[15] = {1., 0., x, 0., y, 0., x*x, 0., x*y, 0., y*y, 0., x*x*x,
2409 real_t By[15] = {0., 1., 0., x, 0., y, 0., x*x, 0., x*y, 0., y*y,
2413 for (
int i = 0; i < 15; i++)
2415 real_t cx = 0.0, cy = 0.0;
2416 for (
int j = 0; j < 15; j++)
2418 cx += M[i][j] * Bx[j];
2419 cy += M[i][j] * By[j];
2430 constexpr real_t f2 = 2.0;
2431 constexpr real_t f4 = 4.0;
2433 real_t DivB[15] = {0., 0., 1., 0., 0., 1., f2*x, 0., y, x, 0., f2*y,
2434 f4*x*x, f4*x*y, f4*y*y
2437 for (
int i = 0; i < 15; i++)
2440 for (
int j = 0; j < 15; j++)
2442 div += M[i][j] * DivB[j];
2448const real_t RT2QuadFiniteElement::pt[4] = {0.,1./3.,2./3.,1.};
2450const real_t RT2QuadFiniteElement::dpt[3] = {0.25,0.5,0.75};
2513 real_t A01 = pt[0] - pt[1];
2514 real_t A02 = pt[0] - pt[2];
2515 real_t A12 = pt[1] - pt[2];
2516 real_t A03 = pt[0] - pt[3];
2517 real_t A13 = pt[1] - pt[3];
2518 real_t A23 = pt[2] - pt[3];
2520 real_t B01 = dpt[0] - dpt[1];
2521 real_t B02 = dpt[0] - dpt[2];
2522 real_t B12 = dpt[1] - dpt[2];
2524 real_t tx0 = (bx1*bx2)/(B01*B02);
2525 real_t tx1 = -(bx0*bx2)/(B01*B12);
2526 real_t tx2 = (bx0*bx1)/(B02*B12);
2528 real_t ty0 = (by1*by2)/(B01*B02);
2529 real_t ty1 = -(by0*by2)/(B01*B12);
2530 real_t ty2 = (by0*by1)/(B02*B12);
2534 shape(0, 1) = (ay1*ay2*ay3)/(A01*A02*A03)*tx0;
2536 shape(1, 1) = (ay1*ay2*ay3)/(A01*A02*A03)*tx1;
2538 shape(2, 1) = (ay1*ay2*ay3)/(A01*A02*A03)*tx2;
2540 shape(3, 0) = (ax0*ax1*ax2)/(A03*A13*A23)*ty0;
2542 shape(4, 0) = (ax0*ax1*ax2)/(A03*A13*A23)*ty1;
2544 shape(5, 0) = (ax0*ax1*ax2)/(A03*A13*A23)*ty2;
2548 shape(6, 1) = (ay0*ay1*ay2)/(A03*A13*A23)*tx2;
2550 shape(7, 1) = (ay0*ay1*ay2)/(A03*A13*A23)*tx1;
2552 shape(8, 1) = (ay0*ay1*ay2)/(A03*A13*A23)*tx0;
2554 shape(9, 0) = (ax1*ax2*ax3)/(A01*A02*A03)*ty2;
2556 shape(10, 0) = (ax1*ax2*ax3)/(A01*A02*A03)*ty1;
2558 shape(11, 0) = (ax1*ax2*ax3)/(A01*A02*A03)*ty0;
2561 shape(12, 0) = (ax0*ax2*ax3)/(A01*A12*A13)*ty0;
2563 shape(13, 0) = (ax0*ax2*ax3)/(A01*A12*A13)*ty1;
2565 shape(14, 0) = (ax0*ax2*ax3)/(A01*A12*A13)*ty2;
2568 shape(15, 0) = -(ax0*ax1*ax3)/(A02*A12*A23)*ty0;
2570 shape(16, 0) = -(ax0*ax1*ax3)/(A02*A12*A23)*ty1;
2572 shape(17, 0) = -(ax0*ax1*ax3)/(A02*A12*A23)*ty2;
2576 shape(18, 1) = (ay0*ay2*ay3)/(A01*A12*A13)*tx0;
2578 shape(19, 1) = (ay0*ay2*ay3)/(A01*A12*A13)*tx1;
2580 shape(20, 1) = (ay0*ay2*ay3)/(A01*A12*A13)*tx2;
2583 shape(21, 1) = -(ay0*ay1*ay3)/(A02*A12*A23)*tx0;
2585 shape(22, 1) = -(ay0*ay1*ay3)/(A02*A12*A23)*tx1;
2587 shape(23, 1) = -(ay0*ay1*ay3)/(A02*A12*A23)*tx2;
2595 real_t a01 = pt[0]*pt[1];
2596 real_t a02 = pt[0]*pt[2];
2597 real_t a12 = pt[1]*pt[2];
2598 real_t a03 = pt[0]*pt[3];
2599 real_t a13 = pt[1]*pt[3];
2600 real_t a23 = pt[2]*pt[3];
2610 real_t A01 = pt[0] - pt[1];
2611 real_t A02 = pt[0] - pt[2];
2612 real_t A12 = pt[1] - pt[2];
2613 real_t A03 = pt[0] - pt[3];
2614 real_t A13 = pt[1] - pt[3];
2615 real_t A23 = pt[2] - pt[3];
2617 real_t A012 = pt[0] + pt[1] + pt[2];
2618 real_t A013 = pt[0] + pt[1] + pt[3];
2619 real_t A023 = pt[0] + pt[2] + pt[3];
2620 real_t A123 = pt[1] + pt[2] + pt[3];
2622 real_t B01 = dpt[0] - dpt[1];
2623 real_t B02 = dpt[0] - dpt[2];
2624 real_t B12 = dpt[1] - dpt[2];
2626 real_t tx0 = (bx1*bx2)/(B01*B02);
2627 real_t tx1 = -(bx0*bx2)/(B01*B12);
2628 real_t tx2 = (bx0*bx1)/(B02*B12);
2630 real_t ty0 = (by1*by2)/(B01*B02);
2631 real_t ty1 = -(by0*by2)/(B01*B12);
2632 real_t ty2 = (by0*by1)/(B02*B12);
2635 divshape(0) = -(a12 + a13 + a23 - 2.*A123*y + 3.*y*y)/(A01*A02*A03)*tx0;
2636 divshape(1) = -(a12 + a13 + a23 - 2.*A123*y + 3.*y*y)/(A01*A02*A03)*tx1;
2637 divshape(2) = -(a12 + a13 + a23 - 2.*A123*y + 3.*y*y)/(A01*A02*A03)*tx2;
2639 divshape(3) = -(a01 + a02 + a12 - 2.*A012*x + 3.*x*x)/(A03*A13*A23)*ty0;
2640 divshape(4) = -(a01 + a02 + a12 - 2.*A012*x + 3.*x*x)/(A03*A13*A23)*ty1;
2641 divshape(5) = -(a01 + a02 + a12 - 2.*A012*x + 3.*x*x)/(A03*A13*A23)*ty2;
2643 divshape(6) = -(a01 + a02 + a12 - 2.*A012*y + 3.*y*y)/(A03*A13*A23)*tx2;
2644 divshape(7) = -(a01 + a02 + a12 - 2.*A012*y + 3.*y*y)/(A03*A13*A23)*tx1;
2645 divshape(8) = -(a01 + a02 + a12 - 2.*A012*y + 3.*y*y)/(A03*A13*A23)*tx0;
2647 divshape(9) = -(a12 + a13 + a23 - 2.*A123*x + 3.*x*x)/(A01*A02*A03)*ty2;
2648 divshape(10) = -(a12 + a13 + a23 - 2.*A123*x + 3.*x*x)/(A01*A02*A03)*ty1;
2649 divshape(11) = -(a12 + a13 + a23 - 2.*A123*x + 3.*x*x)/(A01*A02*A03)*ty0;
2651 divshape(12) = -(a02 + a03 + a23 - 2.*A023*x + 3.*x*x)/(A01*A12*A13)*ty0;
2652 divshape(13) = -(a02 + a03 + a23 - 2.*A023*x + 3.*x*x)/(A01*A12*A13)*ty1;
2653 divshape(14) = -(a02 + a03 + a23 - 2.*A023*x + 3.*x*x)/(A01*A12*A13)*ty2;
2655 divshape(15) = (a01 + a03 + a13 - 2.*A013*x + 3.*x*x)/(A02*A12*A23)*ty0;
2656 divshape(16) = (a01 + a03 + a13 - 2.*A013*x + 3.*x*x)/(A02*A12*A23)*ty1;
2657 divshape(17) = (a01 + a03 + a13 - 2.*A013*x + 3.*x*x)/(A02*A12*A23)*ty2;
2659 divshape(18) = -(a02 + a03 + a23 - 2.*A023*y + 3.*y*y)/(A01*A12*A13)*tx0;
2660 divshape(19) = -(a02 + a03 + a23 - 2.*A023*y + 3.*y*y)/(A01*A12*A13)*tx1;
2661 divshape(20) = -(a02 + a03 + a23 - 2.*A023*y + 3.*y*y)/(A01*A12*A13)*tx2;
2663 divshape(21) = (a01 + a03 + a13 - 2.*A013*y + 3.*y*y)/(A02*A12*A23)*tx0;
2664 divshape(22) = (a01 + a03 + a13 - 2.*A013*y + 3.*y*y)/(A02*A12*A23)*tx1;
2665 divshape(23) = (a01 + a03 + a13 - 2.*A013*y + 3.*y*y)/(A02*A12*A23)*tx2;
2668const real_t RT2QuadFiniteElement::nk[24][2] =
2671 {0,-1}, {0,-1}, {0,-1},
2673 {1, 0}, {1, 0}, {1, 0},
2675 {0, 1}, {0, 1}, {0, 1},
2677 {-1,0}, {-1,0}, {-1,0},
2679 {1, 0}, {1, 0}, {1, 0},
2681 {1, 0}, {1, 0}, {1, 0},
2683 {0, 1}, {0, 1}, {0, 1},
2685 {0, 1}, {0, 1}, {0, 1}
2692#ifdef MFEM_THREAD_SAFE
2697 for (k = 0; k < 24; k++)
2700 for (j = 0; j < 24; j++)
2703 if (j == k) { d -= 1.0; }
2704 if (fabs(d) > 1.0e-12)
2706 mfem::err <<
"RT2QuadFiniteElement::GetLocalInterpolation (...)\n"
2707 " k = " << k <<
", j = " << j <<
", d = " << d << endl;
2724 for (k = 0; k < 24; k++)
2727 ip.
x = vk[0]; ip.
y = vk[1];
2730 vk[0] = Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1];
2731 vk[1] = Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1];
2732 for (j = 0; j < 24; j++)
2733 if (fabs (I(k,j) =
vshape(j,0)*vk[0]+
vshape(j,1)*vk[1]) < 1.0e-12)
2746 for (
int k = 0; k < 24; k++)
2754 dofs(k) = (vk[0] * ( Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1] ) +
2755 vk[1] * ( Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1] ));
2771 shape(0) = 2. - 3. * x;
2772 shape(1) = 3. * x - 1.;
2786 const real_t p = 0.11270166537925831148;
2796 const real_t p = 0.11270166537925831148;
2797 const real_t w = 1./((1-2*
p)*(1-2*
p));
2800 shape(0) = (2*x-1)*(x-1+
p)*w;
2801 shape(1) = 4*(x-1+
p)*(
p-x)*w;
2802 shape(2) = (2*x-1)*(x-
p)*w;
2808 const real_t p = 0.11270166537925831148;
2809 const real_t w = 1./((1-2*
p)*(1-2*
p));
2812 dshape(0,0) = (-3+4*x+2*
p)*w;
2813 dshape(1,0) = (4-8*x)*w;
2814 dshape(2,0) = (-1+4*x-2*
p)*w;
2825 for (i = 1; i < m; i++)
2831#ifndef MFEM_THREAD_SAFE
2836 for (i = 1; i <= m; i++)
2840 for (i = 0; i < m/2+1; i++)
2842 rwk(m-i) = ( rwk(i) *= rwk(m-i) );
2844 for (i = m-1; i >= 0; i -= 2)
2856#ifdef MFEM_THREAD_SAFE
2860 k = (int) floor ( m * x + 0.5 );
2861 k = k > m ? m : k < 0 ? 0 : k;
2864 for (i = 0; i <= m; i++)
2867 wk *= ( rxxk(i) = x - (
real_t)(i) / m );
2869 w = wk * ( rxxk(k) = x - (
real_t)(k) / m );
2873 shape(0) = w * rwk(0) / rxxk(0);
2877 shape(0) = wk * rwk(0);
2881 shape(1) = w * rwk(m) / rxxk(m);
2885 shape(1) = wk * rwk(k);
2887 for (i = 1; i < m; i++)
2890 shape(i+1) = w * rwk(i) / rxxk(i);
2894 shape(k+1) = wk * rwk(k);
2901 real_t s, srx, w, wk, x = ip.
x;
2904#ifdef MFEM_THREAD_SAFE
2908 k = (int) floor ( m * x + 0.5 );
2909 k = k > m ? m : k < 0 ? 0 : k;
2912 for (i = 0; i <= m; i++)
2915 wk *= ( rxxk(i) = x - (
real_t)(i) / m );
2917 w = wk * ( rxxk(k) = x - (
real_t)(k) / m );
2919 for (i = 0; i <= m; i++)
2921 rxxk(i) = 1.0 / rxxk(i);
2924 for (i = 0; i <= m; i++)
2933 dshape(0,0) = (s - w * rxxk(0)) * rwk(0) * rxxk(0);
2937 dshape(0,0) = wk * srx * rwk(0);
2941 dshape(1,0) = (s - w * rxxk(m)) * rwk(m) * rxxk(m);
2945 dshape(1,0) = wk * srx * rwk(k);
2947 for (i = 1; i < m; i++)
2950 dshape(i+1,0) = (s - w * rxxk(i)) * rwk(i) * rxxk(i);
2954 dshape(k+1,0) = wk * srx * rwk(k);
2985 L1 = ip.
x; L2 = ip.
y; L3 = ip.
z; L0 = 1.0 - L1 - L2 - L3;
2986 shape(0) = 1.0 - 3.0 * L0;
2987 shape(1) = 1.0 - 3.0 * L1;
2988 shape(2) = 1.0 - 3.0 * L2;
2989 shape(3) = 1.0 - 3.0 * L3;
2995 dshape(0,0) = 3.0; dshape(0,1) = 3.0; dshape(0,2) = 3.0;
2996 dshape(1,0) = -3.0; dshape(1,1) = 0.0; dshape(1,2) = 0.0;
2997 dshape(2,0) = 0.0; dshape(2,1) = -3.0; dshape(2,2) = 0.0;
2998 dshape(3,0) = 0.0; dshape(3,1) = 0.0; dshape(3,2) = -3.0;
3019 dshape(0,0) = 0.0; dshape(0,1) = 0.0; dshape(0,2) = 0.0;
3040 dshape(0,0) = 0.0; dshape(0,1) = 0.0; dshape(0,2) = 0.0;
3061 dshape(0,0) = 0.0; dshape(0,1) = 0.0; dshape(0,2) = 0.0;
3082 dshape(0,0) = 0.0; dshape(0,1) = 0.0; dshape(0,2) = 0.0;
3096 I[ 0] = 0; J[ 0] = 0; K[ 0] = 0;
3097 I[ 1] = 1; J[ 1] = 0; K[ 1] = 0;
3098 I[ 2] = 1; J[ 2] = 1; K[ 2] = 0;
3099 I[ 3] = 0; J[ 3] = 1; K[ 3] = 0;
3100 I[ 4] = 0; J[ 4] = 0; K[ 4] = 1;
3101 I[ 5] = 1; J[ 5] = 0; K[ 5] = 1;
3102 I[ 6] = 1; J[ 6] = 1; K[ 6] = 1;
3103 I[ 7] = 0; J[ 7] = 1; K[ 7] = 1;
3105 I[ 8] = 2; J[ 8] = 0; K[ 8] = 0;
3106 I[ 9] = 1; J[ 9] = 2; K[ 9] = 0;
3107 I[10] = 2; J[10] = 1; K[10] = 0;
3108 I[11] = 0; J[11] = 2; K[11] = 0;
3109 I[12] = 2; J[12] = 0; K[12] = 1;
3110 I[13] = 1; J[13] = 2; K[13] = 1;
3111 I[14] = 2; J[14] = 1; K[14] = 1;
3112 I[15] = 0; J[15] = 2; K[15] = 1;
3113 I[16] = 0; J[16] = 0; K[16] = 2;
3114 I[17] = 1; J[17] = 0; K[17] = 2;
3115 I[18] = 1; J[18] = 1; K[18] = 2;
3116 I[19] = 0; J[19] = 1; K[19] = 2;
3118 I[20] = 2; J[20] = 2; K[20] = 0;
3119 I[21] = 2; J[21] = 0; K[21] = 2;
3120 I[22] = 1; J[22] = 2; K[22] = 2;
3121 I[23] = 2; J[23] = 1; K[23] = 2;
3122 I[24] = 0; J[24] = 2; K[24] = 2;
3123 I[25] = 2; J[25] = 2; K[25] = 1;
3125 I[26] = 2; J[26] = 2; K[26] = 2;
3127 else if (degree == 3)
3133 I[ 0] = 0; J[ 0] = 0; K[ 0] = 0;
3134 I[ 1] = 1; J[ 1] = 0; K[ 1] = 0;
3135 I[ 2] = 1; J[ 2] = 1; K[ 2] = 0;
3136 I[ 3] = 0; J[ 3] = 1; K[ 3] = 0;
3137 I[ 4] = 0; J[ 4] = 0; K[ 4] = 1;
3138 I[ 5] = 1; J[ 5] = 0; K[ 5] = 1;
3139 I[ 6] = 1; J[ 6] = 1; K[ 6] = 1;
3140 I[ 7] = 0; J[ 7] = 1; K[ 7] = 1;
3142 I[ 8] = 2; J[ 8] = 0; K[ 8] = 0;
3143 I[ 9] = 3; J[ 9] = 0; K[ 9] = 0;
3144 I[10] = 1; J[10] = 2; K[10] = 0;
3145 I[11] = 1; J[11] = 3; K[11] = 0;
3146 I[12] = 2; J[12] = 1; K[12] = 0;
3147 I[13] = 3; J[13] = 1; K[13] = 0;
3148 I[14] = 0; J[14] = 2; K[14] = 0;
3149 I[15] = 0; J[15] = 3; K[15] = 0;
3150 I[16] = 2; J[16] = 0; K[16] = 1;
3151 I[17] = 3; J[17] = 0; K[17] = 1;
3152 I[18] = 1; J[18] = 2; K[18] = 1;
3153 I[19] = 1; J[19] = 3; K[19] = 1;
3154 I[20] = 2; J[20] = 1; K[20] = 1;
3155 I[21] = 3; J[21] = 1; K[21] = 1;
3156 I[22] = 0; J[22] = 2; K[22] = 1;
3157 I[23] = 0; J[23] = 3; K[23] = 1;
3158 I[24] = 0; J[24] = 0; K[24] = 2;
3159 I[25] = 0; J[25] = 0; K[25] = 3;
3160 I[26] = 1; J[26] = 0; K[26] = 2;
3161 I[27] = 1; J[27] = 0; K[27] = 3;
3162 I[28] = 1; J[28] = 1; K[28] = 2;
3163 I[29] = 1; J[29] = 1; K[29] = 3;
3164 I[30] = 0; J[30] = 1; K[30] = 2;
3165 I[31] = 0; J[31] = 1; K[31] = 3;
3167 I[32] = 2; J[32] = 3; K[32] = 0;
3168 I[33] = 3; J[33] = 3; K[33] = 0;
3169 I[34] = 2; J[34] = 2; K[34] = 0;
3170 I[35] = 3; J[35] = 2; K[35] = 0;
3171 I[36] = 2; J[36] = 0; K[36] = 2;
3172 I[37] = 3; J[37] = 0; K[37] = 2;
3173 I[38] = 2; J[38] = 0; K[38] = 3;
3174 I[39] = 3; J[39] = 0; K[39] = 3;
3175 I[40] = 1; J[40] = 2; K[40] = 2;
3176 I[41] = 1; J[41] = 3; K[41] = 2;
3177 I[42] = 1; J[42] = 2; K[42] = 3;
3178 I[43] = 1; J[43] = 3; K[43] = 3;
3179 I[44] = 3; J[44] = 1; K[44] = 2;
3180 I[45] = 2; J[45] = 1; K[45] = 2;
3181 I[46] = 3; J[46] = 1; K[46] = 3;
3182 I[47] = 2; J[47] = 1; K[47] = 3;
3183 I[48] = 0; J[48] = 3; K[48] = 2;
3184 I[49] = 0; J[49] = 2; K[49] = 2;
3185 I[50] = 0; J[50] = 3; K[50] = 3;
3186 I[51] = 0; J[51] = 2; K[51] = 3;
3187 I[52] = 2; J[52] = 2; K[52] = 1;
3188 I[53] = 3; J[53] = 2; K[53] = 1;
3189 I[54] = 2; J[54] = 3; K[54] = 1;
3190 I[55] = 3; J[55] = 3; K[55] = 1;
3192 I[56] = 2; J[56] = 2; K[56] = 2;
3193 I[57] = 3; J[57] = 2; K[57] = 2;
3194 I[58] = 3; J[58] = 3; K[58] = 2;
3195 I[59] = 2; J[59] = 3; K[59] = 2;
3196 I[60] = 2; J[60] = 2; K[60] = 3;
3197 I[61] = 3; J[61] = 2; K[61] = 3;
3198 I[62] = 3; J[62] = 3; K[62] = 3;
3199 I[63] = 2; J[63] = 3; K[63] = 3;
3203 mfem_error (
"LagrangeHexFiniteElement::LagrangeHexFiniteElement");
3207 dof1d = fe1d ->
GetDof();
3209#ifndef MFEM_THREAD_SAFE
3219 for (
int n = 0; n <
dof; n++)
3234#ifdef MFEM_THREAD_SAFE
3235 Vector shape1dx(dof1d), shape1dy(dof1d), shape1dz(dof1d);
3242 for (
int n = 0; n <
dof; n++)
3244 shape(n) = shape1dx(I[n]) * shape1dy(J[n]) * shape1dz(K[n]);
3255#ifdef MFEM_THREAD_SAFE
3256 Vector shape1dx(dof1d), shape1dy(dof1d), shape1dz(dof1d);
3257 DenseMatrix dshape1dx(dof1d,1), dshape1dy(dof1d,1), dshape1dz(dof1d,1);
3268 for (
int n = 0; n <
dof; n++)
3270 dshape(n,0) = dshape1dx(I[n],0) * shape1dy(J[n]) * shape1dz(K[n]);
3271 dshape(n,1) = shape1dx(I[n]) * dshape1dy(J[n],0) * shape1dz(K[n]);
3272 dshape(n,2) = shape1dx(I[n]) * shape1dy(J[n]) * dshape1dz(K[n],0);
3301 shape(0) = 1.0 - 2.0 * x;
3308 shape(1) = 2.0 * x - 1.0;
3309 shape(2) = 2.0 - 2.0 * x;
3320 dshape(0,0) = - 2.0;
3328 dshape(2,0) = - 2.0;
3355 L0 = 2.0 * ( 1. - ip.
x - ip.
y );
3356 L1 = 2.0 * ( ip.
x );
3357 L2 = 2.0 * ( ip.
y );
3366 for (i = 0; i < 6; i++)
3373 shape(0) = L0 - 1.0;
3380 shape(1) = L1 - 1.0;
3387 shape(2) = L2 - 1.0;
3391 shape(3) = 1.0 - L2;
3392 shape(4) = 1.0 - L0;
3393 shape(5) = 1.0 - L1;
3403 L0 = 2.0 * ( 1. - ip.
x - ip.
y );
3404 L1 = 2.0 * ( ip.
x );
3405 L2 = 2.0 * ( ip.
y );
3407 real_t DL0[2], DL1[2], DL2[2];
3408 DL0[0] = -2.0; DL0[1] = -2.0;
3409 DL1[0] = 2.0; DL1[1] = 0.0;
3410 DL2[0] = 0.0; DL2[1] = 2.0;
3412 for (i = 0; i < 6; i++)
3413 for (j = 0; j < 2; j++)
3420 for (j = 0; j < 2; j++)
3422 dshape(0,j) = DL0[j];
3423 dshape(3,j) = DL1[j];
3424 dshape(5,j) = DL2[j];
3429 for (j = 0; j < 2; j++)
3431 dshape(3,j) = DL0[j];
3432 dshape(1,j) = DL1[j];
3433 dshape(4,j) = DL2[j];
3438 for (j = 0; j < 2; j++)
3440 dshape(5,j) = DL0[j];
3441 dshape(4,j) = DL1[j];
3442 dshape(2,j) = DL2[j];
3447 for (j = 0; j < 2; j++)
3449 dshape(3,j) = - DL2[j];
3450 dshape(4,j) = - DL0[j];
3451 dshape(5,j) = - DL1[j];
3496 real_t L0, L1, L2, L3, L4, L5;
3497 L0 = 2.0 * ( 1. - ip.
x - ip.
y - ip.
z );
3498 L1 = 2.0 * ( ip.
x );
3499 L2 = 2.0 * ( ip.
y );
3500 L3 = 2.0 * ( ip.
z );
3501 L4 = 2.0 * ( ip.
x + ip.
y );
3502 L5 = 2.0 * ( ip.
y + ip.
z );
3515 for (i = 0; i < 10; i++)
3522 shape(0) = L0 - 1.0;
3530 shape(1) = L1 - 1.0;
3538 shape(2) = L2 - 1.0;
3546 shape(3) = L3 - 1.0;
3548 else if ((L4 <= 1.0) && (L5 <= 1.0))
3550 shape(4) = 1.0 - L5;
3552 shape(6) = 1.0 - L4;
3553 shape(8) = 1.0 - L0;
3555 else if ((L4 >= 1.0) && (L5 <= 1.0))
3557 shape(4) = 1.0 - L5;
3558 shape(5) = 1.0 - L1;
3559 shape(7) = L4 - 1.0;
3562 else if ((L4 <= 1.0) && (L5 >= 1.0))
3564 shape(5) = 1.0 - L3;
3565 shape(6) = 1.0 - L4;
3567 shape(9) = L5 - 1.0;
3569 else if ((L4 >= 1.0) && (L5 >= 1.0))
3572 shape(7) = L4 - 1.0;
3573 shape(8) = 1.0 - L2;
3574 shape(9) = L5 - 1.0;
3583 real_t L0, L1, L2, L3, L4, L5;
3584 L0 = 2.0 * ( 1. - ip.
x - ip.
y - ip.
z );
3585 L1 = 2.0 * ( ip.
x );
3586 L2 = 2.0 * ( ip.
y );
3587 L3 = 2.0 * ( ip.
z );
3588 L4 = 2.0 * ( ip.
x + ip.
y );
3589 L5 = 2.0 * ( ip.
y + ip.
z );
3591 real_t DL0[3], DL1[3], DL2[3], DL3[3], DL4[3], DL5[3];
3592 DL0[0] = -2.0; DL0[1] = -2.0; DL0[2] = -2.0;
3593 DL1[0] = 2.0; DL1[1] = 0.0; DL1[2] = 0.0;
3594 DL2[0] = 0.0; DL2[1] = 2.0; DL2[2] = 0.0;
3595 DL3[0] = 0.0; DL3[1] = 0.0; DL3[2] = 2.0;
3596 DL4[0] = 2.0; DL4[1] = 2.0; DL4[2] = 0.0;
3597 DL5[0] = 0.0; DL5[1] = 2.0; DL5[2] = 2.0;
3599 for (i = 0; i < 10; i++)
3600 for (j = 0; j < 3; j++)
3607 for (j = 0; j < 3; j++)
3609 dshape(0,j) = DL0[j];
3610 dshape(4,j) = DL1[j];
3611 dshape(5,j) = DL2[j];
3612 dshape(6,j) = DL3[j];
3617 for (j = 0; j < 3; j++)
3619 dshape(4,j) = DL0[j];
3620 dshape(1,j) = DL1[j];
3621 dshape(7,j) = DL2[j];
3622 dshape(8,j) = DL3[j];
3627 for (j = 0; j < 3; j++)
3629 dshape(5,j) = DL0[j];
3630 dshape(7,j) = DL1[j];
3631 dshape(2,j) = DL2[j];
3632 dshape(9,j) = DL3[j];
3637 for (j = 0; j < 3; j++)
3639 dshape(6,j) = DL0[j];
3640 dshape(8,j) = DL1[j];
3641 dshape(9,j) = DL2[j];
3642 dshape(3,j) = DL3[j];
3645 else if ((L4 <= 1.0) && (L5 <= 1.0))
3647 for (j = 0; j < 3; j++)
3649 dshape(4,j) = - DL5[j];
3650 dshape(5,j) = DL2[j];
3651 dshape(6,j) = - DL4[j];
3652 dshape(8,j) = - DL0[j];
3655 else if ((L4 >= 1.0) && (L5 <= 1.0))
3657 for (j = 0; j < 3; j++)
3659 dshape(4,j) = - DL5[j];
3660 dshape(5,j) = - DL1[j];
3661 dshape(7,j) = DL4[j];
3662 dshape(8,j) = DL3[j];
3665 else if ((L4 <= 1.0) && (L5 >= 1.0))
3667 for (j = 0; j < 3; j++)
3669 dshape(5,j) = - DL3[j];
3670 dshape(6,j) = - DL4[j];
3671 dshape(8,j) = DL1[j];
3672 dshape(9,j) = DL5[j];
3675 else if ((L4 >= 1.0) && (L5 >= 1.0))
3677 for (j = 0; j < 3; j++)
3679 dshape(5,j) = DL0[j];
3680 dshape(7,j) = DL4[j];
3681 dshape(8,j) = - DL2[j];
3682 dshape(9,j) = DL5[j];
3717 Lx = 2.0 * ( 1. - x );
3718 Ly = 2.0 * ( 1. - y );
3727 for (i = 0; i < 9; i++)
3732 if ((x <= 0.5) && (y <= 0.5))
3734 shape(0) = (Lx - 1.0) * (Ly - 1.0);
3735 shape(4) = (2.0 - Lx) * (Ly - 1.0);
3736 shape(8) = (2.0 - Lx) * (2.0 - Ly);
3737 shape(7) = (Lx - 1.0) * (2.0 - Ly);
3739 else if ((x >= 0.5) && (y <= 0.5))
3741 shape(4) = Lx * (Ly - 1.0);
3742 shape(1) = (1.0 - Lx) * (Ly - 1.0);
3743 shape(5) = (1.0 - Lx) * (2.0 - Ly);
3744 shape(8) = Lx * (2.0 - Ly);
3746 else if ((x >= 0.5) && (y >= 0.5))
3748 shape(8) = Lx * Ly ;
3749 shape(5) = (1.0 - Lx) * Ly ;
3750 shape(2) = (1.0 - Lx) * (1.0 - Ly);
3751 shape(6) = Lx * (1.0 - Ly);
3753 else if ((x <= 0.5) && (y >= 0.5))
3755 shape(7) = (Lx - 1.0) * Ly ;
3756 shape(8) = (2.0 - Lx) * Ly ;
3757 shape(6) = (2.0 - Lx) * (1.0 - Ly);
3758 shape(3) = (Lx - 1.0) * (1.0 - Ly);
3768 Lx = 2.0 * ( 1. - x );
3769 Ly = 2.0 * ( 1. - y );
3771 for (i = 0; i < 9; i++)
3772 for (j = 0; j < 2; j++)
3777 if ((x <= 0.5) && (y <= 0.5))
3779 dshape(0,0) = 2.0 * (1.0 - Ly);
3780 dshape(0,1) = 2.0 * (1.0 - Lx);
3782 dshape(4,0) = 2.0 * (Ly - 1.0);
3783 dshape(4,1) = -2.0 * (2.0 - Lx);
3785 dshape(8,0) = 2.0 * (2.0 - Ly);
3786 dshape(8,1) = 2.0 * (2.0 - Lx);
3788 dshape(7,0) = -2.0 * (2.0 - Ly);
3789 dshape(7,0) = 2.0 * (Lx - 1.0);
3791 else if ((x >= 0.5) && (y <= 0.5))
3793 dshape(4,0) = -2.0 * (Ly - 1.0);
3794 dshape(4,1) = -2.0 * Lx;
3796 dshape(1,0) = 2.0 * (Ly - 1.0);
3797 dshape(1,1) = -2.0 * (1.0 - Lx);
3799 dshape(5,0) = 2.0 * (2.0 - Ly);
3800 dshape(5,1) = 2.0 * (1.0 - Lx);
3802 dshape(8,0) = -2.0 * (2.0 - Ly);
3803 dshape(8,1) = 2.0 * Lx;
3805 else if ((x >= 0.5) && (y >= 0.5))
3807 dshape(8,0) = -2.0 * Ly;
3808 dshape(8,1) = -2.0 * Lx;
3810 dshape(5,0) = 2.0 * Ly;
3811 dshape(5,1) = -2.0 * (1.0 - Lx);
3813 dshape(2,0) = 2.0 * (1.0 - Ly);
3814 dshape(2,1) = 2.0 * (1.0 - Lx);
3816 dshape(6,0) = -2.0 * (1.0 - Ly);
3817 dshape(6,1) = 2.0 * Lx;
3819 else if ((x <= 0.5) && (y >= 0.5))
3821 dshape(7,0) = -2.0 * Ly;
3822 dshape(7,1) = -2.0 * (Lx - 1.0);
3824 dshape(8,0) = 2.0 * Ly ;
3825 dshape(8,1) = -2.0 * (2.0 - Lx);
3827 dshape(6,0) = 2.0 * (1.0 - Ly);
3828 dshape(6,1) = 2.0 * (2.0 - Lx);
3830 dshape(3,0) = -2.0 * (1.0 - Ly);
3831 dshape(3,1) = 2.0 * (Lx - 1.0);
3842 I[ 0] = 0.0; J[ 0] = 0.0; K[ 0] = 0.0;
3843 I[ 1] = 1.0; J[ 1] = 0.0; K[ 1] = 0.0;
3844 I[ 2] = 1.0; J[ 2] = 1.0; K[ 2] = 0.0;
3845 I[ 3] = 0.0; J[ 3] = 1.0; K[ 3] = 0.0;
3846 I[ 4] = 0.0; J[ 4] = 0.0; K[ 4] = 1.0;
3847 I[ 5] = 1.0; J[ 5] = 0.0; K[ 5] = 1.0;
3848 I[ 6] = 1.0; J[ 6] = 1.0; K[ 6] = 1.0;
3849 I[ 7] = 0.0; J[ 7] = 1.0; K[ 7] = 1.0;
3851 I[ 8] = 0.5; J[ 8] = 0.0; K[ 8] = 0.0;
3852 I[ 9] = 1.0; J[ 9] = 0.5; K[ 9] = 0.0;
3853 I[10] = 0.5; J[10] = 1.0; K[10] = 0.0;
3854 I[11] = 0.0; J[11] = 0.5; K[11] = 0.0;
3855 I[12] = 0.5; J[12] = 0.0; K[12] = 1.0;
3856 I[13] = 1.0; J[13] = 0.5; K[13] = 1.0;
3857 I[14] = 0.5; J[14] = 1.0; K[14] = 1.0;
3858 I[15] = 0.0; J[15] = 0.5; K[15] = 1.0;
3859 I[16] = 0.0; J[16] = 0.0; K[16] = 0.5;
3860 I[17] = 1.0; J[17] = 0.0; K[17] = 0.5;
3861 I[18] = 1.0; J[18] = 1.0; K[18] = 0.5;
3862 I[19] = 0.0; J[19] = 1.0; K[19] = 0.5;
3864 I[20] = 0.5; J[20] = 0.5; K[20] = 0.0;
3865 I[21] = 0.5; J[21] = 0.0; K[21] = 0.5;
3866 I[22] = 1.0; J[22] = 0.5; K[22] = 0.5;
3867 I[23] = 0.5; J[23] = 1.0; K[23] = 0.5;
3868 I[24] = 0.0; J[24] = 0.5; K[24] = 0.5;
3869 I[25] = 0.5; J[25] = 0.5; K[25] = 1.0;
3871 I[26] = 0.5; J[26] = 0.5; K[26] = 0.5;
3873 for (
int n = 0; n < 27; n++)
3888 for (i = 0; i < 27; i++)
3893 if ((x <= 0.5) && (y <= 0.5) && (z <= 0.5))
3908 else if ((x >= 0.5) && (y <= 0.5) && (z <= 0.5))
3923 else if ((x <= 0.5) && (y >= 0.5) && (z <= 0.5))
3938 else if ((x >= 0.5) && (y >= 0.5) && (z <= 0.5))
3953 else if ((x <= 0.5) && (y <= 0.5) && (z >= 0.5))
3968 else if ((x >= 0.5) && (y <= 0.5) && (z >= 0.5))
3983 else if ((x <= 0.5) && (y >= 0.5) && (z >= 0.5))
4014 shape(N[0]) = Lx * Ly * Lz;
4015 shape(N[1]) = (1 - Lx) * Ly * Lz;
4016 shape(N[2]) = (1 - Lx) * (1 - Ly) * Lz;
4017 shape(N[3]) = Lx * (1 - Ly) * Lz;
4018 shape(N[4]) = Lx * Ly * (1 - Lz);
4019 shape(N[5]) = (1 - Lx) * Ly * (1 - Lz);
4020 shape(N[6]) = (1 - Lx) * (1 - Ly) * (1 - Lz);
4021 shape(N[7]) = Lx * (1 - Ly) * (1 - Lz);
4031 for (i = 0; i < 27; i++)
4032 for (j = 0; j < 3; j++)
4037 if ((x <= 0.5) && (y <= 0.5) && (z <= 0.5))
4052 else if ((x >= 0.5) && (y <= 0.5) && (z <= 0.5))
4067 else if ((x <= 0.5) && (y >= 0.5) && (z <= 0.5))
4082 else if ((x >= 0.5) && (y >= 0.5) && (z <= 0.5))
4097 else if ((x <= 0.5) && (y <= 0.5) && (z >= 0.5))
4112 else if ((x >= 0.5) && (y <= 0.5) && (z >= 0.5))
4127 else if ((x <= 0.5) && (y >= 0.5) && (z >= 0.5))
4158 dshape(N[0],0) = -2.0 * Ly * Lz ;
4159 dshape(N[0],1) = -2.0 * Lx * Lz ;
4160 dshape(N[0],2) = -2.0 * Lx * Ly ;
4162 dshape(N[1],0) = 2.0 * Ly * Lz ;
4163 dshape(N[1],1) = -2.0 * (1 - Lx) * Lz ;
4164 dshape(N[1],2) = -2.0 * (1 - Lx) * Ly ;
4166 dshape(N[2],0) = 2.0 * (1 - Ly) * Lz ;
4167 dshape(N[2],1) = 2.0 * (1 - Lx) * Lz ;
4168 dshape(N[2],2) = -2.0 * (1 - Lx) * (1 - Ly);
4170 dshape(N[3],0) = -2.0 * (1 - Ly) * Lz ;
4171 dshape(N[3],1) = 2.0 * Lx * Lz ;
4172 dshape(N[3],2) = -2.0 * Lx * (1 - Ly);
4174 dshape(N[4],0) = -2.0 * Ly * (1 - Lz);
4175 dshape(N[4],1) = -2.0 * Lx * (1 - Lz);
4176 dshape(N[4],2) = 2.0 * Lx * Ly ;
4178 dshape(N[5],0) = 2.0 * Ly * (1 - Lz);
4179 dshape(N[5],1) = -2.0 * (1 - Lx) * (1 - Lz);
4180 dshape(N[5],2) = 2.0 * (1 - Lx) * Ly ;
4182 dshape(N[6],0) = 2.0 * (1 - Ly) * (1 - Lz);
4183 dshape(N[6],1) = 2.0 * (1 - Lx) * (1 - Lz);
4184 dshape(N[6],2) = 2.0 * (1 - Lx) * (1 - Ly);
4186 dshape(N[7],0) = -2.0 * (1 - Ly) * (1 - Lz);
4187 dshape(N[7],1) = 2.0 * Lx * (1 - Lz);
4188 dshape(N[7],2) = 2.0 * Lx * (1 - Ly);
4251 shape(0,0) = (1. - y) * (1. - z);
4255 shape(2,0) = y * (1. - z);
4259 shape(4,0) = z * (1. - y);
4268 shape(1,1) = x * (1. - z);
4272 shape(3,1) = (1. - x) * (1. - z);
4280 shape(7,1) = (1. - x) * z;
4285 shape(8,2) = (1. - x) * (1. - y);
4289 shape(9,2) = x * (1. - y);
4293 shape(10,2) = x * y;
4297 shape(11,2) = y * (1. - x);
4307 curl_shape(0,0) = 0.;
4308 curl_shape(0,1) = y - 1.;
4309 curl_shape(0,2) = 1. - z;
4311 curl_shape(2,0) = 0.;
4312 curl_shape(2,1) = -y;
4313 curl_shape(2,2) = z - 1.;
4315 curl_shape(4,0) = 0;
4316 curl_shape(4,1) = 1. - y;
4317 curl_shape(4,2) = z;
4319 curl_shape(6,0) = 0.;
4320 curl_shape(6,1) = y;
4321 curl_shape(6,2) = -z;
4323 curl_shape(1,0) = x;
4324 curl_shape(1,1) = 0.;
4325 curl_shape(1,2) = 1. - z;
4327 curl_shape(3,0) = 1. - x;
4328 curl_shape(3,1) = 0.;
4329 curl_shape(3,2) = z - 1.;
4331 curl_shape(5,0) = -x;
4332 curl_shape(5,1) = 0.;
4333 curl_shape(5,2) = z;
4335 curl_shape(7,0) = x - 1.;
4336 curl_shape(7,1) = 0.;
4337 curl_shape(7,2) = -z;
4339 curl_shape(8,0) = x - 1.;
4340 curl_shape(8,1) = 1. - y;
4341 curl_shape(8,2) = 0.;
4343 curl_shape(9,0) = -x;
4344 curl_shape(9,1) = y - 1.;
4345 curl_shape(9,2) = 0;
4347 curl_shape(10,0) = x;
4348 curl_shape(10,1) = -y;
4349 curl_shape(10,2) = 0.;
4351 curl_shape(11,0) = 1. - x;
4352 curl_shape(11,1) = y;
4353 curl_shape(11,2) = 0.;
4356const real_t Nedelec1HexFiniteElement::tk[12][3] =
4358 {1,0,0}, {0,1,0}, {1,0,0}, {0,1,0},
4359 {1,0,0}, {0,1,0}, {1,0,0}, {0,1,0},
4360 {0,0,1}, {0,0,1}, {0,0,1}, {0,0,1}
4367#ifdef MFEM_THREAD_SAFE
4372 for (k = 0; k <
dof; k++)
4375 for (j = 0; j <
dof; j++)
4379 if (j == k) { d -= 1.0; }
4380 if (fabs(d) > 1.0e-12)
4382 mfem::err <<
"Nedelec1HexFiniteElement::GetLocalInterpolation (...)\n"
4383 " k = " << k <<
", j = " << j <<
", d = " << d << endl;
4391 ip.
x = ip.
y = ip.
z = 0.0;
4398 for (k = 0; k <
dof; k++)
4401 ip.
x = vk[0]; ip.
y = vk[1]; ip.
z = vk[2];
4404 vk[0] = J(0,0)*tk[k][0]+J(0,1)*tk[k][1]+J(0,2)*tk[k][2];
4405 vk[1] = J(1,0)*tk[k][0]+J(1,1)*tk[k][1]+J(1,2)*tk[k][2];
4406 vk[2] = J(2,0)*tk[k][0]+J(2,1)*tk[k][1]+J(2,2)*tk[k][2];
4407 for (j = 0; j <
dof; j++)
4408 if (fabs (I(k,j) = (
vshape(j,0)*vk[0]+
vshape(j,1)*vk[1]+
4409 vshape(j,2)*vk[2])) < 1.0e-12)
4423 for (
int k = 0; k <
dof; k++)
4431 vk[0] * ( J(0,0)*tk[k][0]+J(0,1)*tk[k][1]+J(0,2)*tk[k][2] ) +
4432 vk[1] * ( J(1,0)*tk[k][0]+J(1,1)*tk[k][1]+J(1,2)*tk[k][2] ) +
4433 vk[2] * ( J(2,0)*tk[k][0]+J(2,1)*tk[k][1]+J(2,2)*tk[k][2] );
4445 for (
int k = 0; k <
dof; k++)
4448 dshape.
Mult(tk[k], grad_k);
4449 for (
int j = 0; j < grad_k.
Size(); j++)
4451 grad(k,j) = (fabs(grad_k(j)) < 1e-12) ? 0.0 : grad_k(j);
4491 shape(0,0) = 1. - y - z;
4496 shape(1,1) = 1. - x - z;
4501 shape(2,2) = 1. - x - y;
4520 curl_shape(0,0) = 0.;
4521 curl_shape(0,1) = -2.;
4522 curl_shape(0,2) = 2.;
4524 curl_shape(1,0) = 2.;
4525 curl_shape(1,1) = 0.;
4526 curl_shape(1,2) = -2.;
4528 curl_shape(2,0) = -2.;
4529 curl_shape(2,1) = 2.;
4530 curl_shape(2,2) = 0.;
4532 curl_shape(3,0) = 0.;
4533 curl_shape(3,1) = 0.;
4534 curl_shape(3,2) = 2.;
4536 curl_shape(4,0) = 0.;
4537 curl_shape(4,1) = -2.;
4538 curl_shape(4,2) = 0.;
4540 curl_shape(5,0) = 2.;
4541 curl_shape(5,1) = 0.;
4542 curl_shape(5,2) = 0.;
4545const real_t Nedelec1TetFiniteElement::tk[6][3] =
4546{{1,0,0}, {0,1,0}, {0,0,1}, {-1,1,0}, {-1,0,1}, {0,-1,1}};
4552#ifdef MFEM_THREAD_SAFE
4557 for (k = 0; k <
dof; k++)
4560 for (j = 0; j <
dof; j++)
4564 if (j == k) { d -= 1.0; }
4565 if (fabs(d) > 1.0e-12)
4567 mfem::err <<
"Nedelec1TetFiniteElement::GetLocalInterpolation (...)\n"
4568 " k = " << k <<
", j = " << j <<
", d = " << d << endl;
4576 ip.
x = ip.
y = ip.
z = 0.0;
4583 for (k = 0; k <
dof; k++)
4586 ip.
x = vk[0]; ip.
y = vk[1]; ip.
z = vk[2];
4589 vk[0] = J(0,0)*tk[k][0]+J(0,1)*tk[k][1]+J(0,2)*tk[k][2];
4590 vk[1] = J(1,0)*tk[k][0]+J(1,1)*tk[k][1]+J(1,2)*tk[k][2];
4591 vk[2] = J(2,0)*tk[k][0]+J(2,1)*tk[k][1]+J(2,2)*tk[k][2];
4592 for (j = 0; j <
dof; j++)
4593 if (fabs (I(k,j) = (
vshape(j,0)*vk[0]+
vshape(j,1)*vk[1]+
4594 vshape(j,2)*vk[2])) < 1.0e-12)
4608 for (
int k = 0; k <
dof; k++)
4616 vk[0] * ( J(0,0)*tk[k][0]+J(0,1)*tk[k][1]+J(0,2)*tk[k][2] ) +
4617 vk[1] * ( J(1,0)*tk[k][0]+J(1,1)*tk[k][1]+J(1,2)*tk[k][2] ) +
4618 vk[2] * ( J(2,0)*tk[k][0]+J(2,1)*tk[k][1]+J(2,2)*tk[k][2] );
4630 for (
int k = 0; k <
dof; k++)
4633 dshape.
Mult(tk[k], grad_k);
4634 for (
int j = 0; j < grad_k.
Size(); j++)
4636 grad(k,j) = (fabs(grad_k(j)) < 1e-12) ? 0.0 : grad_k(j);
4688 shape(0,0) = (1. - y) * (1. - z);
4689 shape(0,1) = x * (1. - z);
4692 shape(1,0) = - y * (1. - z);
4693 shape(1,1) = x * (1. - z);
4696 shape(2,0) = - y * (1. - z);
4697 shape(2,1) = - (1. - x) * (1. - z);
4700 shape(3,0) = (1. - y) * z;
4704 shape(4,0) = - y * z;
4708 shape(5,0) = - y * z;
4709 shape(5,1) = - (1. - x) * z;
4714 shape(6,2) = 1. - x - y;
4729 real_t x = ip.
x, y = ip.
y, z2 = 2. * ip.
z;
4731 curl_shape(0,0) = x;
4732 curl_shape(0,1) = - 1. + y;
4733 curl_shape(0,2) = 2. - z2;
4735 curl_shape(1,0) = x;
4736 curl_shape(1,1) = y;
4737 curl_shape(1,2) = 2. - z2;
4739 curl_shape(2,0) = - 1. + x;
4740 curl_shape(2,1) = y;
4741 curl_shape(2,2) = 2. - z2;
4743 curl_shape(3,0) = - x;
4744 curl_shape(3,1) = 1. - y;
4745 curl_shape(3,2) = z2;
4747 curl_shape(4,0) = - x;
4748 curl_shape(4,1) = - y;
4749 curl_shape(4,2) = z2;
4751 curl_shape(5,0) = 1. - x;
4752 curl_shape(5,1) = - y;
4753 curl_shape(5,2) = z2;
4755 curl_shape(6,0) = - 1.;
4756 curl_shape(6,1) = 1.;
4757 curl_shape(6,2) = 0.;
4759 curl_shape(7,0) = 0.;
4760 curl_shape(7,1) = - 1.;
4761 curl_shape(7,2) = 0.;
4763 curl_shape(8,0) = 1.;
4764 curl_shape(8,1) = 0.;
4765 curl_shape(8,2) = 0.;
4768const real_t Nedelec1WdgFiniteElement::tk[9][3] =
4770 {1,0,0}, {-1,1,0}, {0,-1,0}, {1,0,0}, {-1,1,0}, {0,-1,0},
4771 {0,0,1}, {0,0,1}, {0,0,1}
4778#ifdef MFEM_THREAD_SAFE
4783 for (k = 0; k <
dof; k++)
4786 for (j = 0; j <
dof; j++)
4790 if (j == k) { d -= 1.0; }
4791 if (fabs(d) > 1.0e-12)
4793 mfem::err <<
"Nedelec1WdgFiniteElement::GetLocalInterpolation (...)\n"
4794 " k = " << k <<
", j = " << j <<
", d = " << d << endl;
4802 ip.
x = ip.
y = ip.
z = 0.0;
4809 for (k = 0; k <
dof; k++)
4812 ip.
x = vk[0]; ip.
y = vk[1]; ip.
z = vk[2];
4815 vk[0] = J(0,0)*tk[k][0]+J(0,1)*tk[k][1]+J(0,2)*tk[k][2];
4816 vk[1] = J(1,0)*tk[k][0]+J(1,1)*tk[k][1]+J(1,2)*tk[k][2];
4817 vk[2] = J(2,0)*tk[k][0]+J(2,1)*tk[k][1]+J(2,2)*tk[k][2];
4818 for (j = 0; j <
dof; j++)
4819 if (fabs (I(k,j) = (
vshape(j,0)*vk[0]+
vshape(j,1)*vk[1]+
4820 vshape(j,2)*vk[2])) < 1.0e-12)
4834 for (
int k = 0; k <
dof; k++)
4842 vk[0] * ( J(0,0)*tk[k][0]+J(0,1)*tk[k][1]+J(0,2)*tk[k][2] ) +
4843 vk[1] * ( J(1,0)*tk[k][0]+J(1,1)*tk[k][1]+J(1,2)*tk[k][2] ) +
4844 vk[2] * ( J(2,0)*tk[k][0]+J(2,1)*tk[k][1]+J(2,2)*tk[k][2] );
4856 for (
int k = 0; k <
dof; k++)
4859 dshape.
Mult(tk[k], grad_k);
4860 for (
int j = 0; j < grad_k.
Size(); j++)
4862 grad(k,j) = (fabs(grad_k(j)) < 1e-12) ? 0.0 : grad_k(j);
4908 real_t x = ip.
x, y = ip.
y, z = ip.
z, z2 = 2. * ip.
z;
4909 real_t ox = 1. - x - z, oy = 1. - y - z, oz = 1. - z;
4948 shape(6,2) = - 0.25;
4961 shape(0,2) = x * oy * ozi;
4965 shape(1,2) = x * y * ozi;
4969 shape(2,2) = x * y * ozi;
4973 shape(3,2) = ox * y * ozi;
4975 shape(4,0) = oy * z * ozi;
4976 shape(4,1) = ox * z * ozi;
4977 shape(4,2) = 1. - x - y + x * y * (1. - z2) * ozi * ozi;
4979 shape(5,0) = - oy * z * ozi;
4980 shape(5,1) = x * z * ozi;
4981 shape(5,2) = x * (1. - y * (1. - z2) * ozi * ozi);
4983 shape(6,0) = - y * z * ozi;
4984 shape(6,1) = - x * z * ozi;
4985 shape(6,2) = x * y * (1. - z2) * ozi * ozi;
4987 shape(7,0) = y * z * ozi;
4988 shape(7,1) = - ox * z * ozi;
4989 shape(7,2) = y * (1. - x * (1. - z2) * ozi * ozi);
4996 real_t x = ip.
x, y = ip.
y, z = ip.
z, z2 = 2. * z;
4997 real_t ox = 1. - x - z, oy = 1. - y - z, oz = 1. - z;
5007 curl_shape(0,0) = - 0.5;
5008 curl_shape(0,1) = - 1.5;
5009 curl_shape(0,2) = 1.;
5011 curl_shape(1,0) = 0.5;
5012 curl_shape(1,1) = - 0.5;
5013 curl_shape(1,2) = 1.;
5015 curl_shape(2,0) = 0.5;
5016 curl_shape(2,1) = - 0.5;
5017 curl_shape(2,2) = - 1.;
5019 curl_shape(3,0) = 1.5;
5020 curl_shape(3,1) = 0.5;
5021 curl_shape(3,2) = - 1.;
5023 curl_shape(4,0) = - 1.;
5024 curl_shape(4,1) = 1.;
5025 curl_shape(4,2) = 0.;
5027 curl_shape(5,0) = - 1.;
5028 curl_shape(5,1) = - 1.;
5029 curl_shape(5,2) = 0.;
5031 curl_shape(6,0) = 1.;
5032 curl_shape(6,1) = - 1.;
5033 curl_shape(6,2) = 0.;
5035 curl_shape(7,0) = 1.;
5036 curl_shape(7,1) = 1.;
5037 curl_shape(7,2) = 0.;
5044 curl_shape(0,0) = - x * ozi;
5045 curl_shape(0,1) = - 2. + y * ozi;
5046 curl_shape(0,2) = 1.;
5048 curl_shape(1,0) = x * ozi;
5049 curl_shape(1,1) = - y * ozi;
5050 curl_shape(1,2) = 1.;
5052 curl_shape(2,0) = x * ozi;
5053 curl_shape(2,1) = - y * ozi;
5054 curl_shape(2,2) = - 1.;
5056 curl_shape(3,0) = (2. - x - z2) * ozi;
5057 curl_shape(3,1) = y * ozi;
5058 curl_shape(3,2) = - 1.;
5060 curl_shape(4,0) = - 2. * ox * ozi;
5061 curl_shape(4,1) = 2. * oy * ozi;
5062 curl_shape(4,2) = 0.;
5064 curl_shape(5,0) = - 2. * x * ozi;
5065 curl_shape(5,1) = - 2. * oy * ozi;
5066 curl_shape(5,2) = 0.;
5068 curl_shape(6,0) = 2. * x * ozi;
5069 curl_shape(6,1) = - 2. * y * ozi;
5070 curl_shape(6,2) = 0.;
5072 curl_shape(7,0) = 2. * ox * ozi;
5073 curl_shape(7,1) = 2. * y * ozi;
5074 curl_shape(7,2) = 0.;
5077const real_t Nedelec1PyrFiniteElement::tk[8][3] =
5078{{1,0,0}, {0,1,0}, {1,0,0}, {0,1,0}, {0,0,1}, {-1,0,1}, {-1,-1,1}, {0,-1,1}};
5084#ifdef MFEM_THREAD_SAFE
5089 for (k = 0; k <
dof; k++)
5092 for (j = 0; j <
dof; j++)
5096 if (j == k) { d -= 1.0; }
5097 if (fabs(d) > 1.0e-12)
5099 mfem::err <<
"Nedelec1PyrFiniteElement::GetLocalInterpolation (...)\n"
5100 " k = " << k <<
", j = " << j <<
", d = " << d << endl;
5108 ip.
x = ip.
y = ip.
z = 0.0;
5115 for (k = 0; k <
dof; k++)
5118 ip.
x = vk[0]; ip.
y = vk[1]; ip.
z = vk[2];
5121 vk[0] = J(0,0)*tk[k][0]+J(0,1)*tk[k][1]+J(0,2)*tk[k][2];
5122 vk[1] = J(1,0)*tk[k][0]+J(1,1)*tk[k][1]+J(1,2)*tk[k][2];
5123 vk[2] = J(2,0)*tk[k][0]+J(2,1)*tk[k][1]+J(2,2)*tk[k][2];
5124 for (j = 0; j <
dof; j++)
5125 if (fabs (I(k,j) = (
vshape(j,0)*vk[0]+
vshape(j,1)*vk[1]+
5126 vshape(j,2)*vk[2])) < 1.0e-12)
5140 for (
int k = 0; k <
dof; k++)
5148 vk[0] * ( J(0,0)*tk[k][0]+J(0,1)*tk[k][1]+J(0,2)*tk[k][2] ) +
5149 vk[1] * ( J(1,0)*tk[k][0]+J(1,1)*tk[k][1]+J(1,2)*tk[k][2] ) +
5150 vk[2] * ( J(2,0)*tk[k][0]+J(2,1)*tk[k][1]+J(2,2)*tk[k][2] );
5162 for (
int k = 0; k <
dof; k++)
5165 dshape.
Mult(tk[k], grad_k);
5166 for (
int j = 0; j < grad_k.
Size(); j++)
5168 grad(k,j) = (fabs(grad_k(j)) < 1e-12) ? 0.0 : grad_k(j);
5178 const real_t fop = 1. / 3.;
5229 for (
int i=0; i<n; i++)
5232 for (
int j=0; j<n; j++)
5234 I(j,i) = vecs(j,0)*tk[i][0]+vecs(j,1)*tk[i][1]+vecs(j,2)*tk[i][2];
5246 const real_t x = ip.
x, y = ip.
y, z = ip.
z;
5247 const real_t ox = one - x - z, oy = one - y - z, oz = one - z;
5248 const real_t sq3 = sqrt(3.0);
5291 const real_t ozi = one / oz;
5293 const real_t me0120[3] = {oy, 0., x * oy * ozi};
5294 const real_t me1120[3] = {(x - ox) * oy, 0., (x - ox) * x * oy * ozi};
5296 const real_t me0121[3] = {y, 0., x * y * ozi};
5297 const real_t me1121[3] = {(x - ox) * y, 0., (x - ox) * x * y * ozi};
5299 const real_t me0210[3] = {0., ox, ox * y * ozi};
5300 const real_t me1210[3] = {0., ox * (y - oy), ox * y * (y - oy) * ozi};
5302 const real_t me0211[3] = {0., x, x * y * ozi};
5303 const real_t me1211[3] = {0., x * (y - oy), x * y * (y - oy) * ozi};
5305 const real_t te01[3] = {oy * z * ozi, ox * z * ozi,
5306 (ox * oy + (x * oy + ox * y) * z) * ozi * ozi
5308 const real_t te11[3] = {oy * z * (z * oz - ox * oy) * ozi * ozi,
5309 ox * z * (z * oz - ox * oy) * ozi * ozi,
5310 (ox * oy + z * (x * oy + ox * y)) *
5311 (z * oz - ox * oy) * ozi * ozi * ozi
5314 const real_t te02[3] = {-oy * z * ozi, x * z * ozi,
5315 x * (y * z + oy * oz) * ozi * ozi
5317 const real_t te12[3] = {oy * z * (x * oy - z * oz) * ozi * ozi,
5318 -x * z * (x * oy - z * oz) * ozi * ozi,
5319 -x * (y * z + oy * oz) * (x * oy - z * oz)
5323 const real_t te03[3] = {-y * z * ozi, -x * z * ozi,
5324 x * y * (one - 2_r * z) * ozi * ozi
5326 const real_t te13[3] = {y * z * (x * y - z * oz) * ozi * ozi,
5327 x * z * (x * y - z * oz) * ozi * ozi,
5328 -x * y * (one - 2_r * z) * (x * y - z * oz)
5332 const real_t te04[3] = {y * z * ozi, -ox * z * ozi,
5333 y * (x * z + ox * oz) * ozi * ozi
5335 const real_t te14[3] = {-y * z * (ox * y - z * oz) * ozi * ozi,
5336 ox * z * (ox * y - z * oz) * ozi * ozi,
5337 -y * (x * z + ox * oz) * (ox * y - z * oz)
5341 const real_t qI02[3] = {-y * oy * ozi, 0., -x * y * oy * ozi * ozi};
5342 const real_t qI12[3] = {-(x - ox) * y * oy * ozi * ozi, 0.,
5343 -(x - ox) * x * y * oy * ozi * ozi * ozi
5346 const real_t qII02[3] = {0., -x * ox * ozi, -x * y * ox * ozi * ozi};
5347 const real_t qII12[3] = {0., -x * ox * (y - oy) * ozi * ozi,
5348 -x * ox * y * (y - oy) * ozi * ozi * ozi
5351 const real_t tI120[3] = {oy * z, 0., x * oy * z * ozi};
5352 const real_t tI121[3] = {y * z, 0., x * y * z * ozi};
5353 const real_t tI210[3] = {0., ox * z, ox * y * z * ozi};
5354 const real_t tI211[3] = {0., x * z, x * y * z * ozi};
5356 const real_t tII120[3] = {-ox * oy * z * ozi, 0., x * ox * oy * ozi};
5357 const real_t tII121[3] = {-ox * y * z * ozi, 0., x * ox * y * ozi};
5358 const real_t tII210[3] = {0., -ox * oy * z * ozi, ox * y * oy * ozi};
5359 const real_t tII211[3] = {0., -x * oy * z * ozi, x * y * oy * ozi};
5362 for (
int d=0; d<3; d++)
5364 shape(0,d) = 0.5 * me0120[d] + qI02[d]
5365 - sq3 * (0.5 * me1120[d] + qI12[d]) - 1.5 * tI120[d];
5367 for (
int d=0; d<3; d++)
5369 shape(1,d) = 0.5 * me0120[d] + qI02[d]
5370 + sq3 * (0.5 * me1120[d] + qI12[d]) - 1.5 * tI120[d];
5374 for (
int d=0; d<3; d++)
5376 shape(2,d) = 0.5 * me0211[d] + qII02[d]
5377 - sq3 * (0.5 * me1211[d] + qII12[d]) - 1.5 * tI211[d];
5379 for (
int d=0; d<3; d++)
5381 shape(3,d) = 0.5 * me0211[d] + qII02[d]
5382 + sq3 * (0.5 * me1211[d] + qII12[d]) - 1.5 * tI211[d];
5386 for (
int d=0; d<3; d++)
5388 shape(4,d) = 0.5 * me0121[d] + qI02[d]
5389 - sq3 * (0.5 * me1121[d] + qI12[d]) - 1.5 * tI121[d];
5391 for (
int d=0; d<3; d++)
5393 shape(5,d) = 0.5 * me0121[d] + qI02[d]
5394 + sq3 * (0.5 * me1121[d] + qI12[d]) - 1.5 * tI121[d];
5398 for (
int d=0; d<3; d++)
5400 shape(6,d) = 0.5 * me0210[d] + qII02[d]
5401 - sq3 * (0.5 * me1210[d] + qII12[d]) - 1.5 * tI210[d];
5403 for (
int d=0; d<3; d++)
5405 shape(7,d) = 0.5 * me0210[d] + qII02[d]
5406 + sq3 * (0.5 * me1210[d] + qII12[d]) - 1.5 * tI210[d];
5410 for (
int d=0; d<3; d++)
5412 shape(8,d) = 0.5 * te01[d] - sq3 * 0.5 * te11[d]
5413 - 1.5 * (tI120[d] + tII120[d] + tI210[d] + tII210[d]);
5415 for (
int d=0; d<3; d++)
5417 shape(9,d) = 0.5 * te01[d] + sq3 * 0.5 * te11[d]
5418 - 1.5 * (tI120[d] + tII120[d] + tI210[d] + tII210[d]);
5422 for (
int d=0; d<3; d++)
5424 shape(10,d) = 0.5 * te02[d] - sq3 * 0.5 * te12[d]
5425 - 1.5 * (tII120[d] + tI211[d] + tII211[d]);
5427 for (
int d=0; d<3; d++)
5429 shape(11,d) = 0.5 * te02[d] + sq3 * 0.5 * te12[d]
5430 - 1.5 * (tII120[d] + tI211[d] + tII211[d]);
5434 for (
int d=0; d<3; d++)
5436 shape(12,d) = 0.5 * te03[d] - sq3 * 0.5 * te13[d]
5437 - 1.5 * (tII211[d] + tII121[d]);
5439 for (
int d=0; d<3; d++)
5441 shape(13,d) = 0.5 * te03[d] + sq3 * 0.5 * te13[d]
5442 - 1.5 * (tII211[d] + tII121[d]);
5446 for (
int d=0; d<3; d++)
5448 shape(14,d) = 0.5 * te04[d] - sq3 * 0.5 * te14[d]
5449 - 1.5 * (tI121[d] + tII121[d] + tII210[d]);
5451 for (
int d=0; d<3; d++)
5453 shape(15,d) = 0.5 * te04[d] + sq3 * 0.5 * te14[d]
5454 - 1.5 * (tI121[d] + tII121[d] + tII210[d]);
5458 for (
int d=0; d<3; d++)
5460 shape(16,d) = -2. * qI02[d] + 2. * sq3 * qI12[d];
5462 for (
int d=0; d<3; d++)
5464 shape(17,d) = -2. * qI02[d] - 2. * sq3 * qI12[d];
5467 for (
int d=0; d<3; d++)
5469 shape(18,d) = 2. * qII02[d] - 2. * sq3 * qII12[d];
5471 for (
int d=0; d<3; d++)
5473 shape(19,d) = 2. * qII02[d] + 2. * sq3 * qII12[d];
5477 for (
int d=0; d<3; d++)
5479 shape(20,d) = 3. * tI120[d] - 3. * tII120[d];
5481 for (
int d=0; d<3; d++)
5483 shape(21,d) = 3. * tI120[d] + 6. * tII120[d];
5487 for (
int d=0; d<3; d++)
5489 shape(22,d) = 3. * tI211[d] - 3. * tII211[d];
5491 for (
int d=0; d<3; d++)
5493 shape(23,d) = 3. * tI211[d] + 6. * tII211[d];
5497 for (
int d=0; d<3; d++)
5499 shape(24,d) = -6. * tI121[d] - 3. * tII121[d];
5501 for (
int d=0; d<3; d++)
5503 shape(25,d) = 3. * tI121[d] + 6. * tII121[d];
5507 for (
int d=0; d<3; d++)
5509 shape(26,d) = -6. * tI210[d] - 3. * tII210[d];
5511 for (
int d=0; d<3; d++)
5513 shape(27,d) = 3. * tI210[d] + 6. * tII210[d];
5522 const real_t x = ip.
x, y = ip.
y, z = ip.
z, z2 = 2. * z;
5523 const real_t ox = one - x - z, oy = one - y - z, oz = one - z;
5533 curl_shape(0,0) = 0.;
5534 curl_shape(0,1) = - 2.;
5535 curl_shape(0,2) = 1.;
5537 curl_shape(1,0) = 0.;
5538 curl_shape(1,1) = 0.;
5539 curl_shape(1,2) = 1.;
5541 curl_shape(2,0) = 0.;
5542 curl_shape(2,1) = 0.;
5543 curl_shape(2,2) = - 1.;
5545 curl_shape(3,0) = 2.;
5546 curl_shape(3,1) = 0.;
5547 curl_shape(3,2) = - 1.;
5549 curl_shape(4,0) = - 2.;
5550 curl_shape(4,1) = 2.;
5551 curl_shape(4,2) = 0.;
5553 curl_shape(5,0) = 0.;
5554 curl_shape(5,1) = - 2.;
5555 curl_shape(5,2) = 0.;
5557 curl_shape(6,0) = 0.;
5558 curl_shape(6,1) = 0.;
5559 curl_shape(6,2) = 0.;
5561 curl_shape(7,0) = 2.;
5562 curl_shape(7,1) = 0.;
5563 curl_shape(7,2) = 0.;
5570 curl_shape(0,0) = - x * ozi;
5571 curl_shape(0,1) = - 2. + y * ozi;
5572 curl_shape(0,2) = 1.;
5574 curl_shape(1,0) = x * ozi;
5575 curl_shape(1,1) = - y * ozi;
5576 curl_shape(1,2) = 1.;
5578 curl_shape(2,0) = x * ozi;
5579 curl_shape(2,1) = - y * ozi;
5580 curl_shape(2,2) = - 1.;
5582 curl_shape(3,0) = (2. - x - z2) * ozi;
5583 curl_shape(3,1) = y * ozi;
5584 curl_shape(3,2) = - 1.;
5586 curl_shape(4,0) = - 2. * ox * ozi;
5587 curl_shape(4,1) = 2. * oy * ozi;
5588 curl_shape(4,2) = 0.;
5590 curl_shape(5,0) = - 2. * x * ozi;
5591 curl_shape(5,1) = - 2. * oy * ozi;
5592 curl_shape(5,2) = 0.;
5594 curl_shape(6,0) = 2. * x * ozi;
5595 curl_shape(6,1) = - 2. * y * ozi;
5596 curl_shape(6,2) = 0.;
5598 curl_shape(7,0) = 2. * ox * ozi;
5599 curl_shape(7,1) = 2. * y * ozi;
5600 curl_shape(7,2) = 0.;
5603const real_t Nedelec2PyrFiniteElement::tk[28][3] =
5605 {1,0,0}, {1,0,0}, {0,1,0}, {0,1,0},
5606 {1,0,0}, {1,0,0}, {0,1,0}, {0,1,0},
5607 {0,0,1}, {0,0,1}, {-1,0,1}, {-1,0,1},
5608 {-1,-1,1}, {-1,-1,1}, {0,-1,1}, {0,-1,1},
5609 {1,0,0}, {1,0,0}, {0,-1,0}, {0,-1,0},
5610 {1,0,0}, {0,0,1}, {0,1,0}, {-1,0,1},
5611 {-1,0,0}, {-1,-1,1}, {0,-1,0}, {0,-1,1}
5618#ifdef MFEM_THREAD_SAFE
5623 for (k = 0; k <
dof; k++)
5626 for (j = 0; j <
dof; j++)
5630 if (j == k) { d -= 1.0; }
5631 if (fabs(d) > 1.0e-12)
5633 mfem::err <<
"Nedelec1PyrFiniteElement::GetLocalInterpolation (...)\n"
5634 " k = " << k <<
", j = " << j <<
", d = " << d << endl;
5642 ip.
x = ip.
y = ip.
z = 0.0;
5649 for (k = 0; k <
dof; k++)
5652 ip.
x = vk[0]; ip.
y = vk[1]; ip.
z = vk[2];
5655 vk[0] = J(0,0)*tk[k][0]+J(0,1)*tk[k][1]+J(0,2)*tk[k][2];
5656 vk[1] = J(1,0)*tk[k][0]+J(1,1)*tk[k][1]+J(1,2)*tk[k][2];
5657 vk[2] = J(2,0)*tk[k][0]+J(2,1)*tk[k][1]+J(2,2)*tk[k][2];
5658 for (j = 0; j <
dof; j++)
5659 if (fabs (I(k,j) = (
vshape(j,0)*vk[0]+
vshape(j,1)*vk[1]+
5660 vshape(j,2)*vk[2])) < 1.0e-12)
5674 for (
int k = 0; k <
dof; k++)
5682 vk[0] * ( J(0,0)*tk[k][0]+J(0,1)*tk[k][1]+J(0,2)*tk[k][2] ) +
5683 vk[1] * ( J(1,0)*tk[k][0]+J(1,1)*tk[k][1]+J(1,2)*tk[k][2] ) +
5684 vk[2] * ( J(2,0)*tk[k][0]+J(2,1)*tk[k][1]+J(2,2)*tk[k][2] );
5696 for (
int k = 0; k <
dof; k++)
5699 dshape.
Mult(tk[k], grad_k);
5700 for (
int j = 0; j < grad_k.
Size(); j++)
5702 grad(k,j) = (fabs(grad_k(j)) < 1e-12) ? 0.0 : grad_k(j);
5745 shape(0,2) = z - 1.;
5748 shape(1,1) = y - 1.;
5759 shape(4,0) = x - 1.;
5779const real_t RT0HexFiniteElement::nk[6][3] =
5780{{0,0,-1}, {0,-1,0}, {1,0,0}, {0,1,0}, {-1,0,0}, {0,0,1}};
5786#ifdef MFEM_THREAD_SAFE
5791 for (k = 0; k < 6; k++)
5794 for (j = 0; j < 6; j++)
5798 if (j == k) { d -= 1.0; }
5799 if (fabs(d) > 1.0e-12)
5801 mfem::err <<
"RT0HexFiniteElement::GetLocalInterpolation (...)\n"
5802 " k = " << k <<
", j = " << j <<
", d = " << d << endl;
5810 ip.
x = ip.
y = ip.
z = 0.0;
5819 for (k = 0; k < 6; k++)
5822 ip.
x = vk[0]; ip.
y = vk[1]; ip.
z = vk[2];
5825 vk[0] = Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1]+Jinv(0,2)*nk[k][2];
5826 vk[1] = Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1]+Jinv(1,2)*nk[k][2];
5827 vk[2] = Jinv(2,0)*nk[k][0]+Jinv(2,1)*nk[k][1]+Jinv(2,2)*nk[k][2];
5828 for (j = 0; j < 6; j++)
5829 if (fabs (I(k,j) = (
vshape(j,0)*vk[0]+
vshape(j,1)*vk[1]+
5830 vshape(j,2)*vk[2])) < 1.0e-12)
5844 for (
int k = 0; k < 6; k++)
5853 vk[0] * ( Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1]+Jinv(0,2)*nk[k][2] ) +
5854 vk[1] * ( Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1]+Jinv(1,2)*nk[k][2] ) +
5855 vk[2] * ( Jinv(2,0)*nk[k][0]+Jinv(2,1)*nk[k][1]+Jinv(2,2)*nk[k][2] );
5989 shape(2,2) = -(1. - 3.*z + 2.*z*z)*( 2. - 3.*x)*( 2. - 3.*y);
5992 shape(3,2) = -(1. - 3.*z + 2.*z*z)*(-1. + 3.*x)*( 2. - 3.*y);
5995 shape(0,2) = -(1. - 3.*z + 2.*z*z)*( 2. - 3.*x)*(-1. + 3.*y);
5998 shape(1,2) = -(1. - 3.*z + 2.*z*z)*(-1. + 3.*x)*(-1. + 3.*y);
6001 shape(4,1) = -(1. - 3.*y + 2.*y*y)*( 2. - 3.*x)*( 2. - 3.*z);
6004 shape(5,1) = -(1. - 3.*y + 2.*y*y)*(-1. + 3.*x)*( 2. - 3.*z);
6007 shape(6,1) = -(1. - 3.*y + 2.*y*y)*( 2. - 3.*x)*(-1. + 3.*z);
6010 shape(7,1) = -(1. - 3.*y + 2.*y*y)*(-1. + 3.*x)*(-1. + 3.*z);
6013 shape(8,0) = (-x + 2.*x*x)*( 2. - 3.*y)*( 2. - 3.*z);
6016 shape(9,0) = (-x + 2.*x*x)*(-1. + 3.*y)*( 2. - 3.*z);
6019 shape(10,0) = (-x + 2.*x*x)*( 2. - 3.*y)*(-1. + 3.*z);
6022 shape(11,0) = (-x + 2.*x*x)*(-1. + 3.*y)*(-1. + 3.*z);
6027 shape(13,1) = (-y + 2.*y*y)*( 2. - 3.*x)*( 2. - 3.*z);
6030 shape(12,1) = (-y + 2.*y*y)*(-1. + 3.*x)*( 2. - 3.*z);
6033 shape(15,1) = (-y + 2.*y*y)*( 2. - 3.*x)*(-1. + 3.*z);
6036 shape(14,1) = (-y + 2.*y*y)*(-1. + 3.*x)*(-1. + 3.*z);
6039 shape(17,0) = -(1. - 3.*x + 2.*x*x)*( 2. - 3.*y)*( 2. - 3.*z);
6042 shape(16,0) = -(1. - 3.*x + 2.*x*x)*(-1. + 3.*y)*( 2. - 3.*z);
6045 shape(19,0) = -(1. - 3.*x + 2.*x*x)*( 2. - 3.*y)*(-1. + 3.*z);
6048 shape(18,0) = -(1. - 3.*x + 2.*x*x)*(-1. + 3.*y)*(-1. + 3.*z);
6054 shape(20,2) = (-z + 2.*z*z)*( 2. - 3.*x)*( 2. - 3.*y);
6057 shape(21,2) = (-z + 2.*z*z)*(-1. + 3.*x)*( 2. - 3.*y);
6060 shape(22,2) = (-z + 2.*z*z)*( 2. - 3.*x)*(-1. + 3.*y);
6063 shape(23,2) = (-z + 2.*z*z)*(-1. + 3.*x)*(-1. + 3.*y);
6065 shape(24,0) = (4.*x - 4.*x*x)*( 2. - 3.*y)*( 2. - 3.*z);
6068 shape(25,0) = (4.*x - 4.*x*x)*( 2. - 3.*y)*(-1. + 3.*z);
6071 shape(26,0) = (4.*x - 4.*x*x)*(-1. + 3.*y)*( 2. - 3.*z);
6074 shape(27,0) = (4.*x - 4.*x*x)*(-1. + 3.*y)*(-1. + 3.*z);
6079 shape(28,1) = (4.*y - 4.*y*y)*( 2. - 3.*x)*( 2. - 3.*z);
6082 shape(29,1) = (4.*y - 4.*y*y)*( 2. - 3.*x)*(-1. + 3.*z);
6085 shape(30,1) = (4.*y - 4.*y*y)*(-1. + 3.*x)*( 2. - 3.*z);
6088 shape(31,1) = (4.*y - 4.*y*y)*(-1. + 3.*x)*(-1. + 3.*z);
6093 shape(32,2) = (4.*z - 4.*z*z)*( 2. - 3.*x)*( 2. - 3.*y);
6096 shape(33,2) = (4.*z - 4.*z*z)*( 2. - 3.*x)*(-1. + 3.*y);
6099 shape(34,2) = (4.*z - 4.*z*z)*(-1. + 3.*x)*( 2. - 3.*y);
6102 shape(35,2) = (4.*z - 4.*z*z)*(-1. + 3.*x)*(-1. + 3.*y);
6110 divshape(2) = -(-3. + 4.*z)*( 2. - 3.*x)*( 2. - 3.*y);
6111 divshape(3) = -(-3. + 4.*z)*(-1. + 3.*x)*( 2. - 3.*y);
6112 divshape(0) = -(-3. + 4.*z)*( 2. - 3.*x)*(-1. + 3.*y);
6113 divshape(1) = -(-3. + 4.*z)*(-1. + 3.*x)*(-1. + 3.*y);
6115 divshape(4) = -(-3. + 4.*y)*( 2. - 3.*x)*( 2. - 3.*z);
6116 divshape(5) = -(-3. + 4.*y)*(-1. + 3.*x)*( 2. - 3.*z);
6117 divshape(6) = -(-3. + 4.*y)*( 2. - 3.*x)*(-1. + 3.*z);
6118 divshape(7) = -(-3. + 4.*y)*(-1. + 3.*x)*(-1. + 3.*z);
6120 divshape(8) = (-1. + 4.*x)*( 2. - 3.*y)*( 2. - 3.*z);
6121 divshape(9) = (-1. + 4.*x)*(-1. + 3.*y)*( 2. - 3.*z);
6122 divshape(10) = (-1. + 4.*x)*( 2. - 3.*y)*(-1. + 3.*z);
6123 divshape(11) = (-1. + 4.*x)*(-1. + 3.*y)*(-1. + 3.*z);
6125 divshape(13) = (-1. + 4.*y)*( 2. - 3.*x)*( 2. - 3.*z);
6126 divshape(12) = (-1. + 4.*y)*(-1. + 3.*x)*( 2. - 3.*z);
6127 divshape(15) = (-1. + 4.*y)*( 2. - 3.*x)*(-1. + 3.*z);
6128 divshape(14) = (-1. + 4.*y)*(-1. + 3.*x)*(-1. + 3.*z);
6130 divshape(17) = -(-3. + 4.*x)*( 2. - 3.*y)*( 2. - 3.*z);
6131 divshape(16) = -(-3. + 4.*x)*(-1. + 3.*y)*( 2. - 3.*z);
6132 divshape(19) = -(-3. + 4.*x)*( 2. - 3.*y)*(-1. + 3.*z);
6133 divshape(18) = -(-3. + 4.*x)*(-1. + 3.*y)*(-1. + 3.*z);
6135 divshape(20) = (-1. + 4.*z)*( 2. - 3.*x)*( 2. - 3.*y);
6136 divshape(21) = (-1. + 4.*z)*(-1. + 3.*x)*( 2. - 3.*y);
6137 divshape(22) = (-1. + 4.*z)*( 2. - 3.*x)*(-1. + 3.*y);
6138 divshape(23) = (-1. + 4.*z)*(-1. + 3.*x)*(-1. + 3.*y);
6140 divshape(24) = ( 4. - 8.*x)*( 2. - 3.*y)*( 2. - 3.*z);
6141 divshape(25) = ( 4. - 8.*x)*( 2. - 3.*y)*(-1. + 3.*z);
6142 divshape(26) = ( 4. - 8.*x)*(-1. + 3.*y)*( 2. - 3.*z);
6143 divshape(27) = ( 4. - 8.*x)*(-1. + 3.*y)*(-1. + 3.*z);
6145 divshape(28) = ( 4. - 8.*y)*( 2. - 3.*x)*( 2. - 3.*z);
6146 divshape(29) = ( 4. - 8.*y)*( 2. - 3.*x)*(-1. + 3.*z);
6147 divshape(30) = ( 4. - 8.*y)*(-1. + 3.*x)*( 2. - 3.*z);
6148 divshape(31) = ( 4. - 8.*y)*(-1. + 3.*x)*(-1. + 3.*z);
6150 divshape(32) = ( 4. - 8.*z)*( 2. - 3.*x)*( 2. - 3.*y);
6151 divshape(33) = ( 4. - 8.*z)*( 2. - 3.*x)*(-1. + 3.*y);
6152 divshape(34) = ( 4. - 8.*z)*(-1. + 3.*x)*( 2. - 3.*y);
6153 divshape(35) = ( 4. - 8.*z)*(-1. + 3.*x)*(-1. + 3.*y);
6156const real_t RT1HexFiniteElement::nk[36][3] =
6158 {0, 0,-1}, {0, 0,-1}, {0, 0,-1}, {0, 0,-1},
6159 {0,-1, 0}, {0,-1, 0}, {0,-1, 0}, {0,-1, 0},
6160 {1, 0, 0}, {1, 0, 0}, {1, 0, 0}, {1, 0, 0},
6161 {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
6162 {-1,0, 0}, {-1,0, 0}, {-1,0, 0}, {-1,0, 0},
6163 {0, 0, 1}, {0, 0, 1}, {0, 0, 1}, {0, 0, 1},
6164 {1, 0, 0}, {1, 0, 0}, {1, 0, 0}, {1, 0, 0},
6165 {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
6166 {0, 0, 1}, {0, 0, 1}, {0, 0, 1}, {0, 0, 1}
6173#ifdef MFEM_THREAD_SAFE
6178 for (k = 0; k < 36; k++)
6181 for (j = 0; j < 36; j++)
6185 if (j == k) { d -= 1.0; }
6186 if (fabs(d) > 1.0e-12)
6188 mfem::err <<
"RT0HexFiniteElement::GetLocalInterpolation (...)\n"
6189 " k = " << k <<
", j = " << j <<
", d = " << d << endl;
6197 ip.
x = ip.
y = ip.
z = 0.0;
6206 for (k = 0; k < 36; k++)
6209 ip.
x = vk[0]; ip.
y = vk[1]; ip.
z = vk[2];
6212 vk[0] = Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1]+Jinv(0,2)*nk[k][2];
6213 vk[1] = Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1]+Jinv(1,2)*nk[k][2];
6214 vk[2] = Jinv(2,0)*nk[k][0]+Jinv(2,1)*nk[k][1]+Jinv(2,2)*nk[k][2];
6215 for (j = 0; j < 36; j++)
6216 if (fabs (I(k,j) = (
vshape(j,0)*vk[0]+
vshape(j,1)*vk[1]+
6217 vshape(j,2)*vk[2])) < 1.0e-12)
6231 for (
int k = 0; k < 36; k++)
6240 vk[0] * ( Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1]+Jinv(0,2)*nk[k][2] ) +
6241 vk[1] * ( Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1]+Jinv(1,2)*nk[k][2] ) +
6242 vk[2] * ( Jinv(2,0)*nk[k][0]+Jinv(2,1)*nk[k][1]+Jinv(2,2)*nk[k][2] );
6270 real_t x2 = 2.0*ip.
x, y2 = 2.0*ip.
y, z2 = 2.0*ip.
z;
6276 shape(1,0) = x2 - 2.0;
6281 shape(2,1) = y2 - 2.0;
6286 shape(3,2) = z2 - 2.0;
6298const real_t RT0TetFiniteElement::nk[4][3] =
6299{{.5,.5,.5}, {-.5,0,0}, {0,-.5,0}, {0,0,-.5}};
6305#ifdef MFEM_THREAD_SAFE
6310 for (k = 0; k < 4; k++)
6313 for (j = 0; j < 4; j++)
6317 if (j == k) { d -= 1.0; }
6318 if (fabs(d) > 1.0e-12)
6320 mfem::err <<
"RT0TetFiniteElement::GetLocalInterpolation (...)\n"
6321 " k = " << k <<
", j = " << j <<
", d = " << d << endl;
6329 ip.
x = ip.
y = ip.
z = 0.0;
6338 for (k = 0; k < 4; k++)
6341 ip.
x = vk[0]; ip.
y = vk[1]; ip.
z = vk[2];
6344 vk[0] = Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1]+Jinv(0,2)*nk[k][2];
6345 vk[1] = Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1]+Jinv(1,2)*nk[k][2];
6346 vk[2] = Jinv(2,0)*nk[k][0]+Jinv(2,1)*nk[k][1]+Jinv(2,2)*nk[k][2];
6347 for (j = 0; j < 4; j++)
6348 if (fabs (I(k,j) = (
vshape(j,0)*vk[0]+
vshape(j,1)*vk[1]+
6349 vshape(j,2)*vk[2])) < 1.0e-12)
6363 for (
int k = 0; k < 4; k++)
6372 vk[0] * ( Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1]+Jinv(0,2)*nk[k][2] ) +
6373 vk[1] * ( Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1]+Jinv(1,2)*nk[k][2] ) +
6374 vk[2] * ( Jinv(2,0)*nk[k][0]+Jinv(2,1)*nk[k][1]+Jinv(2,2)*nk[k][2] );
6406 real_t x = ip.
x, y = ip.
y, z2 = 2.0*ip.
z;
6410 shape(0,2) = z2 - 2.0;
6417 shape(2,1) = y - 1.0;
6424 shape(4,0) = x - 1.0;
6439const real_t RT0WdgFiniteElement::nk[5][3] =
6440{{0.,0.,-.5}, {0.,0.,.5}, {0,-1.,0}, {1.,1.,0}, {-1.,0,0}};
6446#ifdef MFEM_THREAD_SAFE
6451 for (k = 0; k <
dof; k++)
6454 for (j = 0; j <
dof; j++)
6458 if (j == k) { d -= 1.0; }
6459 if (fabs(d) > 1.0e-12)
6461 mfem::err <<
"RT0WdgFiniteElement::GetLocalInterpolation (...)\n"
6462 " k = " << k <<
", j = " << j <<
", d = " << d << endl;
6470 ip.
x = ip.
y = ip.
z = 0.0;
6479 for (k = 0; k <
dof; k++)
6482 ip.
x = vk[0]; ip.
y = vk[1]; ip.
z = vk[2];
6485 vk[0] = Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1]+Jinv(0,2)*nk[k][2];
6486 vk[1] = Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1]+Jinv(1,2)*nk[k][2];
6487 vk[2] = Jinv(2,0)*nk[k][0]+Jinv(2,1)*nk[k][1]+Jinv(2,2)*nk[k][2];
6488 for (j = 0; j <
dof; j++)
6489 if (fabs (I(k,j) = (
vshape(j,0)*vk[0]+
vshape(j,1)*vk[1]+
6490 vshape(j,2)*vk[2])) < 1.0e-12)
6504 for (
int k = 0; k < 5; k++)
6513 vk[0] * ( Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1]+Jinv(0,2)*nk[k][2] ) +
6514 vk[1] * ( Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1]+Jinv(1,2)*nk[k][2] ) +
6515 vk[2] * ( Jinv(2,0)*nk[k][0]+Jinv(2,1)*nk[k][1]+Jinv(2,2)*nk[k][2] );
6527 for (
int k = 0; k <
dof; k++)
6530 curl_shape.
Mult(nk[k], curl_k);
6531 for (
int j = 0; j < curl_k.
Size(); j++)
6533 curl(k,j) = (fabs(curl_k(j)) < 1e-12) ? 0.0 : curl_k(j);
6567 real_t x = ip.
x, y = ip.
y, z = ip.
z, oz = 1.0 - z;
6568 real_t x2 = 2.0*ip.
x, y2 = 2.0*ip.
y, z2 = 2.0*ip.
z;
6602 for (
int i=1; i<5; i++)
6603 for (
int j=0; j<3; j++)
6616 shape(0,2) = z - 1.;
6618 shape(1,0) = - x * z * ozi;
6619 shape(1,1) = (y2 + z2 - y * z - 2.0) * ozi;
6622 shape(2,0) = x * (2.0 - z) * ozi;
6623 shape(2,1) = - y * z * ozi;
6626 shape(3,0) = - x * z * ozi;
6627 shape(3,1) = y * (2.0 - z) * ozi;
6630 shape(4,0) = (x2 + z2 - x * z - 2.0) * ozi;
6631 shape(4,1) = - y * z * ozi;
6636 for (
int i=1; i<5; i++)
6637 for (
int j=0; j<3; j++)
6655 for (
int i=1; i<5; i++)
6662const real_t RT0PyrFiniteElement::nk[5][3] =
6663{{0.,0.,-1}, {0,-1,0}, {1,0,1}, {0,1,1}, {-1,0,0}};
6669#ifdef MFEM_THREAD_SAFE
6674 for (k = 0; k <
dof; k++)
6677 for (j = 0; j <
dof; j++)
6681 if (j == k) { d -= 1.0; }
6682 if (fabs(d) > 1.0e-12)
6684 mfem::err <<
"RT0PyrFiniteElement::GetLocalInterpolation (...)\n"
6685 " k = " << k <<
", j = " << j <<
", d = " << d << endl;
6693 ip.
x = ip.
y = ip.
z = 0.0;
6702 for (k = 0; k <
dof; k++)
6705 ip.
x = vk[0]; ip.
y = vk[1]; ip.
z = vk[2];
6708 vk[0] = Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1]+Jinv(0,2)*nk[k][2];
6709 vk[1] = Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1]+Jinv(1,2)*nk[k][2];
6710 vk[2] = Jinv(2,0)*nk[k][0]+Jinv(2,1)*nk[k][1]+Jinv(2,2)*nk[k][2];
6711 for (j = 0; j <
dof; j++)
6712 if (fabs (I(k,j) = (
vshape(j,0)*vk[0]+
vshape(j,1)*vk[1]+
6713 vshape(j,2)*vk[2])) < 1.0e-12)
6727 for (
int k = 0; k <
dof; k++)
6736 vk[0] * ( Jinv(0,0)*nk[k][0]+Jinv(0,1)*nk[k][1]+Jinv(0,2)*nk[k][2] ) +
6737 vk[1] * ( Jinv(1,0)*nk[k][0]+Jinv(1,1)*nk[k][1]+Jinv(1,2)*nk[k][2] ) +
6738 vk[2] * ( Jinv(2,0)*nk[k][0]+Jinv(2,1)*nk[k][1]+Jinv(2,2)*nk[k][2] );
6739 if (!rt0 && k > 0) { dofs[k] *= 2.0; }
6751 for (
int k = 0; k <
dof; k++)
6754 curl_shape.
Mult(nk[k], curl_k);
6755 if (!rt0 && k > 0) { curl_k *= 2.0; }
6756 for (
int j = 0; j < curl_k.
Size(); j++)
6758 curl(k,j) = (fabs(curl_k(j)) < 1e-12) ? 0.0 : curl_k(j);
6797 real_t f5 = x * x - y * y;
6798 real_t f6 = y * y - z * z;
6800 shape(0) = (1./6.) * (1. - 3. * z - f5 - 2. * f6);
6801 shape(1) = (1./6.) * (1. - 3. * y - f5 + f6);
6802 shape(2) = (1./6.) * (1. + 3. * x + 2. * f5 + f6);
6803 shape(3) = (1./6.) * (1. + 3. * y - f5 + f6);
6804 shape(4) = (1./6.) * (1. - 3. * x + 2. * f5 + f6);
6805 shape(5) = (1./6.) * (1. + 3. * z - f5 - 2. * f6);
6819 dshape(0,2) = -1. - 2. * zt;
6822 dshape(1,1) = -1. - 2. * yt;
6825 dshape(2,0) = 1. - 2. * xt;
6830 dshape(3,1) = 1. - 2. * yt;
6833 dshape(4,0) = -1. - 2. * xt;
6839 dshape(5,2) = 1. - 2. * zt;
void SetSize(int nsize)
Change the logical size of the array, keep existing entries.
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
BiCubic2DFiniteElement()
Construct the BiCubic2DFiniteElement.
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void CalcHessian(const IntegrationPoint &ip, DenseMatrix &h) const override
Compute the Hessian of second order partial derivatives at ip.
void CalcHessian(const IntegrationPoint &ip, DenseMatrix &h) const override
Evaluate the Hessians of all shape functions of a scalar finite element in reference space at the giv...
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
BiLinear2DFiniteElement()
Construct the BiLinear2DFiniteElement.
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
BiQuad2DFiniteElement()
Construct the BiQuad2DFiniteElement.
void ProjectDelta(int vertex, Vector &dofs) const override
Project a delta function centered on the given vertex in the local finite dimensional space represent...
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
CrouzeixRaviartFiniteElement()
Construct the CrouzeixRaviartFiniteElement.
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
CrouzeixRaviartQuadFiniteElement()
Construct the CrouzeixRaviartQuadFiniteElement.
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Cubic1DFiniteElement()
Construct the Cubic1DFiniteElement.
Cubic2DFiniteElement()
Construct the Cubic2DFiniteElement.
void CalcHessian(const IntegrationPoint &ip, DenseMatrix &h) const override
Evaluate the Hessians of all shape functions of a scalar finite element in reference space at the giv...
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Cubic3DFiniteElement()
Construct the Cubic3DFiniteElement.
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Data type dense matrix using column-major storage.
void Mult(const real_t *x, real_t *y) const
Matrix vector multiplication.
void SetSize(int s)
Change the size of the DenseMatrix to s x s.
void Invert()
Replaces the current matrix with its inverse.
Abstract class for all finite elements.
int dof
Number of degrees of freedom.
int GetOrder() const
Returns the order of the finite element. In the case of anisotropic orders, returns the maximum order...
virtual void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const
Evaluate the curl of all shape functions of a vector finite element in reference space at the given p...
const IntegrationRule & GetNodes() const
Get a const reference to the nodes of the element.
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const =0
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
int GetDof() const
Returns the number of degrees of freedom in the finite element.
int dim
Dimension of reference space.
Describes the function space on each element.
void ProjectDelta(int vertex, Vector &dofs) const override
Project a delta function centered on the given vertex in the local finite dimensional space represent...
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
GaussBiLinear2DFiniteElement()
Construct the FiniteElement.
GaussBiQuad2DFiniteElement()
Construct the GaussBiQuad2DFiniteElement.
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void ProjectDelta(int vertex, Vector &dofs) const override
Project a delta function centered on the given vertex in the local finite dimensional space represent...
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
GaussLinear2DFiniteElement()
Construct the GaussLinear2DFiniteElement.
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
GaussQuad2DFiniteElement()
Construct the GaussQuad2DFiniteElement.
Class for integration point with weight.
void Set3(const real_t x1, const real_t x2, const real_t x3)
IntegrationPoint & IntPoint(int i)
Returns a reference to the i-th integration point.
A 1D element with uniform nodes.
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Lagrange1DFiniteElement(int degree)
Construct the Lagrange1DFiniteElement with the provided degree.
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
~LagrangeHexFiniteElement()
LagrangeHexFiniteElement(int degree)
Construct the LagrangeHexFiniteElement with the provided degree.
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Linear1DFiniteElement()
Construct the Linear1DFiniteElement.
void CalcHessian(const IntegrationPoint &ip, DenseMatrix &h) const override
Evaluate the Hessians of all shape functions of a scalar finite element in reference space at the giv...
Linear2DFiniteElement()
Construct the Linear2DFiniteElement.
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
void CalcHessian(const IntegrationPoint &ip, DenseMatrix &h) const override
Evaluate the Hessians of all shape functions of a scalar finite element in reference space at the giv...
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
virtual function which evaluates the values of all partial derivatives of all shape functions at a gi...
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
virtual function which evaluates the values of all shape functions at a given point ip and stores the...
void GetFaceDofs(int face, int **dofs, int *ndofs) const override
Get the dofs associated with the given face. *dofs is set to an internal array of the local dofc on t...
Linear3DFiniteElement()
Construct the Linear3DFiniteElement.
void CalcHessian(const IntegrationPoint &ip, DenseMatrix &h) const override
Evaluate the Hessians of all shape functions of a scalar finite element in reference space at the giv...
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
virtual function which evaluates the values of all partial derivatives of all shape functions at a gi...
LinearPyramidFiniteElement()
Construct the LinearPyramidFiniteElement.
void GetFaceDofs(int face, int **dofs, int *ndofs) const override
Get the dofs associated with the given face. *dofs is set to an internal array of the local dofc on t...
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
virtual function which evaluates the values of all shape functions at a given point ip and stores the...
void GetFaceDofs(int face, int **dofs, int *ndofs) const override
Get the dofs associated with the given face. *dofs is set to an internal array of the local dofc on t...
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
virtual function which evaluates the values of all partial derivatives of all shape functions at a gi...
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
virtual function which evaluates the values of all shape functions at a given point ip and stores the...
LinearWedgeFiniteElement()
Construct the LinearWedgeFiniteElement.
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
Nedelec1HexFiniteElement()
Construct the Nedelec1HexFiniteElement.
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const override
Evaluate the curl of all shape functions of a vector finite element in reference space at the given p...
void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const override
Compute the discrete gradient matrix from the given FiniteElement onto 'this' FiniteElement....
Nedelec1PyrFiniteElement()
Construct the Nedelec1PyrFiniteElement.
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const override
Evaluate the curl of all shape functions of a vector finite element in reference space at the given p...
void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const override
Compute the discrete gradient matrix from the given FiniteElement onto 'this' FiniteElement....
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
Nedelec1TetFiniteElement()
Construct the Nedelec1TetFiniteElement.
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const override
Evaluate the curl of all shape functions of a vector finite element in reference space at the given p...
void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const override
Compute the discrete gradient matrix from the given FiniteElement onto 'this' FiniteElement....
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const override
Compute the discrete gradient matrix from the given FiniteElement onto 'this' FiniteElement....
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const override
Evaluate the curl of all shape functions of a vector finite element in reference space at the given p...
Nedelec1WdgFiniteElement()
Construct the Nedelec1WdgFiniteElement.
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
Nedelec2PyrFiniteElement()
Construct the Nedelec2PyrFiniteElement.
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Compute the discrete gradient matrix from the given FiniteElement onto 'this' FiniteElement....
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
virtual void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const
Evaluate the curl of all shape functions of a vector finite element in reference space at the given p...
Class for standard nodal finite elements.
Array< int > lex_ordering
int Height() const
Get the height (size of output) of the Operator. Synonym with NumRows().
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
P0HexFiniteElement()
Construct the P0HexFiniteElement.
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
P0PyrFiniteElement()
Construct the P0PyrFiniteElement.
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
P0QuadFiniteElement()
Construct the P0QuadFiniteElement.
P0SegmentFiniteElement(int Ord=0)
Construct the P0SegmentFiniteElement with dummy order Ord.
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
P0TetFiniteElement()
Construct the P0TetFiniteElement.
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
evaluate derivatives of shape function - constant 0
P0TriangleFiniteElement()
Construct the P0TriangleFiniteElement.
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
evaluate shape function - constant 1
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
P0WdgFiniteElement()
Construct the P0WdgFiniteElement.
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
P1OnQuadFiniteElement()
Construct the P1OnQuadFiniteElement.
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
P1SegmentFiniteElement()
Construct the P1SegmentFiniteElement.
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
P1TetNonConfFiniteElement()
Construct the P1TetNonConfFiniteElement.
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
P2SegmentFiniteElement()
Construct the P2SegmentFiniteElement.
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
PointFiniteElement()
Construct the PointFiniteElement.
const real_t * OpenPoints(const int p, const int btype=BasisType::GaussLegendre, bool on_device=false)
Get coordinates of an open (GaussLegendre) set of points if degree p.
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Quad1DFiniteElement()
Construct the Quad1DFiniteElement.
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Quad2DFiniteElement()
Construct the Quad2DFiniteElement.
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
void ProjectDelta(int vertex, Vector &dofs) const override
Project a delta function centered on the given vertex in the local finite dimensional space represent...
void CalcHessian(const IntegrationPoint &ip, DenseMatrix &h) const override
Evaluate the Hessians of all shape functions of a scalar finite element in reference space at the giv...
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Quadratic3DFiniteElement()
Construct the Quadratic3DFiniteElement.
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
RT0HexFiniteElement()
Construct the RT0HexFiniteElement.
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const override
Compute the discrete curl matrix from the given FiniteElement onto 'this' FiniteElement....
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
RT0PyrFiniteElement(bool rt0tets=true)
Construct the RT0PyrFiniteElement.
RT0QuadFiniteElement()
Construct the RT0QuadFiniteElement.
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
RT0TetFiniteElement()
Construct the RT0TetFiniteElement.
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
RT0TriangleFiniteElement()
Construct the RT0TriangleFiniteElement.
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const override
Compute the discrete curl matrix from the given FiniteElement onto 'this' FiniteElement....
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
RT0WdgFiniteElement()
Construct the RT0WdgFiniteElement.
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
RT1HexFiniteElement()
Construct the RT1HexFiniteElement.
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
RT1QuadFiniteElement()
Construct the RT1QuadFiniteElement.
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
RT1TriangleFiniteElement()
Construct the RT1TriangleFiniteElement.
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
RT2QuadFiniteElement()
Construct the RT2QuadFiniteElement.
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
RT2TriangleFiniteElement()
Construct the RT2TriangleFiniteElement.
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
RefinedBiLinear2DFiniteElement()
Construct the RefinedBiLinear2DFiniteElement.
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
RefinedLinear1DFiniteElement()
Construct the RefinedLinear1DFiniteElement.
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
RefinedLinear2DFiniteElement()
Construct the RefinedLinear2DFiniteElement.
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
RefinedLinear3DFiniteElement()
Construct the RefinedLinear3DFiniteElement.
RefinedTriLinear3DFiniteElement()
Construct the RefinedTriLinear3DFiniteElement.
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
RotTriLinearHexFiniteElement()
Construct the RotTriLinearHexFiniteElement.
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
TriLinear3DFiniteElement()
Construct the TriLinear3DFiniteElement.
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
void CalcHessian(const IntegrationPoint &ip, DenseMatrix &h) const override
Evaluate the Hessians of all shape functions of a scalar finite element in reference space at the giv...
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Base class for vector Coefficients that optionally depend on time and space.
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)=0
Evaluate the vector coefficient in the element described by T at the point ip, storing the result in ...
Intermediate class for finite elements whose basis functions return vector values.
int Size() const
Returns the size of the vector.
void SetSize(int s)
Resize the vector to size s.
void mfem_error(const char *msg)
void Mult(const Table &A, const Table &B, Table &C)
C = A * B (as boolean matrices)
OutStream err(std::cerr)
Global stream used by the library for standard error output. Initially it uses the same std::streambu...
real_t p(const Vector &x, real_t t)