MFEM  v3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
fe.hpp
Go to the documentation of this file.
1 // Copyright (c) 2010, Lawrence Livermore National Security, LLC. Produced at
2 // the Lawrence Livermore National Laboratory. LLNL-CODE-443211. All Rights
3 // reserved. See file COPYRIGHT for details.
4 //
5 // This file is part of the MFEM library. For more information and source code
6 // availability see http://mfem.googlecode.com.
7 //
8 // MFEM is free software; you can redistribute it and/or modify it under the
9 // terms of the GNU Lesser General Public License (as published by the Free
10 // Software Foundation) version 2.1 dated February 1999.
11 
12 #ifndef MFEM_FE
13 #define MFEM_FE
14 
15 #include "../config/config.hpp"
16 #include "../general/array.hpp"
17 #include "../linalg/linalg.hpp"
18 #include "intrules.hpp"
19 #include "geom.hpp"
20 
21 namespace mfem
22 {
23 
24 // Base and derived classes for finite elements
25 
28 public:
29  enum {
30  Pk, // polynomials of order k
31  Qk, // tensor products of polynomials of order k
32  rQk // refined tensor products of polynomials of order k
33  };
34 };
35 
36 class ElementTransformation;
37 class Coefficient;
38 class VectorCoefficient;
39 class KnotVector;
40 
43 {
44 protected:
47 
48 public:
50  enum { SCALAR, VECTOR };
51 
69  enum { VALUE, INTEGRAL, H_DIV, H_CURL };
70 
77  FiniteElement(int D, int G, int Do, int O, int F = FunctionSpace::Pk);
78 
80  int GetDim() const { return Dim; }
81 
83  int GetGeomType() const { return GeomType; }
84 
86  int GetDof() const { return Dof; }
87 
89  int GetOrder() const { return Order; }
90 
92  int Space() const { return FuncSpace; }
93 
94  int GetRangeType() const { return RangeType; }
95 
96  int GetMapType() const { return MapType; }
97 
101  virtual void CalcShape(const IntegrationPoint &ip,
102  Vector &shape) const = 0;
103 
108  virtual void CalcDShape(const IntegrationPoint &ip,
109  DenseMatrix &dshape) const = 0;
110  const IntegrationRule & GetNodes() const { return Nodes; }
111 
112  // virtual functions for finite elements on vector spaces
113 
118  virtual void CalcVShape(const IntegrationPoint &ip,
119  DenseMatrix &shape) const;
120 
121  virtual void CalcVShape(ElementTransformation &Trans,
122  DenseMatrix &shape) const;
123 
127  virtual void CalcDivShape(const IntegrationPoint &ip,
128  Vector &divshape) const;
129 
134  virtual void CalcCurlShape(const IntegrationPoint &ip,
135  DenseMatrix &curl_shape) const;
136 
137  virtual void GetFaceDofs(int face, int **dofs, int *ndofs) const;
138 
141  virtual void CalcHessian (const IntegrationPoint &ip,
142  DenseMatrix &h) const;
143 
147  virtual void GetLocalInterpolation (ElementTransformation &Trans,
148  DenseMatrix &I) const;
149 
153  virtual void Project (Coefficient &coeff,
154  ElementTransformation &Trans, Vector &dofs) const;
155 
159  virtual void Project (VectorCoefficient &vc,
160  ElementTransformation &Trans, Vector &dofs) const;
161 
164  virtual void ProjectDelta(int vertex, Vector &dofs) const;
165 
169  virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
170  DenseMatrix &I) const;
171 
175  virtual void ProjectGrad(const FiniteElement &fe,
176  ElementTransformation &Trans,
177  DenseMatrix &grad) const;
178 
182  virtual void ProjectCurl(const FiniteElement &fe,
183  ElementTransformation &Trans,
184  DenseMatrix &curl) const;
185 
189  virtual void ProjectDiv(const FiniteElement &fe,
190  ElementTransformation &Trans,
191  DenseMatrix &div) const;
192 
193  virtual ~FiniteElement () { }
194 };
195 
197 {
198 protected:
200  DenseMatrix &I,
201  const NodalFiniteElement &fine_fe) const;
202 
203 #ifndef MFEM_THREAD_SAFE
204  mutable Vector c_shape;
205 #endif
206 
207 public:
208  NodalFiniteElement(int D, int G, int Do, int O,
209  int F = FunctionSpace::Pk) :
210 #ifdef MFEM_THREAD_SAFE
211  FiniteElement(D, G, Do, O, F)
212 #else
213  FiniteElement(D, G, Do, O, F), c_shape(Do)
214 #endif
215  { }
216 
217  void SetMapType(int M)
218  {
219  MFEM_VERIFY(M == VALUE || M == INTEGRAL, "unknown MapType");
220  MapType = M;
221  }
222 
224  DenseMatrix &I) const
225  { NodalLocalInterpolation (Trans, I, *this); }
226 
227  virtual void Project (Coefficient &coeff,
228  ElementTransformation &Trans, Vector &dofs) const;
229 
230  virtual void Project (VectorCoefficient &vc,
231  ElementTransformation &Trans, Vector &dofs) const;
232 
233  virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
234  DenseMatrix &I) const;
235 
236  virtual void ProjectGrad(const FiniteElement &fe,
237  ElementTransformation &Trans,
238  DenseMatrix &grad) const;
239 
240  virtual void ProjectDiv(const FiniteElement &fe,
241  ElementTransformation &Trans,
242  DenseMatrix &div) const;
243 };
244 
245 
247 {
248 public:
249  PositiveFiniteElement(int D, int G, int Do, int O, int F = FunctionSpace::Pk)
250  : FiniteElement(D, G, Do, O, F) { }
252  virtual void Project(Coefficient &coeff,
253  ElementTransformation &Trans, Vector &dofs) const;
254  virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
255  DenseMatrix &I) const;
256 };
257 
259 {
260  // Hide the scalar functions CalcShape and CalcDShape.
261 private:
263  virtual void CalcShape(const IntegrationPoint &ip,
264  Vector &shape) const;
265 
267  virtual void CalcDShape(const IntegrationPoint &ip,
268  DenseMatrix &dshape) const;
269 
270 protected:
271 #ifndef MFEM_THREAD_SAFE
272  mutable DenseMatrix Jinv;
274 #endif
275 
277  DenseMatrix &shape) const;
278 
280  DenseMatrix &shape) const;
281 
282  void Project_RT(const double *nk, const Array<int> &d2n,
284  Vector &dofs) const;
285 
286  void Project_RT(const double *nk, const Array<int> &d2n,
287  const FiniteElement &fe, ElementTransformation &Trans,
288  DenseMatrix &I) const;
289 
290  // rotated gradient in 2D
291  void ProjectGrad_RT(const double *nk, const Array<int> &d2n,
292  const FiniteElement &fe, ElementTransformation &Trans,
293  DenseMatrix &grad) const;
294 
295  void ProjectCurl_RT(const double *nk, const Array<int> &d2n,
296  const FiniteElement &fe, ElementTransformation &Trans,
297  DenseMatrix &curl) const;
298 
299  void Project_ND(const double *tk, const Array<int> &d2t,
301  Vector &dofs) const;
302 
303  void Project_ND(const double *tk, const Array<int> &d2t,
304  const FiniteElement &fe, ElementTransformation &Trans,
305  DenseMatrix &I) const;
306 
307  void ProjectGrad_ND(const double *tk, const Array<int> &d2t,
308  const FiniteElement &fe, ElementTransformation &Trans,
309  DenseMatrix &grad) const;
310 
311  void LocalInterpolation_RT(const double *nk, const Array<int> &d2n,
312  ElementTransformation &Trans,
313  DenseMatrix &I) const;
314 
315  void LocalInterpolation_ND(const double *tk, const Array<int> &d2t,
316  ElementTransformation &Trans,
317  DenseMatrix &I) const;
318 
319 public:
320  VectorFiniteElement (int D, int G, int Do, int O, int M,
321  int F = FunctionSpace::Pk) :
322 #ifdef MFEM_THREAD_SAFE
323  FiniteElement(D, G, Do, O, F)
324 #else
325  FiniteElement(D, G, Do, O, F), Jinv(D), vshape(Do, D)
326 #endif
328 };
329 
331 {
332 public:
334 
335  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
336 
337  virtual void CalcDShape(const IntegrationPoint &ip,
338  DenseMatrix &dshape) const;
339 };
340 
343 {
344 public:
347 
351  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
352 
357  virtual void CalcDShape(const IntegrationPoint &ip,
358  DenseMatrix &dshape) const;
359 };
360 
363 {
364 public:
367 
371  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
372 
377  virtual void CalcDShape(const IntegrationPoint &ip,
378  DenseMatrix &dshape) const;
379  virtual void ProjectDelta(int vertex, Vector &dofs) const
380  { dofs = 0.0; dofs(vertex) = 1.0; }
381 };
382 
385 {
386 public:
389 
393  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
394 
399  virtual void CalcDShape(const IntegrationPoint &ip,
400  DenseMatrix &dshape) const;
401  virtual void CalcHessian (const IntegrationPoint &ip,
402  DenseMatrix &h) const;
403  virtual void ProjectDelta(int vertex, Vector &dofs) const
404  { dofs = 0.0; dofs(vertex) = 1.0; }
405 // { dofs = 1.0; }
406 };
407 
410 {
411 public:
413  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
414  virtual void CalcDShape(const IntegrationPoint &ip,
415  DenseMatrix &dshape) const;
416  virtual void ProjectDelta(int vertex, Vector &dofs) const;
417 };
418 
421 {
422 private:
423  static const double p[2];
424 
425 public:
427  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
428  virtual void CalcDShape(const IntegrationPoint &ip,
429  DenseMatrix &dshape) const;
430  virtual void ProjectDelta(int vertex, Vector &dofs) const;
431 };
432 
434 {
435 public:
437  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
438  virtual void CalcDShape(const IntegrationPoint &ip,
439  DenseMatrix &dshape) const;
440  virtual void ProjectDelta(int vertex, Vector &dofs) const
441  { dofs = 1.0; }
442 };
443 
446 {
447 public:
450 
454  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
455 
460  virtual void CalcDShape(const IntegrationPoint &ip,
461  DenseMatrix &dshape) const;
462 };
463 
465 {
466 public:
468  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
469  virtual void CalcDShape(const IntegrationPoint &ip,
470  DenseMatrix &dshape) const;
471 };
472 
475 {
476 public:
479 
483  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
484 
489  virtual void CalcDShape(const IntegrationPoint &ip,
490  DenseMatrix &dshape) const;
491 
492  virtual void CalcHessian (const IntegrationPoint &ip,
493  DenseMatrix &h) const;
494  virtual void ProjectDelta(int vertex, Vector &dofs) const;
495 };
496 
499 {
500 private:
501  static const double p[2];
502  DenseMatrix A;
503  mutable DenseMatrix D;
504  mutable Vector pol;
505 public:
507  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
508  virtual void CalcDShape(const IntegrationPoint &ip,
509  DenseMatrix &dshape) const;
510  // virtual void ProjectDelta(int vertex, Vector &dofs) const;
511 };
512 
515 {
516 public:
519 
523  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
524 
529  virtual void CalcDShape(const IntegrationPoint &ip,
530  DenseMatrix &dshape) const;
531  virtual void ProjectDelta(int vertex, Vector &dofs) const;
532 };
533 
535 {
536 public:
538  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
539  virtual void CalcDShape(const IntegrationPoint &ip,
540  DenseMatrix &dshape) const;
541  virtual void GetLocalInterpolation(ElementTransformation &Trans,
542  DenseMatrix &I) const;
544  virtual void Project(Coefficient &coeff, ElementTransformation &Trans,
545  Vector &dofs) const;
546  virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans,
547  Vector &dofs) const;
548  virtual void ProjectDelta(int vertex, Vector &dofs) const
549  { dofs = 0.; dofs(vertex) = 1.; }
550 };
551 
554 {
555 public:
557  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
558  virtual void CalcDShape(const IntegrationPoint &ip,
559  DenseMatrix &dshape) const;
560 // virtual void ProjectDelta(int vertex, Vector &dofs) const { dofs = 1.; }
561 };
562 
564 {
565 public:
567  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
568  virtual void CalcDShape(const IntegrationPoint &ip,
569  DenseMatrix &dshape) const;
570  virtual void CalcHessian (const IntegrationPoint &ip,
571  DenseMatrix &h) const;
572 };
573 
575 {
576 public:
578 
579  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
580 
581  virtual void CalcDShape(const IntegrationPoint &ip,
582  DenseMatrix &dshape) const;
583 };
584 
586 {
587 public:
589 
590  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
591 
592  virtual void CalcDShape(const IntegrationPoint &ip,
593  DenseMatrix &dshape) const;
594 
595  virtual void CalcHessian (const IntegrationPoint &ip,
596  DenseMatrix &h) const;
597 };
598 
601 {
602 public:
605 
606  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
607 
608  virtual void CalcDShape(const IntegrationPoint &ip,
609  DenseMatrix &dshape) const;
610 };
611 
614 {
615 public:
618 
620  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
621 
623  virtual void CalcDShape(const IntegrationPoint &ip,
624  DenseMatrix &dshape) const;
625  virtual void ProjectDelta(int vertex, Vector &dofs) const
626  { dofs(0) = 1.0; }
627 };
628 
629 
631 {
632 public:
634  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
635  virtual void CalcDShape(const IntegrationPoint &ip,
636  DenseMatrix &dshape) const;
637  virtual void ProjectDelta(int vertex, Vector &dofs) const
638  { dofs(0) = 1.0; }
639 };
640 
641 
644 {
645 public:
648 
652  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
653 
658  virtual void CalcDShape(const IntegrationPoint &ip,
659  DenseMatrix &dshape) const;
660 
661  virtual void ProjectDelta(int vertex, Vector &dofs) const
662  { dofs = 0.0; dofs(vertex) = 1.0; }
663 
664  virtual void GetFaceDofs(int face, int **dofs, int *ndofs) const;
665 };
666 
669 {
670 public:
673 
674  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
675 
676  virtual void CalcDShape(const IntegrationPoint &ip,
677  DenseMatrix &dshape) const;
678 };
679 
682 {
683 public:
686 
690  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
691 
696  virtual void CalcDShape(const IntegrationPoint &ip,
697  DenseMatrix &dshape) const;
698 
699  virtual void ProjectDelta(int vertex, Vector &dofs) const
700  { dofs = 0.0; dofs(vertex) = 1.0; }
701 };
702 
705 {
706 public:
708  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
709  virtual void CalcDShape(const IntegrationPoint &ip,
710  DenseMatrix &dshape) const;
711  virtual void ProjectDelta(int vertex, Vector &dofs) const
712  { dofs = 1.0; }
713 };
714 
717 {
718 public:
720  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
721  virtual void CalcDShape(const IntegrationPoint &ip,
722  DenseMatrix &dshape) const;
723 };
724 
726 {
727 public:
728  P0SegmentFiniteElement(int Ord = 0);
729  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
730  virtual void CalcDShape(const IntegrationPoint &ip,
731  DenseMatrix &dshape) const;
732 };
733 
735 {
736 private:
737  static const double nk[3][2];
738 
739 public:
741 
742  virtual void CalcVShape(const IntegrationPoint &ip,
743  DenseMatrix &shape) const;
744 
745  virtual void CalcVShape(ElementTransformation &Trans,
746  DenseMatrix &shape) const
747  { CalcVShape_RT(Trans, shape); };
748 
749  virtual void CalcDivShape(const IntegrationPoint &ip,
750  Vector &divshape) const;
751 
752  virtual void GetLocalInterpolation (ElementTransformation &Trans,
753  DenseMatrix &I) const;
754 
756 
757  virtual void Project (VectorCoefficient &vc,
758  ElementTransformation &Trans, Vector &dofs) const;
759 };
760 
762 {
763 private:
764  static const double nk[4][2];
765 
766 public:
768 
769  virtual void CalcVShape(const IntegrationPoint &ip,
770  DenseMatrix &shape) const;
771 
772  virtual void CalcVShape(ElementTransformation &Trans,
773  DenseMatrix &shape) const
774  { CalcVShape_RT(Trans, shape); };
775 
776  virtual void CalcDivShape(const IntegrationPoint &ip,
777  Vector &divshape) const;
778 
779  virtual void GetLocalInterpolation (ElementTransformation &Trans,
780  DenseMatrix &I) const;
781 
783 
784  virtual void Project (VectorCoefficient &vc,
785  ElementTransformation &Trans, Vector &dofs) const;
786 };
787 
789 {
790 private:
791  static const double nk[8][2];
792 
793 public:
795 
796  virtual void CalcVShape(const IntegrationPoint &ip,
797  DenseMatrix &shape) const;
798 
799  virtual void CalcVShape(ElementTransformation &Trans,
800  DenseMatrix &shape) const
801  { CalcVShape_RT(Trans, shape); };
802 
803  virtual void CalcDivShape(const IntegrationPoint &ip,
804  Vector &divshape) const;
805 
806  virtual void GetLocalInterpolation (ElementTransformation &Trans,
807  DenseMatrix &I) const;
808 
810 
811  virtual void Project (VectorCoefficient &vc,
812  ElementTransformation &Trans, Vector &dofs) const;
813 };
814 
816 {
817 private:
818  static const double nk[12][2];
819 
820 public:
822 
823  virtual void CalcVShape(const IntegrationPoint &ip,
824  DenseMatrix &shape) const;
825 
826  virtual void CalcVShape(ElementTransformation &Trans,
827  DenseMatrix &shape) const
828  { CalcVShape_RT(Trans, shape); };
829 
830  virtual void CalcDivShape(const IntegrationPoint &ip,
831  Vector &divshape) const;
832 
833  virtual void GetLocalInterpolation (ElementTransformation &Trans,
834  DenseMatrix &I) const;
835 
837 
838  virtual void Project (VectorCoefficient &vc,
839  ElementTransformation &Trans, Vector &dofs) const;
840 };
841 
843 {
844 private:
845  static const double M[15][15];
846 public:
848 
849  virtual void CalcVShape(const IntegrationPoint &ip,
850  DenseMatrix &shape) const;
851 
852  virtual void CalcVShape(ElementTransformation &Trans,
853  DenseMatrix &shape) const
854  { CalcVShape_RT(Trans, shape); };
855 
856  virtual void CalcDivShape(const IntegrationPoint &ip,
857  Vector &divshape) const;
858 };
859 
861 {
862 private:
863  static const double nk[24][2];
864  static const double pt[4];
865  static const double dpt[3];
866 
867 public:
869 
870  virtual void CalcVShape(const IntegrationPoint &ip,
871  DenseMatrix &shape) const;
872 
873  virtual void CalcVShape(ElementTransformation &Trans,
874  DenseMatrix &shape) const
875  { CalcVShape_RT(Trans, shape); };
876 
877  virtual void CalcDivShape(const IntegrationPoint &ip,
878  Vector &divshape) const;
879 
880  virtual void GetLocalInterpolation (ElementTransformation &Trans,
881  DenseMatrix &I) const;
882 
884 
885  virtual void Project (VectorCoefficient &vc,
886  ElementTransformation &Trans, Vector &dofs) const;
887 };
888 
891 {
892 public:
894  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
895  virtual void CalcDShape(const IntegrationPoint &ip,
896  DenseMatrix &dshape) const;
897 };
898 
901 {
902 public:
904  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
905  virtual void CalcDShape(const IntegrationPoint &ip,
906  DenseMatrix &dshape) const;
907 };
908 
910 {
911 private:
912  Vector rwk;
913 #ifndef MFEM_THREAD_SAFE
914  mutable Vector rxxk;
915 #endif
916 public:
917  Lagrange1DFiniteElement (int degree);
918  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
919  virtual void CalcDShape(const IntegrationPoint &ip,
920  DenseMatrix &dshape) const;
921 };
922 
924 {
925 public:
927  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
928  virtual void CalcDShape(const IntegrationPoint &ip,
929  DenseMatrix &dshape) const;
930 };
931 
933 {
934 public:
936  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
937  virtual void CalcDShape(const IntegrationPoint &ip,
938  DenseMatrix &dshape) const;
939  virtual void ProjectDelta(int vertex, Vector &dofs) const
940  { dofs(0) = 1.0; }
941 };
942 
944 {
945 public:
947  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
948  virtual void CalcDShape(const IntegrationPoint &ip,
949  DenseMatrix &dshape) const;
950  virtual void ProjectDelta(int vertex, Vector &dofs) const
951  { dofs(0) = 1.0; }
952 };
953 
956 {
957 private:
959  int dof1d;
960  int *I, *J, *K;
961 #ifndef MFEM_THREAD_SAFE
962  mutable Vector shape1dx, shape1dy, shape1dz;
963  mutable DenseMatrix dshape1dx, dshape1dy, dshape1dz;
964 #endif
965 
966 public:
967  LagrangeHexFiniteElement (int degree);
968  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
969  virtual void CalcDShape(const IntegrationPoint &ip,
970  DenseMatrix &dshape) const;
972 };
973 
974 
977 {
978 public:
981 
985  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
986 
991  virtual void CalcDShape(const IntegrationPoint &ip,
992  DenseMatrix &dshape) const;
993 };
994 
997 {
998 public:
1001 
1005  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1006 
1011  virtual void CalcDShape(const IntegrationPoint &ip,
1012  DenseMatrix &dshape) const;
1013 };
1014 
1017 {
1018 public:
1021 
1022  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1023 
1024  virtual void CalcDShape(const IntegrationPoint &ip,
1025  DenseMatrix &dshape) const;
1026 };
1027 
1030 {
1031 public:
1034 
1038  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1039 
1044  virtual void CalcDShape(const IntegrationPoint &ip,
1045  DenseMatrix &dshape) const;
1046 };
1047 
1050 {
1051 public:
1054 
1058  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1059 
1064  virtual void CalcDShape(const IntegrationPoint &ip,
1065  DenseMatrix &dshape) const;
1066 };
1067 
1068 
1070 {
1071 private:
1072  static const double tk[12][3];
1073 
1074 public:
1076  virtual void CalcVShape(const IntegrationPoint &ip,
1077  DenseMatrix &shape) const;
1078  virtual void CalcVShape(ElementTransformation &Trans,
1079  DenseMatrix &shape) const
1080  { CalcVShape_ND(Trans, shape); };
1081  virtual void CalcCurlShape(const IntegrationPoint &ip,
1082  DenseMatrix &curl_shape) const;
1083  virtual void GetLocalInterpolation (ElementTransformation &Trans,
1084  DenseMatrix &I) const;
1085  using FiniteElement::Project;
1086  virtual void Project (VectorCoefficient &vc,
1087  ElementTransformation &Trans, Vector &dofs) const;
1088 };
1089 
1090 
1092 {
1093 private:
1094  static const double tk[6][3];
1095 
1096 public:
1098  virtual void CalcVShape(const IntegrationPoint &ip,
1099  DenseMatrix &shape) const;
1100  virtual void CalcVShape(ElementTransformation &Trans,
1101  DenseMatrix &shape) const
1102  { CalcVShape_ND(Trans, shape); };
1103  virtual void CalcCurlShape(const IntegrationPoint &ip,
1104  DenseMatrix &curl_shape) const;
1105  virtual void GetLocalInterpolation (ElementTransformation &Trans,
1106  DenseMatrix &I) const;
1107  using FiniteElement::Project;
1108  virtual void Project (VectorCoefficient &vc,
1109  ElementTransformation &Trans, Vector &dofs) const;
1110 };
1111 
1112 
1114 {
1115 private:
1116  static const double nk[6][3];
1117 
1118 public:
1120 
1121  virtual void CalcVShape(const IntegrationPoint &ip,
1122  DenseMatrix &shape) const;
1123 
1124  virtual void CalcVShape(ElementTransformation &Trans,
1125  DenseMatrix &shape) const
1126  { CalcVShape_RT(Trans, shape); };
1127 
1128  virtual void CalcDivShape(const IntegrationPoint &ip,
1129  Vector &divshape) const;
1130 
1131  virtual void GetLocalInterpolation (ElementTransformation &Trans,
1132  DenseMatrix &I) const;
1133 
1134  using FiniteElement::Project;
1135 
1136  virtual void Project (VectorCoefficient &vc,
1137  ElementTransformation &Trans, Vector &dofs) const;
1138 };
1139 
1140 
1142 {
1143 private:
1144  static const double nk[36][3];
1145 
1146 public:
1148 
1149  virtual void CalcVShape(const IntegrationPoint &ip,
1150  DenseMatrix &shape) const;
1151 
1152  virtual void CalcVShape(ElementTransformation &Trans,
1153  DenseMatrix &shape) const
1154  { CalcVShape_RT(Trans, shape); };
1155 
1156  virtual void CalcDivShape(const IntegrationPoint &ip,
1157  Vector &divshape) const;
1158 
1159  virtual void GetLocalInterpolation (ElementTransformation &Trans,
1160  DenseMatrix &I) const;
1161 
1162  using FiniteElement::Project;
1163 
1164  virtual void Project (VectorCoefficient &vc,
1165  ElementTransformation &Trans, Vector &dofs) const;
1166 };
1167 
1168 
1170 {
1171 private:
1172  static const double nk[4][3];
1173 
1174 public:
1176 
1177  virtual void CalcVShape(const IntegrationPoint &ip,
1178  DenseMatrix &shape) const;
1179 
1180  virtual void CalcVShape(ElementTransformation &Trans,
1181  DenseMatrix &shape) const
1182  { CalcVShape_RT(Trans, shape); };
1183 
1184  virtual void CalcDivShape(const IntegrationPoint &ip,
1185  Vector &divshape) const;
1186 
1187  virtual void GetLocalInterpolation (ElementTransformation &Trans,
1188  DenseMatrix &I) const;
1189 
1190  using FiniteElement::Project;
1191 
1192  virtual void Project (VectorCoefficient &vc,
1193  ElementTransformation &Trans, Vector &dofs) const;
1194 };
1195 
1196 
1198 {
1199 public:
1201  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1202  virtual void CalcDShape(const IntegrationPoint &ip,
1203  DenseMatrix &dshape) const;
1204 };
1205 
1206 
1207 class Poly_1D
1208 {
1209 public:
1210  class Basis
1211  {
1212  private:
1213  int mode; // 0 - use change of basis, O(p^2) Evals
1214  // 1 - use barycentric Lagrangian interpolation, O(p) Evals
1215  DenseMatrix A;
1216  mutable Vector x, w;
1217 
1218  public:
1219  Basis(const int p, const double *nodes, const int _mode = 1);
1220  void Eval(const double x, Vector &u) const;
1221  void Eval(const double x, Vector &u, Vector &d) const;
1222  };
1223 
1224 private:
1225  Array<double *> open_pts, closed_pts;
1226  Array<Basis *> open_basis, closed_basis;
1227 
1228  static Array2D<int> binom;
1229 
1230  static void CalcMono(const int p, const double x, double *u);
1231  static void CalcMono(const int p, const double x, double *u, double *d);
1232 
1233  static void CalcLegendre(const int p, const double x, double *u);
1234  static void CalcLegendre(const int p, const double x, double *u, double *d);
1235 
1236  static void CalcChebyshev(const int p, const double x, double *u);
1237  static void CalcChebyshev(const int p, const double x, double *u, double *d);
1238 
1239 public:
1240  Poly_1D() { }
1241 
1242  static const int *Binom(const int p);
1243 
1244  const double *OpenPoints(const int p);
1245  const double *ClosedPoints(const int p);
1246 
1247  Basis &OpenBasis(const int p);
1248  Basis &ClosedBasis(const int p);
1249 
1250  // Evaluate the values of a hierarchical 1D basis at point x
1251  // hierarchical = k-th basis function is degree k polynomial
1252  static void CalcBasis(const int p, const double x, double *u)
1253  // { CalcMono(p, x, u); }
1254  // Bernstein basis is not hierarchical --> does not work for triangles
1255  // and tetrahedra
1256  // { CalcBernstein(p, x, u); }
1257  // { CalcLegendre(p, x, u); }
1258  { CalcChebyshev(p, x, u); }
1259 
1260  // Evaluate the values and derivatives of a hierarchical 1D basis at point x
1261  static void CalcBasis(const int p, const double x, double *u, double *d)
1262  // { CalcMono(p, x, u, d); }
1263  // { CalcBernstein(p, x, u, d); }
1264  // { CalcLegendre(p, x, u, d); }
1265  { CalcChebyshev(p, x, u, d); }
1266 
1267  // Evaluate a representation of a Delta function at point x
1268  static double CalcDelta(const int p, const double x)
1269  { return pow(x, (double) p); }
1270 
1271  static void UniformPoints(const int p, double *x);
1272  static void GaussPoints(const int p, double *x);
1273  static void GaussLobattoPoints(const int p, double *x);
1274  static void ChebyshevPoints(const int p, double *x);
1275 
1277  static void CalcBinomTerms(const int p, const double x, const double y,
1278  double *u);
1281  static void CalcBinomTerms(const int p, const double x, const double y,
1282  double *u, double *d);
1285  static void CalcDBinomTerms(const int p, const double x, const double y,
1286  double *d);
1287  static void CalcBernstein(const int p, const double x, double *u)
1288  { CalcBinomTerms(p, x, 1. - x, u); }
1289  static void CalcBernstein(const int p, const double x, double *u, double *d)
1290  { CalcBinomTerms(p, x, 1. - x, u, d); }
1291 
1292  ~Poly_1D();
1293 };
1294 
1295 extern Poly_1D poly1d;
1296 
1297 
1299 {
1300 private:
1301  Poly_1D::Basis &basis1d;
1302 #ifndef MFEM_THREAD_SAFE
1303  mutable Vector shape_x, dshape_x;
1304 #endif
1305 
1306 public:
1307  H1_SegmentElement(const int p);
1308  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1309  virtual void CalcDShape(const IntegrationPoint &ip,
1310  DenseMatrix &dshape) const;
1311  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1312 };
1313 
1314 
1316 {
1317 private:
1318  Poly_1D::Basis &basis1d;
1319 #ifndef MFEM_THREAD_SAFE
1320  mutable Vector shape_x, shape_y, dshape_x, dshape_y;
1321 #endif
1322  Array<int> dof_map;
1323 
1324 public:
1325  H1_QuadrilateralElement(const int p);
1326  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1327  virtual void CalcDShape(const IntegrationPoint &ip,
1328  DenseMatrix &dshape) const;
1329  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1330  const Array<int> &GetDofMap() const { return dof_map; }
1331 };
1332 
1333 
1335 {
1336 private:
1337  Poly_1D::Basis &basis1d;
1338 #ifndef MFEM_THREAD_SAFE
1339  mutable Vector shape_x, shape_y, shape_z, dshape_x, dshape_y, dshape_z;
1340 #endif
1341  Array<int> dof_map;
1342 
1343 public:
1344  H1_HexahedronElement(const int p);
1345  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1346  virtual void CalcDShape(const IntegrationPoint &ip,
1347  DenseMatrix &dshape) const;
1348  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1349  const Array<int> &GetDofMap() const { return dof_map; }
1350 };
1351 
1353 {
1354 private:
1355 #ifndef MFEM_THREAD_SAFE
1356  // This is to share scratch space between invocations, which helps
1357  // speed things up, but with OpenMP, we need one copy per thread.
1358  // Right now, we solve this by allocating this space within each function
1359  // call every time we call it. Alternatively, we should do some sort
1360  // thread private thing. Brunner, Jan 2014
1361  mutable Vector shape_x, dshape_x;
1362 #endif
1363 
1364 public:
1365  H1Pos_SegmentElement(const int p);
1366  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1367  virtual void CalcDShape(const IntegrationPoint &ip,
1368  DenseMatrix &dshape) const;
1369  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1370 };
1371 
1372 
1374 {
1375 private:
1376 #ifndef MFEM_THREAD_SAFE
1377  // See comment in H1Pos_SegmentElement
1378  mutable Vector shape_x, shape_y, dshape_x, dshape_y;
1379 #endif
1380  Array<int> dof_map;
1381 
1382 public:
1383  H1Pos_QuadrilateralElement(const int p);
1384  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1385  virtual void CalcDShape(const IntegrationPoint &ip,
1386  DenseMatrix &dshape) const;
1387  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1388 };
1389 
1390 
1392 {
1393 private:
1394 #ifndef MFEM_THREAD_SAFE
1395  // See comment in H1Pos_SegementElement.
1396  mutable Vector shape_x, shape_y, shape_z, dshape_x, dshape_y, dshape_z;
1397 #endif
1398  Array<int> dof_map;
1399 
1400 public:
1401  H1Pos_HexahedronElement(const int p);
1402  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1403  virtual void CalcDShape(const IntegrationPoint &ip,
1404  DenseMatrix &dshape) const;
1405  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1406 };
1407 
1408 
1410 {
1411 private:
1412 #ifndef MFEM_THREAD_SAFE
1413  mutable Vector shape_x, shape_y, shape_l, dshape_x, dshape_y, dshape_l, u;
1414  mutable DenseMatrix du;
1415 #endif
1416  DenseMatrix T;
1417 
1418 public:
1419  H1_TriangleElement(const int p);
1420  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1421  virtual void CalcDShape(const IntegrationPoint &ip,
1422  DenseMatrix &dshape) const;
1423 };
1424 
1425 
1427 {
1428 private:
1429 #ifndef MFEM_THREAD_SAFE
1430  mutable Vector shape_x, shape_y, shape_z, shape_l;
1431  mutable Vector dshape_x, dshape_y, dshape_z, dshape_l, u;
1432  mutable DenseMatrix du;
1433 #endif
1434  DenseMatrix T;
1435 
1436 public:
1437  H1_TetrahedronElement(const int p);
1438  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1439  virtual void CalcDShape(const IntegrationPoint &ip,
1440  DenseMatrix &dshape) const;
1441 };
1442 
1443 
1444 // TODO: define H1Pos_ FEs on triangle and tetrahedron
1445 
1446 
1448 {
1449 private:
1450  int type;
1451  Poly_1D::Basis *basis1d;
1452 #ifndef MFEM_THREAD_SAFE
1453  mutable Vector shape_x, dshape_x;
1454 #endif
1455 
1456 public:
1457  L2_SegmentElement(const int p, const int _type = 0);
1458  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1459  virtual void CalcDShape(const IntegrationPoint &ip,
1460  DenseMatrix &dshape) const;
1461  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1462 };
1463 
1464 
1466 {
1467 private:
1468 #ifndef MFEM_THREAD_SAFE
1469  mutable Vector shape_x, dshape_x;
1470 #endif
1471 
1472 public:
1473  L2Pos_SegmentElement(const int p);
1474  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1475  virtual void CalcDShape(const IntegrationPoint &ip,
1476  DenseMatrix &dshape) const;
1477  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1478 };
1479 
1480 
1482 {
1483 private:
1484  int type;
1485  Poly_1D::Basis *basis1d;
1486 #ifndef MFEM_THREAD_SAFE
1487  mutable Vector shape_x, shape_y, dshape_x, dshape_y;
1488 #endif
1489 
1490 public:
1491  L2_QuadrilateralElement(const int p, const int _type = 0);
1492  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1493  virtual void CalcDShape(const IntegrationPoint &ip,
1494  DenseMatrix &dshape) const;
1495  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1496 };
1497 
1498 
1500 {
1501 private:
1502 #ifndef MFEM_THREAD_SAFE
1503  mutable Vector shape_x, shape_y, dshape_x, dshape_y;
1504 #endif
1505 
1506 public:
1507  L2Pos_QuadrilateralElement(const int p);
1508  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1509  virtual void CalcDShape(const IntegrationPoint &ip,
1510  DenseMatrix &dshape) const;
1511  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1512 };
1513 
1514 
1516 {
1517 private:
1518  int type;
1519  Poly_1D::Basis *basis1d;
1520 #ifndef MFEM_THREAD_SAFE
1521  mutable Vector shape_x, shape_y, shape_z, dshape_x, dshape_y, dshape_z;
1522 #endif
1523 
1524 public:
1525  L2_HexahedronElement(const int p, const int _type = 0);
1526  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1527  virtual void CalcDShape(const IntegrationPoint &ip,
1528  DenseMatrix &dshape) const;
1529  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1530 };
1531 
1532 
1534 {
1535 private:
1536 #ifndef MFEM_THREAD_SAFE
1537  mutable Vector shape_x, shape_y, shape_z, dshape_x, dshape_y, dshape_z;
1538 #endif
1539 
1540 public:
1541  L2Pos_HexahedronElement(const int p);
1542  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1543  virtual void CalcDShape(const IntegrationPoint &ip,
1544  DenseMatrix &dshape) const;
1545  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1546 };
1547 
1548 
1550 {
1551 private:
1552  int type;
1553 #ifndef MFEM_THREAD_SAFE
1554  mutable Vector shape_x, shape_y, shape_l, dshape_x, dshape_y, dshape_l, u;
1555  mutable DenseMatrix du;
1556 #endif
1557  DenseMatrix T;
1558 
1559 public:
1560  L2_TriangleElement(const int p, const int _type = 0);
1561  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1562  virtual void CalcDShape(const IntegrationPoint &ip,
1563  DenseMatrix &dshape) const;
1564  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1565 };
1566 
1567 
1569 {
1570 private:
1571 #ifndef MFEM_THREAD_SAFE
1572  mutable Vector dshape_1d;
1573 #endif
1574 
1575 public:
1576  L2Pos_TriangleElement(const int p);
1577  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1578  virtual void CalcDShape(const IntegrationPoint &ip,
1579  DenseMatrix &dshape) const;
1580  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1581 };
1582 
1583 
1585 {
1586 private:
1587  int type;
1588 #ifndef MFEM_THREAD_SAFE
1589  mutable Vector shape_x, shape_y, shape_z, shape_l;
1590  mutable Vector dshape_x, dshape_y, dshape_z, dshape_l, u;
1591  mutable DenseMatrix du;
1592 #endif
1593  DenseMatrix T;
1594 
1595 public:
1596  L2_TetrahedronElement(const int p, const int _type = 0);
1597  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1598  virtual void CalcDShape(const IntegrationPoint &ip,
1599  DenseMatrix &dshape) const;
1600  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1601 };
1602 
1603 
1605 {
1606 private:
1607 #ifndef MFEM_THREAD_SAFE
1608  mutable Vector dshape_1d;
1609 #endif
1610 
1611 public:
1612  L2Pos_TetrahedronElement(const int p);
1613  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1614  virtual void CalcDShape(const IntegrationPoint &ip,
1615  DenseMatrix &dshape) const;
1616  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1617 };
1618 
1619 
1621 {
1622 private:
1623  static const double nk[8];
1624 
1625  Poly_1D::Basis &cbasis1d, &obasis1d;
1626 #ifndef MFEM_THREAD_SAFE
1627  mutable Vector shape_cx, shape_ox, shape_cy, shape_oy;
1628  mutable Vector dshape_cx, dshape_cy;
1629 #endif
1630  Array<int> dof_map, dof2nk;
1631 
1632 public:
1633  RT_QuadrilateralElement(const int p);
1634  virtual void CalcVShape(const IntegrationPoint &ip,
1635  DenseMatrix &shape) const;
1636  virtual void CalcVShape(ElementTransformation &Trans,
1637  DenseMatrix &shape) const
1638  { CalcVShape_RT(Trans, shape); }
1639  virtual void CalcDivShape(const IntegrationPoint &ip,
1640  Vector &divshape) const;
1642  DenseMatrix &I) const
1643  { LocalInterpolation_RT(nk, dof2nk, Trans, I); }
1644  using FiniteElement::Project;
1645  virtual void Project(VectorCoefficient &vc,
1646  ElementTransformation &Trans, Vector &dofs) const
1647  { Project_RT(nk, dof2nk, vc, Trans, dofs); }
1648  virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
1649  DenseMatrix &I) const
1650  { Project_RT(nk, dof2nk, fe, Trans, I); }
1651  virtual void ProjectGrad(const FiniteElement &fe,
1652  ElementTransformation &Trans,
1653  DenseMatrix &grad) const
1654  { ProjectGrad_RT(nk, dof2nk, fe, Trans, grad); }
1655 };
1656 
1657 
1659 {
1660  static const double nk[18];
1661 
1662  Poly_1D::Basis &cbasis1d, &obasis1d;
1663 #ifndef MFEM_THREAD_SAFE
1664  mutable Vector shape_cx, shape_ox, shape_cy, shape_oy, shape_cz, shape_oz;
1665  mutable Vector dshape_cx, dshape_cy, dshape_cz;
1666 #endif
1667  Array<int> dof_map, dof2nk;
1668 
1669 public:
1670  RT_HexahedronElement(const int p);
1671  virtual void CalcVShape(const IntegrationPoint &ip,
1672  DenseMatrix &shape) const;
1673  virtual void CalcVShape(ElementTransformation &Trans,
1674  DenseMatrix &shape) const
1675  { CalcVShape_RT(Trans, shape); }
1676  virtual void CalcDivShape(const IntegrationPoint &ip,
1677  Vector &divshape) const;
1679  DenseMatrix &I) const
1680  { LocalInterpolation_RT(nk, dof2nk, Trans, I); }
1681  using FiniteElement::Project;
1682  virtual void Project(VectorCoefficient &vc,
1683  ElementTransformation &Trans, Vector &dofs) const
1684  { Project_RT(nk, dof2nk, vc, Trans, dofs); }
1685  virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
1686  DenseMatrix &I) const
1687  { Project_RT(nk, dof2nk, fe, Trans, I); }
1688  virtual void ProjectCurl(const FiniteElement &fe,
1689  ElementTransformation &Trans,
1690  DenseMatrix &curl) const
1691  { ProjectCurl_RT(nk, dof2nk, fe, Trans, curl); }
1692 };
1693 
1694 
1696 {
1697  static const double nk[6], c;
1698 
1699 #ifndef MFEM_THREAD_SAFE
1700  mutable Vector shape_x, shape_y, shape_l;
1701  mutable Vector dshape_x, dshape_y, dshape_l;
1702  mutable DenseMatrix u;
1703  mutable Vector divu;
1704 #endif
1705  Array<int> dof2nk;
1706  DenseMatrix T;
1707 
1708 public:
1709  RT_TriangleElement(const int p);
1710  virtual void CalcVShape(const IntegrationPoint &ip,
1711  DenseMatrix &shape) const;
1712  virtual void CalcVShape(ElementTransformation &Trans,
1713  DenseMatrix &shape) const
1714  { CalcVShape_RT(Trans, shape); }
1715  virtual void CalcDivShape(const IntegrationPoint &ip,
1716  Vector &divshape) const;
1718  DenseMatrix &I) const
1719  { LocalInterpolation_RT(nk, dof2nk, Trans, I); }
1720  using FiniteElement::Project;
1721  virtual void Project(VectorCoefficient &vc,
1722  ElementTransformation &Trans, Vector &dofs) const
1723  { Project_RT(nk, dof2nk, vc, Trans, dofs); }
1724  virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
1725  DenseMatrix &I) const
1726  { Project_RT(nk, dof2nk, fe, Trans, I); }
1727  virtual void ProjectGrad(const FiniteElement &fe,
1728  ElementTransformation &Trans,
1729  DenseMatrix &grad) const
1730  { ProjectGrad_RT(nk, dof2nk, fe, Trans, grad); }
1731 };
1732 
1733 
1735 {
1736  static const double nk[12], c;
1737 
1738 #ifndef MFEM_THREAD_SAFE
1739  mutable Vector shape_x, shape_y, shape_z, shape_l;
1740  mutable Vector dshape_x, dshape_y, dshape_z, dshape_l;
1741  mutable DenseMatrix u;
1742  mutable Vector divu;
1743 #endif
1744  Array<int> dof2nk;
1745  DenseMatrix T;
1746 
1747 public:
1748  RT_TetrahedronElement(const int p);
1749  virtual void CalcVShape(const IntegrationPoint &ip,
1750  DenseMatrix &shape) const;
1751  virtual void CalcVShape(ElementTransformation &Trans,
1752  DenseMatrix &shape) const
1753  { CalcVShape_RT(Trans, shape); }
1754  virtual void CalcDivShape(const IntegrationPoint &ip,
1755  Vector &divshape) const;
1757  DenseMatrix &I) const
1758  { LocalInterpolation_RT(nk, dof2nk, Trans, I); }
1759  using FiniteElement::Project;
1760  virtual void Project(VectorCoefficient &vc,
1761  ElementTransformation &Trans, Vector &dofs) const
1762  { Project_RT(nk, dof2nk, vc, Trans, dofs); }
1763  virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
1764  DenseMatrix &I) const
1765  { Project_RT(nk, dof2nk, fe, Trans, I); }
1766  virtual void ProjectCurl(const FiniteElement &fe,
1767  ElementTransformation &Trans,
1768  DenseMatrix &curl) const
1769  { ProjectCurl_RT(nk, dof2nk, fe, Trans, curl); }
1770 };
1771 
1772 
1774 {
1775  static const double tk[18];
1776 
1777  Poly_1D::Basis &cbasis1d, &obasis1d;
1778 #ifndef MFEM_THREAD_SAFE
1779  mutable Vector shape_cx, shape_ox, shape_cy, shape_oy, shape_cz, shape_oz;
1780  mutable Vector dshape_cx, dshape_cy, dshape_cz;
1781 #endif
1782  Array<int> dof_map, dof2tk;
1783 
1784 public:
1785  ND_HexahedronElement(const int p);
1786  virtual void CalcVShape(const IntegrationPoint &ip,
1787  DenseMatrix &shape) const;
1788  virtual void CalcVShape(ElementTransformation &Trans,
1789  DenseMatrix &shape) const
1790  { CalcVShape_ND(Trans, shape); }
1791  virtual void CalcCurlShape(const IntegrationPoint &ip,
1792  DenseMatrix &curl_shape) const;
1794  DenseMatrix &I) const
1795  { LocalInterpolation_ND(tk, dof2tk, Trans, I); }
1796  using FiniteElement::Project;
1797  virtual void Project(VectorCoefficient &vc,
1798  ElementTransformation &Trans, Vector &dofs) const
1799  { Project_ND(tk, dof2tk, vc, Trans, dofs); }
1800  virtual void Project(const FiniteElement &fe,
1801  ElementTransformation &Trans,
1802  DenseMatrix &I) const
1803  { Project_ND(tk, dof2tk, fe, Trans, I); }
1804  virtual void ProjectGrad(const FiniteElement &fe,
1805  ElementTransformation &Trans,
1806  DenseMatrix &grad) const
1807  { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
1808 };
1809 
1810 
1812 {
1813  static const double tk[8];
1814 
1815  Poly_1D::Basis &cbasis1d, &obasis1d;
1816 #ifndef MFEM_THREAD_SAFE
1817  mutable Vector shape_cx, shape_ox, shape_cy, shape_oy;
1818  mutable Vector dshape_cx, dshape_cy;
1819 #endif
1820  Array<int> dof_map, dof2tk;
1821 
1822 public:
1823  ND_QuadrilateralElement(const int p);
1824  virtual void CalcVShape(const IntegrationPoint &ip,
1825  DenseMatrix &shape) const;
1826  virtual void CalcVShape(ElementTransformation &Trans,
1827  DenseMatrix &shape) const
1828  { CalcVShape_ND(Trans, shape); }
1829  virtual void CalcCurlShape(const IntegrationPoint &ip,
1830  DenseMatrix &curl_shape) const;
1832  DenseMatrix &I) const
1833  { LocalInterpolation_ND(tk, dof2tk, Trans, I); }
1834  using FiniteElement::Project;
1835  virtual void Project(VectorCoefficient &vc,
1836  ElementTransformation &Trans, Vector &dofs) const
1837  { Project_ND(tk, dof2tk, vc, Trans, dofs); }
1838  virtual void Project(const FiniteElement &fe,
1839  ElementTransformation &Trans,
1840  DenseMatrix &I) const
1841  { Project_ND(tk, dof2tk, fe, Trans, I); }
1842  virtual void ProjectGrad(const FiniteElement &fe,
1843  ElementTransformation &Trans,
1844  DenseMatrix &grad) const
1845  { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
1846 };
1847 
1848 
1850 {
1851  static const double tk[18], c;
1852 
1853 #ifndef MFEM_THREAD_SAFE
1854  mutable Vector shape_x, shape_y, shape_z, shape_l;
1855  mutable Vector dshape_x, dshape_y, dshape_z, dshape_l;
1856  mutable DenseMatrix u;
1857 #endif
1858  Array<int> dof2tk;
1859  DenseMatrix T;
1860 
1861 public:
1862  ND_TetrahedronElement(const int p);
1863  virtual void CalcVShape(const IntegrationPoint &ip,
1864  DenseMatrix &shape) const;
1865  virtual void CalcVShape(ElementTransformation &Trans,
1866  DenseMatrix &shape) const
1867  { CalcVShape_ND(Trans, shape); }
1868  virtual void CalcCurlShape(const IntegrationPoint &ip,
1869  DenseMatrix &curl_shape) const;
1871  DenseMatrix &I) const
1872  { LocalInterpolation_ND(tk, dof2tk, Trans, I); }
1873  using FiniteElement::Project;
1874  virtual void Project(VectorCoefficient &vc,
1875  ElementTransformation &Trans, Vector &dofs) const
1876  { Project_ND(tk, dof2tk, vc, Trans, dofs); }
1877  virtual void Project(const FiniteElement &fe,
1878  ElementTransformation &Trans,
1879  DenseMatrix &I) const
1880  { Project_ND(tk, dof2tk, fe, Trans, I); }
1881  virtual void ProjectGrad(const FiniteElement &fe,
1882  ElementTransformation &Trans,
1883  DenseMatrix &grad) const
1884  { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
1885 };
1886 
1888 {
1889  static const double tk[8], c;
1890 
1891 #ifndef MFEM_THREAD_SAFE
1892  mutable Vector shape_x, shape_y, shape_l;
1893  mutable Vector dshape_x, dshape_y, dshape_l;
1894  mutable DenseMatrix u;
1895 #endif
1896  Array<int> dof2tk;
1897  DenseMatrix T;
1898 
1899 public:
1900  ND_TriangleElement(const int p);
1901  virtual void CalcVShape(const IntegrationPoint &ip,
1902  DenseMatrix &shape) const;
1903  virtual void CalcVShape(ElementTransformation &Trans,
1904  DenseMatrix &shape) const
1905  { CalcVShape_ND(Trans, shape); }
1906  virtual void CalcCurlShape(const IntegrationPoint &ip,
1907  DenseMatrix &curl_shape) const;
1909  DenseMatrix &I) const
1910  { LocalInterpolation_ND(tk, dof2tk, Trans, I); }
1911  using FiniteElement::Project;
1912  virtual void Project(VectorCoefficient &vc,
1913  ElementTransformation &Trans, Vector &dofs) const
1914  { Project_ND(tk, dof2tk, vc, Trans, dofs); }
1915  virtual void Project(const FiniteElement &fe,
1916  ElementTransformation &Trans,
1917  DenseMatrix &I) const
1918  { Project_ND(tk, dof2tk, fe, Trans, I); }
1919  virtual void ProjectGrad(const FiniteElement &fe,
1920  ElementTransformation &Trans,
1921  DenseMatrix &grad) const
1922  { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
1923 };
1924 
1925 
1927 {
1928 protected:
1930  mutable int *ijk, patch, elem;
1931  mutable Vector weights;
1932 
1933 public:
1934  NURBSFiniteElement(int D, int G, int Do, int O, int F)
1935  : FiniteElement(D, G, Do, O, F)
1936  {
1937  ijk = NULL;
1938  patch = elem = -1;
1939  kv.SetSize(Dim);
1940  weights.SetSize(Dof);
1941  weights = 1.0;
1942  }
1943 
1944  void Reset () const { patch = elem = -1; }
1945  void SetIJK (int *IJK) const { ijk = IJK; }
1946  int GetPatch () const { return patch; }
1947  void SetPatch (int p) const { patch = p; }
1948  int GetElement () const { return elem; }
1949  void SetElement (int e) const { elem = e; }
1950  Array <KnotVector*> &KnotVectors() const { return kv; }
1951  Vector &Weights () const { return weights; }
1952 };
1953 
1955 {
1956 protected:
1957  mutable Vector shape_x;
1958 
1959 public:
1961  : NURBSFiniteElement(1, Geometry::SEGMENT, p + 1, p, FunctionSpace::Qk),
1962  shape_x(p + 1) { }
1963 
1964  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1965  virtual void CalcDShape(const IntegrationPoint &ip,
1966  DenseMatrix &dshape) const;
1967 };
1968 
1970 {
1971 protected:
1973 
1974 public:
1976  : NURBSFiniteElement(2, Geometry::SQUARE, (p + 1)*(p + 1), p,
1977  FunctionSpace::Qk), u(Dof),
1978  shape_x(p + 1), shape_y(p + 1), dshape_x(p + 1), dshape_y(p + 1) { }
1979 
1980  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1981  virtual void CalcDShape(const IntegrationPoint &ip,
1982  DenseMatrix &dshape) const;
1983 };
1984 
1986 {
1987 protected:
1989 
1990 public:
1992  : NURBSFiniteElement(3, Geometry::CUBE, (p + 1)*(p + 1)*(p + 1), p,
1993  FunctionSpace::Qk), u(Dof),
1994  shape_x(p + 1), shape_y(p + 1), shape_z(p + 1),
1995  dshape_x(p + 1), dshape_y(p + 1), dshape_z(p + 1) { }
1996 
1997  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1998  virtual void CalcDShape(const IntegrationPoint &ip,
1999  DenseMatrix &dshape) const;
2000 };
2001 
2002 }
2003 
2004 #endif
Abstract class for Finite Elements.
Definition: fe.hpp:42
RefinedLinear3DFiniteElement()
Construct a quadratic FE on tetrahedron.
Definition: fe.cpp:3859
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.hpp:1180
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:1078
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:7356
RT_QuadrilateralElement(const int p)
Definition: fe.cpp:8251
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:5585
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.hpp:1682
int GetDim() const
Returns the space dimension for the finite element.
Definition: fe.hpp:80
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:6722
L2_TetrahedronElement(const int p, const int _type=0)
Definition: fe.cpp:7956
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:2595
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.hpp:1152
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:3462
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:826
static void CalcBernstein(const int p, const double x, double *u, double *d)
Definition: fe.hpp:1289
Class for integration rule.
Definition: intrules.hpp:63
Linear 1D element with nodes 1/3 and 2/3 (trace of RT1)
Definition: fe.hpp:890
Quadratic 1D element with nodes the Gaussian points in [0,1] (trace of RT2)
Definition: fe.hpp:900
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:7724
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:9858
Linear3DFiniteElement()
Construct a linear FE on tetrahedron.
Definition: fe.cpp:1997
static double CalcDelta(const int p, const double x)
Definition: fe.hpp:1268
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:2775
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.hpp:1712
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1756
H1_HexahedronElement(const int p)
Definition: fe.cpp:6470
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:7494
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:8948
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:30
RefinedBiLinear2DFiniteElement()
Construct a biquadratic FE on quadrilateral.
Definition: fe.cpp:4063
ND_QuadrilateralElement(const int p)
Definition: fe.cpp:9309
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:1392
L2Pos_TriangleElement(const int p)
Definition: fe.cpp:7871
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.hpp:1842
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.hpp:745
H1Pos_SegmentElement(const int p)
Definition: fe.cpp:6670
int GetPatch() const
Definition: fe.hpp:1946
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition: fe.hpp:1766
virtual void ProjectDiv(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &div) const
Definition: fe.cpp:116
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:637
virtual void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const
Definition: fe.cpp:4642
virtual void Project(Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:75
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:548
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:2235
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:2014
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:7944
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:2549
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:2825
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:1192
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:6704
L2Pos_TetrahedronElement(const int p)
Definition: fe.cpp:8102
Array< KnotVector * > kv
Definition: fe.hpp:1929
void CalcVShape_RT(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.cpp:330
void SetSize(int s)
Resizes the vector if the new size is different.
Definition: vector.hpp:248
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Definition: fe.cpp:8389
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:4702
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:3289
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:747
virtual void Project(Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:156
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:1216
void LocalInterpolation_ND(const double *tk, const Array< int > &d2t, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:578
virtual void CalcHessian(const IntegrationPoint &ip, DenseMatrix &h) const
Definition: fe.cpp:1570
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:1481
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:2318
static void UniformPoints(const int p, double *x)
Definition: fe.cpp:5839
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
evaluate derivatives of shape function - constant 0
Definition: fe.cpp:1968
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.hpp:1100
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.hpp:1788
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:636
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:6324
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:9808
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:7373
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1641
LagrangeHexFiniteElement(int degree)
Definition: fe.cpp:3514
int GetOrder() const
Returns the order of the finite element.
Definition: fe.hpp:89
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Definition: fe.cpp:2331
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:3388
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:3674
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.hpp:1826
Data type dense matrix.
Definition: densemat.hpp:22
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:3356
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.cpp:226
void Reset() const
Definition: fe.hpp:1944
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.hpp:1721
Class for quadratic FE on triangle.
Definition: fe.hpp:474
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:9820
Basis & OpenBasis(const int p)
Definition: fe.cpp:6219
const double * ClosedPoints(const int p)
Definition: fe.cpp:6198
PositiveFiniteElement(int D, int G, int Do, int O, int F=FunctionSpace::Pk)
Definition: fe.hpp:249
Class for quadratic FE on interval.
Definition: fe.hpp:445
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.hpp:1636
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Definition: fe.cpp:8806
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:4866
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:1983
int Space() const
Returns the type of space on each element.
Definition: fe.hpp:92
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:1641
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:69
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1685
RefinedTriLinear3DFiniteElement()
Construct a biquadratic FE on quadrilateral.
Definition: fe.cpp:4198
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:3501
Quadratic3DFiniteElement()
Construct a quadratic FE on tetrahedron.
Definition: fe.cpp:2053
int GetMapType() const
Definition: fe.hpp:96
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:7244
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:5212
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:5399
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:2428
const Array< int > & GetDofMap() const
Definition: fe.hpp:1349
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:8067
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:1693
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:8148
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:2260
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:2252
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:7301
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:6392
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:950
void ProjectCurl_RT(const double *nk, const Array< int > &d2n, const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition: fe.cpp:451
H1Pos_HexahedronElement(const int p)
Definition: fe.cpp:6818
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.cpp:100
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:8011
RT_HexahedronElement(const int p)
Definition: fe.cpp:8431
virtual void CalcHessian(const IntegrationPoint &ip, DenseMatrix &h) const
Definition: fe.cpp:708
int GetElement() const
Definition: fe.hpp:1948
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:6790
Linear2DFiniteElement()
Construct a linear FE on triangle.
Definition: fe.cpp:650
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.hpp:1645
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:2110
Class for refined bi-linear FE on quadrilateral.
Definition: fe.hpp:1029
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:5532
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:4376
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:9767
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:617
L2_SegmentElement(const int p, const int _type=0)
Definition: fe.cpp:7217
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:1713
L2Pos_HexahedronElement(const int p)
Definition: fe.cpp:7662
ND_TriangleElement(const int p)
Definition: fe.cpp:9689
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Definition: fe.cpp:8984
static void CalcBasis(const int p, const double x, double *u)
Definition: fe.hpp:1252
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.hpp:772
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
evaluate shape function - constant 1
Definition: fe.cpp:1962
virtual void CalcHessian(const IntegrationPoint &ip, DenseMatrix &h) const
Definition: fe.cpp:1741
static void CalcBinomTerms(const int p, const double x, const double y, double *u)
Compute the terms in the expansion of the binomial (x + y)^p.
Definition: fe.cpp:6012
virtual void CalcHessian(const IntegrationPoint &ip, DenseMatrix &h) const
Definition: fe.cpp:63
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:3003
Cubic3DFiniteElement()
Construct a cubic FE on tetrahedron.
Definition: fe.cpp:1788
Linear1DFiniteElement()
Construct a linear FE on interval.
Definition: fe.cpp:629
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:3810
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Definition: fe.cpp:5520
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:1265
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition: fe.cpp:108
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:883
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1678
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:2284
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:1881
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:3307
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:440
Class for bilinear FE on quad with nodes at the 4 Gaussian points.
Definition: fe.hpp:420
Class for refined linear FE on interval.
Definition: fe.hpp:976
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:7250
Class for refined linear FE on triangle.
Definition: fe.hpp:996
Class for refined linear FE on tetrahedron.
Definition: fe.hpp:1016
void SetPatch(int p) const
Definition: fe.hpp:1947
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:843
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:854
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:1102
Class for constant FE on triangle.
Definition: fe.hpp:613
H1_TriangleElement(const int p)
Definition: fe.cpp:6956
RefinedLinear1DFiniteElement()
Construct a quadratic FE on interval.
Definition: fe.cpp:3711
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:6601
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:6811
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:1365
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:7813
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:7014
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition: fe.hpp:1688
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:3735
void LocalInterpolation_RT(const double *nk, const Array< int > &d2n, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:544
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Definition: fe.cpp:2945
static void ChebyshevPoints(const int p, double *x)
Definition: fe.cpp:5982
NURBSFiniteElement(int D, int G, int Do, int O, int F)
Definition: fe.hpp:1934
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:5655
const Array< int > & GetDofMap() const
Definition: fe.hpp:1330
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:3486
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:5498
Class for refined trilinear FE on a hexahedron.
Definition: fe.hpp:1049
ND_TetrahedronElement(const int p)
Definition: fe.cpp:9428
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:7910
Class for quadratic FE on tetrahedron.
Definition: fe.hpp:668
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const =0
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.hpp:1865
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:623
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.hpp:1751
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:1656
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1870
const IntegrationRule & GetNodes() const
Definition: fe.hpp:110
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:4753
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:924
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:7586
DenseMatrix vshape
Definition: fe.hpp:273
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:2088
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.hpp:1651
L2Pos_QuadrilateralElement(const int p)
Definition: fe.cpp:7441
P0SegmentFiniteElement(int Ord=0)
Definition: fe.cpp:2223
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Definition: fe.cpp:2572
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:9893
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.hpp:1874
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.hpp:852
Class for linear FE on tetrahedron.
Definition: fe.hpp:643
Class for linear FE on interval.
Definition: fe.hpp:342
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:8574
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:4804
Crouzeix-Raviart finite element on quadrilateral.
Definition: fe.hpp:716
Class for linear FE on triangle.
Definition: fe.hpp:362
Class for quadratic FE on triangle with nodes at the &quot;Gaussian&quot; points.
Definition: fe.hpp:498
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:7793
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:8350
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1908
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:1520
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:3201
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1831
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:699
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:2023
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Definition: fe.cpp:8636
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:7160
virtual void CalcHessian(const IntegrationPoint &ip, DenseMatrix &h) const
Definition: fe.cpp:948
void SetElement(int e) const
Definition: fe.hpp:1949
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:1026
void ProjectGrad_ND(const double *tk, const Array< int > &d2t, const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.cpp:525
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:7886
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1763
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.hpp:799
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:9917
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:1040
int GetGeomType() const
Returns the geometry type:
Definition: fe.hpp:83
virtual void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const
Definition: fe.cpp:9416
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:7457
ND_HexahedronElement(const int p)
Definition: fe.cpp:9030
IntegrationRule Nodes
Definition: fe.hpp:46
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:910
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:7681
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:6686
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:6949
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:3251
virtual void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const
Definition: fe.cpp:9801
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Definition: fe.cpp:2443
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:4086
virtual ~FiniteElement()
Definition: fe.hpp:193
H1_QuadrilateralElement(const int p)
Definition: fe.cpp:6348
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:2342
void CalcVShape_ND(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.cpp:343
DenseMatrix Jinv
Definition: fe.hpp:272
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.hpp:1124
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:7261
int GetDof() const
Returns the degrees of freedom in the FE space.
Definition: fe.hpp:86
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:7183
Class for bi-quadratic FE on quadrilateral.
Definition: fe.hpp:514
Class for tri-linear FE on cube.
Definition: fe.hpp:681
Base class Coefficient that may optionally depend on time.
Definition: coefficient.hpp:31
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:794
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:939
virtual void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const
Definition: fe.cpp:4834
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:8118
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:711
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:661
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:4243
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:3971
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:625
static const int * Binom(const int p)
Definition: fe.cpp:5824
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Definition: fe.cpp:3103
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Definition: fe.cpp:44
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:729
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1648
static void GaussLobattoPoints(const int p, double *x)
Definition: fe.cpp:5908
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.hpp:1078
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:8034
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:9180
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:2505
FiniteElement(int D, int G, int Do, int O, int F=FunctionSpace::Pk)
Definition: fe.cpp:22
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:1151
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:2168
Class for bilinear FE on quadrilateral.
Definition: fe.hpp:384
Quad1DFiniteElement()
Construct a quadratic FE on interval.
Definition: fe.cpp:835
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:6906
virtual void GetFaceDofs(int face, int **dofs, int *ndofs) const
Definition: fe.cpp:58
Class for linear FE on triangle with nodes at the 3 &quot;Gaussian&quot; points.
Definition: fe.hpp:409
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:783
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1793
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.hpp:873
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:690
virtual void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const
Definition: fe.cpp:51
H1Pos_QuadrilateralElement(const int p)
Definition: fe.cpp:6729
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.hpp:1912
Array< KnotVector * > & KnotVectors() const
Definition: fe.hpp:1950
Class for integration point with weight.
Definition: intrules.hpp:25
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:643
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:7842
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:6925
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:7307
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:223
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:1989
Bi-quadratic element on quad with nodes at the 9 Gaussian points.
Definition: fe.hpp:553
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.hpp:826
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:7700
void Project_RT(const double *nk, const Array< int > &d2n, VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:362
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:6558
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:818
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:2922
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:9575
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:2703
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:9375
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:379
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.hpp:1919
virtual void ProjectDiv(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &div) const
Definition: fe.cpp:250
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:2455
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:7318
RefinedLinear2DFiniteElement()
Construct a quadratic FE on triangle.
Definition: fe.cpp:3751
void NodalLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I, const NodalFiniteElement &fine_fe) const
Definition: fe.cpp:125
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:5452
void SetIJK(int *IJK) const
Definition: fe.hpp:1945
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.hpp:1835
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.hpp:1804
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:3719
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:3450
RT_TetrahedronElement(const int p)
Definition: fe.cpp:8848
L2_TriangleElement(const int p, const int _type=0)
Definition: fe.cpp:7743
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:5012
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:3655
Vector & Weights() const
Definition: fe.hpp:1951
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:6307
H1_TetrahedronElement(const int p)
Definition: fe.cpp:7064
BiQuad2DFiniteElement()
Construct a biquadratic FE on quadrilateral.
Definition: fe.cpp:1055
virtual void GetFaceDofs(int face, int **dofs, int *ndofs) const
Definition: fe.cpp:2043
Tensor products of 1D FEs (only degree 2 is functional)
Definition: fe.hpp:955
Basis & ClosedBasis(const int p)
Definition: fe.cpp:6238
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Definition: fe.cpp:2740
P0TriangleFiniteElement()
Construct P0 triangle finite element.
Definition: fe.cpp:1955
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1915
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:2229
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1724
RT_TriangleElement(const int p)
Definition: fe.cpp:8699
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:6290
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.hpp:1797
virtual void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const
Definition: fe.cpp:9242
void Eval(const double x, Vector &u) const
Definition: fe.cpp:5730
L2Pos_SegmentElement(const int p)
Definition: fe.cpp:7289
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:3894
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:5065
Class for cubic FE on tetrahedron.
Definition: fe.hpp:600
Vector data type.
Definition: vector.hpp:29
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Definition: fe.cpp:4998
static void CalcBernstein(const int p, const double x, double *u)
Definition: fe.hpp:1287
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1800
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:6772
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:7562
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:976
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:8775
Quad2DFiniteElement()
Construct a quadratic FE on triangle.
Definition: fe.cpp:893
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1838
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.hpp:1760
Describes the space on each element.
Definition: fe.hpp:27
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:2184
const double * OpenPoints(const int p)
Definition: fe.cpp:6177
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:4917
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:7474
static void GaussPoints(const int p, double *x)
Definition: fe.cpp:5852
virtual void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const
Definition: fe.cpp:9617
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:3507
virtual void Project(Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:1292
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:669
H1_SegmentElement(const int p)
Definition: fe.cpp:6273
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:1853
NodalFiniteElement(int D, int G, int Do, int O, int F=FunctionSpace::Pk)
Definition: fe.hpp:208
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:2295
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:6429
L2_HexahedronElement(const int p, const int _type=0)
Definition: fe.cpp:7509
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:699
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:4968
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:3319
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:403
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:4131
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const =0
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:9839
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1717
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.hpp:1881
void Project_ND(const double *tk, const Array< int > &d2t, VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:468
int GetRangeType() const
Definition: fe.hpp:94
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:772
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:2645
static void CalcBasis(const int p, const double x, double *u, double *d)
Definition: fe.hpp:1261
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1877
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:3480
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:6577
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.hpp:1727
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:6409
Basis(const int p, const double *nodes, const int _mode=1)
Definition: fe.cpp:5690
static void CalcDBinomTerms(const int p, const double x, const double y, double *d)
Definition: fe.cpp:6076
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition: fe.cpp:4587
TriLinear3DFiniteElement()
Construct a tri-linear FE on cube.
Definition: fe.cpp:2132
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:87
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:873
VectorFiniteElement(int D, int G, int Do, int O, int M, int F=FunctionSpace::Pk) MapType
Definition: fe.hpp:327
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:7543
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.hpp:1673
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:3768
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:3280
BiLinear2DFiniteElement()
Construct a bilinear FE on quadrilateral.
Definition: fe.cpp:677
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.hpp:1903
Poly_1D poly1d
Definition: fe.cpp:6269
Crouzeix-Raviart finite element on triangle.
Definition: fe.hpp:704
L2_QuadrilateralElement(const int p, const int _type=0)
Definition: fe.cpp:7325
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:5638
Lagrange1DFiniteElement(int degree)
Definition: fe.cpp:3332
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:2392
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Definition: fe.cpp:5335
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:8235
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:7393
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:739
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:661
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:7034
void ProjectGrad_RT(const double *nk, const Array< int > &d2n, const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.cpp:428
virtual void Project(Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:278