MFEM v4.10.0
Finite element discretization library
Loading...
Searching...
No Matches
fe_rt.hpp
Go to the documentation of this file.
1// Copyright (c) 2010-2026, 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#include "fe_pyramid.hpp"
19
20namespace mfem
21{
22
23/// Arbitrary order Raviart-Thomas elements in 2D on a square
25{
26private:
27 static const real_t nk[8];
28
29#ifndef MFEM_THREAD_SAFE
30 mutable Vector shape_cx, shape_ox, shape_cy, shape_oy;
31 mutable Vector dshape_cx, dshape_cy;
32#endif
33 Array<int> dof2nk;
34 const real_t *cp;
35
36public:
37 /** @brief Construct the RT_QuadrilateralElement of order @a p and closed and
38 open BasisType @a cb_type and @a ob_type */
39 RT_QuadrilateralElement(const int p,
40 const int cb_type = BasisType::GaussLobatto,
41 const int ob_type = BasisType::GaussLegendre);
42 void CalcVShape(const IntegrationPoint &ip,
43 DenseMatrix &shape) const override;
45 DenseMatrix &shape) const override
46 { CalcVShape_RT(Trans, shape); }
47 void CalcDivShape(const IntegrationPoint &ip,
48 Vector &divshape) const override;
50 DenseMatrix &I) const override
51 { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
53 DenseMatrix &R) const override
54 { LocalRestriction_RT(nk, dof2nk, Trans, R); }
57 DenseMatrix &I) const override
58 { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
61 ElementTransformation &Trans, Vector &dofs) const override
62 {
63 if (obasis1d.IsIntegratedType()) { ProjectIntegrated(vc, Trans, dofs); }
64 else { Project_RT(nk, dof2nk, vc, Trans, dofs); }
65 }
67 Vector &dofs) const override
68 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
71 Vector &dofs) const override
72 { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
74 DenseMatrix &I) const override
75 { Project_RT(nk, dof2nk, fe, Trans, I); }
76 // Curl = Gradient + rotation: H1 -> H(div)
77 void ProjectCurl(const FiniteElement &fe,
79 DenseMatrix &curl) const override
80 { ProjectCurl2D_RT(nk, dof2nk, fe, Trans, curl); }
81
82 void GetFaceMap(const int face_id, Array<int> &face_map) const override;
83
84protected:
86 Vector &dofs) const;
87};
88
89
90/// Arbitrary order Raviart-Thomas elements in 3D on a cube
92{
93 static const real_t nk[18];
94
95#ifndef MFEM_THREAD_SAFE
96 mutable Vector shape_cx, shape_ox, shape_cy, shape_oy, shape_cz, shape_oz;
97 mutable Vector dshape_cx, dshape_cy, dshape_cz;
98#endif
99 Array<int> dof2nk;
100 const real_t *cp;
101
102public:
103 /** @brief Construct the RT_HexahedronElement of order @a p and closed and
104 open BasisType @a cb_type and @a ob_type */
105 RT_HexahedronElement(const int p,
106 const int cb_type = BasisType::GaussLobatto,
107 const int ob_type = BasisType::GaussLegendre);
108
109 void CalcVShape(const IntegrationPoint &ip,
110 DenseMatrix &shape) const override;
112 DenseMatrix &shape) const override
113 { CalcVShape_RT(Trans, shape); }
114 void CalcDivShape(const IntegrationPoint &ip,
115 Vector &divshape) const override;
117 DenseMatrix &I) const override
118 { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
120 DenseMatrix &R) const override
121 { LocalRestriction_RT(nk, dof2nk, Trans, R); }
124 DenseMatrix &I) const override
125 { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
128 ElementTransformation &Trans, Vector &dofs) const override
129 {
130 if (obasis1d.IsIntegratedType()) { ProjectIntegrated(vc, Trans, dofs); }
131 else { Project_RT(nk, dof2nk, vc, Trans, dofs); }
132 }
134 Vector &dofs) const override
135 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
138 Vector &dofs) const override
139 { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
141 DenseMatrix &I) const override
142 { Project_RT(nk, dof2nk, fe, Trans, I); }
145 DenseMatrix &curl) const override
146 { ProjectCurl3D_RT(nk, dof2nk, fe, Trans, curl); }
147
148 /// @brief Return the mapping from lexicographically ordered face DOFs to
149 /// lexicographically ordered element DOFs corresponding to local face
150 /// @a face_id.
151 void GetFaceMap(const int face_id, Array<int> &face_map) const override;
152
153protected:
156 Vector &dofs) const;
157};
158
159
160/// Arbitrary order Raviart-Thomas elements in 2D on a triangle
162{
163 static const real_t nk[6], c;
164
165#ifndef MFEM_THREAD_SAFE
166 mutable Vector shape_x, shape_y, shape_l;
167 mutable Vector dshape_x, dshape_y, dshape_l;
168 mutable DenseMatrix u;
169 mutable Vector divu;
170#endif
171 Array<int> dof2nk;
173
174public:
175 /// Construct the RT_TriangleElement of order @a p
176 RT_TriangleElement(const int p);
177 void CalcVShape(const IntegrationPoint &ip,
178 DenseMatrix &shape) const override;
180 DenseMatrix &shape) const override
181 { CalcVShape_RT(Trans, shape); }
182 void CalcDivShape(const IntegrationPoint &ip,
183 Vector &divshape) const override;
185 DenseMatrix &I) const override
186 { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
188 DenseMatrix &R) const override
189 { LocalRestriction_RT(nk, dof2nk, Trans, R); }
192 DenseMatrix &I) const override
193 { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
196 ElementTransformation &Trans, Vector &dofs) const override
197 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
199 Vector &dofs) const override
200 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
203 Vector &dofs) const override
204 { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
206 DenseMatrix &I) const override
207 { Project_RT(nk, dof2nk, fe, Trans, I); }
208 // Curl = Gradient + rotation: H1 -> H(div)
211 DenseMatrix &curl) const override
212 { ProjectCurl2D_RT(nk, dof2nk, fe, Trans, curl); }
213};
214
215
216/// Arbitrary order Raviart-Thomas elements in 3D on a tetrahedron
218{
219 static const real_t nk[12], c;
220
221#ifndef MFEM_THREAD_SAFE
222 mutable Vector shape_x, shape_y, shape_z, shape_l;
223 mutable Vector dshape_x, dshape_y, dshape_z, dshape_l;
224 mutable DenseMatrix u;
225 mutable Vector divu;
226#endif
227 Array<int> dof2nk;
229
230public:
231 /// Construct the RT_TetrahedronElement of order @a p
232 RT_TetrahedronElement(const int p);
233 void CalcVShape(const IntegrationPoint &ip,
234 DenseMatrix &shape) const override;
236 DenseMatrix &shape) const override
237 { CalcVShape_RT(Trans, shape); }
238 void CalcDivShape(const IntegrationPoint &ip,
239 Vector &divshape) const override;
241 DenseMatrix &I) const override
242 { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
244 DenseMatrix &R) const override
245 { LocalRestriction_RT(nk, dof2nk, Trans, R); }
248 DenseMatrix &I) const override
249 { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
252 ElementTransformation &Trans, Vector &dofs) const override
253 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
255 Vector &dofs) const override
256 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
259 Vector &dofs) const override
260 { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
262 DenseMatrix &I) const override
263 { Project_RT(nk, dof2nk, fe, Trans, I); }
266 DenseMatrix &curl) const override
267 { ProjectCurl3D_RT(nk, dof2nk, fe, Trans, curl); }
268};
269
271{
272 static const real_t nk[15];
273
274#ifndef MFEM_THREAD_SAFE
275 mutable Vector tl2_shape;
276 mutable Vector sh1_shape;
277 mutable DenseMatrix trt_shape;
278 mutable Vector sl2_shape;
279 mutable DenseMatrix sh1_dshape;
280 mutable Vector trt_dshape;
281#endif
282 Array<int> dof2nk, t_dof, s_dof;
283
284 // The RT_Wedge is implemented as the sum of tensor products of
285 // lower dimensional basis funcgtions.
286 // Specifically: L2TriangleFE x H1SegmentFE + RTTriangle x L2SegmentFE
287 L2_TriangleElement L2TriangleFE;
288 RT_TriangleElement RTTriangleFE;
289 H1_SegmentElement H1SegmentFE;
290 L2_SegmentElement L2SegmentFE;
291
292public:
293 RT_WedgeElement(const int p);
294 void CalcVShape(const IntegrationPoint &ip,
295 DenseMatrix &shape) const override;
297 DenseMatrix &shape) const override
298 { CalcVShape_RT(Trans, shape); }
299 void CalcDivShape(const IntegrationPoint &ip,
300 Vector &divshape) const override;
302 DenseMatrix &I) const override
303 { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
305 DenseMatrix &R) const override
306 { LocalRestriction_RT(nk, dof2nk, Trans, R); }
309 DenseMatrix &I) const override
310 { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
313 ElementTransformation &Trans, Vector &dofs) const override
314 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
317 Vector &dofs) const override
318 { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
320 DenseMatrix &I) const override
321 { Project_RT(nk, dof2nk, fe, Trans, I); }
324 DenseMatrix &curl) const override
325 { ProjectCurl3D_RT(nk, dof2nk, fe, Trans, curl); }
326};
327
328/** Arbitrary order H(Div) basis functions defined on pyramid-shaped elements
329
330 This implementation is closely based on the finite elements
331 described in section 9.3 of the paper "Orientation embedded high
332 order shape functions for the exact sequence elements of all shapes"
333 by Federico Fuentes, Brendan Keith, Leszek Demkowicz, and Sriram
334 Nagaraj, see https://doi.org/10.1016/j.camwa.2015.04.027.
335 */
337 : public VectorFiniteElement, public FuentesPyramid
338{
339private:
340 static const real_t nk[24];
341
342 mutable real_t zmax;
343
344#ifndef MFEM_THREAD_SAFE
345 mutable Vector tmp1_i;
346 mutable DenseMatrix tmp1_ij;
347 mutable DenseMatrix tmp2_ij;
348 mutable DenseMatrix tmp3_ij;
349 mutable DenseMatrix tmp4_ij;
350 mutable DenseTensor tmp1_ijk;
351 mutable DenseTensor tmp2_ijk;
352 mutable DenseTensor tmp3_ijk;
353 mutable DenseTensor tmp4_ijk;
354 mutable DenseTensor tmp5_ijk;
355 mutable DenseTensor tmp6_ijk;
356 mutable DenseTensor tmp7_ijk;
357 mutable DenseMatrix u;
358 mutable Vector divu;
359#endif
360 Array<int> dof2nk;
362
363 void calcBasis(const int p, const IntegrationPoint &ip,
364 Vector &phi_k,
365 DenseMatrix &phi_ij,
366 DenseMatrix &dphi_k,
367 DenseTensor &VQ_ijk,
368 DenseTensor &VT_ijk,
369 DenseTensor &VTT_ijk,
370 DenseTensor &E_ijk, DenseTensor &dE_ijk,
371 DenseTensor &dphi_ijk,
372 DenseTensor &VL_ijk,
373 DenseMatrix &VR_ij,
374 DenseMatrix &F) const;
375
376 void calcDivBasis(const int p, const IntegrationPoint &ip,
377 Vector &phi_k,
378 DenseMatrix &phi_ij,
379 DenseMatrix &dphi_k,
380 DenseTensor &VQ_ijk,
381 DenseTensor &VT_ijk,
382 DenseTensor &VTT_ijk, DenseMatrix &dVTT_ij,
383 DenseTensor &E_ijk, DenseTensor &dE_ijk,
384 DenseTensor &dphi_ijk,
385 DenseTensor &VL_ijk,
386 DenseMatrix &VR_ij,
387 Vector &dF) const;
388
389public:
390 RT_FuentesPyramidElement(const int p);
391 virtual void CalcVShape(const IntegrationPoint &ip,
392 DenseMatrix &shape) const;
394 DenseMatrix &shape) const
395 { CalcVShape_RT(Trans, shape); }
396 virtual void CalcDivShape(const IntegrationPoint &ip,
397 Vector &divshape) const;
399 DenseMatrix &I) const
400 { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
402 DenseMatrix &R) const
403 { LocalRestriction_RT(nk, dof2nk, Trans, R); }
404 virtual void GetTransferMatrix(const FiniteElement &fe,
406 DenseMatrix &I) const
407 { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
409 virtual void Project(VectorCoefficient &vc,
410 ElementTransformation &Trans, Vector &dofs) const
411 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
414 { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
415 virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
416 DenseMatrix &I) const
417 { Project_RT(nk, dof2nk, fe, Trans, I); }
418 virtual void ProjectCurl(const FiniteElement &fe,
420 DenseMatrix &curl) const
421 { ProjectCurl3D_RT(nk, dof2nk, fe, Trans, curl); }
422
423 void CalcRawVShape(const IntegrationPoint &ip,
424 DenseMatrix &shape) const;
425
426 void CalcRawDivShape(const IntegrationPoint &ip,
427 Vector &dshape) const;
428
429 real_t GetZetaMax() const { return zmax; }
430};
431
432/// Arbitrary order, three component, Raviart-Thomas elements in 1D on a segment
433/** RT_R1D_SegmentElement provides a representation of a three component
434 Raviart-Thomas basis where the vector components vary along only one
435 dimension.
436*/
438{
439 static const real_t nk[9];
440#ifndef MFEM_THREAD_SAFE
441 mutable Vector shape_cx, shape_ox;
442 mutable Vector dshape_cx;
443#endif
444 Array<int> dof_map, dof2nk;
445
446 Poly_1D::Basis &cbasis1d, &obasis1d;
447
448public:
449 /** @brief Construct the RT_R1D_SegmentElement of order @a p and closed and
450 open BasisType @a cb_type and @a ob_type */
451 RT_R1D_SegmentElement(const int p,
452 const int cb_type = BasisType::GaussLobatto,
453 const int ob_type = BasisType::GaussLegendre);
454
455 void CalcVShape(const IntegrationPoint &ip,
456 DenseMatrix &shape) const override;
457
459 DenseMatrix &shape) const override;
460
461 void CalcDivShape(const IntegrationPoint &ip,
462 Vector &divshape) const override;
463
465
466 void Project(VectorCoefficient &vc,
467 ElementTransformation &Trans, Vector &dofs) const override;
468
469 void Project(const FiniteElement &fe,
471 DenseMatrix &I) const override;
472
473 void ProjectCurl(const FiniteElement &fe,
475 DenseMatrix &curl) const override;
476};
477
478
479/** RT_R2D_SegmentElement provides a representation of a 3D Raviart-Thomas
480 basis where the vector field is assumed constant in the third dimension.
481*/
483{
484 static const real_t nk[2];
485#ifndef MFEM_THREAD_SAFE
486 mutable Vector shape_ox;
487#endif
488 Array<int> dof_map, dof2nk;
489
490 Poly_1D::Basis &obasis1d;
491
492private:
493 void LocalInterpolation(const VectorFiniteElement &cfe,
495 DenseMatrix &I) const;
496
497public:
498 /** @brief Construct the RT_R2D_SegmentElement of order @a p and open
499 BasisType @a ob_type */
500 RT_R2D_SegmentElement(const int p,
501 const int ob_type = BasisType::GaussLegendre);
502
503 int GetPhysRangeDim(int space_dim) const override { return 2; }
504 int GetPhysCurlDim(int space_dim) const override { return 0; }
505
506 void CalcVShape(const IntegrationPoint &ip,
507 DenseMatrix &shape) const override;
508
510 DenseMatrix &shape) const override;
511
512 void CalcDivShape(const IntegrationPoint &ip,
513 Vector &div_shape) const override;
514
516 DenseMatrix &I) const override
517 { LocalInterpolation(*this, Trans, I); }
518
520 DenseMatrix &R) const override
521 { MFEM_ABORT("method is not overloaded"); }
522
525 DenseMatrix &I) const override
526 { LocalInterpolation(CheckVectorFE(fe), Trans, I); }
527};
528
530{
531protected:
532 const real_t *nk;
534
535 RT_R2D_FiniteElement(int p, Geometry::Type G, int Do, const real_t *nk_fe);
536
537private:
538 void LocalInterpolation(const VectorFiniteElement &cfe,
540 DenseMatrix &I) const;
541
542public:
543 int GetPhysRangeDim(int space_dim) const override { return 3; }
544 int GetPhysCurlDim(int space_dim) const override { return 0; }
545
547
549 DenseMatrix &shape) const override;
550
552 DenseMatrix &I) const override
553 { LocalInterpolation(*this, Trans, I); }
554
556 DenseMatrix &R) const override;
557
560 DenseMatrix &I) const override
561 { LocalInterpolation(CheckVectorFE(fe), Trans, I); }
562
564
565 void Project(VectorCoefficient &vc,
566 ElementTransformation &Trans, Vector &dofs) const override;
567
568 void Project(const FiniteElement &fe, ElementTransformation &Trans,
569 DenseMatrix &I) const override;
570
571 void ProjectCurl(const FiniteElement &fe,
573 DenseMatrix &curl) const override;
574};
575
576/// Arbitrary order Raviart-Thomas 3D elements in 2D on a triangle
578{
579private:
580 static const real_t nk_t[12];
581
582#ifndef MFEM_THREAD_SAFE
583 mutable DenseMatrix rt_shape;
584 mutable Vector l2_shape;
585 mutable Vector rt_dshape;
586#endif
587
588 RT_TriangleElement RT_FE;
589 L2_TriangleElement L2_FE;
590
591public:
592 /** @brief Construct the RT_R2D_TriangleElement of order @a p */
593 RT_R2D_TriangleElement(const int p);
594
596
597 void CalcVShape(const IntegrationPoint &ip,
598 DenseMatrix &shape) const override;
599
600 void CalcDivShape(const IntegrationPoint &ip,
601 Vector &divshape) const override;
602};
603
604/// Arbitrary order Raviart-Thomas 3D elements in 2D on a square
606{
607private:
608 static const real_t nk_q[15];
609
610#ifndef MFEM_THREAD_SAFE
611 mutable Vector shape_cx, shape_ox, shape_cy, shape_oy;
612 mutable Vector dshape_cx, dshape_cy;
613#endif
614
615 Poly_1D::Basis &cbasis1d, &obasis1d;
616
617public:
618 /** @brief Construct the RT_R2D_QuadrilateralElement of order @a p and
619 closed and open BasisType @a cb_type and @a ob_type */
621 const int cb_type = BasisType::GaussLobatto,
622 const int ob_type = BasisType::GaussLegendre);
623
625
626 void CalcVShape(const IntegrationPoint &ip,
627 DenseMatrix &shape) const override;
628 void CalcDivShape(const IntegrationPoint &ip,
629 Vector &divshape) const override;
630};
631
632
633} // namespace mfem
634
635#endif
@ GaussLobatto
Closed type.
Definition fe_base.hpp:36
@ GaussLegendre
Open type.
Definition fe_base.hpp:35
Data type dense matrix using column-major storage.
Definition densemat.hpp:24
Rank 3 tensor (array of matrices)
Abstract class for all finite elements.
Definition fe_base.hpp:294
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:50
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:136
Arbitrary order H1 elements in 1D.
Definition fe_h1.hpp:23
Class for integration point with weight.
Definition intrules.hpp:35
Arbitrary order L2 elements in 1D on a segment.
Definition fe_l2.hpp:23
Arbitrary order L2 elements in 2D on a triangle.
Definition fe_l2.hpp:110
Class for evaluating 1D nodal, positive (Bernstein), or integrated (Gerritsma) bases.
Definition fe_base.hpp:1083
bool IsIntegratedType() const
Returns true if the basis is "integrated", false otherwise.
Definition fe_base.hpp:1127
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:1398
RT_FuentesPyramidElement(const int p)
Definition fe_rt.cpp:1273
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:393
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:409
void CalcRawDivShape(const IntegrationPoint &ip, Vector &dshape) const
Definition fe_rt.cpp:1478
virtual void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Compute the embedding/projection matrix from the given FiniteElement onto 'this' FiniteElement....
Definition fe_rt.hpp:415
virtual void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Compute the discrete curl matrix from the given FiniteElement onto 'this' FiniteElement....
Definition fe_rt.hpp:418
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:401
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:398
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:1449
void CalcRawVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition fe_rt.cpp:1425
virtual void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Given a matrix coefficient and a transformation, compute an approximation ("projection") in the local...
Definition fe_rt.hpp:412
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:404
Arbitrary order Raviart-Thomas elements in 3D on a cube.
Definition fe_rt.hpp:92
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
Definition fe_rt.cpp:492
void GetTransferMatrix(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const override
Return interpolation matrix, I, which maps dofs from a coarse element, fe, to the fine dofs on this f...
Definition fe_rt.hpp:122
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
Definition fe_rt.hpp:116
void ProjectIntegrated(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition fe_rt.cpp:661
void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const override
Compute the embedding/projection matrix from the given FiniteElement onto 'this' FiniteElement....
Definition fe_rt.hpp:140
void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition fe_rt.hpp:111
void GetFaceMap(const int face_id, Array< int > &face_map) const override
Return the mapping from lexicographically ordered face DOFs to lexicographically ordered element DOFs...
Definition fe_rt.cpp:711
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition fe_rt.cpp:582
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:326
void ProjectFromNodes(Vector &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector of values at the finite element nodes and a transformation, compute its projection (ap...
Definition fe_rt.hpp:133
void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const override
Compute the discrete curl matrix from the given FiniteElement onto 'this' FiniteElement....
Definition fe_rt.hpp:143
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
Definition fe_rt.hpp:127
void GetLocalRestriction(ElementTransformation &Trans, DenseMatrix &R) const override
Return a local restriction matrix R (Dof x Dof) mapping fine dofs to coarse dofs.
Definition fe_rt.hpp:119
void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const override
Given a matrix coefficient and a transformation, compute an approximation ("projection") in the local...
Definition fe_rt.hpp:136
Arbitrary order Raviart-Thomas elements in 2D on a square.
Definition fe_rt.hpp:25
void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const override
Compute the discrete curl matrix from the given FiniteElement onto 'this' FiniteElement....
Definition fe_rt.hpp:77
void GetTransferMatrix(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const override
Return interpolation matrix, I, which maps dofs from a coarse element, fe, to the fine dofs on this f...
Definition fe_rt.hpp:55
void ProjectIntegrated(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition fe_rt.cpp:258
void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const override
Given a matrix coefficient and a transformation, compute an approximation ("projection") in the local...
Definition fe_rt.hpp:69
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition fe_rt.cpp:203
void GetFaceMap(const int face_id, Array< int > &face_map) const override
Return the mapping from lexicographic face DOFs to lexicographic element DOFs for the given local fac...
Definition fe_rt.cpp:301
void GetLocalRestriction(ElementTransformation &Trans, DenseMatrix &R) const override
Return a local restriction matrix R (Dof x Dof) mapping fine dofs to coarse dofs.
Definition fe_rt.hpp:52
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
Definition fe_rt.cpp:142
void ProjectFromNodes(Vector &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector of values at the finite element nodes and a transformation, compute its projection (ap...
Definition fe_rt.hpp:66
void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const override
Compute the embedding/projection matrix from the given FiniteElement onto 'this' FiniteElement....
Definition fe_rt.hpp:73
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
Definition fe_rt.hpp:49
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
Definition fe_rt.hpp:60
void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition fe_rt.hpp:44
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:26
Arbitrary order, three component, Raviart-Thomas elements in 1D on a segment.
Definition fe_rt.hpp:438
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
Definition fe_rt.cpp:2146
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:2005
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
Definition fe_rt.cpp:2059
void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const override
Compute the discrete curl matrix from the given FiniteElement onto 'this' FiniteElement....
Definition fe_rt.cpp:2258
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition fe_rt.cpp:2113
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
Definition fe_rt.hpp:551
void GetLocalRestriction(ElementTransformation &Trans, DenseMatrix &R) const override
Return a local restriction matrix R (Dof x Dof) mapping fine dofs to coarse dofs.
Definition fe_rt.cpp:2463
int GetPhysCurlDim(int space_dim) const override
Definition fe_rt.hpp:544
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
Definition fe_rt.cpp:2511
void GetTransferMatrix(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const override
Return interpolation matrix, I, which maps dofs from a coarse element, fe, to the fine dofs on this f...
Definition fe_rt.hpp:558
void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const override
Compute the discrete curl matrix from the given FiniteElement onto 'this' FiniteElement....
Definition fe_rt.cpp:2623
void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition fe_rt.cpp:2404
int GetPhysRangeDim(int space_dim) const override
Returns the vector dimension, in physical space, for vector-valued finite elements,...
Definition fe_rt.hpp:543
RT_R2D_FiniteElement(int p, Geometry::Type G, int Do, const real_t *nk_fe)
Definition fe_rt.cpp:2392
Arbitrary order Raviart-Thomas 3D elements in 2D on a square.
Definition fe_rt.hpp:606
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
Definition fe_rt.cpp:2896
RT_R2D_QuadrilateralElement(const int p, const int cb_type=BasisType::GaussLobatto, const int ob_type=BasisType::GaussLegendre)
Construct the RT_R2D_QuadrilateralElement of order p and closed and open BasisType cb_type and ob_typ...
Definition fe_rt.cpp:2770
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition fe_rt.cpp:2953
void GetTransferMatrix(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const override
Return interpolation matrix, I, which maps dofs from a coarse element, fe, to the fine dofs on this f...
Definition fe_rt.hpp:523
int GetPhysRangeDim(int space_dim) const override
Returns the vector dimension, in physical space, for vector-valued finite elements,...
Definition fe_rt.hpp:503
void CalcDivShape(const IntegrationPoint &ip, Vector &div_shape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition fe_rt.cpp:2345
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:2281
int GetPhysCurlDim(int space_dim) const override
Definition fe_rt.hpp:504
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
Definition fe_rt.hpp:515
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
Definition fe_rt.cpp:2309
void GetLocalRestriction(ElementTransformation &Trans, DenseMatrix &R) const override
Return a local restriction matrix R (Dof x Dof) mapping fine dofs to coarse dofs.
Definition fe_rt.hpp:519
Arbitrary order Raviart-Thomas 3D elements in 2D on a triangle.
Definition fe_rt.hpp:578
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
Definition fe_rt.cpp:2715
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition fe_rt.cpp:2744
RT_R2D_TriangleElement(const int p)
Construct the RT_R2D_TriangleElement of order p.
Definition fe_rt.cpp:2647
Arbitrary order Raviart-Thomas elements in 3D on a tetrahedron.
Definition fe_rt.hpp:218
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition fe_rt.cpp:1037
RT_TetrahedronElement(const int p)
Construct the RT_TetrahedronElement of order p.
Definition fe_rt.cpp:899
void GetTransferMatrix(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const override
Return interpolation matrix, I, which maps dofs from a coarse element, fe, to the fine dofs on this f...
Definition fe_rt.hpp:246
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
Definition fe_rt.hpp:240
void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const override
Compute the embedding/projection matrix from the given FiniteElement onto 'this' FiniteElement....
Definition fe_rt.hpp:261
void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const override
Given a matrix coefficient and a transformation, compute an approximation ("projection") in the local...
Definition fe_rt.hpp:257
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
Definition fe_rt.cpp:1001
void GetLocalRestriction(ElementTransformation &Trans, DenseMatrix &R) const override
Return a local restriction matrix R (Dof x Dof) mapping fine dofs to coarse dofs.
Definition fe_rt.hpp:243
void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const override
Compute the discrete curl matrix from the given FiniteElement onto 'this' FiniteElement....
Definition fe_rt.hpp:264
void ProjectFromNodes(Vector &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector of values at the finite element nodes and a transformation, compute its projection (ap...
Definition fe_rt.hpp:254
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
Definition fe_rt.hpp:251
void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition fe_rt.hpp:235
Arbitrary order Raviart-Thomas elements in 2D on a triangle.
Definition fe_rt.hpp:162
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
Definition fe_rt.hpp:195
void GetTransferMatrix(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const override
Return interpolation matrix, I, which maps dofs from a coarse element, fe, to the fine dofs on this f...
Definition fe_rt.hpp:190
void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const override
Compute the discrete curl matrix from the given FiniteElement onto 'this' FiniteElement....
Definition fe_rt.hpp:209
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
Definition fe_rt.cpp:824
void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const override
Given a matrix coefficient and a transformation, compute an approximation ("projection") in the local...
Definition fe_rt.hpp:201
RT_TriangleElement(const int p)
Construct the RT_TriangleElement of order p.
Definition fe_rt.cpp:746
void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition fe_rt.hpp:179
void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const override
Compute the embedding/projection matrix from the given FiniteElement onto 'this' FiniteElement....
Definition fe_rt.hpp:205
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition fe_rt.cpp:857
void GetLocalRestriction(ElementTransformation &Trans, DenseMatrix &R) const override
Return a local restriction matrix R (Dof x Dof) mapping fine dofs to coarse dofs.
Definition fe_rt.hpp:187
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
Definition fe_rt.hpp:184
void ProjectFromNodes(Vector &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector of values at the finite element nodes and a transformation, compute its projection (ap...
Definition fe_rt.hpp:198
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition fe_rt.cpp:1235
void Project(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const override
Compute the embedding/projection matrix from the given FiniteElement onto 'this' FiniteElement....
Definition fe_rt.hpp:319
void GetTransferMatrix(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const override
Return interpolation matrix, I, which maps dofs from a coarse element, fe, to the fine dofs on this f...
Definition fe_rt.hpp:307
RT_WedgeElement(const int p)
Definition fe_rt.cpp:1082
void GetLocalRestriction(ElementTransformation &Trans, DenseMatrix &R) const override
Return a local restriction matrix R (Dof x Dof) mapping fine dofs to coarse dofs.
Definition fe_rt.hpp:304
void ProjectCurl(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const override
Compute the discrete curl matrix from the given FiniteElement onto 'this' FiniteElement....
Definition fe_rt.hpp:322
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
Definition fe_rt.cpp:1200
void Project(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const override
Given a vector coefficient and a transformation, compute its projection (approximation) in the local ...
Definition fe_rt.hpp:312
void ProjectMatrixCoefficient(MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const override
Given a matrix coefficient and a transformation, compute an approximation ("projection") in the local...
Definition fe_rt.hpp:315
void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const override
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
Definition fe_rt.hpp:301
void CalcVShape(ElementTransformation &Trans, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in physical space at the point ...
Definition fe_rt.hpp:296
Base class for vector Coefficients that optionally depend on time and space.
Intermediate class for finite elements whose basis functions return vector values.
Definition fe_base.hpp:890
void ProjectCurl2D_RT(const real_t *nk, const Array< int > &d2n, const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition fe_base.cpp:1319
void LocalRestriction_RT(const real_t *nk, const Array< int > &d2n, ElementTransformation &Trans, DenseMatrix &R) const
Definition fe_base.cpp:1726
void Project_RT(const real_t *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:1179
void LocalInterpolation_RT(const VectorFiniteElement &cfe, const real_t *nk, const Array< int > &d2n, ElementTransformation &Trans, DenseMatrix &I) const
Definition fe_base.cpp:1600
void CalcVShape_RT(ElementTransformation &Trans, DenseMatrix &shape) const
Definition fe_base.cpp:1156
static const VectorFiniteElement & CheckVectorFE(const FiniteElement &fe)
Definition fe_base.hpp:1051
void ProjectMatrixCoefficient_RT(const real_t *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:1216
void ProjectCurl3D_RT(const real_t *nk, const Array< int > &d2n, const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition fe_base.cpp:1385
Vector data type.
Definition vector.hpp:82
float real_t
Definition config.hpp:46
real_t p(const Vector &x, real_t t)