MFEM v4.10.0
Finite element discretization library
Loading...
Searching...
No Matches
fe_nd.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_ND
13#define MFEM_FE_ND
14
15#include "fe_base.hpp"
16#include "fe_h1.hpp"
17#include "fe_pyramid.hpp"
18
19namespace mfem
20{
21
22/// Arbitrary order Nedelec elements in 3D on a cube
24{
25 static const real_t tk[18];
26#ifndef MFEM_THREAD_SAFE
27 mutable Vector shape_cx, shape_ox, shape_cy, shape_oy, shape_cz, shape_oz;
28 mutable Vector dshape_cx, dshape_cy, dshape_cz;
29#endif
30 Array<int> dof2tk;
31 const real_t *cp;
32
33public:
34 /** @brief Construct the ND_HexahedronElement of order @a p and closed and
35 open BasisType @a cb_type and @a ob_type */
36 ND_HexahedronElement(const int p,
37 const int cb_type = BasisType::GaussLobatto,
38 const int ob_type = BasisType::GaussLegendre);
39
40 void CalcVShape(const IntegrationPoint &ip,
41 DenseMatrix &shape) const override;
42
44 DenseMatrix &shape) const override
45 { CalcVShape_ND(Trans, shape); }
46
47 void CalcCurlShape(const IntegrationPoint &ip,
48 DenseMatrix &curl_shape) const override;
49
51 DenseMatrix &I) const override
52 { LocalInterpolation_ND(*this, tk, dof2tk, Trans, I); }
53
55 DenseMatrix &R) const override
56 { LocalRestriction_ND(tk, dof2tk, Trans, R); }
57
60 DenseMatrix &I) const override
61 { LocalInterpolation_ND(CheckVectorFE(fe), tk, dof2tk, Trans, I); }
62
64
66 ElementTransformation &Trans, Vector &dofs) const override
67 {
68 if (obasis1d.IsIntegratedType()) { ProjectIntegrated(vc, Trans, dofs); }
69 else { Project_ND(tk, dof2tk, vc, Trans, dofs); }
70 }
71
73 Vector &dofs) const override
74 { Project_ND(tk, dof2tk, vc, Trans, dofs); }
75
78 Vector &dofs) const override
79 { ProjectMatrixCoefficient_ND(tk, dof2tk, mc, T, dofs); }
80
81 void Project(const FiniteElement &fe,
83 DenseMatrix &I) const override
84 { Project_ND(tk, dof2tk, fe, Trans, I); }
85
86 void ProjectGrad(const FiniteElement &fe,
88 DenseMatrix &grad) const override
89 { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
90
91 void ProjectCurl(const FiniteElement &fe,
93 DenseMatrix &curl) const override
94 { ProjectCurl_ND(tk, dof2tk, fe, Trans, curl); }
95
96 void GetFaceMap(const int face_id, Array<int> &face_map) const override;
97
98protected:
101 Vector &dofs) const;
102};
103
104
105/// Arbitrary order Nedelec elements in 2D on a square
107{
108 static const real_t tk[8];
109
110#ifndef MFEM_THREAD_SAFE
111 mutable Vector shape_cx, shape_ox, shape_cy, shape_oy;
112 mutable Vector dshape_cx, dshape_cy;
113#endif
114 Array<int> dof2tk;
115 const real_t *cp;
116
117public:
118 /** @brief Construct the ND_QuadrilateralElement of order @a p and closed and
119 open BasisType @a cb_type and @a ob_type */
120 ND_QuadrilateralElement(const int p,
121 const int cb_type = BasisType::GaussLobatto,
122 const int ob_type = BasisType::GaussLegendre);
123 void CalcVShape(const IntegrationPoint &ip,
124 DenseMatrix &shape) const override;
126 DenseMatrix &shape) const override
127 { CalcVShape_ND(Trans, shape); }
128 void CalcCurlShape(const IntegrationPoint &ip,
129 DenseMatrix &curl_shape) const override;
131 DenseMatrix &I) const override
132 { LocalInterpolation_ND(*this, tk, dof2tk, Trans, I); }
134 DenseMatrix &R) const override
135 { LocalRestriction_ND(tk, dof2tk, Trans, R); }
138 DenseMatrix &I) const override
139 { LocalInterpolation_ND(CheckVectorFE(fe), tk, dof2tk, Trans, I); }
142 ElementTransformation &Trans, Vector &dofs) const override
143 {
144 if (obasis1d.IsIntegratedType()) { ProjectIntegrated(vc, Trans, dofs); }
145 else { Project_ND(tk, dof2tk, vc, Trans, dofs); }
146 }
148 Vector &dofs) const override
149 { Project_ND(tk, dof2tk, vc, Trans, dofs); }
152 Vector &dofs) const override
153 { ProjectMatrixCoefficient_ND(tk, dof2tk, mc, T, dofs); }
154 void Project(const FiniteElement &fe,
156 DenseMatrix &I) const override
157 { Project_ND(tk, dof2tk, fe, Trans, I); }
160 DenseMatrix &grad) const override
161 { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
162
163 void GetFaceMap(const int face_id, Array<int> &face_map) const override;
164
165protected:
168 Vector &dofs) const;
169};
170
171
172/// Arbitrary order Nedelec elements in 3D on a tetrahedron
174{
175 static const real_t tk[18], c;
176
177#ifndef MFEM_THREAD_SAFE
178 mutable Vector shape_x, shape_y, shape_z, shape_l;
179 mutable Vector dshape_x, dshape_y, dshape_z, dshape_l;
180 mutable DenseMatrix u;
181#endif
182 Array<int> dof2tk;
184
186
187public:
188 /// Construct the ND_TetrahedronElement of order @a p
189 ND_TetrahedronElement(const int p);
190 void CalcVShape(const IntegrationPoint &ip,
191 DenseMatrix &shape) const override;
193 DenseMatrix &shape) const override
194 { CalcVShape_ND(Trans, shape); }
195 void CalcCurlShape(const IntegrationPoint &ip,
196 DenseMatrix &curl_shape) const override;
198 DenseMatrix &I) const override
199 { LocalInterpolation_ND(*this, tk, dof2tk, Trans, I); }
201 DenseMatrix &R) const override
202 { LocalRestriction_ND(tk, dof2tk, Trans, R); }
205 DenseMatrix &I) const override
206 { LocalInterpolation_ND(CheckVectorFE(fe), tk, dof2tk, Trans, I); }
208 { return &doftrans; }
211 ElementTransformation &Trans, Vector &dofs) const override
212 { Project_ND(tk, dof2tk, vc, Trans, dofs); }
214 Vector &dofs) const override
215 { Project_ND(tk, dof2tk, vc, Trans, dofs); }
218 Vector &dofs) const override
219 { ProjectMatrixCoefficient_ND(tk, dof2tk, mc, T, dofs); }
220 void Project(const FiniteElement &fe,
222 DenseMatrix &I) const override
223 { Project_ND(tk, dof2tk, fe, Trans, I); }
226 DenseMatrix &grad) const override
227 { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
228
231 DenseMatrix &curl) const override
232 { ProjectCurl_ND(tk, dof2tk, fe, Trans, curl); }
233};
234
235/// Arbitrary order Nedelec elements in 2D on a triangle
237{
238 static const real_t tk[8], c;
239
240#ifndef MFEM_THREAD_SAFE
241 mutable Vector shape_x, shape_y, shape_l;
242 mutable Vector dshape_x, dshape_y, dshape_l;
243 mutable DenseMatrix u;
244 mutable Vector curlu;
245#endif
246 Array<int> dof2tk;
248
250
251public:
252 /// Construct the ND_TriangleElement of order @a p
253 ND_TriangleElement(const int p);
254 void CalcVShape(const IntegrationPoint &ip,
255 DenseMatrix &shape) const override;
257 DenseMatrix &shape) const override
258 { CalcVShape_ND(Trans, shape); }
259 void CalcCurlShape(const IntegrationPoint &ip,
260 DenseMatrix &curl_shape) const override;
262 DenseMatrix &I) const override
263 { LocalInterpolation_ND(*this, tk, dof2tk, Trans, I); }
265 DenseMatrix &R) const override
266 { LocalRestriction_ND(tk, dof2tk, Trans, R); }
269 DenseMatrix &I) const override
270 { LocalInterpolation_ND(CheckVectorFE(fe), tk, dof2tk, Trans, I); }
272 { return &doftrans; }
275 ElementTransformation &Trans, Vector &dofs) const override
276 { Project_ND(tk, dof2tk, vc, Trans, dofs); }
278 Vector &dofs) const override
279 { Project_ND(tk, dof2tk, vc, Trans, dofs); }
282 Vector &dofs) const override
283 { ProjectMatrixCoefficient_ND(tk, dof2tk, mc, T, dofs); }
284 void Project(const FiniteElement &fe,
286 DenseMatrix &I) const override
287 { Project_ND(tk, dof2tk, fe, Trans, I); }
290 DenseMatrix &grad) const override
291 { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
292};
293
294
295/// Arbitrary order Nedelec elements in 1D on a segment
297{
298 static const real_t tk[1];
299
300 Array<int> dof2tk;
301
302public:
303 /** @brief Construct the ND_SegmentElement of order @a p and open
304 BasisType @a ob_type */
305 ND_SegmentElement(const int p, const int ob_type = BasisType::GaussLegendre);
306 void CalcShape(const IntegrationPoint &ip, Vector &shape) const override;
307 void CalcVShape(const IntegrationPoint &ip,
308 DenseMatrix &shape) const override;
310 DenseMatrix &shape) const override
311 { CalcVShape_ND(Trans, shape); }
312 // void CalcCurlShape(const IntegrationPoint &ip,
313 // DenseMatrix &curl_shape) const;
315 DenseMatrix &I) const override
316 { LocalInterpolation_ND(*this, tk, dof2tk, Trans, I); }
318 DenseMatrix &R) const override
319 { LocalRestriction_ND(tk, dof2tk, Trans, R); }
322 DenseMatrix &I) const override
323 { LocalInterpolation_ND(CheckVectorFE(fe), tk, dof2tk, Trans, I); }
326 ElementTransformation &Trans, Vector &dofs) const override
327 {
328 if (obasis1d.IsIntegratedType()) { ProjectIntegrated(vc, Trans, dofs); }
329 else { Project_ND(tk, dof2tk, vc, Trans, dofs); }
330 }
333 Vector &dofs) const override
334 { ProjectMatrixCoefficient_ND(tk, dof2tk, mc, T, dofs); }
335 void Project(const FiniteElement &fe,
337 DenseMatrix &I) const override
338 { Project_ND(tk, dof2tk, fe, Trans, I); }
341 DenseMatrix &grad) const override
342 { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
343
344protected:
347 Vector &dofs) const;
348};
349
351{
352private:
353 static const real_t tk[15];
354
355#ifndef MFEM_THREAD_SAFE
356 mutable Vector t1_shape, s1_shape;
357 mutable DenseMatrix tn_shape, sn_shape;
358 mutable DenseMatrix t1_dshape, s1_dshape, tn_dshape;
359#endif
360 Array<int> dof2tk, t_dof, s_dof;
361
363
364 H1_TriangleElement H1TriangleFE;
365 ND_TriangleElement NDTriangleFE;
366 H1_SegmentElement H1SegmentFE;
367 ND_SegmentElement NDSegmentFE;
368
369public:
370 ND_WedgeElement(const int p,
371 const int cb_type = BasisType::GaussLobatto,
372 const int ob_type = BasisType::GaussLegendre);
373
374 void CalcVShape(const IntegrationPoint &ip,
375 DenseMatrix &shape) const override;
376
378 DenseMatrix &shape) const override
379 { CalcVShape_ND(Trans, shape); }
380
381 void CalcCurlShape(const IntegrationPoint &ip,
382 DenseMatrix &curl_shape) const override;
383
385 DenseMatrix &I) const override
386 { LocalInterpolation_ND(*this, tk, dof2tk, Trans, I); }
388 DenseMatrix &R) const override
389 { LocalRestriction_ND(tk, dof2tk, Trans, R); }
392 DenseMatrix &I) const override
393 { LocalInterpolation_ND(CheckVectorFE(fe), tk, dof2tk, Trans, I); }
394
396 { return &doftrans; }
397
399
401 ElementTransformation &Trans, Vector &dofs) const override
402 { Project_ND(tk, dof2tk, vc, Trans, dofs); }
403
406 Vector &dofs) const override
407 { ProjectMatrixCoefficient_ND(tk, dof2tk, mc, T, dofs); }
408
409 void Project(const FiniteElement &fe,
411 DenseMatrix &I) const override
412 { Project_ND(tk, dof2tk, fe, Trans, I); }
413
416 DenseMatrix &grad) const override
417 { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
418
421 DenseMatrix &curl) const override
422 { ProjectCurl_ND(tk, dof2tk, fe, Trans, curl); }
423};
424
425
426/** Arbitrary order H(Curl) basis functions defined on pyramid-shaped elements
427
428 This implementation is closely based on the finite elements
429 described in section 9.2 of the paper "Orientation embedded high
430 order shape functions for the exact sequence elements of all shapes"
431 by Federico Fuentes, Brendan Keith, Leszek Demkowicz, and Sriram
432 Nagaraj, see https://doi.org/10.1016/j.camwa.2015.04.027.
433 */
435 : public VectorFiniteElement, public FuentesPyramid
436{
437private:
438 static const real_t tk[27];
439
440 mutable real_t zmax;
441
442#ifndef MFEM_THREAD_SAFE
443 mutable DenseMatrix tmp_E_E_ij;
444 mutable DenseMatrix tmp_dE_E_ij;
445 mutable DenseTensor tmp_E_Q1_ijk;
446 mutable DenseTensor tmp_dE_Q1_ijk;
447 mutable DenseTensor tmp_E_Q2_ijk;
448 mutable DenseTensor tmp_dE_Q2_ijk;
449 mutable DenseTensor tmp_E_T_ijk;
450 mutable DenseTensor tmp_dE_T_ijk;
451 mutable DenseMatrix tmp_phi_Q1_ij;
452 mutable DenseTensor tmp_dphi_Q1_ij;
453 mutable DenseMatrix tmp_phi_Q2_ij;
454 mutable DenseTensor tmp_dphi_Q2_ij;
455 mutable Vector tmp_phi_E_i;
456 mutable DenseMatrix tmp_dphi_E_i;
457 mutable DenseMatrix u;
458 mutable DenseMatrix curlu;
459#endif
460 Array<int> dof2tk;
462
464
465 void calcBasis(const int p, const IntegrationPoint & ip,
466 DenseMatrix & E_E_ik,
467 DenseTensor & E_Q1_ijk,
468 DenseTensor & E_Q2_ijk,
469 DenseTensor & E_T_ijk,
470 DenseMatrix & phi_Q1_ij,
471 DenseTensor & dphi_Q1_ij,
472 DenseMatrix & phi_Q2_ij,
473 Vector & phi_E_k,
474 DenseMatrix & dphi_E_k,
475 DenseMatrix & W) const;
476
477 void calcCurlBasis(const int p, const IntegrationPoint & ip,
478 DenseMatrix & E_E_ik,
479 DenseMatrix & dE_E_ik,
480 DenseTensor & E_Q1_ijk,
481 DenseTensor & dE_Q1_ijk,
482 DenseTensor & E_Q2_ijk,
483 DenseTensor & dE_Q2_ijk,
484 DenseTensor & E_T_ijk,
485 DenseTensor & dE_T_ijk,
486 DenseMatrix & phi_Q2_ij,
487 DenseTensor & dphi_Q2_ij,
488 Vector & phi_E_k,
489 DenseMatrix & dphi_E_k,
490 DenseMatrix & dW) const;
491
492public:
493 ND_FuentesPyramidElement(const int p,
494 const int cb_type = BasisType::GaussLobatto,
495 const int ob_type = BasisType::GaussLegendre);
496 virtual void CalcVShape(const IntegrationPoint &ip,
497 DenseMatrix &shape) const;
499 DenseMatrix &shape) const
500 { CalcVShape_ND(Trans, shape); }
501 virtual void CalcCurlShape(const IntegrationPoint &ip,
502 DenseMatrix &curl_shape) const;
504 DenseMatrix &I) const
505 { LocalInterpolation_ND(*this, tk, dof2tk, Trans, I); }
507 DenseMatrix &R) const
508 { LocalRestriction_ND(tk, dof2tk, Trans, R); }
509 virtual void GetTransferMatrix(const FiniteElement &fe,
511 DenseMatrix &I) const
512 { LocalInterpolation_ND(CheckVectorFE(fe), tk, dof2tk, Trans, I); }
513
515
516 virtual void Project(VectorCoefficient &vc,
517 ElementTransformation &Trans, Vector &dofs) const
518 { Project_ND(tk, dof2tk, vc, Trans, dofs); }
521 { ProjectMatrixCoefficient_ND(tk, dof2tk, mc, T, dofs); }
522 virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
523 DenseMatrix &I) const
524 { Project_ND(tk, dof2tk, fe, Trans, I); }
525
526 virtual void ProjectGrad(const FiniteElement &fe,
528 DenseMatrix &grad) const
529 { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
530
531 virtual void ProjectCurl(const FiniteElement &fe,
533 DenseMatrix &curl) const
534 { ProjectCurl_ND(tk, dof2tk, fe, Trans, curl); }
535
536 void CalcRawVShape(const IntegrationPoint &ip,
537 DenseMatrix &shape) const;
538
539 void CalcRawCurlShape(const IntegrationPoint &ip,
540 DenseMatrix &dshape) const;
541
542 real_t GetZetaMax() const { return zmax; }
543};
544
545
546/// A 0D Nedelec finite element for the boundary of a 1D domain
547/** ND_R1D_PointElement provides a representation of the trace of a three
548 component Nedelec basis restricted to 1D.
549*/
551{
552 static const real_t tk[9];
553
554public:
555 /** @brief Construct the ND_R1D_PointElement */
557
559
560 void CalcVShape(const IntegrationPoint &ip,
561 DenseMatrix &shape) const override;
562
564 DenseMatrix &shape) const override;
565};
566
567/// Arbitrary order, three component, Nedelec elements in 1D on a segment
568/** ND_R1D_SegmentElement provides a representation of a three component Nedelec
569 basis where the vector components vary along only one dimension.
570*/
572{
573 static const real_t tk[9];
574#ifndef MFEM_THREAD_SAFE
575 mutable Vector shape_cx, shape_ox;
576 mutable Vector dshape_cx;
577#endif
578 Array<int> dof_map, dof2tk;
579
580 Poly_1D::Basis &cbasis1d, &obasis1d;
581
582public:
583 /** @brief Construct the ND_R1D_SegmentElement of order @a p and closed and
584 open BasisType @a cb_type and @a ob_type */
585 ND_R1D_SegmentElement(const int p,
586 const int cb_type = BasisType::GaussLobatto,
587 const int ob_type = BasisType::GaussLegendre);
588
591
592 void CalcVShape(const IntegrationPoint &ip,
593 DenseMatrix &shape) const override;
594
596 DenseMatrix &shape) const override;
597
598 void CalcCurlShape(const IntegrationPoint &ip,
599 DenseMatrix &curl_shape) const override;
600
602 DenseMatrix &curl_shape) const override;
603
605 DenseMatrix &I) const override
606 { LocalInterpolation_ND(*this, tk, dof2tk, Trans, I); }
607
609 DenseMatrix &R) const override
610 { LocalRestriction_ND(tk, dof2tk, Trans, R); }
611
614 DenseMatrix &I) const override
615 { LocalInterpolation_ND(CheckVectorFE(fe), tk, dof2tk, Trans, I); }
616
618
619 void Project(VectorCoefficient &vc,
620 ElementTransformation &Trans, Vector &dofs) const override;
621
623 Vector &dofs) const override
624 { Project_ND(tk, dof2tk, vc, Trans, dofs); }
625
628 Vector &dofs) const override
629 { ProjectMatrixCoefficient_ND(tk, dof2tk, mc, T, dofs); }
630
631 void Project(const FiniteElement &fe,
633 DenseMatrix &I) const override;
634
637 DenseMatrix &grad) const override
638 { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
639
642 DenseMatrix &curl) const override
643 { ProjectCurl_ND(tk, dof2tk, fe, Trans, curl); }
644};
645
646
647/** ND_R2D_SegmentElement provides a representation of a 3D Nedelec
648 basis where the vector field is assumed constant in the third dimension.
649*/
651{
652 static const real_t tk[4];
653#ifndef MFEM_THREAD_SAFE
654 mutable Vector shape_cx, shape_ox;
655 mutable Vector dshape_cx;
656#endif
657 Array<int> dof_map, dof2tk;
658
659 Poly_1D::Basis &cbasis1d, &obasis1d;
660
661private:
662 void LocalInterpolation(const VectorFiniteElement &cfe,
664 DenseMatrix &I) const;
665
666public:
667 /** @brief Construct the ND_R2D_SegmentElement of order @a p and closed and
668 open BasisType @a cb_type and @a ob_type */
669 ND_R2D_SegmentElement(const int p,
670 const int cb_type = BasisType::GaussLobatto,
671 const int ob_type = BasisType::GaussLegendre);
672
673 int GetPhysRangeDim(int space_dim) const override { return 2; }
674 int GetPhysCurlDim(int space_dim) const override { return 1; }
675
676 void CalcVShape(const IntegrationPoint &ip,
677 DenseMatrix &shape) const override;
678
680 DenseMatrix &shape) const override;
681
682 void CalcCurlShape(const IntegrationPoint &ip,
683 DenseMatrix &curl_shape) const override;
684
686 DenseMatrix &I) const override
687 { LocalInterpolation(*this, Trans, I); }
688
690 DenseMatrix &R) const override
691 { MFEM_ABORT("method is not overloaded"); }
692
695 DenseMatrix &I) const override
696 { LocalInterpolation(CheckVectorFE(fe), Trans, I); }
697
699
700 void Project(VectorCoefficient &vc,
701 ElementTransformation &Trans, Vector &dofs) const override;
702};
703
705{
706protected:
707 const real_t *tk;
709
710 ND_R2D_FiniteElement(int p, Geometry::Type G, int Do, const real_t *tk_fe);
711
712private:
713 void LocalInterpolation(const VectorFiniteElement &cfe,
715 DenseMatrix &I) const;
716
717public:
718 int GetPhysRangeDim(int space_dim) const override { return 3; }
719 int GetPhysCurlDim(int space_dim) const override { return 3; }
720
723
725 DenseMatrix &shape) const override;
726
728 DenseMatrix &curl_shape) const override;
729
731 DenseMatrix &I) const override
732 { LocalInterpolation(*this, Trans, I); }
733
735 DenseMatrix &R) const override;
736
739 DenseMatrix &I) const override
740 { LocalInterpolation(CheckVectorFE(fe), Trans, I); }
741
743
744 void Project(VectorCoefficient &vc,
745 ElementTransformation &Trans, Vector &dofs) const override;
746
747 void Project(const FiniteElement &fe, ElementTransformation &Trans,
748 DenseMatrix &I) const override;
749
750 void ProjectGrad(const FiniteElement &fe,
752 DenseMatrix &grad) const override;
753};
754
755/// Arbitrary order Nedelec 3D elements in 2D on a triangle
757{
758private:
759 static const real_t tk_t[15];
760
761#ifndef MFEM_THREAD_SAFE
762 mutable DenseMatrix nd_shape;
763 mutable Vector h1_shape;
764 mutable DenseMatrix nd_dshape;
765 mutable DenseMatrix h1_dshape;
766#endif
767
768 ND_TriangleElement ND_FE;
769 H1_TriangleElement H1_FE;
770
771public:
772 /// Construct the ND_R2D_TriangleElement of order @a p
773 ND_R2D_TriangleElement(const int p,
774 const int cb_type = BasisType::GaussLobatto);
775
778
779 void CalcVShape(const IntegrationPoint &ip,
780 DenseMatrix &shape) const override;
781 void CalcCurlShape(const IntegrationPoint &ip,
782 DenseMatrix &curl_shape) const override;
783};
784
785
786/// Arbitrary order Nedelec 3D elements in 2D on a square
788{
789 static const real_t tk_q[15];
790
791#ifndef MFEM_THREAD_SAFE
792 mutable Vector shape_cx, shape_ox, shape_cy, shape_oy;
793 mutable Vector dshape_cx, dshape_cy;
794#endif
795
796 Poly_1D::Basis &cbasis1d, &obasis1d;
797
798public:
799 /** @brief Construct the ND_R2D_QuadrilateralElement of order @a p and
800 closed and open BasisType @a cb_type and @a ob_type */
802 const int cb_type = BasisType::GaussLobatto,
803 const int ob_type = BasisType::GaussLegendre);
804
807
808 void CalcVShape(const IntegrationPoint &ip,
809 DenseMatrix &shape) const override;
810 void CalcCurlShape(const IntegrationPoint &ip,
811 DenseMatrix &curl_shape) const override;
812};
813
814
815} // namespace mfem
816
817#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
virtual void CalcPhysCurlShape(ElementTransformation &Trans, DenseMatrix &curl_shape) const
Evaluate the curl of all shape functions of a vector finite element in physical space at the point de...
Definition fe_base.cpp:81
Arbitrary order H1 elements in 1D.
Definition fe_h1.hpp:23
Arbitrary order H1 elements in 2D on a triangle.
Definition fe_h1.hpp:85
Class for integration point with weight.
Definition intrules.hpp:35
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_nd.hpp:526
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_nd.hpp:522
void CalcRawVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition fe_nd.cpp:1877
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_nd.hpp:498
void CalcRawCurlShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition fe_nd.cpp:1899
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_nd.hpp:516
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_nd.hpp:506
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_nd.hpp:503
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_nd.hpp:531
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_nd.hpp:519
ND_FuentesPyramidElement(const int p, const int cb_type=BasisType::GaussLobatto, const int ob_type=BasisType::GaussLegendre)
Definition fe_nd.cpp:1628
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_nd.cpp:1823
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_nd.hpp:509
virtual void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const
Evaluate the curl of all shape functions of a vector finite element in reference space at the given p...
Definition fe_nd.cpp:1848
Arbitrary order Nedelec elements in 3D on a cube.
Definition fe_nd.hpp:24
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_nd.hpp:72
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_nd.hpp:65
ND_HexahedronElement(const int p, const int cb_type=BasisType::GaussLobatto, const int ob_type=BasisType::GaussLegendre)
Construct the ND_HexahedronElement of order p and closed and open BasisType cb_type and ob_type.
Definition fe_nd.cpp:26
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_nd.hpp:86
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_nd.hpp:91
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_nd.hpp:54
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_nd.hpp:50
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_nd.cpp:485
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_nd.hpp:76
void ProjectIntegrated(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition fe_nd.cpp:245
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_nd.cpp:310
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_nd.hpp:81
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_nd.hpp:58
void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const override
Evaluate the curl of all shape functions of a vector finite element in reference space at the given p...
Definition fe_nd.cpp:400
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_nd.hpp:43
DoF transformation implementation for the Nedelec basis on pyramid elements.
Definition doftrans.hpp:375
Arbitrary order Nedelec elements in 2D on a square.
Definition fe_nd.hpp:107
ND_QuadrilateralElement(const int p, const int cb_type=BasisType::GaussLobatto, const int ob_type=BasisType::GaussLegendre)
Construct the ND_QuadrilateralElement of order p and closed and open BasisType cb_type and ob_type.
Definition fe_nd.cpp:533
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_nd.cpp:700
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_nd.cpp:820
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_nd.hpp:154
void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const override
Evaluate the curl of all shape functions of a vector finite element in reference space at the given p...
Definition fe_nd.cpp:763
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_nd.hpp:130
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_nd.hpp:147
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_nd.hpp:158
void ProjectIntegrated(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition fe_nd.cpp:624
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_nd.hpp:150
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_nd.hpp:125
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_nd.hpp:133
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_nd.hpp:136
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_nd.hpp:141
A 0D Nedelec finite element for the boundary of a 1D domain.
Definition fe_nd.hpp:551
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_nd.cpp:2580
ND_R1D_PointElement(int p)
Construct the ND_R1D_PointElement.
Definition fe_nd.cpp:2569
Arbitrary order, three component, Nedelec elements in 1D on a segment.
Definition fe_nd.hpp:572
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_nd.cpp:2662
ND_R1D_SegmentElement(const int p, const int cb_type=BasisType::GaussLobatto, const int ob_type=BasisType::GaussLegendre)
Construct the ND_R1D_SegmentElement of order p and closed and open BasisType cb_type and ob_type.
Definition fe_nd.cpp:2598
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_nd.hpp:640
void CalcPhysCurlShape(ElementTransformation &Trans, DenseMatrix &curl_shape) const override
Evaluate the curl of all shape functions of a vector finite element in physical space at the point de...
Definition fe_nd.cpp:2755
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_nd.hpp:635
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_nd.hpp:604
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_nd.hpp:612
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_nd.hpp:622
void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const override
Evaluate the curl of all shape functions of a vector finite element in reference space at the given p...
Definition fe_nd.cpp:2715
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_nd.cpp:2766
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_nd.hpp:626
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_nd.hpp:608
ND_R2D_FiniteElement(int p, Geometry::Type G, int Do, const real_t *tk_fe)
Definition fe_nd.cpp:3060
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_nd.hpp:730
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_nd.hpp:737
int GetPhysCurlDim(int space_dim) const override
Definition fe_nd.hpp:719
void CalcPhysCurlShape(ElementTransformation &Trans, DenseMatrix &curl_shape) const override
Evaluate the curl of all shape functions of a vector finite element in physical space at the point de...
Definition fe_nd.cpp:3095
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_nd.cpp:3204
int GetPhysRangeDim(int space_dim) const override
Returns the vector dimension, in physical space, for vector-valued finite elements,...
Definition fe_nd.hpp:718
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_nd.cpp:3078
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_nd.cpp:3316
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_nd.cpp:3158
Arbitrary order Nedelec 3D elements in 2D on a square.
Definition fe_nd.hpp:788
void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const override
Evaluate the curl of all shape functions of a vector finite element in reference space at the given p...
Definition fe_nd.cpp:3668
ND_R2D_QuadrilateralElement(const int p, const int cb_type=BasisType::GaussLobatto, const int ob_type=BasisType::GaussLegendre)
Construct the ND_R2D_QuadrilateralElement of order p and closed and open BasisType cb_type and ob_typ...
Definition fe_nd.cpp:3481
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_nd.cpp:3608
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_nd.cpp:3035
ND_R2D_SegmentElement(const int p, const int cb_type=BasisType::GaussLobatto, const int ob_type=BasisType::GaussLegendre)
Construct the ND_R2D_SegmentElement of order p and closed and open BasisType cb_type and ob_type.
Definition fe_nd.cpp:2875
int GetPhysCurlDim(int space_dim) const override
Definition fe_nd.hpp:674
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_nd.cpp:2924
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_nd.hpp:689
void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const override
Evaluate the curl of all shape functions of a vector finite element in reference space at the given p...
Definition fe_nd.cpp:2967
int GetPhysRangeDim(int space_dim) const override
Returns the vector dimension, in physical space, for vector-valued finite elements,...
Definition fe_nd.hpp:673
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_nd.hpp:693
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_nd.hpp:685
Arbitrary order Nedelec 3D elements in 2D on a triangle.
Definition fe_nd.hpp:757
ND_R2D_TriangleElement(const int p, const int cb_type=BasisType::GaussLobatto)
Construct the ND_R2D_TriangleElement of order p.
Definition fe_nd.cpp:3340
void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const override
Evaluate the curl of all shape functions of a vector finite element in reference space at the given p...
Definition fe_nd.cpp:3448
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_nd.cpp:3419
Arbitrary order Nedelec elements in 1D on a segment.
Definition fe_nd.hpp:297
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_nd.hpp:339
ND_SegmentElement(const int p, const int ob_type=BasisType::GaussLegendre)
Construct the ND_SegmentElement of order p and open BasisType ob_type.
Definition fe_nd.cpp:1268
void ProjectIntegrated(VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Definition fe_nd.cpp:1300
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_nd.hpp:309
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_nd.hpp:331
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_nd.cpp:1292
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_nd.hpp:320
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition fe_nd.cpp:1285
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_nd.hpp:314
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_nd.hpp:317
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_nd.hpp:325
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_nd.hpp:335
DoF transformation implementation for the Nedelec basis on tetrahedra.
Definition doftrans.hpp:352
Arbitrary order Nedelec elements in 3D on a tetrahedron.
Definition fe_nd.hpp:174
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_nd.hpp:216
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_nd.hpp:213
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_nd.hpp:210
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_nd.hpp:200
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_nd.hpp:224
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_nd.hpp:197
void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const override
Evaluate the curl of all shape functions of a vector finite element in reference space at the given p...
Definition fe_nd.cpp:1036
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_nd.hpp:229
ND_TetrahedronElement(const int p)
Construct the ND_TetrahedronElement of order p.
Definition fe_nd.cpp:846
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_nd.cpp:994
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_nd.hpp:192
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_nd.hpp:203
const StatelessDofTransformation * GetDofTransformation() const override
Return a DoF transformation object for this particular type of basis.
Definition fe_nd.hpp:207
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_nd.hpp:220
Arbitrary order Nedelec elements in 2D on a triangle.
Definition fe_nd.hpp:237
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_nd.hpp:264
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_nd.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_nd.cpp:1189
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_nd.hpp:256
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_nd.hpp:280
void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const override
Evaluate the curl of all shape functions of a vector finite element in reference space at the given p...
Definition fe_nd.cpp:1223
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_nd.hpp:284
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_nd.hpp:277
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_nd.hpp:274
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_nd.hpp:288
const StatelessDofTransformation * GetDofTransformation() const override
Return a DoF transformation object for this particular type of basis.
Definition fe_nd.hpp:271
ND_TriangleElement(const int p)
Construct the ND_TriangleElement of order p.
Definition fe_nd.cpp:1108
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_nd.hpp:261
DoF transformation implementation for the Nedelec basis on wedge elements.
Definition doftrans.hpp:363
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_nd.hpp:409
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_nd.hpp:390
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_nd.cpp:1549
const StatelessDofTransformation * GetDofTransformation() const override
Return a DoF transformation object for this particular type of basis.
Definition fe_nd.hpp:395
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_nd.hpp:384
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_nd.hpp:404
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_nd.hpp:419
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_nd.hpp:414
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_nd.hpp:400
void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const override
Evaluate the curl of all shape functions of a vector finite element in reference space at the given p...
Definition fe_nd.cpp:1583
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_nd.hpp:377
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_nd.hpp:387
ND_WedgeElement(const int p, const int cb_type=BasisType::GaussLobatto, const int ob_type=BasisType::GaussLegendre)
Definition fe_nd.cpp:1333
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
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 Project_ND(const real_t *tk, const Array< int > &d2t, VectorCoefficient &vc, ElementTransformation &Trans, Vector &dofs) const
Project a vector coefficient onto the ND basis functions.
Definition fe_base.cpp:1404
void ProjectMatrixCoefficient_ND(const real_t *tk, const Array< int > &d2t, MatrixCoefficient &mc, ElementTransformation &T, Vector &dofs) const
Project the rows of the matrix coefficient in an ND space.
Definition fe_base.cpp:1433
void LocalRestriction_ND(const real_t *tk, const Array< int > &d2t, ElementTransformation &Trans, DenseMatrix &R) const
Definition fe_base.cpp:1769
void ProjectGrad_ND(const real_t *tk, const Array< int > &d2t, const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition fe_base.cpp:1532
void CalcVShape_ND(ElementTransformation &Trans, DenseMatrix &shape) const
Definition fe_base.cpp:1168
void LocalInterpolation_ND(const VectorFiniteElement &cfe, const real_t *tk, const Array< int > &d2t, ElementTransformation &Trans, DenseMatrix &I) const
Definition fe_base.cpp:1687
static const VectorFiniteElement & CheckVectorFE(const FiniteElement &fe)
Definition fe_base.hpp:1051
void ProjectCurl_ND(const real_t *tk, const Array< int > &d2t, const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition fe_base.cpp:1347
Vector data type.
Definition vector.hpp:82
float real_t
Definition config.hpp:46
real_t p(const Vector &x, real_t t)