MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
fe_rt.hpp
Go to the documentation of this file.
1// Copyright (c) 2010-2024, 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
19namespace mfem
20{
21
22/// Arbitrary order Raviart-Thomas elements in 2D on a square
24{
25private:
26 static const real_t 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 real_t *cp;
34
35public:
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;
43 virtual void CalcVShape(ElementTransformation &Trans,
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); }
70 { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
71 virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
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 virtual void GetFaceMap(const int face_id, Array<int> &face_map) const;
86
87protected:
89 Vector &dofs) const;
90};
91
92
93/// Arbitrary order Raviart-Thomas elements in 3D on a cube
95{
96 static const real_t nk[18];
97
98#ifndef MFEM_THREAD_SAFE
99 mutable Vector shape_cx, shape_ox, shape_cy, shape_oy, shape_cz, shape_oz;
100 mutable Vector dshape_cx, dshape_cy, dshape_cz;
101#endif
102 Array<int> dof2nk;
103 const real_t *cp;
104
105public:
106 /** @brief Construct the RT_HexahedronElement of order @a p and closed and
107 open BasisType @a cb_type and @a ob_type */
108 RT_HexahedronElement(const int p,
109 const int cb_type = BasisType::GaussLobatto,
110 const int ob_type = BasisType::GaussLegendre);
111
112 virtual void CalcVShape(const IntegrationPoint &ip,
113 DenseMatrix &shape) const;
115 DenseMatrix &shape) const
116 { CalcVShape_RT(Trans, shape); }
117 virtual void CalcDivShape(const IntegrationPoint &ip,
118 Vector &divshape) const;
120 DenseMatrix &I) const
121 { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
123 DenseMatrix &R) const
124 { LocalRestriction_RT(nk, dof2nk, Trans, R); }
125 virtual void GetTransferMatrix(const FiniteElement &fe,
127 DenseMatrix &I) const
128 { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
130 virtual void Project(VectorCoefficient &vc,
131 ElementTransformation &Trans, Vector &dofs) const
132 {
133 if (obasis1d.IsIntegratedType()) { ProjectIntegrated(vc, Trans, dofs); }
134 else { Project_RT(nk, dof2nk, vc, Trans, dofs); }
135 }
137 Vector &dofs) const
138 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
141 { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
142 virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
143 DenseMatrix &I) const
144 { Project_RT(nk, dof2nk, fe, Trans, I); }
145 virtual void ProjectCurl(const FiniteElement &fe,
147 DenseMatrix &curl) const
148 { ProjectCurl_RT(nk, dof2nk, fe, Trans, curl); }
149
150 /// @brief Return the mapping from lexicographically ordered face DOFs to
151 /// lexicographically ordered element DOFs corresponding to local face
152 /// @a face_id.
153 virtual void GetFaceMap(const int face_id, Array<int> &face_map) const;
154
155protected:
158 Vector &dofs) const;
159};
160
161
162/// Arbitrary order Raviart-Thomas elements in 2D on a triangle
164{
165 static const real_t nk[6], c;
166
167#ifndef MFEM_THREAD_SAFE
168 mutable Vector shape_x, shape_y, shape_l;
169 mutable Vector dshape_x, dshape_y, dshape_l;
170 mutable DenseMatrix u;
171 mutable Vector divu;
172#endif
173 Array<int> dof2nk;
175
176public:
177 /// Construct the RT_TriangleElement of order @a p
178 RT_TriangleElement(const int p);
179 virtual void CalcVShape(const IntegrationPoint &ip,
180 DenseMatrix &shape) const;
182 DenseMatrix &shape) const
183 { CalcVShape_RT(Trans, shape); }
184 virtual void CalcDivShape(const IntegrationPoint &ip,
185 Vector &divshape) const;
187 DenseMatrix &I) const
188 { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
190 DenseMatrix &R) const
191 { LocalRestriction_RT(nk, dof2nk, Trans, R); }
192 virtual void GetTransferMatrix(const FiniteElement &fe,
194 DenseMatrix &I) const
195 { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
197 virtual void Project(VectorCoefficient &vc,
198 ElementTransformation &Trans, Vector &dofs) const
199 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
201 Vector &dofs) const
202 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
205 { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
206 virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
207 DenseMatrix &I) const
208 { Project_RT(nk, dof2nk, fe, Trans, I); }
209 // Gradient + rotation = Curl: H1 -> H(div)
210 virtual void ProjectGrad(const FiniteElement &fe,
212 DenseMatrix &grad) const
213 { ProjectGrad_RT(nk, dof2nk, fe, Trans, grad); }
214 // Curl = Gradient + rotation: H1 -> H(div)
215 virtual void ProjectCurl(const FiniteElement &fe,
217 DenseMatrix &curl) const
218 { ProjectGrad_RT(nk, dof2nk, fe, Trans, curl); }
219};
220
221
222/// Arbitrary order Raviart-Thomas elements in 3D on a tetrahedron
224{
225 static const real_t nk[12], c;
226
227#ifndef MFEM_THREAD_SAFE
228 mutable Vector shape_x, shape_y, shape_z, shape_l;
229 mutable Vector dshape_x, dshape_y, dshape_z, dshape_l;
230 mutable DenseMatrix u;
231 mutable Vector divu;
232#endif
233 Array<int> dof2nk;
235
236public:
237 /// Construct the RT_TetrahedronElement of order @a p
238 RT_TetrahedronElement(const int p);
239 virtual void CalcVShape(const IntegrationPoint &ip,
240 DenseMatrix &shape) const;
242 DenseMatrix &shape) const
243 { CalcVShape_RT(Trans, shape); }
244 virtual void CalcDivShape(const IntegrationPoint &ip,
245 Vector &divshape) const;
247 DenseMatrix &I) const
248 { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
250 DenseMatrix &R) const
251 { LocalRestriction_RT(nk, dof2nk, Trans, R); }
252 virtual void GetTransferMatrix(const FiniteElement &fe,
254 DenseMatrix &I) const
255 { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
257 virtual void Project(VectorCoefficient &vc,
258 ElementTransformation &Trans, Vector &dofs) const
259 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
261 Vector &dofs) const
262 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
265 { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
266 virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
267 DenseMatrix &I) const
268 { Project_RT(nk, dof2nk, fe, Trans, I); }
269 virtual void ProjectCurl(const FiniteElement &fe,
271 DenseMatrix &curl) const
272 { ProjectCurl_RT(nk, dof2nk, fe, Trans, curl); }
273};
274
276{
277 static const real_t nk[15];
278
279#ifndef MFEM_THREAD_SAFE
280 mutable Vector tl2_shape;
281 mutable Vector sh1_shape;
282 mutable DenseMatrix trt_shape;
283 mutable Vector sl2_shape;
284 mutable DenseMatrix sh1_dshape;
285 mutable Vector trt_dshape;
286#endif
287 Array<int> dof2nk, t_dof, s_dof;
288
289 // The RT_Wedge is implemented as the sum of tensor products of
290 // lower dimensional basis funcgtions.
291 // Specifically: L2TriangleFE x H1SegmentFE + RTTriangle x L2SegmentFE
292 L2_TriangleElement L2TriangleFE;
293 RT_TriangleElement RTTriangleFE;
294 H1_SegmentElement H1SegmentFE;
295 L2_SegmentElement L2SegmentFE;
296
297public:
298 RT_WedgeElement(const int p);
299 virtual void CalcVShape(const IntegrationPoint &ip,
300 DenseMatrix &shape) const;
302 DenseMatrix &shape) const
303 { CalcVShape_RT(Trans, shape); }
304 virtual void CalcDivShape(const IntegrationPoint &ip,
305 Vector &divshape) const;
307 DenseMatrix &I) const
308 { LocalInterpolation_RT(*this, nk, dof2nk, Trans, I); }
310 DenseMatrix &R) const
311 { LocalRestriction_RT(nk, dof2nk, Trans, R); }
312 virtual void GetTransferMatrix(const FiniteElement &fe,
314 DenseMatrix &I) const
315 { LocalInterpolation_RT(CheckVectorFE(fe), nk, dof2nk, Trans, I); }
317 virtual void Project(VectorCoefficient &vc,
318 ElementTransformation &Trans, Vector &dofs) const
319 { Project_RT(nk, dof2nk, vc, Trans, dofs); }
322 { ProjectMatrixCoefficient_RT(nk, dof2nk, mc, T, dofs); }
323 virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
324 DenseMatrix &I) const
325 { Project_RT(nk, dof2nk, fe, Trans, I); }
326 virtual void ProjectCurl(const FiniteElement &fe,
328 DenseMatrix &curl) const
329 { ProjectCurl_RT(nk, dof2nk, fe, Trans, curl); }
330};
331
332
333/// Arbitrary order, three component, Raviart-Thomas elements in 1D on a segment
334/** RT_R1D_SegmentElement provides a representation of a three component
335 Raviart-Thomas basis where the vector components vary along only one
336 dimension.
337*/
339{
340 static const real_t nk[9];
341#ifndef MFEM_THREAD_SAFE
342 mutable Vector shape_cx, shape_ox;
343 mutable Vector dshape_cx;
344#endif
345 Array<int> dof_map, dof2nk;
346
347 Poly_1D::Basis &cbasis1d, &obasis1d;
348
349public:
350 /** @brief Construct the RT_R1D_SegmentElement of order @a p and closed and
351 open BasisType @a cb_type and @a ob_type */
352 RT_R1D_SegmentElement(const int p,
353 const int cb_type = BasisType::GaussLobatto,
354 const int ob_type = BasisType::GaussLegendre);
355
356 virtual void CalcVShape(const IntegrationPoint &ip,
357 DenseMatrix &shape) const;
358
359 virtual void CalcVShape(ElementTransformation &Trans,
360 DenseMatrix &shape) const;
361
362 virtual void CalcDivShape(const IntegrationPoint &ip,
363 Vector &divshape) const;
364
366
367 virtual void Project(VectorCoefficient &vc,
368 ElementTransformation &Trans, Vector &dofs) const;
369
370 virtual void Project(const FiniteElement &fe,
372 DenseMatrix &I) const;
373
374 virtual void ProjectCurl(const FiniteElement &fe,
376 DenseMatrix &curl) const;
377};
378
379
380/** RT_R2D_SegmentElement provides a representation of a 3D Raviart-Thomas
381 basis where the vector field is assumed constant in the third dimension.
382*/
384{
385 static const real_t nk[2];
386#ifndef MFEM_THREAD_SAFE
387 mutable Vector shape_ox;
388#endif
389 Array<int> dof_map, dof2nk;
390
391 Poly_1D::Basis &obasis1d;
392
393private:
394 void LocalInterpolation(const VectorFiniteElement &cfe,
396 DenseMatrix &I) const;
397
398public:
399 /** @brief Construct the RT_R2D_SegmentElement of order @a p and open
400 BasisType @a ob_type */
401 RT_R2D_SegmentElement(const int p,
402 const int ob_type = BasisType::GaussLegendre);
403
404 virtual void CalcVShape(const IntegrationPoint &ip,
405 DenseMatrix &shape) const;
406
407 virtual void CalcVShape(ElementTransformation &Trans,
408 DenseMatrix &shape) const;
409
410 virtual void CalcDivShape(const IntegrationPoint &ip,
411 Vector &div_shape) const;
412
414 DenseMatrix &I) const
415 { LocalInterpolation(*this, Trans, I); }
416
418 DenseMatrix &R) const
419 { MFEM_ABORT("method is not overloaded"); }
420
421 virtual void GetTransferMatrix(const FiniteElement &fe,
423 DenseMatrix &I) const
424 { LocalInterpolation(CheckVectorFE(fe), Trans, I); }
425};
426
428{
429protected:
430 const real_t *nk;
432
433 RT_R2D_FiniteElement(int p, Geometry::Type G, int Do, const real_t *nk_fe);
434
435private:
436 void LocalInterpolation(const VectorFiniteElement &cfe,
438 DenseMatrix &I) const;
439
440public:
442
443 virtual void CalcVShape(ElementTransformation &Trans,
444 DenseMatrix &shape) const;
445
447 DenseMatrix &I) const
448 { LocalInterpolation(*this, Trans, I); }
449
450 virtual void GetLocalRestriction(ElementTransformation &Trans,
451 DenseMatrix &R) const;
452
453 virtual void GetTransferMatrix(const FiniteElement &fe,
455 DenseMatrix &I) const
456 { LocalInterpolation(CheckVectorFE(fe), Trans, I); }
457
459
460 virtual void Project(VectorCoefficient &vc,
461 ElementTransformation &Trans, Vector &dofs) const;
462
463 virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
464 DenseMatrix &I) const;
465
466 virtual void ProjectCurl(const FiniteElement &fe,
468 DenseMatrix &curl) const;
469};
470
471/// Arbitrary order Raviart-Thomas 3D elements in 2D on a triangle
473{
474private:
475 static const real_t nk_t[12];
476
477#ifndef MFEM_THREAD_SAFE
478 mutable DenseMatrix rt_shape;
479 mutable Vector l2_shape;
480 mutable Vector rt_dshape;
481#endif
482
483 RT_TriangleElement RT_FE;
484 L2_TriangleElement L2_FE;
485
486public:
487 /** @brief Construct the RT_R2D_TriangleElement of order @a p */
488 RT_R2D_TriangleElement(const int p);
489
491
492 virtual void CalcVShape(const IntegrationPoint &ip,
493 DenseMatrix &shape) const;
494
495 virtual void CalcDivShape(const IntegrationPoint &ip,
496 Vector &divshape) const;
497};
498
499/// Arbitrary order Raviart-Thomas 3D elements in 2D on a square
501{
502private:
503 static const real_t nk_q[15];
504
505#ifndef MFEM_THREAD_SAFE
506 mutable Vector shape_cx, shape_ox, shape_cy, shape_oy;
507 mutable Vector dshape_cx, dshape_cy;
508#endif
509
510 Poly_1D::Basis &cbasis1d, &obasis1d;
511
512public:
513 /** @brief Construct the RT_QuadrilateralElement of order @a p and closed and
514 open BasisType @a cb_type and @a ob_type */
516 const int cb_type = BasisType::GaussLobatto,
517 const int ob_type = BasisType::GaussLegendre);
518
520
521 virtual void CalcVShape(const IntegrationPoint &ip,
522 DenseMatrix &shape) const;
523 virtual void CalcDivShape(const IntegrationPoint &ip,
524 Vector &divshape) const;
525};
526
527
528} // namespace mfem
529
530#endif
@ GaussLobatto
Closed type.
Definition fe_base.hpp:32
@ GaussLegendre
Open type.
Definition fe_base.hpp:31
Data type dense matrix using column-major storage.
Definition densemat.hpp:24
Abstract class for all finite elements.
Definition fe_base.hpp:239
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:22
Class for integration point with weight.
Definition intrules.hpp:35
Arbitrary order L2 elements in 1D on a segment.
Definition fe_l2.hpp:22
Arbitrary order L2 elements in 2D on a triangle.
Definition fe_l2.hpp:109
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:991
bool IsIntegratedType() const
Returns true if the basis is "integrated", false otherwise.
Definition fe_base.hpp:1035
Arbitrary order Raviart-Thomas elements in 3D on a cube.
Definition fe_rt.hpp:95
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:142
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:582
void ProjectIntegrated(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition fe_rt.cpp:661
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:492
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:139
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:122
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:130
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
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:114
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:136
virtual void GetFaceMap(const int face_id, Array< int > &face_map) const
Return the mapping from lexicographically ordered face DOFs to lexicographically ordered element DOFs...
Definition fe_rt.cpp:711
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:125
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:119
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:145
Arbitrary order Raviart-Thomas elements in 2D on a square.
Definition fe_rt.hpp:24
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: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:51
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
virtual void GetFaceMap(const int face_id, Array< int > &face_map) const
Return the mapping from lexicographic face DOFs to lexicographic element DOFs for the given local fac...
Definition fe_rt.cpp:301
void ProjectIntegrated(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition fe_rt.cpp:258
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 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
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 ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Compute the discrete gradient matrix from the given FiniteElement onto 'this' FiniteElement....
Definition fe_rt.hpp:75
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 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:203
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:80
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:71
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
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:142
Arbitrary order, three component, Raviart-Thomas elements in 1D on a segment.
Definition fe_rt.hpp:339
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:1377
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:1269
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.cpp:1522
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:1410
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:1323
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:1775
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:446
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:1727
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:1668
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:453
RT_R2D_FiniteElement(int p, Geometry::Type G, int Do, const real_t *nk_fe)
Definition fe_rt.cpp:1656
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.cpp:1887
Arbitrary order Raviart-Thomas 3D elements in 2D on a square.
Definition fe_rt.hpp:501
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:2034
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:2160
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:2217
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:1545
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:413
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:417
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:1609
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:421
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:1573
Arbitrary order Raviart-Thomas 3D elements in 2D on a triangle.
Definition fe_rt.hpp:473
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:2008
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:1979
RT_R2D_TriangleElement(const int p)
Construct the RT_R2D_TriangleElement of order p.
Definition fe_rt.cpp:1911
Arbitrary order Raviart-Thomas elements in 3D on a tetrahedron.
Definition fe_rt.hpp:224
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:260
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:269
RT_TetrahedronElement(const int p)
Construct the RT_TetrahedronElement of order p.
Definition fe_rt.cpp:899
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:246
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:252
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:257
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:1001
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:249
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:1037
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:263
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:266
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:241
Arbitrary order Raviart-Thomas elements in 2D on a triangle.
Definition fe_rt.hpp:164
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:857
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:189
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:186
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:203
RT_TriangleElement(const int p)
Construct the RT_TriangleElement of order p.
Definition fe_rt.cpp:746
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:206
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:197
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:215
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:824
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:181
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:200
virtual void ProjectGrad(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Compute the discrete gradient matrix from the given FiniteElement onto 'this' FiniteElement....
Definition fe_rt.hpp:210
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:192
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:309
RT_WedgeElement(const int p)
Definition fe_rt.cpp:1082
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:317
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:306
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:1200
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:301
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:312
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:326
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:320
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:323
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:1235
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:801
void ProjectGrad_RT(const real_t *nk, const Array< int > &d2n, const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition fe_base.cpp:1206
void LocalRestriction_RT(const real_t *nk, const Array< int > &d2n, ElementTransformation &Trans, DenseMatrix &R) const
Definition fe_base.cpp:1612
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:1066
void LocalInterpolation_RT(const VectorFiniteElement &cfe, const real_t *nk, const Array< int > &d2n, ElementTransformation &Trans, DenseMatrix &I) const
Definition fe_base.cpp:1486
void CalcVShape_RT(ElementTransformation &Trans, DenseMatrix &shape) const
Definition fe_base.cpp:1043
void ProjectCurl_RT(const real_t *nk, const Array< int > &d2n, const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition fe_base.cpp:1271
static const VectorFiniteElement & CheckVectorFE(const FiniteElement &fe)
Definition fe_base.hpp:961
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:1103
Vector data type.
Definition vector.hpp:80
float real_t
Definition config.hpp:43
real_t p(const Vector &x, real_t t)