MFEM v4.8.0
Finite element discretization library
Loading...
Searching...
No Matches
fe_rt.hpp
Go to the documentation of this file.
1// Copyright (c) 2010-2025, 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 // Gradient + rotation = Curl: H1 -> H(div)
77 void ProjectGrad(const FiniteElement &fe,
79 DenseMatrix &grad) const override
80 { ProjectGrad_RT(nk, dof2nk, fe, Trans, grad); }
81 // Curl = Gradient + rotation: H1 -> H(div)
82 void ProjectCurl(const FiniteElement &fe,
84 DenseMatrix &curl) const override
85 { ProjectGrad_RT(nk, dof2nk, fe, Trans, curl); }
86
87 void GetFaceMap(const int face_id, Array<int> &face_map) const override;
88
89protected:
91 Vector &dofs) const;
92};
93
94
95/// Arbitrary order Raviart-Thomas elements in 3D on a cube
97{
98 static const real_t nk[18];
99
100#ifndef MFEM_THREAD_SAFE
101 mutable Vector shape_cx, shape_ox, shape_cy, shape_oy, shape_cz, shape_oz;
102 mutable Vector dshape_cx, dshape_cy, dshape_cz;
103#endif
104 Array<int> dof2nk;
105 const real_t *cp;
106
107public:
108 /** @brief Construct the RT_HexahedronElement of order @a p and closed and
109 open BasisType @a cb_type and @a ob_type */
110 RT_HexahedronElement(const int p,
111 const int cb_type = BasisType::GaussLobatto,
112 const int ob_type = BasisType::GaussLegendre);
113
114 void CalcVShape(const IntegrationPoint &ip,
115 DenseMatrix &shape) const override;
117 DenseMatrix &shape) const override
118 { CalcVShape_RT(Trans, shape); }
119 void CalcDivShape(const IntegrationPoint &ip,
120 Vector &divshape) const override;
122 DenseMatrix &I) const override
123 { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
125 DenseMatrix &R) const override
126 { LocalRestriction_RT(nk, dof2nk, Trans, R); }
129 DenseMatrix &I) const override
130 { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
133 ElementTransformation &Trans, Vector &dofs) const override
134 {
135 if (obasis1d.IsIntegratedType()) { ProjectIntegrated(vc, Trans, dofs); }
136 else { Project_RT(nk, dof2nk, vc, Trans, dofs); }
137 }
139 Vector &dofs) const override
140 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
143 Vector &dofs) const override
144 { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
146 DenseMatrix &I) const override
147 { Project_RT(nk, dof2nk, fe, Trans, I); }
150 DenseMatrix &curl) const override
151 { ProjectCurl_RT(nk, dof2nk, fe, Trans, curl); }
152
153 /// @brief Return the mapping from lexicographically ordered face DOFs to
154 /// lexicographically ordered element DOFs corresponding to local face
155 /// @a face_id.
156 void GetFaceMap(const int face_id, Array<int> &face_map) const override;
157
158protected:
161 Vector &dofs) const;
162};
163
164
165/// Arbitrary order Raviart-Thomas elements in 2D on a triangle
167{
168 static const real_t nk[6], c;
169
170#ifndef MFEM_THREAD_SAFE
171 mutable Vector shape_x, shape_y, shape_l;
172 mutable Vector dshape_x, dshape_y, dshape_l;
173 mutable DenseMatrix u;
174 mutable Vector divu;
175#endif
176 Array<int> dof2nk;
178
179public:
180 /// Construct the RT_TriangleElement of order @a p
181 RT_TriangleElement(const int p);
182 void CalcVShape(const IntegrationPoint &ip,
183 DenseMatrix &shape) const override;
185 DenseMatrix &shape) const override
186 { CalcVShape_RT(Trans, shape); }
187 void CalcDivShape(const IntegrationPoint &ip,
188 Vector &divshape) const override;
190 DenseMatrix &I) const override
191 { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
193 DenseMatrix &R) const override
194 { LocalRestriction_RT(nk, dof2nk, Trans, R); }
197 DenseMatrix &I) const override
198 { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
201 ElementTransformation &Trans, Vector &dofs) const override
202 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
204 Vector &dofs) const override
205 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
208 Vector &dofs) const override
209 { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
211 DenseMatrix &I) const override
212 { Project_RT(nk, dof2nk, fe, Trans, I); }
213 // Gradient + rotation = Curl: H1 -> H(div)
216 DenseMatrix &grad) const override
217 { ProjectGrad_RT(nk, dof2nk, fe, Trans, grad); }
218 // Curl = Gradient + rotation: H1 -> H(div)
221 DenseMatrix &curl) const override
222 { ProjectGrad_RT(nk, dof2nk, fe, Trans, curl); }
223};
224
225
226/// Arbitrary order Raviart-Thomas elements in 3D on a tetrahedron
228{
229 static const real_t nk[12], c;
230
231#ifndef MFEM_THREAD_SAFE
232 mutable Vector shape_x, shape_y, shape_z, shape_l;
233 mutable Vector dshape_x, dshape_y, dshape_z, dshape_l;
234 mutable DenseMatrix u;
235 mutable Vector divu;
236#endif
237 Array<int> dof2nk;
239
240public:
241 /// Construct the RT_TetrahedronElement of order @a p
242 RT_TetrahedronElement(const int p);
243 void CalcVShape(const IntegrationPoint &ip,
244 DenseMatrix &shape) const override;
246 DenseMatrix &shape) const override
247 { CalcVShape_RT(Trans, shape); }
248 void CalcDivShape(const IntegrationPoint &ip,
249 Vector &divshape) const override;
251 DenseMatrix &I) const override
252 { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
254 DenseMatrix &R) const override
255 { LocalRestriction_RT(nk, dof2nk, Trans, R); }
258 DenseMatrix &I) const override
259 { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
262 ElementTransformation &Trans, Vector &dofs) const override
263 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
265 Vector &dofs) const override
266 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
269 Vector &dofs) const override
270 { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
272 DenseMatrix &I) const override
273 { Project_RT(nk, dof2nk, fe, Trans, I); }
276 DenseMatrix &curl) const override
277 { ProjectCurl_RT(nk, dof2nk, fe, Trans, curl); }
278};
279
281{
282 static const real_t nk[15];
283
284#ifndef MFEM_THREAD_SAFE
285 mutable Vector tl2_shape;
286 mutable Vector sh1_shape;
287 mutable DenseMatrix trt_shape;
288 mutable Vector sl2_shape;
289 mutable DenseMatrix sh1_dshape;
290 mutable Vector trt_dshape;
291#endif
292 Array<int> dof2nk, t_dof, s_dof;
293
294 // The RT_Wedge is implemented as the sum of tensor products of
295 // lower dimensional basis funcgtions.
296 // Specifically: L2TriangleFE x H1SegmentFE + RTTriangle x L2SegmentFE
297 L2_TriangleElement L2TriangleFE;
298 RT_TriangleElement RTTriangleFE;
299 H1_SegmentElement H1SegmentFE;
300 L2_SegmentElement L2SegmentFE;
301
302public:
303 RT_WedgeElement(const int p);
304 void CalcVShape(const IntegrationPoint &ip,
305 DenseMatrix &shape) const override;
307 DenseMatrix &shape) const override
308 { CalcVShape_RT(Trans, shape); }
309 void CalcDivShape(const IntegrationPoint &ip,
310 Vector &divshape) const override;
312 DenseMatrix &I) const override
313 { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
315 DenseMatrix &R) const override
316 { LocalRestriction_RT(nk, dof2nk, Trans, R); }
319 DenseMatrix &I) const override
320 { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
323 ElementTransformation &Trans, Vector &dofs) const override
324 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
327 Vector &dofs) const override
328 { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
330 DenseMatrix &I) const override
331 { Project_RT(nk, dof2nk, fe, Trans, I); }
334 DenseMatrix &curl) const override
335 { ProjectCurl_RT(nk, dof2nk, fe, Trans, curl); }
336};
337
338/** Arbitrary order H(Div) basis functions defined on pyramid-shaped elements
339
340 This implementation is closely based on the finite elements
341 described in section 9.3 of the paper "Orientation embedded high
342 order shape functions for the exact sequence elements of all shapes"
343 by Federico Fuentes, Brendan Keith, Leszek Demkowicz, and Sriram
344 Nagaraj, see https://doi.org/10.1016/j.camwa.2015.04.027.
345 */
347 : public VectorFiniteElement, public FuentesPyramid
348{
349private:
350 static const real_t nk[24];
351
352 mutable real_t zmax;
353
354#ifndef MFEM_THREAD_SAFE
355 mutable Vector tmp1_i;
356 mutable DenseMatrix tmp1_ij;
357 mutable DenseMatrix tmp2_ij;
358 mutable DenseMatrix tmp3_ij;
359 mutable DenseMatrix tmp4_ij;
360 mutable DenseTensor tmp1_ijk;
361 mutable DenseTensor tmp2_ijk;
362 mutable DenseTensor tmp3_ijk;
363 mutable DenseTensor tmp4_ijk;
364 mutable DenseTensor tmp5_ijk;
365 mutable DenseTensor tmp6_ijk;
366 mutable DenseTensor tmp7_ijk;
367 mutable DenseMatrix u;
368 mutable Vector divu;
369#endif
370 Array<int> dof2nk;
372
373 void calcBasis(const int p, const IntegrationPoint &ip,
374 Vector &phi_k,
375 DenseMatrix &phi_ij,
376 DenseMatrix &dphi_k,
377 DenseTensor &VQ_ijk,
378 DenseTensor &VT_ijk,
379 DenseTensor &VTT_ijk,
380 DenseTensor &E_ijk, DenseTensor &dE_ijk,
381 DenseTensor &dphi_ijk,
382 DenseTensor &VL_ijk,
383 DenseMatrix &VR_ij,
384 DenseMatrix &F) const;
385
386 void calcDivBasis(const int p, const IntegrationPoint &ip,
387 Vector &phi_k,
388 DenseMatrix &phi_ij,
389 DenseMatrix &dphi_k,
390 DenseTensor &VQ_ijk,
391 DenseTensor &VT_ijk,
392 DenseTensor &VTT_ijk, DenseMatrix &dVTT_ij,
393 DenseTensor &E_ijk, DenseTensor &dE_ijk,
394 DenseTensor &dphi_ijk,
395 DenseTensor &VL_ijk,
396 DenseMatrix &VR_ij,
397 Vector &dF) const;
398
399public:
400 RT_FuentesPyramidElement(const int p);
401 virtual void CalcVShape(const IntegrationPoint &ip,
402 DenseMatrix &shape) const;
404 DenseMatrix &shape) const
405 { CalcVShape_RT(Trans, shape); }
406 virtual void CalcDivShape(const IntegrationPoint &ip,
407 Vector &divshape) const;
409 DenseMatrix &I) const
410 { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
412 DenseMatrix &R) const
413 { LocalRestriction_RT(nk, dof2nk, Trans, R); }
414 virtual void GetTransferMatrix(const FiniteElement &fe,
416 DenseMatrix &I) const
417 { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
419 virtual void Project(VectorCoefficient &vc,
420 ElementTransformation &Trans, Vector &dofs) const
421 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
424 { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
425 virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
426 DenseMatrix &I) const
427 { Project_RT(nk, dof2nk, fe, Trans, I); }
428 virtual void ProjectCurl(const FiniteElement &fe,
430 DenseMatrix &curl) const
431 { ProjectCurl_RT(nk, dof2nk, fe, Trans, curl); }
432
433 void CalcRawVShape(const IntegrationPoint &ip,
434 DenseMatrix &shape) const;
435
436 void CalcRawDivShape(const IntegrationPoint &ip,
437 Vector &dshape) const;
438
439 real_t GetZetaMax() const { return zmax; }
440};
441
442/// Arbitrary order, three component, Raviart-Thomas elements in 1D on a segment
443/** RT_R1D_SegmentElement provides a representation of a three component
444 Raviart-Thomas basis where the vector components vary along only one
445 dimension.
446*/
448{
449 static const real_t nk[9];
450#ifndef MFEM_THREAD_SAFE
451 mutable Vector shape_cx, shape_ox;
452 mutable Vector dshape_cx;
453#endif
454 Array<int> dof_map, dof2nk;
455
456 Poly_1D::Basis &cbasis1d, &obasis1d;
457
458public:
459 /** @brief Construct the RT_R1D_SegmentElement of order @a p and closed and
460 open BasisType @a cb_type and @a ob_type */
461 RT_R1D_SegmentElement(const int p,
462 const int cb_type = BasisType::GaussLobatto,
463 const int ob_type = BasisType::GaussLegendre);
464
465 void CalcVShape(const IntegrationPoint &ip,
466 DenseMatrix &shape) const override;
467
469 DenseMatrix &shape) const override;
470
471 void CalcDivShape(const IntegrationPoint &ip,
472 Vector &divshape) const override;
473
475
476 void Project(VectorCoefficient &vc,
477 ElementTransformation &Trans, Vector &dofs) const override;
478
479 void Project(const FiniteElement &fe,
481 DenseMatrix &I) const override;
482
483 void ProjectCurl(const FiniteElement &fe,
485 DenseMatrix &curl) const override;
486};
487
488
489/** RT_R2D_SegmentElement provides a representation of a 3D Raviart-Thomas
490 basis where the vector field is assumed constant in the third dimension.
491*/
493{
494 static const real_t nk[2];
495#ifndef MFEM_THREAD_SAFE
496 mutable Vector shape_ox;
497#endif
498 Array<int> dof_map, dof2nk;
499
500 Poly_1D::Basis &obasis1d;
501
502private:
503 void LocalInterpolation(const VectorFiniteElement &cfe,
505 DenseMatrix &I) const;
506
507public:
508 /** @brief Construct the RT_R2D_SegmentElement of order @a p and open
509 BasisType @a ob_type */
510 RT_R2D_SegmentElement(const int p,
511 const int ob_type = BasisType::GaussLegendre);
512
513 void CalcVShape(const IntegrationPoint &ip,
514 DenseMatrix &shape) const override;
515
517 DenseMatrix &shape) const override;
518
519 void CalcDivShape(const IntegrationPoint &ip,
520 Vector &div_shape) const override;
521
523 DenseMatrix &I) const override
524 { LocalInterpolation(*this, Trans, I); }
525
527 DenseMatrix &R) const override
528 { MFEM_ABORT("method is not overloaded"); }
529
532 DenseMatrix &I) const override
533 { LocalInterpolation(CheckVectorFE(fe), Trans, I); }
534};
535
537{
538protected:
539 const real_t *nk;
541
542 RT_R2D_FiniteElement(int p, Geometry::Type G, int Do, const real_t *nk_fe);
543
544private:
545 void LocalInterpolation(const VectorFiniteElement &cfe,
547 DenseMatrix &I) const;
548
549public:
551
553 DenseMatrix &shape) const override;
554
556 DenseMatrix &I) const override
557 { LocalInterpolation(*this, Trans, I); }
558
560 DenseMatrix &R) const override;
561
564 DenseMatrix &I) const override
565 { LocalInterpolation(CheckVectorFE(fe), Trans, I); }
566
568
569 void Project(VectorCoefficient &vc,
570 ElementTransformation &Trans, Vector &dofs) const override;
571
572 void Project(const FiniteElement &fe, ElementTransformation &Trans,
573 DenseMatrix &I) const override;
574
575 void ProjectCurl(const FiniteElement &fe,
577 DenseMatrix &curl) const override;
578};
579
580/// Arbitrary order Raviart-Thomas 3D elements in 2D on a triangle
582{
583private:
584 static const real_t nk_t[12];
585
586#ifndef MFEM_THREAD_SAFE
587 mutable DenseMatrix rt_shape;
588 mutable Vector l2_shape;
589 mutable Vector rt_dshape;
590#endif
591
592 RT_TriangleElement RT_FE;
593 L2_TriangleElement L2_FE;
594
595public:
596 /** @brief Construct the RT_R2D_TriangleElement of order @a p */
597 RT_R2D_TriangleElement(const int p);
598
600
601 void CalcVShape(const IntegrationPoint &ip,
602 DenseMatrix &shape) const override;
603
604 void CalcDivShape(const IntegrationPoint &ip,
605 Vector &divshape) const override;
606};
607
608/// Arbitrary order Raviart-Thomas 3D elements in 2D on a square
610{
611private:
612 static const real_t nk_q[15];
613
614#ifndef MFEM_THREAD_SAFE
615 mutable Vector shape_cx, shape_ox, shape_cy, shape_oy;
616 mutable Vector dshape_cx, dshape_cy;
617#endif
618
619 Poly_1D::Basis &cbasis1d, &obasis1d;
620
621public:
622 /** @brief Construct the RT_QuadrilateralElement of order @a p and closed and
623 open BasisType @a cb_type and @a ob_type */
625 const int cb_type = BasisType::GaussLobatto,
626 const int ob_type = BasisType::GaussLegendre);
627
629
630 void CalcVShape(const IntegrationPoint &ip,
631 DenseMatrix &shape) const override;
632 void CalcDivShape(const IntegrationPoint &ip,
633 Vector &divshape) const override;
634};
635
636
637} // namespace mfem
638
639#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:244
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:40
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:126
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
Base class for Matrix Coefficients that optionally depend on time and space.
Class for evaluating 1D nodal, positive (Bernstein), or integrated (Gerritsma) bases.
Definition fe_base.hpp:1003
bool IsIntegratedType() const
Returns true if the basis is "integrated", false otherwise.
Definition fe_base.hpp:1047
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:403
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:419
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:425
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:428
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:411
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:408
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:422
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
Arbitrary order Raviart-Thomas elements in 3D on a cube.
Definition fe_rt.hpp:97
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:127
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:121
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:145
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:116
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:138
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:148
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:132
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:124
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:141
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:82
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 ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const override
Compute the discrete gradient matrix from the given FiniteElement onto 'this' FiniteElement....
Definition fe_rt.hpp:77
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:448
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:555
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
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:562
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
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:610
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_QuadrilateralElement of order p and closed and open BasisType cb_type and ob_type.
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:530
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
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:522
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:526
Arbitrary order Raviart-Thomas 3D elements in 2D on a triangle.
Definition fe_rt.hpp:582
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:228
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:256
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:250
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:271
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:267
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:253
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:274
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:264
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:261
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:245
Arbitrary order Raviart-Thomas elements in 2D on a triangle.
Definition fe_rt.hpp:167
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:200
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:195
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:219
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:206
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:184
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:210
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:192
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:189
void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const override
Compute the discrete gradient matrix from the given FiniteElement onto 'this' FiniteElement....
Definition fe_rt.hpp:214
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:203
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:329
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:317
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:314
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:332
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:322
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:325
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:311
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:306
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:813
void ProjectGrad_RT(const real_t *nk, const Array< int > &d2n, const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition fe_base.cpp:1222
void LocalRestriction_RT(const real_t *nk, const Array< int > &d2n, ElementTransformation &Trans, DenseMatrix &R) const
Definition fe_base.cpp:1628
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:1082
void LocalInterpolation_RT(const VectorFiniteElement &cfe, const real_t *nk, const Array< int > &d2n, ElementTransformation &Trans, DenseMatrix &I) const
Definition fe_base.cpp:1502
void CalcVShape_RT(ElementTransformation &Trans, DenseMatrix &shape) const
Definition fe_base.cpp:1059
void ProjectCurl_RT(const real_t *nk, const Array< int > &d2n, const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition fe_base.cpp:1287
static const VectorFiniteElement & CheckVectorFE(const FiniteElement &fe)
Definition fe_base.hpp:973
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:1119
Vector data type.
Definition vector.hpp:82
float real_t
Definition config.hpp:43
real_t p(const Vector &x, real_t t)