MFEM  v3.3.2
Finite element discretization library
 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.org.
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 #include <map>
22 
23 namespace mfem
24 {
25 
26 // Base and derived classes for finite elements
27 
28 /// Describes the space on each element
30 {
31 public:
32  enum
33  {
34  Pk, ///< Polynomials of order k
35  Qk, ///< Tensor products of polynomials of order k
36  rQk ///< Refined tensor products of polynomials of order k
37  };
38 };
39 
40 class ElementTransformation;
41 class Coefficient;
42 class VectorCoefficient;
43 class MatrixCoefficient;
44 class KnotVector;
45 
46 /// Abstract class for Finite Elements
48 {
49 protected:
50  int Dim, ///< Dimension of reference space
51  GeomType, ///< Geometry::Type of the reference element
52  Dof, ///< Number of degrees of freedom
53  Order, ///< Order/degree of the shape functions
57 #ifndef MFEM_THREAD_SAFE
58  mutable DenseMatrix vshape; // Dof x Dim
59 #endif
60 
61 public:
62  /// Enumeration for RangeType and DerivRangeType
63  enum { SCALAR, VECTOR };
64 
65  /** @brief Enumeration for MapType: defines how reference functions are
66  mapped to physical space.
67 
68  A reference function, `uh(xh)`, can be mapped to a function, `u(x)`, on a
69  general physical element in following ways:
70 
71  VALUE u(x) = uh(xh)
72  INTEGRAL u(x) = (1/w) * uh(xh)
73  H_DIV u(x) = (J/w) * uh(xh)
74  H_CURL u(x) = J^{-t} * uh(xh) (square J)
75  H_CURL u(x) = J*(J^t*J)^{-1} * uh(xh) (general J)
76 
77  where
78 
79  x = T(xh) is the image of the reference point xh ("x hat"),
80  J = J(xh) is the Jacobian matrix of the transformation T, and
81  w = w(xh) = / det(J), for square J,
82  \ det(J^t*J)^{1/2}, for general J,
83  is the transformation weight factor.
84  */
85  enum { VALUE, ///< For scalar fields; preserves point values
86  INTEGRAL, ///< For scalar fields; preserves volume integrals
87  H_DIV, /**< For vector fields; preserves surface integrals of the
88  normal component */
89  H_CURL /**< For vector fields; preserves line integrals of the
90  tangential component */
91  };
92 
93  /** @brief Enumeration for DerivType: defines which derivative method
94  is implemented.
95 
96  Each FiniteElement class implements only one type of derivative. The
97  value returned by GetDerivType() indicates which derivative method is
98  implemented.
99  */
100  enum { NONE, ///< No derivatives implemented
101  GRAD, ///< Implements CalcDShape methods
102  DIV, ///< Implements CalcDivShape methods
103  CURL ///< Implements CalcCurlShape methods
104  };
105 
106  /** Construct FiniteElement with given
107  @param D Reference space dimension
108  @param G Geometry type (of type Geometry::Type)
109  @param Do Number of degrees of freedom in the FiniteElement
110  @param O Order/degree of the FiniteElement
111  @param F FunctionSpace type of the FiniteElement
112  */
113  FiniteElement(int D, int G, int Do, int O, int F = FunctionSpace::Pk);
114 
115  /// Returns the reference space dimension for the finite element
116  int GetDim() const { return Dim; }
117 
118  /// Returns the Geometry::Type of the reference element
119  int GetGeomType() const { return GeomType; }
120 
121  /// Returns the number of degrees of freedom in the finite element
122  int GetDof() const { return Dof; }
123 
124  /// Returns the order of the finite element
125  int GetOrder() const { return Order; }
126 
127  /// Returns the type of space on each element
128  int Space() const { return FuncSpace; }
129 
130  int GetRangeType() const { return RangeType; }
131 
132  int GetDerivRangeType() const { return DerivRangeType; }
133 
134  int GetMapType() const { return MapType; }
135 
136  int GetDerivType() const { return DerivType; }
137 
138  int GetDerivMapType() const { return DerivMapType; }
139 
140  /** @brief Evaluate the values of all shape functions of a scalar finite
141  element in reference space at the given point @a ip. */
142  /** The size (#Dof) of the result Vector @a shape must be set in advance. */
143  virtual void CalcShape(const IntegrationPoint &ip,
144  Vector &shape) const = 0;
145 
146  /** @brief Evaluate the values of all shape functions of a scalar finite
147  element in physical space at the point described by @a Trans. */
148  /** The size (#Dof) of the result Vector @a shape must be set in advance. */
149  void CalcPhysShape(ElementTransformation &Trans, Vector &shape) const;
150 
151  /** @brief Evaluate the gradients of all shape functions of a scalar finite
152  element in reference space at the given point @a ip. */
153  /** Each row of the result DenseMatrix @a dshape contains the derivatives of
154  one shape function. The size (#Dof x #Dim) of @a dshape must be set in
155  advance. */
156  virtual void CalcDShape(const IntegrationPoint &ip,
157  DenseMatrix &dshape) const = 0;
158 
159  /** @brief Evaluate the gradients of all shape functions of a scalar finite
160  element in physical space at the point described by @a Trans. */
161  /** Each row of the result DenseMatrix @a dshape contains the derivatives of
162  one shape function. The size (#Dof x SDim) of @a dshape must be set in
163  advance, where SDim >= #Dim is the physical space dimension as described
164  by @a Trans. */
166 
167  const IntegrationRule & GetNodes() const { return Nodes; }
168 
169  // virtual functions for finite elements on vector spaces
170 
171  /** @brief Evaluate the values of all shape functions of a *vector* finite
172  element in reference space at the given point @a ip. */
173  /** Each row of the result DenseMatrix @a shape contains the components of
174  one vector shape function. The size (#Dof x #Dim) of @a shape must be set
175  in advance. */
176  virtual void CalcVShape(const IntegrationPoint &ip,
177  DenseMatrix &shape) const;
178 
179  /** @brief Evaluate the values of all shape functions of a *vector* finite
180  element in physical space at the point described by @a Trans. */
181  /** Each row of the result DenseMatrix @a shape contains the components of
182  one vector shape function. The size (#Dof x SDim) of @a shape must be set
183  in advance, where SDim >= #Dim is the physical space dimension as
184  described by @a Trans. */
185  virtual void CalcVShape(ElementTransformation &Trans,
186  DenseMatrix &shape) const;
187 
188  /// Equivalent to the CalcVShape() method with the same arguments.
190  { CalcVShape(Trans, shape); }
191 
192  /** @brief Evaluate the divergence of all shape functions of a *vector*
193  finite element in reference space at the given point @a ip. */
194  /** The size (#Dof) of the result Vector @a divshape must be set in advance.
195  */
196  virtual void CalcDivShape(const IntegrationPoint &ip,
197  Vector &divshape) const;
198 
199  /** @brief Evaluate the divergence of all shape functions of a *vector*
200  finite element in physical space at the point described by @a Trans. */
201  /** The size (#Dof) of the result Vector @a divshape must be set in advance.
202  */
203  void CalcPhysDivShape(ElementTransformation &Trans, Vector &divshape) const;
204 
205  /** @brief Evaluate the curl of all shape functions of a *vector* finite
206  element in reference space at the given point @a ip. */
207  /** Each row of the result DenseMatrix @a curl_shape contains the components
208  of the curl of one vector shape function. The size (#Dof x CDim) of
209  @a curl_shape must be set in advance, where CDim = 3 for #Dim = 3 and
210  CDim = 1 for #Dim = 2. */
211  virtual void CalcCurlShape(const IntegrationPoint &ip,
212  DenseMatrix &curl_shape) const;
213 
214  /** @brief Evaluate the curl of all shape functions of a *vector* finite
215  element in physical space at the point described by @a Trans. */
216  /** Each row of the result DenseMatrix @a curl_shape contains the components
217  of the curl of one vector shape function. The size (#Dof x CDim) of
218  @a curl_shape must be set in advance, where CDim = 3 for #Dim = 3 and
219  CDim = 1 for #Dim = 2. */
221  DenseMatrix &curl_shape) const;
222 
223  virtual void GetFaceDofs(int face, int **dofs, int *ndofs) const;
224 
225  /** each row of h contains the upper triangular part of the hessian
226  of one shape function; the order in 2D is {u_xx, u_xy, u_yy} */
227  virtual void CalcHessian (const IntegrationPoint &ip,
228  DenseMatrix &h) const;
229 
230  /** Return the local interpolation matrix I (Dof x Dof) where the
231  fine element is the image of the base geometry under the given
232  transformation. */
234  DenseMatrix &I) const;
235 
236  /** Given a coefficient and a transformation, compute its projection
237  (approximation) in the local finite dimensional space in terms
238  of the degrees of freedom. */
239  virtual void Project (Coefficient &coeff,
240  ElementTransformation &Trans, Vector &dofs) const;
241 
242  /** Given a vector coefficient and a transformation, compute its
243  projection (approximation) in the local finite dimensional space
244  in terms of the degrees of freedom. (VectorFiniteElements) */
245  virtual void Project (VectorCoefficient &vc,
246  ElementTransformation &Trans, Vector &dofs) const;
247 
248  /** Given a matrix coefficient and a transformation, compute an approximation
249  ("projection") in the local finite dimensional space in terms of the
250  degrees of freedom. For VectorFiniteElements, the rows of the coefficient
251  are projected in the vector space. */
252  virtual void ProjectMatrixCoefficient(
253  MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const;
254 
255  /** Compute a representation (up to multiplicative constant) for
256  the delta function at the vertex with the given index. */
257  virtual void ProjectDelta(int vertex, Vector &dofs) const;
258 
259  /** Compute the embedding/projection matrix from the given FiniteElement
260  onto 'this' FiniteElement. The ElementTransformation is included to
261  support cases when the projection depends on it. */
262  virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
263  DenseMatrix &I) const;
264 
265  /** Compute the discrete gradient matrix from the given FiniteElement onto
266  'this' FiniteElement. The ElementTransformation is included to support
267  cases when the matrix depends on it. */
268  virtual void ProjectGrad(const FiniteElement &fe,
270  DenseMatrix &grad) const;
271 
272  /** Compute the discrete curl matrix from the given FiniteElement onto
273  'this' FiniteElement. The ElementTransformation is included to support
274  cases when the matrix depends on it. */
275  virtual void ProjectCurl(const FiniteElement &fe,
277  DenseMatrix &curl) const;
278 
279  /** Compute the discrete divergence matrix from the given FiniteElement onto
280  'this' FiniteElement. The ElementTransformation is included to support
281  cases when the matrix depends on it. */
282  virtual void ProjectDiv(const FiniteElement &fe,
284  DenseMatrix &div) const;
285 
286  virtual ~FiniteElement () { }
287 
288  static int VerifyClosed(int pt_type)
289  {
290  int cp_type = Quadrature1D::CheckClosed(pt_type);
291  MFEM_VERIFY(cp_type != Quadrature1D::Invalid,
292  "invalid closed point type: " << pt_type);
293  return cp_type;
294  }
295  static int VerifyOpen(int pt_type)
296  {
297  int op_type = Quadrature1D::CheckOpen(pt_type);
298  MFEM_VERIFY(op_type != Quadrature1D::Invalid,
299  "invalid open point type: " << pt_type);
300  return op_type;
301  }
302 };
303 
305 {
306 public:
307  ScalarFiniteElement(int D, int G, int Do, int O, int F = FunctionSpace::Pk)
308  : FiniteElement(D, G, Do, O, F)
310 
311  void SetMapType(int M)
312  {
313  MFEM_VERIFY(M == VALUE || M == INTEGRAL, "unknown MapType");
314  MapType = M;
315  DerivType = (M == VALUE) ? GRAD : NONE;
316  }
317 };
318 
320 {
321 protected:
323  DenseMatrix &I,
324  const NodalFiniteElement &fine_fe) const;
325 
326  void ProjectCurl_2D(const FiniteElement &fe,
327  ElementTransformation &Trans,
328  DenseMatrix &curl) const;
329 
330 #ifndef MFEM_THREAD_SAFE
331  mutable Vector c_shape;
332 #endif
333 
334 public:
335 #ifdef MFEM_THREAD_SAFE
336  NodalFiniteElement(int D, int G, int Do, int O, int F = FunctionSpace::Pk)
337  : ScalarFiniteElement(D, G, Do, O, F) { }
338 #else
339  NodalFiniteElement(int D, int G, int Do, int O, int F = FunctionSpace::Pk)
340  : ScalarFiniteElement(D, G, Do, O, F), c_shape(Do) { }
341 #endif
342 
344  DenseMatrix &I) const
345  { NodalLocalInterpolation (Trans, I, *this); }
346 
347  virtual void Project (Coefficient &coeff,
348  ElementTransformation &Trans, Vector &dofs) const;
349 
350  virtual void Project (VectorCoefficient &vc,
351  ElementTransformation &Trans, Vector &dofs) const;
352 
353  // (mc.height x mc.width) @ DOFs -> (Dof x mc.width x mc.height) in dofs
354  virtual void ProjectMatrixCoefficient(
355  MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const;
356 
357  virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
358  DenseMatrix &I) const;
359 
360  virtual void ProjectGrad(const FiniteElement &fe,
361  ElementTransformation &Trans,
362  DenseMatrix &grad) const;
363 
364  virtual void ProjectDiv(const FiniteElement &fe,
365  ElementTransformation &Trans,
366  DenseMatrix &div) const;
367 };
368 
369 
371 {
372 protected:
374  DenseMatrix &I,
375  const PositiveFiniteElement &fine_fe) const;
376 
377 public:
378  PositiveFiniteElement(int D, int G, int Do, int O,
379  int F = FunctionSpace::Pk) :
380  ScalarFiniteElement(D, G, Do, O, F)
381  { }
382 
384  DenseMatrix &I) const
385  { PositiveLocalInterpolation(Trans, I, *this); }
386 
388 
389  // Low-order monotone "projection" (actually it is not a projection): the
390  // dofs are set to be the Coefficient values at the nodes.
391  virtual void Project(Coefficient &coeff,
392  ElementTransformation &Trans, Vector &dofs) const;
393 
394  virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
395  DenseMatrix &I) const;
396 };
397 
399 {
400  // Hide the scalar functions CalcShape and CalcDShape.
401 private:
402  /// Overrides the scalar CalcShape function to print an error.
403  virtual void CalcShape(const IntegrationPoint &ip,
404  Vector &shape) const;
405 
406  /// Overrides the scalar CalcDShape function to print an error.
407  virtual void CalcDShape(const IntegrationPoint &ip,
408  DenseMatrix &dshape) const;
409 
410 protected:
411 #ifndef MFEM_THREAD_SAFE
412  mutable DenseMatrix J, Jinv;
414 #endif
415  void SetDerivMembers();
416 
418  DenseMatrix &shape) const;
419 
421  DenseMatrix &shape) const;
422 
423  void Project_RT(const double *nk, const Array<int> &d2n,
425  Vector &dofs) const;
426 
427  // project the rows of the matrix coefficient in an RT space
429  const double *nk, const Array<int> &d2n,
430  MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const;
431 
432  void Project_RT(const double *nk, const Array<int> &d2n,
434  DenseMatrix &I) const;
435 
436  // rotated gradient in 2D
437  void ProjectGrad_RT(const double *nk, const Array<int> &d2n,
439  DenseMatrix &grad) const;
440 
441  // Compute the curl as a discrete operator from ND FE (fe) to ND FE (this).
442  // The natural FE for the range is RT, so this is an approximation.
443  void ProjectCurl_ND(const double *tk, const Array<int> &d2t,
445  DenseMatrix &curl) const;
446 
447  void ProjectCurl_RT(const double *nk, const Array<int> &d2n,
449  DenseMatrix &curl) const;
450 
451  void Project_ND(const double *tk, const Array<int> &d2t,
453  Vector &dofs) const;
454 
455  // project the rows of the matrix coefficient in an ND space
457  const double *tk, const Array<int> &d2t,
458  MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const;
459 
460  void Project_ND(const double *tk, const Array<int> &d2t,
462  DenseMatrix &I) const;
463 
464  void ProjectGrad_ND(const double *tk, const Array<int> &d2t,
466  DenseMatrix &grad) const;
467 
468  void LocalInterpolation_RT(const double *nk, const Array<int> &d2n,
470  DenseMatrix &I) const;
471 
472  void LocalInterpolation_ND(const double *tk, const Array<int> &d2t,
474  DenseMatrix &I) const;
475 
476 public:
477  VectorFiniteElement (int D, int G, int Do, int O, int M,
478  int F = FunctionSpace::Pk) :
479 #ifdef MFEM_THREAD_SAFE
480  FiniteElement(D, G, Do, O, F)
481  { RangeType = VECTOR; MapType = M; SetDerivMembers(); }
482 #else
483  FiniteElement(D, G, Do, O, F), Jinv(D)
484  { RangeType = VECTOR; MapType = M; SetDerivMembers(); }
485 #endif
486 };
487 
489 {
490 public:
492 
493  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
494 
495  virtual void CalcDShape(const IntegrationPoint &ip,
496  DenseMatrix &dshape) const;
497 };
498 
499 /// Class for linear FE on interval
501 {
502 public:
503  /// Construct a linear FE on interval
505 
506  /** virtual function which evaluates the values of all
507  shape functions at a given point ip and stores
508  them in the vector shape of dimension Dof (2) */
509  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
510 
511  /** virtual function which evaluates the derivatives of all
512  shape functions at a given point ip and stores them in
513  the matrix dshape (Dof x Dim) (2 x 1) so that each row
514  contains the derivative of one shape function */
515  virtual void CalcDShape(const IntegrationPoint &ip,
516  DenseMatrix &dshape) const;
517 };
518 
519 /// Class for linear FE on triangle
521 {
522 public:
523  /// Construct a linear FE on triangle
525 
526  /** virtual function which evaluates the values of all
527  shape functions at a given point ip and stores
528  them in the vector shape of dimension Dof (3) */
529  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
530 
531  /** virtual function which evaluates the values of all
532  partial derivatives of all shape functions at a given
533  point ip and stores them in the matrix dshape (Dof x Dim) (3 x 2)
534  so that each row contains the derivatives of one shape function */
535  virtual void CalcDShape(const IntegrationPoint &ip,
536  DenseMatrix &dshape) const;
537  virtual void ProjectDelta(int vertex, Vector &dofs) const
538  { dofs = 0.0; dofs(vertex) = 1.0; }
539 };
540 
541 /// Class for bilinear FE on quadrilateral
543 {
544 public:
545  /// Construct a bilinear FE on quadrilateral
547 
548  /** virtual function which evaluates the values of all
549  shape functions at a given point ip and stores
550  them in the vector shape of dimension Dof (4) */
551  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
552 
553  /** virtual function which evaluates the values of all
554  partial derivatives of all shape functions at a given
555  point ip and stores them in the matrix dshape (Dof x Dim) (4 x 2)
556  so that each row contains the derivatives of one shape function */
557  virtual void CalcDShape(const IntegrationPoint &ip,
558  DenseMatrix &dshape) const;
559  virtual void CalcHessian (const IntegrationPoint &ip,
560  DenseMatrix &h) const;
561  virtual void ProjectDelta(int vertex, Vector &dofs) const
562  { dofs = 0.0; dofs(vertex) = 1.0; } // { dofs = 1.0; }
563 };
564 
565 /// Class for linear FE on triangle with nodes at the 3 "Gaussian" points
567 {
568 public:
570  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
571  virtual void CalcDShape(const IntegrationPoint &ip,
572  DenseMatrix &dshape) const;
573  virtual void ProjectDelta(int vertex, Vector &dofs) const;
574 };
575 
576 /// Class for bilinear FE on quad with nodes at the 4 Gaussian points
578 {
579 private:
580  static const double p[2];
581 
582 public:
584  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
585  virtual void CalcDShape(const IntegrationPoint &ip,
586  DenseMatrix &dshape) const;
587  virtual void ProjectDelta(int vertex, Vector &dofs) const;
588 };
589 
591 {
592 public:
594  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
595  virtual void CalcDShape(const IntegrationPoint &ip,
596  DenseMatrix &dshape) const;
597  virtual void ProjectDelta(int vertex, Vector &dofs) const
598  { dofs = 1.0; }
599 };
600 
601 /// Class for quadratic FE on interval
603 {
604 public:
605  /// Construct a quadratic FE on interval
607 
608  /** virtual function which evaluates the values of all
609  shape functions at a given point ip and stores
610  them in the vector shape of dimension Dof (3) */
611  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
612 
613  /** virtual function which evaluates the derivatives of all
614  shape functions at a given point ip and stores them in
615  the matrix dshape (Dof x Dim) (3 x 1) so that each row
616  contains the derivative of one shape function */
617  virtual void CalcDShape(const IntegrationPoint &ip,
618  DenseMatrix &dshape) const;
619 };
620 
622 {
623 public:
625  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
626  virtual void CalcDShape(const IntegrationPoint &ip,
627  DenseMatrix &dshape) const;
628 };
629 
630 /// Class for quadratic FE on triangle
632 {
633 public:
634  /// Construct a quadratic FE on triangle
636 
637  /** virtual function which evaluates the values of all
638  shape functions at a given point ip and stores
639  them in the vector shape of dimension Dof (6) */
640  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
641 
642  /** virtual function which evaluates the values of all
643  partial derivatives of all shape functions at a given
644  point ip and stores them in the matrix dshape (Dof x Dim) (6 x 2)
645  so that each row contains the derivatives of one shape function */
646  virtual void CalcDShape(const IntegrationPoint &ip,
647  DenseMatrix &dshape) const;
648 
649  virtual void CalcHessian (const IntegrationPoint &ip,
650  DenseMatrix &h) const;
651  virtual void ProjectDelta(int vertex, Vector &dofs) const;
652 };
653 
654 /// Class for quadratic FE on triangle with nodes at the "Gaussian" points
656 {
657 private:
658  static const double p[2];
659  DenseMatrix A;
660  mutable DenseMatrix D;
661  mutable Vector pol;
662 public:
664  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
665  virtual void CalcDShape(const IntegrationPoint &ip,
666  DenseMatrix &dshape) const;
667  // virtual void ProjectDelta(int vertex, Vector &dofs) const;
668 };
669 
670 /// Class for bi-quadratic FE on quadrilateral
672 {
673 public:
674  /// Construct a biquadratic FE on quadrilateral
676 
677  /** virtual function which evaluates the values of all
678  shape functions at a given point ip and stores
679  them in the vector shape of dimension Dof (9) */
680  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
681 
682  /** virtual function which evaluates the values of all
683  partial derivatives of all shape functions at a given
684  point ip and stores them in the matrix dshape (Dof x Dim) (9 x 2)
685  so that each row contains the derivatives of one shape function */
686  virtual void CalcDShape(const IntegrationPoint &ip,
687  DenseMatrix &dshape) const;
688  virtual void ProjectDelta(int vertex, Vector &dofs) const;
689 };
690 
692 {
693 public:
695  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
696  virtual void CalcDShape(const IntegrationPoint &ip,
697  DenseMatrix &dshape) const;
699  DenseMatrix &I) const;
701  virtual void Project(Coefficient &coeff, ElementTransformation &Trans,
702  Vector &dofs) const;
703  virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans,
704  Vector &dofs) const;
705  virtual void ProjectDelta(int vertex, Vector &dofs) const
706  { dofs = 0.; dofs(vertex) = 1.; }
707 };
708 
709 /// Bi-quadratic element on quad with nodes at the 9 Gaussian points
711 {
712 public:
714  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
715  virtual void CalcDShape(const IntegrationPoint &ip,
716  DenseMatrix &dshape) const;
717  // virtual void ProjectDelta(int vertex, Vector &dofs) const { dofs = 1.; }
718 };
719 
721 {
722 public:
724  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
725  virtual void CalcDShape(const IntegrationPoint &ip,
726  DenseMatrix &dshape) const;
727  virtual void CalcHessian (const IntegrationPoint &ip,
728  DenseMatrix &h) const;
729 };
730 
732 {
733 public:
735 
736  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
737 
738  virtual void CalcDShape(const IntegrationPoint &ip,
739  DenseMatrix &dshape) const;
740 };
741 
743 {
744 public:
746 
747  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
748 
749  virtual void CalcDShape(const IntegrationPoint &ip,
750  DenseMatrix &dshape) const;
751 
752  virtual void CalcHessian (const IntegrationPoint &ip,
753  DenseMatrix &h) const;
754 };
755 
756 /// Class for cubic FE on tetrahedron
758 {
759 public:
760  /// Construct a cubic FE on tetrahedron
762 
763  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
764 
765  virtual void CalcDShape(const IntegrationPoint &ip,
766  DenseMatrix &dshape) const;
767 };
768 
769 /// Class for constant FE on triangle
771 {
772 public:
773  /// Construct P0 triangle finite element
775 
776  /// evaluate shape function - constant 1
777  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
778 
779  /// evaluate derivatives of shape function - constant 0
780  virtual void CalcDShape(const IntegrationPoint &ip,
781  DenseMatrix &dshape) const;
782  virtual void ProjectDelta(int vertex, Vector &dofs) const
783  { dofs(0) = 1.0; }
784 };
785 
786 
788 {
789 public:
791  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
792  virtual void CalcDShape(const IntegrationPoint &ip,
793  DenseMatrix &dshape) const;
794  virtual void ProjectDelta(int vertex, Vector &dofs) const
795  { dofs(0) = 1.0; }
796 };
797 
798 
799 /// Class for linear FE on tetrahedron
801 {
802 public:
803  /// Construct a linear FE on tetrahedron
805 
806  /** virtual function which evaluates the values of all
807  shape functions at a given point ip and stores
808  them in the vector shape of dimension Dof (4) */
809  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
810 
811  /** virtual function which evaluates the values of all
812  partial derivatives of all shape functions at a given
813  point ip and stores them in the matrix dshape (Dof x Dim) (4 x 3)
814  so that each row contains the derivatives of one shape function */
815  virtual void CalcDShape(const IntegrationPoint &ip,
816  DenseMatrix &dshape) const;
817 
818  virtual void ProjectDelta(int vertex, Vector &dofs) const
819  { dofs = 0.0; dofs(vertex) = 1.0; }
820 
821  virtual void GetFaceDofs(int face, int **dofs, int *ndofs) const;
822 };
823 
824 /// Class for quadratic FE on tetrahedron
826 {
827 public:
828  /// Construct a quadratic FE on tetrahedron
830 
831  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
832 
833  virtual void CalcDShape(const IntegrationPoint &ip,
834  DenseMatrix &dshape) const;
835 };
836 
837 /// Class for tri-linear FE on cube
839 {
840 public:
841  /// Construct a tri-linear FE on cube
843 
844  /** virtual function which evaluates the values of all
845  shape functions at a given point ip and stores
846  them in the vector shape of dimension Dof (8) */
847  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
848 
849  /** virtual function which evaluates the values of all
850  partial derivatives of all shape functions at a given
851  point ip and stores them in the matrix dshape (Dof x Dim) (8 x 3)
852  so that each row contains the derivatives of one shape function */
853  virtual void CalcDShape(const IntegrationPoint &ip,
854  DenseMatrix &dshape) const;
855 
856  virtual void ProjectDelta(int vertex, Vector &dofs) const
857  { dofs = 0.0; dofs(vertex) = 1.0; }
858 };
859 
860 /// Crouzeix-Raviart finite element on triangle
862 {
863 public:
865  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
866  virtual void CalcDShape(const IntegrationPoint &ip,
867  DenseMatrix &dshape) const;
868  virtual void ProjectDelta(int vertex, Vector &dofs) const
869  { dofs = 1.0; }
870 };
871 
872 /// Crouzeix-Raviart finite element on quadrilateral
874 {
875 public:
877  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
878  virtual void CalcDShape(const IntegrationPoint &ip,
879  DenseMatrix &dshape) const;
880 };
881 
883 {
884 public:
885  P0SegmentFiniteElement(int Ord = 0);
886  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
887  virtual void CalcDShape(const IntegrationPoint &ip,
888  DenseMatrix &dshape) const;
889 };
890 
892 {
893 private:
894  static const double nk[3][2];
895 
896 public:
898 
899  virtual void CalcVShape(const IntegrationPoint &ip,
900  DenseMatrix &shape) const;
901 
903  DenseMatrix &shape) const
904  { CalcVShape_RT(Trans, shape); }
905 
906  virtual void CalcDivShape(const IntegrationPoint &ip,
907  Vector &divshape) const;
908 
910  DenseMatrix &I) const;
911 
913 
914  virtual void Project (VectorCoefficient &vc,
915  ElementTransformation &Trans, Vector &dofs) const;
916 };
917 
919 {
920 private:
921  static const double nk[4][2];
922 
923 public:
925 
926  virtual void CalcVShape(const IntegrationPoint &ip,
927  DenseMatrix &shape) const;
928 
930  DenseMatrix &shape) const
931  { CalcVShape_RT(Trans, shape); }
932 
933  virtual void CalcDivShape(const IntegrationPoint &ip,
934  Vector &divshape) const;
935 
937  DenseMatrix &I) const;
938 
940 
941  virtual void Project (VectorCoefficient &vc,
942  ElementTransformation &Trans, Vector &dofs) const;
943 };
944 
946 {
947 private:
948  static const double nk[8][2];
949 
950 public:
952 
953  virtual void CalcVShape(const IntegrationPoint &ip,
954  DenseMatrix &shape) const;
955 
957  DenseMatrix &shape) const
958  { CalcVShape_RT(Trans, shape); }
959 
960  virtual void CalcDivShape(const IntegrationPoint &ip,
961  Vector &divshape) const;
962 
964  DenseMatrix &I) const;
965 
967 
968  virtual void Project (VectorCoefficient &vc,
969  ElementTransformation &Trans, Vector &dofs) const;
970 };
971 
973 {
974 private:
975  static const double nk[12][2];
976 
977 public:
979 
980  virtual void CalcVShape(const IntegrationPoint &ip,
981  DenseMatrix &shape) const;
982 
984  DenseMatrix &shape) const
985  { CalcVShape_RT(Trans, shape); }
986 
987  virtual void CalcDivShape(const IntegrationPoint &ip,
988  Vector &divshape) const;
989 
991  DenseMatrix &I) const;
992 
994 
995  virtual void Project (VectorCoefficient &vc,
996  ElementTransformation &Trans, Vector &dofs) const;
997 };
998 
1000 {
1001 private:
1002  static const double M[15][15];
1003 public:
1005 
1006  virtual void CalcVShape(const IntegrationPoint &ip,
1007  DenseMatrix &shape) const;
1008 
1010  DenseMatrix &shape) const
1011  { CalcVShape_RT(Trans, shape); }
1012 
1013  virtual void CalcDivShape(const IntegrationPoint &ip,
1014  Vector &divshape) const;
1015 };
1016 
1018 {
1019 private:
1020  static const double nk[24][2];
1021  static const double pt[4];
1022  static const double dpt[3];
1023 
1024 public:
1026 
1027  virtual void CalcVShape(const IntegrationPoint &ip,
1028  DenseMatrix &shape) const;
1029 
1031  DenseMatrix &shape) const
1032  { CalcVShape_RT(Trans, shape); }
1033 
1034  virtual void CalcDivShape(const IntegrationPoint &ip,
1035  Vector &divshape) const;
1036 
1038  DenseMatrix &I) const;
1039 
1040  using FiniteElement::Project;
1041 
1042  virtual void Project (VectorCoefficient &vc,
1043  ElementTransformation &Trans, Vector &dofs) const;
1044 };
1045 
1046 /// Linear 1D element with nodes 1/3 and 2/3 (trace of RT1)
1048 {
1049 public:
1051  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1052  virtual void CalcDShape(const IntegrationPoint &ip,
1053  DenseMatrix &dshape) const;
1054 };
1055 
1056 /// Quadratic 1D element with nodes the Gaussian points in [0,1] (trace of RT2)
1058 {
1059 public:
1061  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1062  virtual void CalcDShape(const IntegrationPoint &ip,
1063  DenseMatrix &dshape) const;
1064 };
1065 
1067 {
1068 private:
1069  Vector rwk;
1070 #ifndef MFEM_THREAD_SAFE
1071  mutable Vector rxxk;
1072 #endif
1073 public:
1074  Lagrange1DFiniteElement (int degree);
1075  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1076  virtual void CalcDShape(const IntegrationPoint &ip,
1077  DenseMatrix &dshape) const;
1078 };
1079 
1081 {
1082 public:
1084  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1085  virtual void CalcDShape(const IntegrationPoint &ip,
1086  DenseMatrix &dshape) const;
1087 };
1088 
1090 {
1091 public:
1092  P0TetFiniteElement ();
1093  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1094  virtual void CalcDShape(const IntegrationPoint &ip,
1095  DenseMatrix &dshape) const;
1096  virtual void ProjectDelta(int vertex, Vector &dofs) const
1097  { dofs(0) = 1.0; }
1098 };
1099 
1101 {
1102 public:
1103  P0HexFiniteElement ();
1104  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1105  virtual void CalcDShape(const IntegrationPoint &ip,
1106  DenseMatrix &dshape) const;
1107  virtual void ProjectDelta(int vertex, Vector &dofs) const
1108  { dofs(0) = 1.0; }
1109 };
1110 
1111 /// Tensor products of 1D FEs (only degree 2 is functional)
1113 {
1114 private:
1115  Lagrange1DFiniteElement * fe1d;
1116  int dof1d;
1117  int *I, *J, *K;
1118 #ifndef MFEM_THREAD_SAFE
1119  mutable Vector shape1dx, shape1dy, shape1dz;
1120  mutable DenseMatrix dshape1dx, dshape1dy, dshape1dz;
1121 #endif
1122 
1123 public:
1124  LagrangeHexFiniteElement (int degree);
1125  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1126  virtual void CalcDShape(const IntegrationPoint &ip,
1127  DenseMatrix &dshape) const;
1129 };
1130 
1131 
1132 /// Class for refined linear FE on interval
1134 {
1135 public:
1136  /// Construct a quadratic FE on interval
1138 
1139  /** virtual function which evaluates the values of all
1140  shape functions at a given point ip and stores
1141  them in the vector shape of dimension Dof (3) */
1142  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1143 
1144  /** virtual function which evaluates the derivatives of all
1145  shape functions at a given point ip and stores them in
1146  the matrix dshape (Dof x Dim) (3 x 1) so that each row
1147  contains the derivative of one shape function */
1148  virtual void CalcDShape(const IntegrationPoint &ip,
1149  DenseMatrix &dshape) const;
1150 };
1151 
1152 /// Class for refined linear FE on triangle
1154 {
1155 public:
1156  /// Construct a quadratic FE on triangle
1158 
1159  /** virtual function which evaluates the values of all
1160  shape functions at a given point ip and stores
1161  them in the vector shape of dimension Dof (6) */
1162  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1163 
1164  /** virtual function which evaluates the values of all
1165  partial derivatives of all shape functions at a given
1166  point ip and stores them in the matrix dshape (Dof x Dim) (6 x 2)
1167  so that each row contains the derivatives of one shape function */
1168  virtual void CalcDShape(const IntegrationPoint &ip,
1169  DenseMatrix &dshape) const;
1170 };
1171 
1172 /// Class for refined linear FE on tetrahedron
1174 {
1175 public:
1176  /// Construct a quadratic FE on tetrahedron
1178 
1179  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1180 
1181  virtual void CalcDShape(const IntegrationPoint &ip,
1182  DenseMatrix &dshape) const;
1183 };
1184 
1185 /// Class for refined bi-linear FE on quadrilateral
1187 {
1188 public:
1189  /// Construct a biquadratic FE on quadrilateral
1191 
1192  /** virtual function which evaluates the values of all
1193  shape functions at a given point ip and stores
1194  them in the vector shape of dimension Dof (9) */
1195  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1196 
1197  /** virtual function which evaluates the values of all
1198  partial derivatives of all shape functions at a given
1199  point ip and stores them in the matrix dshape (Dof x Dim) (9 x 2)
1200  so that each row contains the derivatives of one shape function */
1201  virtual void CalcDShape(const IntegrationPoint &ip,
1202  DenseMatrix &dshape) const;
1203 };
1204 
1205 /// Class for refined trilinear FE on a hexahedron
1207 {
1208 public:
1209  /// Construct a biquadratic FE on quadrilateral
1211 
1212  /** virtual function which evaluates the values of all
1213  shape functions at a given point ip and stores
1214  them in the vector shape of dimension Dof (9) */
1215  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1216 
1217  /** virtual function which evaluates the values of all
1218  partial derivatives of all shape functions at a given
1219  point ip and stores them in the matrix dshape (Dof x Dim) (9 x 2)
1220  so that each row contains the derivatives of one shape function */
1221  virtual void CalcDShape(const IntegrationPoint &ip,
1222  DenseMatrix &dshape) const;
1223 };
1224 
1225 
1227 {
1228 private:
1229  static const double tk[12][3];
1230 
1231 public:
1233  virtual void CalcVShape(const IntegrationPoint &ip,
1234  DenseMatrix &shape) const;
1236  DenseMatrix &shape) const
1237  { CalcVShape_ND(Trans, shape); }
1238  virtual void CalcCurlShape(const IntegrationPoint &ip,
1239  DenseMatrix &curl_shape) const;
1241  DenseMatrix &I) const;
1242  using FiniteElement::Project;
1243  virtual void Project (VectorCoefficient &vc,
1244  ElementTransformation &Trans, Vector &dofs) const;
1245 };
1246 
1247 
1249 {
1250 private:
1251  static const double tk[6][3];
1252 
1253 public:
1255  virtual void CalcVShape(const IntegrationPoint &ip,
1256  DenseMatrix &shape) const;
1258  DenseMatrix &shape) const
1259  { CalcVShape_ND(Trans, shape); }
1260  virtual void CalcCurlShape(const IntegrationPoint &ip,
1261  DenseMatrix &curl_shape) const;
1263  DenseMatrix &I) const;
1264  using FiniteElement::Project;
1265  virtual void Project (VectorCoefficient &vc,
1266  ElementTransformation &Trans, Vector &dofs) const;
1267 };
1268 
1269 
1271 {
1272 private:
1273  static const double nk[6][3];
1274 
1275 public:
1277 
1278  virtual void CalcVShape(const IntegrationPoint &ip,
1279  DenseMatrix &shape) const;
1280 
1282  DenseMatrix &shape) const
1283  { CalcVShape_RT(Trans, shape); }
1284 
1285  virtual void CalcDivShape(const IntegrationPoint &ip,
1286  Vector &divshape) const;
1287 
1289  DenseMatrix &I) const;
1290 
1291  using FiniteElement::Project;
1292 
1293  virtual void Project (VectorCoefficient &vc,
1294  ElementTransformation &Trans, Vector &dofs) const;
1295 };
1296 
1297 
1299 {
1300 private:
1301  static const double nk[36][3];
1302 
1303 public:
1305 
1306  virtual void CalcVShape(const IntegrationPoint &ip,
1307  DenseMatrix &shape) const;
1308 
1310  DenseMatrix &shape) const
1311  { CalcVShape_RT(Trans, shape); }
1312 
1313  virtual void CalcDivShape(const IntegrationPoint &ip,
1314  Vector &divshape) const;
1315 
1317  DenseMatrix &I) const;
1318 
1319  using FiniteElement::Project;
1320 
1321  virtual void Project (VectorCoefficient &vc,
1322  ElementTransformation &Trans, Vector &dofs) const;
1323 };
1324 
1325 
1327 {
1328 private:
1329  static const double nk[4][3];
1330 
1331 public:
1333 
1334  virtual void CalcVShape(const IntegrationPoint &ip,
1335  DenseMatrix &shape) const;
1336 
1338  DenseMatrix &shape) const
1339  { CalcVShape_RT(Trans, shape); }
1340 
1341  virtual void CalcDivShape(const IntegrationPoint &ip,
1342  Vector &divshape) const;
1343 
1345  DenseMatrix &I) const;
1346 
1347  using FiniteElement::Project;
1348 
1349  virtual void Project (VectorCoefficient &vc,
1350  ElementTransformation &Trans, Vector &dofs) const;
1351 };
1352 
1353 
1355 {
1356 public:
1358  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1359  virtual void CalcDShape(const IntegrationPoint &ip,
1360  DenseMatrix &dshape) const;
1361 };
1362 
1363 
1364 class Poly_1D
1365 {
1366 public:
1367  class Basis
1368  {
1369  private:
1370  int mode; /* 0 - use change of basis, O(p^2) Evals
1371  1 - use barycentric Lagrangian interpolation, O(p) Evals */
1372  DenseMatrixInverse Ai;
1373  mutable Vector x, w;
1374 
1375  public:
1376  Basis(const int p, const double *nodes, const int _mode = 1);
1377  void Eval(const double x, Vector &u) const;
1378  void Eval(const double x, Vector &u, Vector &d) const;
1379  };
1380 
1381 private:
1382  std::map< int, Array<double*>* > points_container;
1383  std::map< int, Array<Basis*>* > bases_container;
1384 
1385  static Array2D<int> binom;
1386 
1387  static void CalcMono(const int p, const double x, double *u);
1388  static void CalcMono(const int p, const double x, double *u, double *d);
1389 
1390  static void CalcLegendre(const int p, const double x, double *u);
1391  static void CalcLegendre(const int p, const double x, double *u, double *d);
1392 
1393  static void CalcChebyshev(const int p, const double x, double *u);
1394  static void CalcChebyshev(const int p, const double x, double *u, double *d);
1395 
1396  QuadratureFunctions1D quad_func;
1397 
1398 public:
1399  Poly_1D() { }
1400 
1401  /** @brief Get a poiner to an array containing the binomial coefficients "p
1402  choose k" for k=0,...,p for the given p. */
1403  static const int *Binom(const int p);
1404 
1405  /** @brief Get the coordinates of the points of the given Quadrature1D type.
1406  @param p the polynomial degree; the number of points is `p+1`.
1407  @param type the Quadrature1D type.
1408  @return a pointer to an array containing the `p+1` coordiantes of the
1409  quadrature points. */
1410  const double *GetPoints(const int p, const int type);
1411  const double *OpenPoints(const int p,
1412  const int type = Quadrature1D::GaussLegendre)
1413  { return GetPoints(p, type); }
1414  const double *ClosedPoints(const int p,
1415  const int type = Quadrature1D::GaussLobatto)
1416  { return GetPoints(p, type); }
1417 
1418  /** @brief Get a Poly_1D::Basis object of the given degree and Quadrature1D
1419  type.
1420  @param p the polynomial degree of the basis.
1421  @param type the Quadrature1D type.
1422  @return a reference to an object of type Poly_1D::Basis that represents
1423  the requested nodal basis. */
1424  Basis &GetBasis(const int p, const int type);
1425  Basis &OpenBasis(const int p,
1426  const int type = Quadrature1D::GaussLegendre)
1427  { return GetBasis(p, type); }
1428  Basis &ClosedBasis(const int p,
1429  const int type = Quadrature1D::GaussLobatto)
1430  { return GetBasis(p, type); }
1431 
1432  // Evaluate the values of a hierarchical 1D basis at point x
1433  // hierarchical = k-th basis function is degree k polynomial
1434  static void CalcBasis(const int p, const double x, double *u)
1435  // { CalcMono(p, x, u); }
1436  // Bernstein basis is not hierarchical --> does not work for triangles
1437  // and tetrahedra
1438  // { CalcBernstein(p, x, u); }
1439  // { CalcLegendre(p, x, u); }
1440  { CalcChebyshev(p, x, u); }
1441 
1442  // Evaluate the values and derivatives of a hierarchical 1D basis at point x
1443  static void CalcBasis(const int p, const double x, double *u, double *d)
1444  // { CalcMono(p, x, u, d); }
1445  // { CalcBernstein(p, x, u, d); }
1446  // { CalcLegendre(p, x, u, d); }
1447  { CalcChebyshev(p, x, u, d); }
1448 
1449  // Evaluate a representation of a Delta function at point x
1450  static double CalcDelta(const int p, const double x)
1451  { return pow(x, (double) p); }
1452 
1453  static void ChebyshevPoints(const int p, double *x);
1454 
1455  /// Compute the terms in the expansion of the binomial (x + y)^p
1456  static void CalcBinomTerms(const int p, const double x, const double y,
1457  double *u);
1458  /** Compute the terms in the expansion of the binomial (x + y)^p and their
1459  derivatives with respect to x assuming that dy/dx = -1. */
1460  static void CalcBinomTerms(const int p, const double x, const double y,
1461  double *u, double *d);
1462  /** Compute the derivatives (w.r.t. x) of the terms in the expansion of the
1463  binomial (x + y)^p assuming that dy/dx = -1. */
1464  static void CalcDBinomTerms(const int p, const double x, const double y,
1465  double *d);
1466  static void CalcBernstein(const int p, const double x, double *u)
1467  { CalcBinomTerms(p, x, 1. - x, u); }
1468  static void CalcBernstein(const int p, const double x, double *u, double *d)
1469  { CalcBinomTerms(p, x, 1. - x, u, d); }
1470 
1471  ~Poly_1D();
1472 };
1473 
1474 extern Poly_1D poly1d;
1475 
1476 
1478 {
1479 private:
1480  int pt_type;
1481  Poly_1D::Basis &basis1d;
1482 #ifndef MFEM_THREAD_SAFE
1483  mutable Vector shape_x, dshape_x;
1484 #endif
1485  Array<int> dof_map;
1486 
1487 public:
1488  H1_SegmentElement(const int p, const int type = Quadrature1D::GaussLobatto);
1489  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1490  virtual void CalcDShape(const IntegrationPoint &ip,
1491  DenseMatrix &dshape) const;
1492  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1493  const Array<int> &GetDofMap() const { return dof_map; }
1494 };
1495 
1496 
1498 {
1499 private:
1500  int pt_type;
1501  Poly_1D::Basis &basis1d;
1502 #ifndef MFEM_THREAD_SAFE
1503  mutable Vector shape_x, shape_y, dshape_x, dshape_y;
1504 #endif
1505  Array<int> dof_map;
1506 
1507 public:
1508  H1_QuadrilateralElement(const int p,
1509  const int type = Quadrature1D::GaussLobatto);
1510  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1511  virtual void CalcDShape(const IntegrationPoint &ip,
1512  DenseMatrix &dshape) const;
1513  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1514  const Array<int> &GetDofMap() const { return dof_map; }
1515 };
1516 
1517 
1519 {
1520 private:
1521  int pt_type;
1522  Poly_1D::Basis &basis1d;
1523 #ifndef MFEM_THREAD_SAFE
1524  mutable Vector shape_x, shape_y, shape_z, dshape_x, dshape_y, dshape_z;
1525 #endif
1526  Array<int> dof_map;
1527 
1528 public:
1529  H1_HexahedronElement(const int p, const int type = Quadrature1D::GaussLobatto);
1530  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1531  virtual void CalcDShape(const IntegrationPoint &ip,
1532  DenseMatrix &dshape) const;
1533  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1534  const Array<int> &GetDofMap() const { return dof_map; }
1535 };
1536 
1538 {
1539 private:
1540 #ifndef MFEM_THREAD_SAFE
1541  // This is to share scratch space between invocations, which helps
1542  // speed things up, but with OpenMP, we need one copy per thread.
1543  // Right now, we solve this by allocating this space within each function
1544  // call every time we call it. Alternatively, we should do some sort
1545  // thread private thing. Brunner, Jan 2014
1546  mutable Vector shape_x, dshape_x;
1547 #endif
1548  Array<int> dof_map;
1549 
1550 public:
1551  H1Pos_SegmentElement(const int p);
1552  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1553  virtual void CalcDShape(const IntegrationPoint &ip,
1554  DenseMatrix &dshape) const;
1555  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1556  const Array<int> &GetDofMap() const { return dof_map; }
1557 };
1558 
1559 
1561 {
1562 private:
1563 #ifndef MFEM_THREAD_SAFE
1564  // See comment in H1Pos_SegmentElement
1565  mutable Vector shape_x, shape_y, dshape_x, dshape_y;
1566 #endif
1567  Array<int> dof_map;
1568 
1569 public:
1570  H1Pos_QuadrilateralElement(const int p);
1571  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1572  virtual void CalcDShape(const IntegrationPoint &ip,
1573  DenseMatrix &dshape) const;
1574  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1575  const Array<int> &GetDofMap() const { return dof_map; }
1576 };
1577 
1578 
1580 {
1581 private:
1582 #ifndef MFEM_THREAD_SAFE
1583  // See comment in H1Pos_SegementElement.
1584  mutable Vector shape_x, shape_y, shape_z, dshape_x, dshape_y, dshape_z;
1585 #endif
1586  Array<int> dof_map;
1587 
1588 public:
1589  H1Pos_HexahedronElement(const int p);
1590  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1591  virtual void CalcDShape(const IntegrationPoint &ip,
1592  DenseMatrix &dshape) const;
1593  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1594  const Array<int> &GetDofMap() const { return dof_map; }
1595 };
1596 
1597 
1599 {
1600 private:
1601 #ifndef MFEM_THREAD_SAFE
1602  mutable Vector shape_x, shape_y, shape_l, dshape_x, dshape_y, dshape_l, u;
1603  mutable DenseMatrix du;
1604 #endif
1605  DenseMatrixInverse Ti;
1606 
1607 public:
1608  H1_TriangleElement(const int p, const int type = Quadrature1D::GaussLobatto);
1609  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1610  virtual void CalcDShape(const IntegrationPoint &ip,
1611  DenseMatrix &dshape) const;
1612 };
1613 
1614 
1616 {
1617 private:
1618 #ifndef MFEM_THREAD_SAFE
1619  mutable Vector shape_x, shape_y, shape_z, shape_l;
1620  mutable Vector dshape_x, dshape_y, dshape_z, dshape_l, u;
1621  mutable DenseMatrix du;
1622 #endif
1623  DenseMatrixInverse Ti;
1624 
1625 public:
1626  H1_TetrahedronElement(const int p,
1627  const int type = Quadrature1D::GaussLobatto);
1628  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1629  virtual void CalcDShape(const IntegrationPoint &ip,
1630  DenseMatrix &dshape) const;
1631 };
1632 
1633 
1635 {
1636 protected:
1637 #ifndef MFEM_THREAD_SAFE
1640 #endif
1642 
1643 public:
1644  H1Pos_TriangleElement(const int p);
1645 
1646  // The size of shape is (p+1)(p+2)/2 (dof).
1647  static void CalcShape(const int p, const double x, const double y,
1648  double *shape);
1649 
1650  // The size of dshape_1d is p+1; the size of dshape is (dof x dim).
1651  static void CalcDShape(const int p, const double x, const double y,
1652  double *dshape_1d, double *dshape);
1653 
1654  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1655  virtual void CalcDShape(const IntegrationPoint &ip,
1656  DenseMatrix &dshape) const;
1657 };
1658 
1659 
1661 {
1662 protected:
1663 #ifndef MFEM_THREAD_SAFE
1666 #endif
1668 
1669 public:
1670  H1Pos_TetrahedronElement(const int p);
1671 
1672  // The size of shape is (p+1)(p+2)(p+3)/6 (dof).
1673  static void CalcShape(const int p, const double x, const double y,
1674  const double z, double *shape);
1675 
1676  // The size of dshape_1d is p+1; the size of dshape is (dof x dim).
1677  static void CalcDShape(const int p, const double x, const double y,
1678  const double z, double *dshape_1d, double *dshape);
1679 
1680  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1681  virtual void CalcDShape(const IntegrationPoint &ip,
1682  DenseMatrix &dshape) const;
1683 };
1684 
1685 
1687 {
1688 private:
1689  int type;
1690  Poly_1D::Basis &basis1d;
1691 #ifndef MFEM_THREAD_SAFE
1692  mutable Vector shape_x, dshape_x;
1693 #endif
1694 
1695 public:
1696  L2_SegmentElement(const int p, const int type = Quadrature1D::GaussLegendre);
1697  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1698  virtual void CalcDShape(const IntegrationPoint &ip,
1699  DenseMatrix &dshape) const;
1700  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1701 };
1702 
1703 
1705 {
1706 private:
1707 #ifndef MFEM_THREAD_SAFE
1708  mutable Vector shape_x, dshape_x;
1709 #endif
1710 
1711 public:
1712  L2Pos_SegmentElement(const int p);
1713  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1714  virtual void CalcDShape(const IntegrationPoint &ip,
1715  DenseMatrix &dshape) const;
1716  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1717 };
1718 
1719 
1721 {
1722 private:
1723  int type;
1724  Poly_1D::Basis &basis1d;
1725 #ifndef MFEM_THREAD_SAFE
1726  mutable Vector shape_x, shape_y, dshape_x, dshape_y;
1727 #endif
1728 
1729 public:
1730  L2_QuadrilateralElement(const int p,
1731  const int _type = Quadrature1D::GaussLegendre);
1732  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1733  virtual void CalcDShape(const IntegrationPoint &ip,
1734  DenseMatrix &dshape) const;
1735  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1736  virtual void ProjectCurl(const FiniteElement &fe,
1738  DenseMatrix &curl) const
1739  { ProjectCurl_2D(fe, Trans, curl); }
1740 };
1741 
1742 
1744 {
1745 private:
1746 #ifndef MFEM_THREAD_SAFE
1747  mutable Vector shape_x, shape_y, dshape_x, dshape_y;
1748 #endif
1749 
1750 public:
1751  L2Pos_QuadrilateralElement(const int p);
1752  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1753  virtual void CalcDShape(const IntegrationPoint &ip,
1754  DenseMatrix &dshape) const;
1755  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1756 };
1757 
1758 
1760 {
1761 private:
1762  int type;
1763  Poly_1D::Basis &basis1d;
1764 #ifndef MFEM_THREAD_SAFE
1765  mutable Vector shape_x, shape_y, shape_z, dshape_x, dshape_y, dshape_z;
1766 #endif
1767 
1768 public:
1769  L2_HexahedronElement(const int p,
1770  const int _type = Quadrature1D::GaussLegendre);
1771  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1772  virtual void CalcDShape(const IntegrationPoint &ip,
1773  DenseMatrix &dshape) const;
1774  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1775 };
1776 
1777 
1779 {
1780 private:
1781 #ifndef MFEM_THREAD_SAFE
1782  mutable Vector shape_x, shape_y, shape_z, dshape_x, dshape_y, dshape_z;
1783 #endif
1784 
1785 public:
1786  L2Pos_HexahedronElement(const int p);
1787  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1788  virtual void CalcDShape(const IntegrationPoint &ip,
1789  DenseMatrix &dshape) const;
1790  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1791 };
1792 
1793 
1795 {
1796 private:
1797 #ifndef MFEM_THREAD_SAFE
1798  mutable Vector shape_x, shape_y, shape_l, dshape_x, dshape_y, dshape_l, u;
1799  mutable DenseMatrix du;
1800 #endif
1801  DenseMatrixInverse Ti;
1802 
1803 public:
1804  L2_TriangleElement(const int p,
1805  const int type = Quadrature1D::GaussLegendre);
1806  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1807  virtual void CalcDShape(const IntegrationPoint &ip,
1808  DenseMatrix &dshape) const;
1809  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1810  virtual void ProjectCurl(const FiniteElement &fe,
1812  DenseMatrix &curl) const
1813  { ProjectCurl_2D(fe, Trans, curl); }
1814 };
1815 
1816 
1818 {
1819 private:
1820 #ifndef MFEM_THREAD_SAFE
1821  mutable Vector dshape_1d;
1822 #endif
1823 
1824 public:
1825  L2Pos_TriangleElement(const int p);
1826  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1827  virtual void CalcDShape(const IntegrationPoint &ip,
1828  DenseMatrix &dshape) const;
1829  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1830 };
1831 
1832 
1834 {
1835 private:
1836 #ifndef MFEM_THREAD_SAFE
1837  mutable Vector shape_x, shape_y, shape_z, shape_l;
1838  mutable Vector dshape_x, dshape_y, dshape_z, dshape_l, u;
1839  mutable DenseMatrix du;
1840 #endif
1841  DenseMatrixInverse Ti;
1842 
1843 public:
1844  L2_TetrahedronElement(const int p,
1845  const int type = Quadrature1D::GaussLegendre);
1846  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1847  virtual void CalcDShape(const IntegrationPoint &ip,
1848  DenseMatrix &dshape) const;
1849  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1850 };
1851 
1852 
1854 {
1855 private:
1856 #ifndef MFEM_THREAD_SAFE
1857  mutable Vector dshape_1d;
1858 #endif
1859 
1860 public:
1861  L2Pos_TetrahedronElement(const int p);
1862  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
1863  virtual void CalcDShape(const IntegrationPoint &ip,
1864  DenseMatrix &dshape) const;
1865  virtual void ProjectDelta(int vertex, Vector &dofs) const;
1866 };
1867 
1868 
1870 {
1871 private:
1872  static const double nk[8];
1873 
1874  Poly_1D::Basis &cbasis1d, &obasis1d;
1875 #ifndef MFEM_THREAD_SAFE
1876  mutable Vector shape_cx, shape_ox, shape_cy, shape_oy;
1877  mutable Vector dshape_cx, dshape_cy;
1878 #endif
1879  Array<int> dof_map, dof2nk;
1880 
1881 public:
1882  RT_QuadrilateralElement(const int p,
1883  const int cp_type = Quadrature1D::GaussLobatto,
1884  const int op_type = Quadrature1D::GaussLegendre);
1885  virtual void CalcVShape(const IntegrationPoint &ip,
1886  DenseMatrix &shape) const;
1888  DenseMatrix &shape) const
1889  { CalcVShape_RT(Trans, shape); }
1890  virtual void CalcDivShape(const IntegrationPoint &ip,
1891  Vector &divshape) const;
1893  DenseMatrix &I) const
1894  { LocalInterpolation_RT(nk, dof2nk, Trans, I); }
1895  using FiniteElement::Project;
1896  virtual void Project(VectorCoefficient &vc,
1897  ElementTransformation &Trans, Vector &dofs) const
1898  { Project_RT(nk, dof2nk, vc, Trans, dofs); }
1900  MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
1901  { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
1903  DenseMatrix &I) const
1904  { Project_RT(nk, dof2nk, fe, Trans, I); }
1905  // Gradient + rotation = Curl: H1 -> H(div)
1906  virtual void ProjectGrad(const FiniteElement &fe,
1908  DenseMatrix &grad) const
1909  { ProjectGrad_RT(nk, dof2nk, fe, Trans, grad); }
1910  // Curl = Gradient + rotation: H1 -> H(div)
1911  virtual void ProjectCurl(const FiniteElement &fe,
1913  DenseMatrix &curl) const
1914  { ProjectGrad_RT(nk, dof2nk, fe, Trans, curl); }
1915 };
1916 
1917 
1919 {
1920  static const double nk[18];
1921 
1922  Poly_1D::Basis &cbasis1d, &obasis1d;
1923 #ifndef MFEM_THREAD_SAFE
1924  mutable Vector shape_cx, shape_ox, shape_cy, shape_oy, shape_cz, shape_oz;
1925  mutable Vector dshape_cx, dshape_cy, dshape_cz;
1926 #endif
1927  Array<int> dof_map, dof2nk;
1928 
1929 public:
1930  RT_HexahedronElement(const int p,
1931  const int cp_type = Quadrature1D::GaussLobatto,
1932  const int op_type = Quadrature1D::GaussLegendre);
1933 
1934  virtual void CalcVShape(const IntegrationPoint &ip,
1935  DenseMatrix &shape) const;
1937  DenseMatrix &shape) const
1938  { CalcVShape_RT(Trans, shape); }
1939  virtual void CalcDivShape(const IntegrationPoint &ip,
1940  Vector &divshape) const;
1942  DenseMatrix &I) const
1943  { LocalInterpolation_RT(nk, dof2nk, Trans, I); }
1944  using FiniteElement::Project;
1945  virtual void Project(VectorCoefficient &vc,
1946  ElementTransformation &Trans, Vector &dofs) const
1947  { Project_RT(nk, dof2nk, vc, Trans, dofs); }
1949  MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
1950  { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
1952  DenseMatrix &I) const
1953  { Project_RT(nk, dof2nk, fe, Trans, I); }
1954  virtual void ProjectCurl(const FiniteElement &fe,
1956  DenseMatrix &curl) const
1957  { ProjectCurl_RT(nk, dof2nk, fe, Trans, curl); }
1958 };
1959 
1960 
1962 {
1963  static const double nk[6], c;
1964 
1965 #ifndef MFEM_THREAD_SAFE
1966  mutable Vector shape_x, shape_y, shape_l;
1967  mutable Vector dshape_x, dshape_y, dshape_l;
1968  mutable DenseMatrix u;
1969  mutable Vector divu;
1970 #endif
1971  Array<int> dof2nk;
1972  DenseMatrixInverse Ti;
1973 
1974 public:
1975  RT_TriangleElement(const int p);
1976  virtual void CalcVShape(const IntegrationPoint &ip,
1977  DenseMatrix &shape) const;
1979  DenseMatrix &shape) const
1980  { CalcVShape_RT(Trans, shape); }
1981  virtual void CalcDivShape(const IntegrationPoint &ip,
1982  Vector &divshape) const;
1984  DenseMatrix &I) const
1985  { LocalInterpolation_RT(nk, dof2nk, Trans, I); }
1986  using FiniteElement::Project;
1987  virtual void Project(VectorCoefficient &vc,
1988  ElementTransformation &Trans, Vector &dofs) const
1989  { Project_RT(nk, dof2nk, vc, Trans, dofs); }
1991  MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
1992  { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
1994  DenseMatrix &I) const
1995  { Project_RT(nk, dof2nk, fe, Trans, I); }
1996  // Gradient + rotation = Curl: H1 -> H(div)
1997  virtual void ProjectGrad(const FiniteElement &fe,
1999  DenseMatrix &grad) const
2000  { ProjectGrad_RT(nk, dof2nk, fe, Trans, grad); }
2001  // Curl = Gradient + rotation: H1 -> H(div)
2002  virtual void ProjectCurl(const FiniteElement &fe,
2004  DenseMatrix &curl) const
2005  { ProjectGrad_RT(nk, dof2nk, fe, Trans, curl); }
2006 };
2007 
2008 
2010 {
2011  static const double nk[12], c;
2012 
2013 #ifndef MFEM_THREAD_SAFE
2014  mutable Vector shape_x, shape_y, shape_z, shape_l;
2015  mutable Vector dshape_x, dshape_y, dshape_z, dshape_l;
2016  mutable DenseMatrix u;
2017  mutable Vector divu;
2018 #endif
2019  Array<int> dof2nk;
2020  DenseMatrixInverse Ti;
2021 
2022 public:
2023  RT_TetrahedronElement(const int p);
2024  virtual void CalcVShape(const IntegrationPoint &ip,
2025  DenseMatrix &shape) const;
2027  DenseMatrix &shape) const
2028  { CalcVShape_RT(Trans, shape); }
2029  virtual void CalcDivShape(const IntegrationPoint &ip,
2030  Vector &divshape) const;
2032  DenseMatrix &I) const
2033  { LocalInterpolation_RT(nk, dof2nk, Trans, I); }
2034  using FiniteElement::Project;
2035  virtual void Project(VectorCoefficient &vc,
2036  ElementTransformation &Trans, Vector &dofs) const
2037  { Project_RT(nk, dof2nk, vc, Trans, dofs); }
2039  MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
2040  { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
2042  DenseMatrix &I) const
2043  { Project_RT(nk, dof2nk, fe, Trans, I); }
2044  virtual void ProjectCurl(const FiniteElement &fe,
2046  DenseMatrix &curl) const
2047  { ProjectCurl_RT(nk, dof2nk, fe, Trans, curl); }
2048 };
2049 
2050 
2052 {
2053  static const double tk[18];
2054 
2055  Poly_1D::Basis &cbasis1d, &obasis1d;
2056 #ifndef MFEM_THREAD_SAFE
2057  mutable Vector shape_cx, shape_ox, shape_cy, shape_oy, shape_cz, shape_oz;
2058  mutable Vector dshape_cx, dshape_cy, dshape_cz;
2059 #endif
2060  Array<int> dof_map, dof2tk;
2061 
2062 public:
2063  ND_HexahedronElement(const int p,
2064  const int cp_type = Quadrature1D::GaussLobatto,
2065  const int op_type = Quadrature1D::GaussLegendre);
2066 
2067  virtual void CalcVShape(const IntegrationPoint &ip,
2068  DenseMatrix &shape) const;
2069 
2071  DenseMatrix &shape) const
2072  { CalcVShape_ND(Trans, shape); }
2073 
2074  virtual void CalcCurlShape(const IntegrationPoint &ip,
2075  DenseMatrix &curl_shape) const;
2076 
2078  DenseMatrix &I) const
2079  { LocalInterpolation_ND(tk, dof2tk, Trans, I); }
2080 
2081  using FiniteElement::Project;
2082 
2083  virtual void Project(VectorCoefficient &vc,
2084  ElementTransformation &Trans, Vector &dofs) const
2085  { Project_ND(tk, dof2tk, vc, Trans, dofs); }
2086 
2088  MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
2089  { ProjectMatrixCoefficient_ND(tk, dof2tk, mc, T, dofs); }
2090 
2091  virtual void Project(const FiniteElement &fe,
2093  DenseMatrix &I) const
2094  { Project_ND(tk, dof2tk, fe, Trans, I); }
2095 
2096  virtual void ProjectGrad(const FiniteElement &fe,
2098  DenseMatrix &grad) const
2099  { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
2100 
2101  virtual void ProjectCurl(const FiniteElement &fe,
2103  DenseMatrix &curl) const
2104  { ProjectCurl_ND(tk, dof2tk, fe, Trans, curl); }
2105 };
2106 
2107 
2109 {
2110  static const double tk[8];
2111 
2112  Poly_1D::Basis &cbasis1d, &obasis1d;
2113 #ifndef MFEM_THREAD_SAFE
2114  mutable Vector shape_cx, shape_ox, shape_cy, shape_oy;
2115  mutable Vector dshape_cx, dshape_cy;
2116 #endif
2117  Array<int> dof_map, dof2tk;
2118 
2119 public:
2120  ND_QuadrilateralElement(const int p,
2121  const int cp_type = Quadrature1D::GaussLobatto,
2122  const int op_type = Quadrature1D::GaussLegendre);
2123  virtual void CalcVShape(const IntegrationPoint &ip,
2124  DenseMatrix &shape) const;
2126  DenseMatrix &shape) const
2127  { CalcVShape_ND(Trans, shape); }
2128  virtual void CalcCurlShape(const IntegrationPoint &ip,
2129  DenseMatrix &curl_shape) const;
2131  DenseMatrix &I) const
2132  { LocalInterpolation_ND(tk, dof2tk, Trans, I); }
2133  using FiniteElement::Project;
2134  virtual void Project(VectorCoefficient &vc,
2135  ElementTransformation &Trans, Vector &dofs) const
2136  { Project_ND(tk, dof2tk, vc, Trans, dofs); }
2138  MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
2139  { ProjectMatrixCoefficient_ND(tk, dof2tk, mc, T, dofs); }
2140  virtual void Project(const FiniteElement &fe,
2142  DenseMatrix &I) const
2143  { Project_ND(tk, dof2tk, fe, Trans, I); }
2144  virtual void ProjectGrad(const FiniteElement &fe,
2146  DenseMatrix &grad) const
2147  { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
2148 };
2149 
2150 
2152 {
2153  static const double tk[18], c;
2154 
2155 #ifndef MFEM_THREAD_SAFE
2156  mutable Vector shape_x, shape_y, shape_z, shape_l;
2157  mutable Vector dshape_x, dshape_y, dshape_z, dshape_l;
2158  mutable DenseMatrix u;
2159 #endif
2160  Array<int> dof2tk;
2161  DenseMatrixInverse Ti;
2162 
2163 public:
2164  ND_TetrahedronElement(const int p);
2165  virtual void CalcVShape(const IntegrationPoint &ip,
2166  DenseMatrix &shape) const;
2168  DenseMatrix &shape) const
2169  { CalcVShape_ND(Trans, shape); }
2170  virtual void CalcCurlShape(const IntegrationPoint &ip,
2171  DenseMatrix &curl_shape) const;
2173  DenseMatrix &I) const
2174  { LocalInterpolation_ND(tk, dof2tk, Trans, I); }
2175  using FiniteElement::Project;
2176  virtual void Project(VectorCoefficient &vc,
2177  ElementTransformation &Trans, Vector &dofs) const
2178  { Project_ND(tk, dof2tk, vc, Trans, dofs); }
2180  MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
2181  { ProjectMatrixCoefficient_ND(tk, dof2tk, mc, T, dofs); }
2182  virtual void Project(const FiniteElement &fe,
2184  DenseMatrix &I) const
2185  { Project_ND(tk, dof2tk, fe, Trans, I); }
2186  virtual void ProjectGrad(const FiniteElement &fe,
2188  DenseMatrix &grad) const
2189  { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
2190 
2191  virtual void ProjectCurl(const FiniteElement &fe,
2193  DenseMatrix &curl) const
2194  { ProjectCurl_ND(tk, dof2tk, fe, Trans, curl); }
2195 };
2196 
2198 {
2199  static const double tk[8], c;
2200 
2201 #ifndef MFEM_THREAD_SAFE
2202  mutable Vector shape_x, shape_y, shape_l;
2203  mutable Vector dshape_x, dshape_y, dshape_l;
2204  mutable DenseMatrix u;
2205  mutable Vector curlu;
2206 #endif
2207  Array<int> dof2tk;
2208  DenseMatrixInverse Ti;
2209 
2210 public:
2211  ND_TriangleElement(const int p);
2212  virtual void CalcVShape(const IntegrationPoint &ip,
2213  DenseMatrix &shape) const;
2215  DenseMatrix &shape) const
2216  { CalcVShape_ND(Trans, shape); }
2217  virtual void CalcCurlShape(const IntegrationPoint &ip,
2218  DenseMatrix &curl_shape) const;
2220  DenseMatrix &I) const
2221  { LocalInterpolation_ND(tk, dof2tk, Trans, I); }
2222  using FiniteElement::Project;
2223  virtual void Project(VectorCoefficient &vc,
2224  ElementTransformation &Trans, Vector &dofs) const
2225  { Project_ND(tk, dof2tk, vc, Trans, dofs); }
2227  MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
2228  { ProjectMatrixCoefficient_ND(tk, dof2tk, mc, T, dofs); }
2229  virtual void Project(const FiniteElement &fe,
2231  DenseMatrix &I) const
2232  { Project_ND(tk, dof2tk, fe, Trans, I); }
2233  virtual void ProjectGrad(const FiniteElement &fe,
2235  DenseMatrix &grad) const
2236  { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
2237 };
2238 
2239 
2241 {
2242  static const double tk[1];
2243 
2244  Poly_1D::Basis &obasis1d;
2245  Array<int> dof2tk;
2246 
2247 public:
2248  ND_SegmentElement(const int p,
2249  const int op_type = Quadrature1D::GaussLegendre );
2250  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
2251  { obasis1d.Eval(ip.x, shape); }
2252  virtual void CalcVShape(const IntegrationPoint &ip,
2253  DenseMatrix &shape) const;
2255  DenseMatrix &shape) const
2256  { CalcVShape_ND(Trans, shape); }
2257  // virtual void CalcCurlShape(const IntegrationPoint &ip,
2258  // DenseMatrix &curl_shape) const;
2260  DenseMatrix &I) const
2261  { LocalInterpolation_ND(tk, dof2tk, Trans, I); }
2262  using FiniteElement::Project;
2263  virtual void Project(VectorCoefficient &vc,
2264  ElementTransformation &Trans, Vector &dofs) const
2265  { Project_ND(tk, dof2tk, vc, Trans, dofs); }
2267  MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
2268  { ProjectMatrixCoefficient_ND(tk, dof2tk, mc, T, dofs); }
2269  virtual void Project(const FiniteElement &fe,
2271  DenseMatrix &I) const
2272  { Project_ND(tk, dof2tk, fe, Trans, I); }
2273  virtual void ProjectGrad(const FiniteElement &fe,
2275  DenseMatrix &grad) const
2276  { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
2277 };
2278 
2279 
2281 {
2282 protected:
2284  mutable int *ijk, patch, elem;
2285  mutable Vector weights;
2286 
2287 public:
2288  NURBSFiniteElement(int D, int G, int Do, int O, int F)
2289  : ScalarFiniteElement(D, G, Do, O, F)
2290  {
2291  ijk = NULL;
2292  patch = elem = -1;
2293  kv.SetSize(Dim);
2294  weights.SetSize(Dof);
2295  weights = 1.0;
2296  }
2297 
2298  void Reset () const { patch = elem = -1; }
2299  void SetIJK (int *IJK) const { ijk = IJK; }
2300  int GetPatch () const { return patch; }
2301  void SetPatch (int p) const { patch = p; }
2302  int GetElement () const { return elem; }
2303  void SetElement (int e) const { elem = e; }
2304  Array <KnotVector*> &KnotVectors() const { return kv; }
2305  Vector &Weights () const { return weights; }
2306 };
2307 
2309 {
2310 protected:
2311  mutable Vector shape_x;
2312 
2313 public:
2315  : NURBSFiniteElement(1, Geometry::SEGMENT, p + 1, p, FunctionSpace::Qk),
2316  shape_x(p + 1) { }
2317 
2318  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
2319  virtual void CalcDShape(const IntegrationPoint &ip,
2320  DenseMatrix &dshape) const;
2321 };
2322 
2324 {
2325 protected:
2327 
2328 public:
2330  : NURBSFiniteElement(2, Geometry::SQUARE, (p + 1)*(p + 1), p,
2331  FunctionSpace::Qk), u(Dof),
2332  shape_x(p + 1), shape_y(p + 1), dshape_x(p + 1), dshape_y(p + 1) { }
2333 
2334  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
2335  virtual void CalcDShape(const IntegrationPoint &ip,
2336  DenseMatrix &dshape) const;
2337 };
2338 
2340 {
2341 protected:
2343 
2344 public:
2346  : NURBSFiniteElement(3, Geometry::CUBE, (p + 1)*(p + 1)*(p + 1), p,
2347  FunctionSpace::Qk), u(Dof),
2348  shape_x(p + 1), shape_y(p + 1), shape_z(p + 1),
2349  dshape_x(p + 1), dshape_y(p + 1), dshape_z(p + 1) { }
2350 
2351  virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const;
2352  virtual void CalcDShape(const IntegrationPoint &ip,
2353  DenseMatrix &dshape) const;
2354 };
2355 
2356 } // namespace mfem
2357 
2358 #endif
Abstract class for Finite Elements.
Definition: fe.hpp:47
RefinedLinear3DFiniteElement()
Construct a quadratic FE on tetrahedron.
Definition: fe.cpp:4270
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:1337
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:1383
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:8285
DenseMatrix curlshape_J
Definition: fe.hpp:413
const Array< int > & GetDofMap() const
Definition: fe.hpp:1556
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:6069
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.hpp:1945
int GetDim() const
Returns the reference space dimension for the finite element.
Definition: fe.hpp:116
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:7185
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:2907
L2_SegmentElement(const int p, const int type=Quadrature1D::GaussLegendre)
Definition: fe.cpp:8159
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:1309
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:3848
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:1131
static void CalcBernstein(const int p, const double x, double *u, double *d)
Definition: fe.hpp:1468
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition: fe.hpp:1911
Class for an integration rule - an Array of IntegrationPoint.
Definition: intrules.hpp:83
Linear 1D element with nodes 1/3 and 2/3 (trace of RT1)
Definition: fe.hpp:1047
Quadratic 1D element with nodes the Gaussian points in [0,1] (trace of RT2)
Definition: fe.hpp:1057
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:8680
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:10998
Linear3DFiniteElement()
Construct a linear FE on tetrahedron.
Definition: fe.cpp:2306
static double CalcDelta(const int p, const double x)
Definition: fe.hpp:1450
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:3089
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:1978
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:2031
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:8437
void ProjectMatrixCoefficient_RT(const double *nk, const Array< int > &d2n, MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Definition: fe.cpp:577
void ProjectMatrixCoefficient_ND(const double *tk, const Array< int > &d2t, MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Definition: fe.cpp:753
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...
Definition: fe.cpp:9854
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...
Definition: fe.cpp:38
RefinedBiLinear2DFiniteElement()
Construct a biquadratic FE on quadrilateral.
Definition: fe.cpp:4502
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:1701
L2Pos_TriangleElement(const int p)
Definition: fe.cpp:8824
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.hpp:2144
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:902
H1Pos_SegmentElement(const int p)
Definition: fe.cpp:7123
int GetPatch() const
Definition: fe.hpp:2300
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition: fe.hpp:2044
virtual void ProjectDiv(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &div) const
Definition: fe.cpp:162
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:794
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...
Definition: fe.cpp:5114
virtual void Project(Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:115
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:705
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:2544
void CalcPhysDivShape(ElementTransformation &Trans, Vector &divshape) const
Evaluate the divergence of all shape functions of a vector finite element in physical space at the po...
Definition: fe.cpp:59
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:2323
const double * OpenPoints(const int p, const int type=Quadrature1D::GaussLegendre)
Definition: fe.hpp:1411
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:8863
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition: fe.hpp:2191
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...
Definition: fe.cpp:2861
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:3141
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:1497
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:7165
FiniteElement(D, G, Do, O, F)
int GetDerivMapType() const
Definition: fe.hpp:138
L2Pos_TetrahedronElement(const int p)
Definition: fe.cpp:9018
Array< KnotVector * > kv
Definition: fe.hpp:2283
virtual void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Definition: fe.cpp:282
void CalcVShape_RT(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.cpp:534
L2_TriangleElement(const int p, const int type=Quadrature1D::GaussLegendre)
Definition: fe.cpp:8699
void SetSize(int s)
Resize the vector to size s.
Definition: vector.hpp:320
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition: fe.cpp:9236
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:5176
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:3631
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:1052
virtual void Project(Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:243
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:1521
void LocalInterpolation_ND(const double *tk, const Array< int > &d2t, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:881
virtual void CalcHessian(const IntegrationPoint &ip, DenseMatrix &h) const
Definition: fe.cpp:1879
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition: fe.hpp:2002
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:1790
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...
Definition: fe.cpp:2626
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
evaluate derivatives of shape function - constant 0
Definition: fe.cpp:2277
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:1257
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:2070
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:941
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:6685
H1Pos_TetrahedronElement(const int p)
Definition: fe.cpp:7907
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:10946
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:8304
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1892
LagrangeHexFiniteElement(int degree)
Definition: fe.cpp:3900
int GetOrder() const
Returns the order of the finite element.
Definition: fe.hpp:125
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition: fe.cpp:2639
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:3754
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:4062
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:2125
Data type dense matrix using column-major storage.
Definition: densemat.hpp:23
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:3706
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.cpp:345
void Reset() const
Definition: fe.hpp:2298
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.hpp:1987
Polynomials of order k.
Definition: fe.hpp:34
Class for quadratic FE on triangle.
Definition: fe.hpp:631
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:10960
PositiveFiniteElement(int D, int G, int Do, int O, int F=FunctionSpace::Pk)
Definition: fe.hpp:378
Class for quadratic FE on interval.
Definition: fe.hpp:602
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:1887
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition: fe.cpp:9710
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:5342
void ProjectCurl_ND(const double *tk, const Array< int > &d2t, const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition: fe.cpp:679
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:2292
int Space() const
Returns the type of space on each element.
Definition: fe.hpp:128
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:1950
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:109
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1951
RefinedTriLinear3DFiniteElement()
Construct a biquadratic FE on quadrilateral.
Definition: fe.cpp:4649
DenseMatrix vshape
Definition: fe.hpp:58
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:3887
Quadratic3DFiniteElement()
Construct a quadratic FE on tetrahedron.
Definition: fe.cpp:2362
int GetMapType() const
Definition: fe.hpp:134
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:8177
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...
Definition: fe.cpp:5692
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:5879
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...
Definition: fe.cpp:2738
const Array< int > & GetDofMap() const
Definition: fe.hpp:1534
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:8983
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition: fe.hpp:2101
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:2002
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:9048
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:2569
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:2561
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:8239
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:6773
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:1107
void ProjectCurl_RT(const double *nk, const Array< int > &d2n, const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition: fe.cpp:717
H1Pos_HexahedronElement(const int p)
Definition: fe.cpp:7295
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.cpp:146
static void CalcShape(const int p, const double x, const double y, const double z, double *shape)
Definition: fe.cpp:8009
H1_SegmentElement(const int p, const int type=Quadrature1D::GaussLobatto)
Definition: fe.cpp:6623
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:8925
virtual void CalcHessian(const IntegrationPoint &ip, DenseMatrix &h) const
Definition: fe.cpp:1013
H1_TetrahedronElement(const int p, const int type=Quadrature1D::GaussLobatto)
Definition: fe.cpp:7592
int GetElement() const
Definition: fe.hpp:2302
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:7267
Linear2DFiniteElement()
Construct a linear FE on triangle.
Definition: fe.cpp:955
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.hpp:1896
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:2419
virtual void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Definition: fe.hpp:2226
Class for refined bi-linear FE on quadrilateral.
Definition: fe.hpp:1186
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:6014
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:4838
L2_QuadrilateralElement(const int p, const int _type=Quadrature1D::GaussLegendre)
Definition: fe.cpp:8263
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...
Definition: fe.cpp:10842
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:922
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:2022
void CalcPhysCurlShape(ElementTransformation &Trans, DenseMatrix &curl_shape) const
Evaluate the curl of all shape functions of a vector finite element in physical space at the point de...
Definition: fe.cpp:73
L2Pos_HexahedronElement(const int p)
Definition: fe.cpp:8607
ND_TriangleElement(const int p)
Definition: fe.cpp:10761
RT_QuadrilateralElement(const int p, const int cp_type=Quadrature1D::GaussLobatto, const int op_type=Quadrature1D::GaussLegendre)
Definition: fe.cpp:9075
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition: fe.hpp:1810
const double * GetPoints(const int p, const int type)
Get the coordinates of the points of the given Quadrature1D type.
Definition: fe.cpp:6552
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition: fe.cpp:9890
Implements CalcDivShape methods.
Definition: fe.hpp:102
static void CalcDShape(const int p, const double x, const double y, const double z, double *dshape_1d, double *dshape)
Definition: fe.cpp:8042
static void CalcBasis(const int p, const double x, double *u)
Definition: fe.hpp:1434
H1_HexahedronElement(const int p, const int type=Quadrature1D::GaussLobatto)
Definition: fe.cpp:6863
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:929
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
evaluate shape function - constant 1
Definition: fe.cpp:2271
virtual void CalcHessian(const IntegrationPoint &ip, DenseMatrix &h) const
Definition: fe.cpp:2050
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:6387
virtual void CalcHessian(const IntegrationPoint &ip, DenseMatrix &h) const
Definition: fe.cpp:103
H1Pos_TriangleElement(const int p)
Definition: fe.cpp:7762
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...
Definition: fe.cpp:3343
void SetMapType(int M)
Definition: fe.hpp:311
static int VerifyOpen(int pt_type)
Definition: fe.hpp:295
Cubic3DFiniteElement()
Construct a cubic FE on tetrahedron.
Definition: fe.cpp:2097
Linear1DFiniteElement()
Construct a linear FE on interval.
Definition: fe.cpp:934
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:4211
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition: fe.cpp:6002
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:1570
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition: fe.cpp:154
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:1188
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1941
static void CalcShape(const int p, const double x, const double y, double *shape)
Definition: fe.cpp:7817
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:2592
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:2190
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:3649
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:597
int Dof
Number of degrees of freedom.
Definition: fe.hpp:50
Class for bilinear FE on quad with nodes at the 4 Gaussian points.
Definition: fe.hpp:577
Class for refined linear FE on interval.
Definition: fe.hpp:1133
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:8183
Class for refined linear FE on triangle.
Definition: fe.hpp:1153
Class for refined linear FE on tetrahedron.
Definition: fe.hpp:1173
void SetPatch(int p) const
Definition: fe.hpp:2301
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:1148
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:1159
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:1407
Class for constant FE on triangle.
Definition: fe.hpp:770
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.hpp:2273
RefinedLinear1DFiniteElement()
Construct a quadratic FE on interval.
Definition: fe.cpp:4100
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:7038
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:7288
virtual void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Definition: fe.hpp:1948
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:1674
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:8766
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:7540
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition: fe.hpp:1954
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:4127
VectorFiniteElement(int D, int G, int Do, int O, int M, int F=FunctionSpace::Pk)
Definition: fe.hpp:477
void LocalInterpolation_RT(const double *nk, const Array< int > &d2n, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:847
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition: fe.cpp:3282
static void ChebyshevPoints(const int p, double *x)
Definition: fe.cpp:6355
NURBSFiniteElement(int D, int G, int Do, int O, int F)
Definition: fe.hpp:2288
Implements CalcDShape methods.
Definition: fe.hpp:101
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:6139
const Array< int > & GetDofMap() const
Definition: fe.hpp:1514
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:3872
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...
Definition: fe.cpp:5980
Class for refined trilinear FE on a hexahedron.
Definition: fe.hpp:1206
ND_TetrahedronElement(const int p)
Definition: fe.cpp:10499
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:8852
int DerivMapType
Definition: fe.hpp:50
Class for quadratic FE on tetrahedron.
Definition: fe.hpp:825
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const =0
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:2167
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:928
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:2026
For scalar fields; preserves point values.
Definition: fe.hpp:85
int GeomType
Geometry::Type of the reference element.
Definition: fe.hpp:50
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:1965
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:2172
const IntegrationRule & GetNodes() const
Definition: fe.hpp:167
For scalar fields; preserves volume integrals.
Definition: fe.hpp:86
Refined tensor products of polynomials of order k.
Definition: fe.hpp:36
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:5229
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:1229
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:8522
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:2397
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.hpp:1906
L2Pos_QuadrilateralElement(const int p)
Definition: fe.cpp:8373
P0SegmentFiniteElement(int Ord=0)
Definition: fe.cpp:2532
static void CalcDShape(const int p, const double x, const double y, double *dshape_1d, double *dshape)
Definition: fe.cpp:7843
int GetDerivRangeType() const
Definition: fe.hpp:132
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition: fe.cpp:2884
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:11033
Implements CalcCurlShape methods.
Definition: fe.hpp:103
DenseMatrix curlshape
Definition: fe.hpp:413
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.hpp:2176
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:1009
Class for linear FE on tetrahedron.
Definition: fe.hpp:800
Class for linear FE on interval.
Definition: fe.hpp:500
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...
Definition: fe.cpp:9450
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...
Definition: fe.cpp:5280
void CalcPhysDShape(ElementTransformation &Trans, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in physical space at the poi...
Definition: fe.cpp:180
Crouzeix-Raviart finite element on quadrilateral.
Definition: fe.hpp:873
Class for linear FE on triangle.
Definition: fe.hpp:520
Class for quadratic FE on triangle with nodes at the &quot;Gaussian&quot; points.
Definition: fe.hpp:655
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:8744
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...
Definition: fe.cpp:9189
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:2219
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:1829
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:3541
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:2130
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:1004
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:2332
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition: fe.cpp:9524
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:7703
virtual void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Definition: fe.hpp:1990
virtual void CalcHessian(const IntegrationPoint &ip, DenseMatrix &h) const
Definition: fe.cpp:1253
void SetElement(int e) const
Definition: fe.hpp:2303
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:1331
void ProjectGrad_ND(const double *tk, const Array< int > &d2t, const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.cpp:826
ScalarFiniteElement(int D, int G, int Do, int O, int F=FunctionSpace::Pk)
Definition: fe.hpp:307
void CalcPhysVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Equivalent to the CalcVShape() method with the same arguments.
Definition: fe.hpp:189
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:8846
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:2041
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:956
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition: fe.hpp:1736
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:11057
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:1345
int GetGeomType() const
Returns the Geometry::Type of the reference element.
Definition: fe.hpp:119
DenseMatrix m_dshape
Definition: fe.hpp:1639
int Dim
Dimension of reference space.
Definition: fe.hpp:50
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...
Definition: fe.cpp:10445
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:8398
IntegrationRule Nodes
Definition: fe.hpp:56
const Array< int > & GetDofMap() const
Definition: fe.hpp:1594
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:2269
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:1215
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:8635
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:7145
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:7466
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:3593
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...
Definition: fe.cpp:10876
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition: fe.cpp:2753
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:4525
static int CheckClosed(int type)
If the Quadrature1D type is not closed return Invalid; otherwise return type.
Definition: intrules.cpp:799
virtual ~FiniteElement()
Definition: fe.hpp:286
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:2650
const Array< int > & GetDofMap() const
Definition: fe.hpp:1575
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Overrides the scalar CalcShape function to print an error.
Definition: fe.hpp:2250
void CalcVShape_ND(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe.cpp:546
DenseMatrix Jinv
Definition: fe.hpp:412
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:1281
No derivatives implemented.
Definition: fe.hpp:100
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.hpp:2263
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:8194
int GetDof() const
Returns the number of degrees of freedom in the finite element.
Definition: fe.hpp:122
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:7728
Class for bi-quadratic FE on quadrilateral.
Definition: fe.hpp:671
Class for tri-linear FE on cube.
Definition: fe.hpp:838
Base class Coefficient that may optionally depend on time.
Definition: coefficient.hpp:31
virtual void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Definition: fe.hpp:2266
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:1099
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:1096
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...
Definition: fe.cpp:5310
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:9041
void CalcPhysShape(ElementTransformation &Trans, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in physical space at the point ...
Definition: fe.cpp:170
Basis & OpenBasis(const int p, const int type=Quadrature1D::GaussLegendre)
Definition: fe.hpp:1425
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:868
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:966
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:4695
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:4392
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:782
static const int * Binom(const int p)
Get a poiner to an array containing the binomial coefficients &quot;p choose k&quot; for k=0,...,p for the given p.
Definition: fe.cpp:6338
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition: fe.cpp:3443
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition: fe.cpp:52
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:1034
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1902
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:1235
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:8950
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...
Definition: fe.cpp:10154
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:2817
FiniteElement(int D, int G, int Do, int O, int F=FunctionSpace::Pk)
Definition: fe.cpp:24
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:1456
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:2477
Class for bilinear FE on quadrilateral.
Definition: fe.hpp:542
static int CheckOpen(int type)
If the Quadrature1D type is not open return Invalid; otherwise return type.
Definition: intrules.cpp:811
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:383
virtual void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Definition: fe.hpp:1899
ND_HexahedronElement(const int p, const int cp_type=Quadrature1D::GaussLobatto, const int op_type=Quadrature1D::GaussLegendre)
Definition: fe.cpp:9936
Quad1DFiniteElement()
Construct a quadratic FE on interval.
Definition: fe.cpp:1140
RT_HexahedronElement(const int p, const int cp_type=Quadrature1D::GaussLobatto, const int op_type=Quadrature1D::GaussLegendre)
Definition: fe.cpp:9286
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:2254
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:7421
virtual void GetFaceDofs(int face, int **dofs, int *ndofs) const
Definition: fe.cpp:98
Class for linear FE on triangle with nodes at the 3 &quot;Gaussian&quot; points.
Definition: fe.hpp:566
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:1088
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:2077
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:1030
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:995
Basis & ClosedBasis(const int p, const int type=Quadrature1D::GaussLobatto)
Definition: fe.hpp:1428
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...
Definition: fe.cpp:66
H1Pos_QuadrilateralElement(const int p)
Definition: fe.cpp:7192
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.hpp:2223
Array< KnotVector * > & KnotVectors() const
Definition: fe.hpp:2304
virtual void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Definition: fe.hpp:2179
Class for integration point with weight.
Definition: intrules.hpp:25
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:948
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:8795
virtual void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Definition: fe.cpp:127
Basis & GetBasis(const int p, const int type)
Get a Poly_1D::Basis object of the given degree and Quadrature1D type.
Definition: fe.cpp:6573
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:7442
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:8245
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:343
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:2298
Bi-quadratic element on quad with nodes at the 9 Gaussian points.
Definition: fe.hpp:710
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:983
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:8656
void Project_RT(const double *nk, const Array< int > &d2n, VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:557
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:6993
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:1123
virtual void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Definition: fe.hpp:2038
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...
Definition: fe.cpp:3257
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...
Definition: fe.cpp:10647
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...
Definition: fe.cpp:3017
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...
Definition: fe.cpp:10396
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:537
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.hpp:2233
virtual void ProjectDiv(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &div) const
Definition: fe.cpp:374
static int VerifyClosed(int pt_type)
Definition: fe.hpp:288
int DerivRangeType
Definition: fe.hpp:50
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:2765
virtual void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Definition: fe.hpp:2137
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:8256
RefinedLinear2DFiniteElement()
Construct a quadratic FE on triangle.
Definition: fe.cpp:4146
void NodalLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I, const NodalFiniteElement &fine_fe) const
Definition: fe.cpp:191
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:5934
void ProjectCurl_2D(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition: fe.cpp:224
void SetIJK(int *IJK) const
Definition: fe.hpp:2299
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.hpp:2134
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.hpp:2096
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:4108
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:3836
Array< int > dof_map
Definition: fe.hpp:1641
RT_TetrahedronElement(const int p)
Definition: fe.cpp:9752
ND_QuadrilateralElement(const int p, const int cp_type=Quadrature1D::GaussLobatto, const int op_type=Quadrature1D::GaussLegendre)
Definition: fe.cpp:10307
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.cpp:5490
L2_TetrahedronElement(const int p, const int type=Quadrature1D::GaussLegendre)
Definition: fe.cpp:8875
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:4041
Vector & Weights() const
Definition: fe.hpp:2305
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:6666
BiQuad2DFiniteElement()
Construct a biquadratic FE on quadrilateral.
Definition: fe.cpp:1360
virtual void GetFaceDofs(int face, int **dofs, int *ndofs) const
Definition: fe.cpp:2352
Tensor products of 1D FEs (only degree 2 is functional)
Definition: fe.hpp:1112
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition: fe.cpp:3054
P0TriangleFiniteElement()
Construct P0 triangle finite element.
Definition: fe.cpp:2264
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:2229
const double * ClosedPoints(const int p, const int type=Quadrature1D::GaussLobatto)
Definition: fe.hpp:1414
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:2538
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1993
RT_TriangleElement(const int p)
Definition: fe.cpp:9599
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:6647
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...
Definition: fe.cpp:10937
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.hpp:2083
virtual void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Definition: fe.hpp:2087
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...
Definition: fe.cpp:10228
void Eval(const double x, Vector &u) const
Definition: fe.cpp:6224
L2Pos_SegmentElement(const int p)
Definition: fe.cpp:8218
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:4305
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:5545
Class for cubic FE on tetrahedron.
Definition: fe.hpp:757
Vector data type.
Definition: vector.hpp:41
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition: fe.cpp:5476
static void CalcBernstein(const int p, const double x, double *u)
Definition: fe.hpp:1466
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:2091
int GetDerivType() const
Definition: fe.hpp:136
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:7247
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:8498
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:1281
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...
Definition: fe.cpp:9677
Quad2DFiniteElement()
Construct a quadratic FE on triangle.
Definition: fe.cpp:1198
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:2140
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.hpp:2035
Describes the space on each element.
Definition: fe.hpp:29
H1_QuadrilateralElement(const int p, const int type=Quadrature1D::GaussLobatto)
Definition: fe.cpp:6713
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:2493
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:2259
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:5395
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:8417
void PositiveLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I, const PositiveFiniteElement &fine_fe) const
Definition: fe.cpp:405
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...
Definition: fe.cpp:10689
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:3893
virtual void Project(Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:1599
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:974
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:2162
NodalFiniteElement(int D, int G, int Do, int O, int F=FunctionSpace::Pk)
Definition: fe.hpp:336
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:2603
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:6814
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:856
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...
Definition: fe.cpp:5446
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:3661
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:561
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition: fe.cpp:4576
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...
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:10979
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:1983
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.hpp:2186
void Project_ND(const double *tk, const Array< int > &d2t, VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:736
int GetRangeType() const
Definition: fe.hpp:130
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:1077
int Order
Order/degree of the shape functions.
Definition: fe.hpp:50
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:2959
H1_TriangleElement(const int p, const int type=Quadrature1D::GaussLobatto)
Definition: fe.cpp:7473
static void CalcBasis(const int p, const double x, double *u, double *d)
Definition: fe.hpp:1443
A Class that defines 1-D numerical quadrature rules on [0,1].
Definition: intrules.hpp:235
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe.hpp:2182
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:3866
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:7014
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.hpp:1997
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:6792
Basis(const int p, const double *nodes, const int _mode=1)
Definition: fe.cpp:6174
static void CalcDBinomTerms(const int p, const double x, const double y, double *d)
Definition: fe.cpp:6451
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...
Definition: fe.cpp:5059
Tensor products of polynomials of order k.
Definition: fe.hpp:35
TriLinear3DFiniteElement()
Construct a tri-linear FE on cube.
Definition: fe.cpp:2441
ND_SegmentElement(const int p, const int op_type=Quadrature1D::GaussLegendre)
Definition: fe.cpp:10921
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:133
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:1178
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:8477
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:1936
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Definition: fe.cpp:4163
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:3622
BiLinear2DFiniteElement()
Construct a bilinear FE on quadrilateral.
Definition: fe.cpp:982
virtual void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition: fe.hpp:2214
L2_HexahedronElement(const int p, const int _type=Quadrature1D::GaussLegendre)
Definition: fe.cpp:8452
Poly_1D poly1d
Definition: fe.cpp:6619
Crouzeix-Raviart finite element on triangle.
Definition: fe.hpp:861
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition: fe.cpp:6122
Lagrange1DFiniteElement(int degree)
Definition: fe.cpp:3674
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:2702
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition: fe.cpp:5815
const Array< int > & GetDofMap() const
Definition: fe.hpp:1493
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:9059
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.cpp:8324
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:1044
virtual void ProjectDelta(int vertex, Vector &dofs) const
Definition: fe.hpp:818
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition: fe.cpp:7562
void ProjectGrad_RT(const double *nk, const Array< int > &d2n, const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe.cpp:652
virtual void Project(Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const
Definition: fe.cpp:445