MFEM  v4.4.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
fe_rt.hpp
Go to the documentation of this file.
1 // Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
2 // at the Lawrence Livermore National Laboratory. All Rights reserved. See files
3 // LICENSE and NOTICE for details. LLNL-CODE-806117.
4 //
5 // This file is part of the MFEM library. For more information and source code
6 // availability visit https://mfem.org.
7 //
8 // MFEM is free software; you can redistribute it and/or modify it under the
9 // terms of the BSD-3 license. We welcome feedback and contributions, see file
10 // CONTRIBUTING.md for details.
11 
12 #ifndef MFEM_FE_RT
13 #define MFEM_FE_RT
14 
15 #include "fe_base.hpp"
16 #include "fe_h1.hpp"
17 #include "fe_l2.hpp"
18 
19 namespace mfem
20 {
21 
22 /// Arbitrary order Raviart-Thomas elements in 2D on a square
24 {
25 private:
26  static const double nk[8];
27 
28 #ifndef MFEM_THREAD_SAFE
29  mutable Vector shape_cx, shape_ox, shape_cy, shape_oy;
30  mutable Vector dshape_cx, dshape_cy;
31 #endif
32  Array<int> dof2nk;
33  const double *cp;
34 
35 public:
36  /** @brief Construct the RT_QuadrilateralElement of order @a p and closed and
37  open BasisType @a cb_type and @a ob_type */
38  RT_QuadrilateralElement(const int p,
39  const int cb_type = BasisType::GaussLobatto,
40  const int ob_type = BasisType::GaussLegendre);
41  virtual void CalcVShape(const IntegrationPoint &ip,
42  DenseMatrix &shape) const;
44  DenseMatrix &shape) const
45  { CalcVShape_RT(Trans, shape); }
46  virtual void CalcDivShape(const IntegrationPoint &ip,
47  Vector &divshape) const;
49  DenseMatrix &I) const
50  { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
52  DenseMatrix &R) const
53  { LocalRestriction_RT(nk, dof2nk, Trans, R); }
54  virtual void GetTransferMatrix(const FiniteElement &fe,
56  DenseMatrix &I) const
57  { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
59  virtual void Project(VectorCoefficient &vc,
60  ElementTransformation &Trans, Vector &dofs) const
61  {
62  if (obasis1d.IsIntegratedType()) { ProjectIntegrated(vc, Trans, dofs); }
63  else { Project_RT(nk, dof2nk, vc, Trans, dofs); }
64  }
66  Vector &dofs) const
67  { Project_RT(nk, dof2nk, vc, Trans, dofs); }
69  MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
70  { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
72  DenseMatrix &I) const
73  { Project_RT(nk, dof2nk, fe, Trans, I); }
74  // Gradient + rotation = Curl: H1 -> H(div)
75  virtual void ProjectGrad(const FiniteElement &fe,
77  DenseMatrix &grad) const
78  { ProjectGrad_RT(nk, dof2nk, fe, Trans, grad); }
79  // Curl = Gradient + rotation: H1 -> H(div)
80  virtual void ProjectCurl(const FiniteElement &fe,
82  DenseMatrix &curl) const
83  { ProjectGrad_RT(nk, dof2nk, fe, Trans, curl); }
84 
85 protected:
87  Vector &dofs) const;
88 };
89 
90 
91 /// Arbitrary order Raviart-Thomas elements in 3D on a cube
93 {
94  static const double nk[18];
95 
96 #ifndef MFEM_THREAD_SAFE
97  mutable Vector shape_cx, shape_ox, shape_cy, shape_oy, shape_cz, shape_oz;
98  mutable Vector dshape_cx, dshape_cy, dshape_cz;
99 #endif
100  Array<int> dof2nk;
101  const double *cp;
102 
103 public:
104  /** @brief Construct the RT_HexahedronElement of order @a p and closed and
105  open BasisType @a cb_type and @a ob_type */
106  RT_HexahedronElement(const int p,
107  const int cb_type = BasisType::GaussLobatto,
108  const int ob_type = BasisType::GaussLegendre);
109 
110  virtual void CalcVShape(const IntegrationPoint &ip,
111  DenseMatrix &shape) const;
113  DenseMatrix &shape) const
114  { CalcVShape_RT(Trans, shape); }
115  virtual void CalcDivShape(const IntegrationPoint &ip,
116  Vector &divshape) const;
118  DenseMatrix &I) const
119  { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
121  DenseMatrix &R) const
122  { LocalRestriction_RT(nk, dof2nk, Trans, R); }
123  virtual void GetTransferMatrix(const FiniteElement &fe,
125  DenseMatrix &I) const
126  { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
128  virtual void Project(VectorCoefficient &vc,
129  ElementTransformation &Trans, Vector &dofs) const
130  {
131  if (obasis1d.IsIntegratedType()) { ProjectIntegrated(vc, Trans, dofs); }
132  else { Project_RT(nk, dof2nk, vc, Trans, dofs); }
133  }
135  Vector &dofs) const
136  { Project_RT(nk, dof2nk, vc, Trans, dofs); }
138  MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
139  { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
141  DenseMatrix &I) const
142  { Project_RT(nk, dof2nk, fe, Trans, I); }
143  virtual void ProjectCurl(const FiniteElement &fe,
145  DenseMatrix &curl) const
146  { ProjectCurl_RT(nk, dof2nk, fe, Trans, curl); }
147 
148 protected:
151  Vector &dofs) const;
152 };
153 
154 
155 /// Arbitrary order Raviart-Thomas elements in 2D on a triangle
157 {
158  static const double nk[6], c;
159 
160 #ifndef MFEM_THREAD_SAFE
161  mutable Vector shape_x, shape_y, shape_l;
162  mutable Vector dshape_x, dshape_y, dshape_l;
163  mutable DenseMatrix u;
164  mutable Vector divu;
165 #endif
166  Array<int> dof2nk;
168 
169 public:
170  /// Construct the RT_TriangleElement of order @a p
171  RT_TriangleElement(const int p);
172  virtual void CalcVShape(const IntegrationPoint &ip,
173  DenseMatrix &shape) const;
175  DenseMatrix &shape) const
176  { CalcVShape_RT(Trans, shape); }
177  virtual void CalcDivShape(const IntegrationPoint &ip,
178  Vector &divshape) const;
180  DenseMatrix &I) const
181  { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
183  DenseMatrix &R) const
184  { LocalRestriction_RT(nk, dof2nk, Trans, R); }
185  virtual void GetTransferMatrix(const FiniteElement &fe,
187  DenseMatrix &I) const
188  { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
190  virtual void Project(VectorCoefficient &vc,
191  ElementTransformation &Trans, Vector &dofs) const
192  { Project_RT(nk, dof2nk, vc, Trans, dofs); }
194  Vector &dofs) const
195  { Project_RT(nk, dof2nk, vc, Trans, dofs); }
197  MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
198  { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
200  DenseMatrix &I) const
201  { Project_RT(nk, dof2nk, fe, Trans, I); }
202  // Gradient + rotation = Curl: H1 -> H(div)
203  virtual void ProjectGrad(const FiniteElement &fe,
205  DenseMatrix &grad) const
206  { ProjectGrad_RT(nk, dof2nk, fe, Trans, grad); }
207  // Curl = Gradient + rotation: H1 -> H(div)
208  virtual void ProjectCurl(const FiniteElement &fe,
210  DenseMatrix &curl) const
211  { ProjectGrad_RT(nk, dof2nk, fe, Trans, curl); }
212 };
213 
214 
215 /// Arbitrary order Raviart-Thomas elements in 3D on a tetrahedron
217 {
218  static const double nk[12], c;
219 
220 #ifndef MFEM_THREAD_SAFE
221  mutable Vector shape_x, shape_y, shape_z, shape_l;
222  mutable Vector dshape_x, dshape_y, dshape_z, dshape_l;
223  mutable DenseMatrix u;
224  mutable Vector divu;
225 #endif
226  Array<int> dof2nk;
228 
229 public:
230  /// Construct the RT_TetrahedronElement of order @a p
231  RT_TetrahedronElement(const int p);
232  virtual void CalcVShape(const IntegrationPoint &ip,
233  DenseMatrix &shape) const;
235  DenseMatrix &shape) const
236  { CalcVShape_RT(Trans, shape); }
237  virtual void CalcDivShape(const IntegrationPoint &ip,
238  Vector &divshape) const;
240  DenseMatrix &I) const
241  { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
243  DenseMatrix &R) const
244  { LocalRestriction_RT(nk, dof2nk, Trans, R); }
245  virtual void GetTransferMatrix(const FiniteElement &fe,
247  DenseMatrix &I) const
248  { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
250  virtual void Project(VectorCoefficient &vc,
251  ElementTransformation &Trans, Vector &dofs) const
252  { Project_RT(nk, dof2nk, vc, Trans, dofs); }
254  Vector &dofs) const
255  { Project_RT(nk, dof2nk, vc, Trans, dofs); }
257  MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
258  { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
260  DenseMatrix &I) const
261  { Project_RT(nk, dof2nk, fe, Trans, I); }
262  virtual void ProjectCurl(const FiniteElement &fe,
264  DenseMatrix &curl) const
265  { ProjectCurl_RT(nk, dof2nk, fe, Trans, curl); }
266 };
267 
269 {
270  static const double nk[15];
271 
272 #ifndef MFEM_THREAD_SAFE
273  mutable Vector tl2_shape;
274  mutable Vector sh1_shape;
275  mutable DenseMatrix trt_shape;
276  mutable Vector sl2_shape;
277  mutable DenseMatrix sh1_dshape;
278  mutable Vector trt_dshape;
279 #endif
280  Array<int> dof2nk, t_dof, s_dof;
281 
282  // The RT_Wedge is implemented as the sum of tensor products of
283  // lower dimensional basis funcgtions.
284  // Specifically: L2TriangleFE x H1SegmentFE + RTTriangle x L2SegmentFE
285  L2_TriangleElement L2TriangleFE;
286  RT_TriangleElement RTTriangleFE;
287  H1_SegmentElement H1SegmentFE;
288  L2_SegmentElement L2SegmentFE;
289 
290 public:
291  RT_WedgeElement(const int p);
292  virtual void CalcVShape(const IntegrationPoint &ip,
293  DenseMatrix &shape) const;
295  DenseMatrix &shape) const
296  { CalcVShape_RT(Trans, shape); }
297  virtual void CalcDivShape(const IntegrationPoint &ip,
298  Vector &divshape) const;
300  DenseMatrix &I) const
301  { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
303  DenseMatrix &R) const
304  { LocalRestriction_RT(nk, dof2nk, Trans, R); }
305  virtual void GetTransferMatrix(const FiniteElement &fe,
307  DenseMatrix &I) const
308  { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
310  virtual void Project(VectorCoefficient &vc,
311  ElementTransformation &Trans, Vector &dofs) const
312  { Project_RT(nk, dof2nk, vc, Trans, dofs); }
314  MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
315  { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
317  DenseMatrix &I) const
318  { Project_RT(nk, dof2nk, fe, Trans, I); }
319  virtual void ProjectCurl(const FiniteElement &fe,
321  DenseMatrix &curl) const
322  { ProjectCurl_RT(nk, dof2nk, fe, Trans, curl); }
323 };
324 
325 
326 /// Arbitrary order, three component, Raviart-Thomas elements in 1D on a segment
327 /** RT_R1D_SegmentElement provides a representation of a three component
328  Raviart-Thomas basis where the vector components vary along only one
329  dimension.
330 */
332 {
333  static const double nk[9];
334 #ifndef MFEM_THREAD_SAFE
335  mutable Vector shape_cx, shape_ox;
336  mutable Vector dshape_cx;
337 #endif
338  Array<int> dof_map, dof2nk;
339 
340  Poly_1D::Basis &cbasis1d, &obasis1d;
341 
342 public:
343  /** @brief Construct the RT_R1D_SegmentElement of order @a p and closed and
344  open BasisType @a cb_type and @a ob_type */
345  RT_R1D_SegmentElement(const int p,
346  const int cb_type = BasisType::GaussLobatto,
347  const int ob_type = BasisType::GaussLegendre);
348 
349  virtual void CalcVShape(const IntegrationPoint &ip,
350  DenseMatrix &shape) const;
351 
352  virtual void CalcVShape(ElementTransformation &Trans,
353  DenseMatrix &shape) const;
354 
355  virtual void CalcDivShape(const IntegrationPoint &ip,
356  Vector &divshape) const;
357 
359 
360  virtual void Project(VectorCoefficient &vc,
361  ElementTransformation &Trans, Vector &dofs) const;
362 
363  virtual void Project(const FiniteElement &fe,
364  ElementTransformation &Trans,
365  DenseMatrix &I) const;
366 
367  virtual void ProjectCurl(const FiniteElement &fe,
368  ElementTransformation &Trans,
369  DenseMatrix &curl) const;
370 };
371 
372 
373 /** RT_R2D_SegmentElement provides a representation of a 3D Raviart-Thomas
374  basis where the vector field is assumed constant in the third dimension.
375 */
377 {
378  static const double nk[2];
379 #ifndef MFEM_THREAD_SAFE
380  mutable Vector shape_ox;
381 #endif
382  Array<int> dof_map, dof2nk;
383 
384  Poly_1D::Basis &obasis1d;
385 
386 private:
387  void LocalInterpolation(const VectorFiniteElement &cfe,
389  DenseMatrix &I) const;
390 
391 public:
392  /** @brief Construct the RT_R2D_SegmentElement of order @a p and open
393  BasisType @a ob_type */
394  RT_R2D_SegmentElement(const int p,
395  const int ob_type = BasisType::GaussLegendre);
396 
397  virtual void CalcVShape(const IntegrationPoint &ip,
398  DenseMatrix &shape) const;
399 
400  virtual void CalcVShape(ElementTransformation &Trans,
401  DenseMatrix &shape) const;
402 
403  virtual void CalcDivShape(const IntegrationPoint &ip,
404  Vector &div_shape) const;
405 
407  DenseMatrix &I) const
408  { LocalInterpolation(*this, Trans, I); }
409 
411  DenseMatrix &R) const
412  { MFEM_ABORT("method is not overloaded"); }
413 
414  virtual void GetTransferMatrix(const FiniteElement &fe,
415  ElementTransformation &Trans,
416  DenseMatrix &I) const
417  { LocalInterpolation(CheckVectorFE(fe), Trans, I); }
418 };
419 
421 {
422 protected:
423  const double *nk;
425 
426  RT_R2D_FiniteElement(int p, Geometry::Type G, int Do, const double *nk_fe);
427 
428 private:
429  void LocalInterpolation(const VectorFiniteElement &cfe,
431  DenseMatrix &I) const;
432 
433 public:
435 
436  virtual void CalcVShape(ElementTransformation &Trans,
437  DenseMatrix &shape) const;
438 
440  DenseMatrix &I) const
441  { LocalInterpolation(*this, Trans, I); }
442 
444  DenseMatrix &R) const;
445 
446  virtual void GetTransferMatrix(const FiniteElement &fe,
448  DenseMatrix &I) const
449  { LocalInterpolation(CheckVectorFE(fe), Trans, I); }
450 
452 
453  virtual void Project(VectorCoefficient &vc,
454  ElementTransformation &Trans, Vector &dofs) const;
455 
456  virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
457  DenseMatrix &I) const;
458 
459  virtual void ProjectCurl(const FiniteElement &fe,
461  DenseMatrix &curl) const;
462 };
463 
464 /// Arbitrary order Raviart-Thomas 3D elements in 2D on a triangle
466 {
467 private:
468  static const double nk_t[12];
469 
470 #ifndef MFEM_THREAD_SAFE
471  mutable DenseMatrix rt_shape;
472  mutable Vector l2_shape;
473  mutable Vector rt_dshape;
474 #endif
475 
476  RT_TriangleElement RT_FE;
477  L2_TriangleElement L2_FE;
478 
479 public:
480  /** @brief Construct the RT_R2D_TriangleElement of order @a p */
481  RT_R2D_TriangleElement(const int p);
482 
484 
485  virtual void CalcVShape(const IntegrationPoint &ip,
486  DenseMatrix &shape) const;
487 
488  virtual void CalcDivShape(const IntegrationPoint &ip,
489  Vector &divshape) const;
490 };
491 
492 /// Arbitrary order Raviart-Thomas 3D elements in 2D on a square
494 {
495 private:
496  static const double nk_q[15];
497 
498 #ifndef MFEM_THREAD_SAFE
499  mutable Vector shape_cx, shape_ox, shape_cy, shape_oy;
500  mutable Vector dshape_cx, dshape_cy;
501 #endif
502 
503  Poly_1D::Basis &cbasis1d, &obasis1d;
504 
505 public:
506  /** @brief Construct the RT_QuadrilateralElement of order @a p and closed and
507  open BasisType @a cb_type and @a ob_type */
508  RT_R2D_QuadrilateralElement(const int p,
509  const int cb_type = BasisType::GaussLobatto,
510  const int ob_type = BasisType::GaussLegendre);
511 
513 
514  virtual void CalcVShape(const IntegrationPoint &ip,
515  DenseMatrix &shape) const;
516  virtual void CalcDivShape(const IntegrationPoint &ip,
517  Vector &divshape) const;
518 };
519 
520 
521 } // namespace mfem
522 
523 #endif
Abstract class for all finite elements.
Definition: fe_base.hpp:235
virtual void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Given a matrix coefficient and a transformation, compute an approximation (&quot;projection&quot;) in the local...
Definition: fe_rt.hpp:313
virtual void GetTransferMatrix(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Return interpolation matrix, I, which maps dofs from a coarse element, fe, to the fine dofs on this f...
Definition: fe_rt.hpp:414
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
Definition: fe_rt.hpp:128
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Compute the discrete curl matrix from the given FiniteElement onto &#39;this&#39; FiniteElement. The ElementTransformation is included to support cases when the matrix depends on it.
Definition: fe_rt.hpp:80
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_rt.hpp:174
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
Definition: fe_rt.hpp:239
void ProjectMatrixCoefficient_RT(const double *nk, const Array< int > &d2n, MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Project the rows of the matrix coefficient in an RT space.
Definition: fe_base.cpp:963
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_rt.cpp:942
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_base.cpp:39
void LocalInterpolation_RT(const VectorFiniteElement &cfe, const double *nk, const Array< int > &d2n, ElementTransformation &Trans, DenseMatrix &I) const
Definition: fe_base.cpp:1347
bool IsIntegratedType() const
Returns true if the basis is &quot;integrated&quot;, false otherwise.
Definition: fe_base.hpp:1021
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Compute the discrete curl matrix from the given FiniteElement onto &#39;this&#39; FiniteElement. The ElementTransformation is included to support cases when the matrix depends on it.
Definition: fe_rt.hpp:262
Arbitrary order L2 elements in 2D on a triangle.
Definition: fe_l2.hpp:81
Base class for vector Coefficients that optionally depend on time and space.
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_rt.cpp:1264
virtual void Project(Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const
Given a coefficient and a transformation, compute its projection (approximation) in the local finite ...
Definition: fe_base.cpp:125
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Compute the discrete curl matrix from the given FiniteElement onto &#39;this&#39; FiniteElement. The ElementTransformation is included to support cases when the matrix depends on it.
Definition: fe_rt.cpp:1463
virtual void GetLocalRestriction(ElementTransformation &Trans, DenseMatrix &R) const
Return a local restriction matrix R (Dof x Dof) mapping fine dofs to coarse dofs. ...
Definition: fe_rt.hpp:51
void CalcVShape_RT(ElementTransformation &Trans, DenseMatrix &shape) const
Definition: fe_base.cpp:903
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_rt.cpp:199
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_rt.cpp:1141
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_rt.cpp:2101
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Compute the discrete curl matrix from the given FiniteElement onto &#39;this&#39; FiniteElement. The ElementTransformation is included to support cases when the matrix depends on it.
Definition: fe_rt.hpp:208
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
Definition: fe_rt.hpp:48
virtual void ProjectFromNodes(Vector &vc, ElementTransformation &Trans, Vector &dofs) const
Given a vector of values at the finite element nodes and a transformation, compute its projection (ap...
Definition: fe_rt.hpp:253
Data type dense matrix using column-major storage.
Definition: densemat.hpp:23
virtual void GetTransferMatrix(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Return interpolation matrix, I, which maps dofs from a coarse element, fe, to the fine dofs on this f...
Definition: fe_rt.hpp:123
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
Definition: fe_rt.hpp:190
virtual void GetTransferMatrix(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Return interpolation matrix, I, which maps dofs from a coarse element, fe, to the fine dofs on this f...
Definition: fe_rt.hpp:245
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_rt.hpp:43
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Compute the discrete curl matrix from the given FiniteElement onto &#39;this&#39; FiniteElement. The ElementTransformation is included to support cases when the matrix depends on it.
Definition: fe_rt.cpp:1828
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_rt.cpp:798
virtual void ProjectFromNodes(Vector &vc, ElementTransformation &Trans, Vector &dofs) const
Given a vector of values at the finite element nodes and a transformation, compute its projection (ap...
Definition: fe_rt.hpp:65
Arbitrary order, three component, Raviart-Thomas elements in 1D on a segment.
Definition: fe_rt.hpp:331
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Compute the embedding/projection matrix from the given FiniteElement onto &#39;this&#39; FiniteElement. The ElementTransformation is included to support cases when the projection depends on it.
Definition: fe_rt.hpp:140
Intermediate class for finite elements whose basis functions return vector values.
Definition: fe_base.hpp:785
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_rt.cpp:1920
virtual void GetLocalRestriction(ElementTransformation &Trans, DenseMatrix &R) const
Return a local restriction matrix R (Dof x Dof) mapping fine dofs to coarse dofs. ...
Definition: fe_rt.hpp:410
void ProjectCurl_RT(const double *nk, const Array< int > &d2n, const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition: fe_base.cpp:1131
const double * nk
Definition: fe_rt.hpp:423
RT_WedgeElement(const int p)
Definition: fe_rt.cpp:1023
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
Definition: fe_rt.hpp:59
void ProjectIntegrated(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe_rt.cpp:631
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_rt.cpp:978
virtual void GetLocalRestriction(ElementTransformation &Trans, DenseMatrix &R) const
Return a local restriction matrix R (Dof x Dof) mapping fine dofs to coarse dofs. ...
Definition: fe_rt.hpp:242
Arbitrary order Raviart-Thomas 3D elements in 2D on a triangle.
Definition: fe_rt.hpp:465
Arbitrary order Raviart-Thomas 3D elements in 2D on a square.
Definition: fe_rt.hpp:493
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_rt.cpp:1318
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
Definition: fe_rt.hpp:117
Array< int > dof_map
Definition: fe_rt.hpp:424
virtual void GetLocalRestriction(ElementTransformation &Trans, DenseMatrix &R) const
Return a local restriction matrix R (Dof x Dof) mapping fine dofs to coarse dofs. ...
Definition: fe_rt.hpp:182
Arbitrary order L2 elements in 1D on a segment.
Definition: fe_l2.hpp:21
virtual void GetTransferMatrix(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Return interpolation matrix, I, which maps dofs from a coarse element, fe, to the fine dofs on this f...
Definition: fe_rt.hpp:446
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_rt.cpp:1609
virtual void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Given a matrix coefficient and a transformation, compute an approximation (&quot;projection&quot;) in the local...
Definition: fe_rt.hpp:137
RT_R1D_SegmentElement(const int p, const int cb_type=BasisType::GaussLobatto, const int ob_type=BasisType::GaussLegendre)
Construct the RT_R1D_SegmentElement of order p and closed and open BasisType cb_type and ob_type...
Definition: fe_rt.cpp:1210
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Compute the discrete curl matrix from the given FiniteElement onto &#39;this&#39; FiniteElement. The ElementTransformation is included to support cases when the matrix depends on it.
Definition: fe_rt.hpp:143
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &div_shape) const
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition: fe_rt.cpp:1550
RT_R2D_FiniteElement(int p, Geometry::Type G, int Do, const double *nk_fe)
Definition: fe_rt.cpp:1597
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
Definition: fe_rt.hpp:299
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_rt.hpp:234
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Compute the discrete gradient matrix from the given FiniteElement onto &#39;this&#39; FiniteElement. The ElementTransformation is included to support cases when the matrix depends on it.
Definition: fe_rt.hpp:75
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_rt.cpp:2158
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_rt.cpp:466
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_rt.cpp:141
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
Definition: fe_rt.hpp:310
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_rt.cpp:553
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_rt.cpp:1176
virtual void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Given a matrix coefficient and a transformation, compute an approximation (&quot;projection&quot;) in the local...
Definition: fe_rt.hpp:196
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Compute the embedding/projection matrix from the given FiniteElement onto &#39;this&#39; FiniteElement. The ElementTransformation is included to support cases when the projection depends on it.
Definition: fe_rt.hpp:259
RT_R2D_TriangleElement(const int p)
Construct the RT_R2D_TriangleElement of order p.
Definition: fe_rt.cpp:1852
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_rt.cpp:1514
void ProjectIntegrated(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition: fe_rt.cpp:253
virtual void ProjectFromNodes(Vector &vc, ElementTransformation &Trans, Vector &dofs) const
Given a vector of values at the finite element nodes and a transformation, compute its projection (ap...
Definition: fe_rt.hpp:193
Arbitrary order Raviart-Thomas elements in 3D on a tetrahedron.
Definition: fe_rt.hpp:216
RT_R2D_QuadrilateralElement(const int p, const int cb_type=BasisType::GaussLobatto, const int ob_type=BasisType::GaussLegendre)
Construct the RT_QuadrilateralElement of order p and closed and open BasisType cb_type and ob_type...
Definition: fe_rt.cpp:1975
RT_R2D_SegmentElement(const int p, const int ob_type=BasisType::GaussLegendre)
Construct the RT_R2D_SegmentElement of order p and open BasisType ob_type.
Definition: fe_rt.cpp:1486
Base class for Matrix Coefficients that optionally depend on time and space.
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Compute the embedding/projection matrix from the given FiniteElement onto &#39;this&#39; FiniteElement. The ElementTransformation is included to support cases when the projection depends on it.
Definition: fe_rt.hpp:71
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
Definition: fe_rt.hpp:439
Arbitrary order Raviart-Thomas elements in 2D on a triangle.
Definition: fe_rt.hpp:156
virtual void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Given a matrix coefficient and a transformation, compute an approximation (&quot;projection&quot;) in the local...
Definition: fe_rt.hpp:68
virtual void GetLocalRestriction(ElementTransformation &Trans, DenseMatrix &R) const
Return a local restriction matrix R (Dof x Dof) mapping fine dofs to coarse dofs. ...
Definition: fe_rt.hpp:302
virtual void GetTransferMatrix(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Return interpolation matrix, I, which maps dofs from a coarse element, fe, to the fine dofs on this f...
Definition: fe_rt.hpp:185
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
Definition: fe_rt.cpp:1351
Class for integration point with weight.
Definition: intrules.hpp:25
Arbitrary order Raviart-Thomas elements in 2D on a square.
Definition: fe_rt.hpp:23
virtual void GetLocalRestriction(ElementTransformation &Trans, DenseMatrix &R) const
Return a local restriction matrix R (Dof x Dof) mapping fine dofs to coarse dofs. ...
Definition: fe_rt.cpp:1668
void Project_RT(const double *nk, const Array< int > &d2n, VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Project a vector coefficient onto the RT basis functions.
Definition: fe_base.cpp:926
virtual void GetLocalRestriction(ElementTransformation &Trans, DenseMatrix &R) const
Return a local restriction matrix R (Dof x Dof) mapping fine dofs to coarse dofs. ...
Definition: fe_rt.hpp:120
virtual void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Given a matrix coefficient and a transformation, compute an approximation (&quot;projection&quot;) in the local...
Definition: fe_rt.hpp:256
virtual void GetTransferMatrix(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Return interpolation matrix, I, which maps dofs from a coarse element, fe, to the fine dofs on this f...
Definition: fe_rt.hpp:305
Arbitrary order H1 elements in 1D.
Definition: fe_h1.hpp:21
RT_TetrahedronElement(const int p)
Construct the RT_TetrahedronElement of order p.
Definition: fe_rt.cpp:840
Class for evaluating 1D nodal, positive (Bernstein), or integrated (Gerritsma) bases.
Definition: fe_base.hpp:976
virtual void GetTransferMatrix(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Return interpolation matrix, I, which maps dofs from a coarse element, fe, to the fine dofs on this f...
Definition: fe_rt.hpp:54
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
Definition: fe_rt.cpp:1716
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
Definition: fe_rt.hpp:406
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Compute the embedding/projection matrix from the given FiniteElement onto &#39;this&#39; FiniteElement. The ElementTransformation is included to support cases when the projection depends on it.
Definition: fe_rt.hpp:199
RT_TriangleElement(const int p)
Construct the RT_TriangleElement of order p.
Definition: fe_rt.cpp:687
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Compute the embedding/projection matrix from the given FiniteElement onto &#39;this&#39; FiniteElement. The ElementTransformation is included to support cases when the projection depends on it.
Definition: fe_rt.hpp:316
virtual void ProjectFromNodes(Vector &vc, ElementTransformation &Trans, Vector &dofs) const
Given a vector of values at the finite element nodes and a transformation, compute its projection (ap...
Definition: fe_rt.hpp:134
Vector data type.
Definition: vector.hpp:60
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_rt.cpp:765
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Compute the discrete curl matrix from the given FiniteElement onto &#39;this&#39; FiniteElement. The ElementTransformation is included to support cases when the matrix depends on it.
Definition: fe_rt.hpp:319
virtual void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
Definition: fe_rt.hpp:250
void LocalRestriction_RT(const double *nk, const Array< int > &d2n, ElementTransformation &Trans, DenseMatrix &R) const
Definition: fe_base.cpp:1473
static const VectorFiniteElement & CheckVectorFE(const FiniteElement &fe)
Definition: fe_base.hpp:946
RT_HexahedronElement(const int p, const int cb_type=BasisType::GaussLobatto, const int ob_type=BasisType::GaussLegendre)
Construct the RT_HexahedronElement of order p and closed and open BasisType cb_type and ob_type...
Definition: fe_rt.cpp:300
RT_QuadrilateralElement(const int p, const int cb_type=BasisType::GaussLobatto, const int ob_type=BasisType::GaussLegendre)
Construct the RT_QuadrilateralElement of order p and closed and open BasisType cb_type and ob_type...
Definition: fe_rt.cpp:25
Arbitrary order Raviart-Thomas elements in 3D on a cube.
Definition: fe_rt.hpp:92
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
Definition: fe_rt.hpp:179
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_rt.hpp:294
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Compute the discrete gradient matrix from the given FiniteElement onto &#39;this&#39; FiniteElement. The ElementTransformation is included to support cases when the matrix depends on it.
Definition: fe_rt.hpp:203
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_rt.hpp:112
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_rt.cpp:1949
void ProjectGrad_RT(const double *nk, const Array< int > &d2n, const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition: fe_base.cpp:1066