MFEM v4.8.0
Finite element discretization library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
fe_nd.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_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 { obasis1d.Eval(ip.x, shape); }
308 void CalcVShape(const IntegrationPoint &ip,
309 DenseMatrix &shape) const override;
311 DenseMatrix &shape) const override
312 { CalcVShape_ND(Trans, shape); }
313 // void CalcCurlShape(const IntegrationPoint &ip,
314 // DenseMatrix &curl_shape) const;
316 DenseMatrix &I) const override
317 { LocalInterpolation_ND(*this, tk, dof2tk, Trans, I); }
319 DenseMatrix &R) const override
320 { LocalRestriction_ND(tk, dof2tk, Trans, R); }
323 DenseMatrix &I) const override
324 { LocalInterpolation_ND(CheckVectorFE(fe), tk, dof2tk, Trans, I); }
327 ElementTransformation &Trans, Vector &dofs) const override
328 { Project_ND(tk, dof2tk, vc, Trans, dofs); }
331 Vector &dofs) const override
332 { ProjectMatrixCoefficient_ND(tk, dof2tk, mc, T, dofs); }
333 void Project(const FiniteElement &fe,
335 DenseMatrix &I) const override
336 { Project_ND(tk, dof2tk, fe, Trans, I); }
339 DenseMatrix &grad) const override
340 { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
341};
342
344{
345private:
346 static const real_t tk[15];
347
348#ifndef MFEM_THREAD_SAFE
349 mutable Vector t1_shape, s1_shape;
350 mutable DenseMatrix tn_shape, sn_shape;
351 mutable DenseMatrix t1_dshape, s1_dshape, tn_dshape;
352#endif
353 Array<int> dof2tk, t_dof, s_dof;
354
356
357 H1_TriangleElement H1TriangleFE;
358 ND_TriangleElement NDTriangleFE;
359 H1_SegmentElement H1SegmentFE;
360 ND_SegmentElement NDSegmentFE;
361
362public:
363 ND_WedgeElement(const int p,
364 const int cb_type = BasisType::GaussLobatto,
365 const int ob_type = BasisType::GaussLegendre);
366
367 void CalcVShape(const IntegrationPoint &ip,
368 DenseMatrix &shape) const override;
369
371 DenseMatrix &shape) const override
372 { CalcVShape_ND(Trans, shape); }
373
374 void CalcCurlShape(const IntegrationPoint &ip,
375 DenseMatrix &curl_shape) const override;
376
378 DenseMatrix &I) const override
379 { LocalInterpolation_ND(*this, tk, dof2tk, Trans, I); }
381 DenseMatrix &R) const override
382 { LocalRestriction_ND(tk, dof2tk, Trans, R); }
385 DenseMatrix &I) const override
386 { LocalInterpolation_ND(CheckVectorFE(fe), tk, dof2tk, Trans, I); }
387
389 { return &doftrans; }
390
392
394 ElementTransformation &Trans, Vector &dofs) const override
395 { Project_ND(tk, dof2tk, vc, Trans, dofs); }
396
399 Vector &dofs) const override
400 { ProjectMatrixCoefficient_ND(tk, dof2tk, mc, T, dofs); }
401
402 void Project(const FiniteElement &fe,
404 DenseMatrix &I) const override
405 { Project_ND(tk, dof2tk, fe, Trans, I); }
406
409 DenseMatrix &grad) const override
410 { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
411
414 DenseMatrix &curl) const override
415 { ProjectCurl_ND(tk, dof2tk, fe, Trans, curl); }
416};
417
418
419/** Arbitrary order H(Curl) basis functions defined on pyramid-shaped elements
420
421 This implementation is closely based on the finite elements
422 described in section 9.2 of the paper "Orientation embedded high
423 order shape functions for the exact sequence elements of all shapes"
424 by Federico Fuentes, Brendan Keith, Leszek Demkowicz, and Sriram
425 Nagaraj, see https://doi.org/10.1016/j.camwa.2015.04.027.
426 */
428 : public VectorFiniteElement, public FuentesPyramid
429{
430private:
431 static const real_t tk[27];
432
433 mutable real_t zmax;
434
435#ifndef MFEM_THREAD_SAFE
436 mutable DenseMatrix tmp_E_E_ij;
437 mutable DenseMatrix tmp_dE_E_ij;
438 mutable DenseTensor tmp_E_Q1_ijk;
439 mutable DenseTensor tmp_dE_Q1_ijk;
440 mutable DenseTensor tmp_E_Q2_ijk;
441 mutable DenseTensor tmp_dE_Q2_ijk;
442 mutable DenseTensor tmp_E_T_ijk;
443 mutable DenseTensor tmp_dE_T_ijk;
444 mutable DenseMatrix tmp_phi_Q1_ij;
445 mutable DenseTensor tmp_dphi_Q1_ij;
446 mutable DenseMatrix tmp_phi_Q2_ij;
447 mutable DenseTensor tmp_dphi_Q2_ij;
448 mutable Vector tmp_phi_E_i;
449 mutable DenseMatrix tmp_dphi_E_i;
450 mutable DenseMatrix u;
451 mutable DenseMatrix curlu;
452#endif
453 Array<int> dof2tk;
455
457
458 void calcBasis(const int p, const IntegrationPoint & ip,
459 DenseMatrix & E_E_ik,
460 DenseTensor & E_Q1_ijk,
461 DenseTensor & E_Q2_ijk,
462 DenseTensor & E_T_ijk,
463 DenseMatrix & phi_Q1_ij,
464 DenseTensor & dphi_Q1_ij,
465 DenseMatrix & phi_Q2_ij,
466 Vector & phi_E_k,
467 DenseMatrix & dphi_E_k,
468 DenseMatrix & W) const;
469
470 void calcCurlBasis(const int p, const IntegrationPoint & ip,
471 DenseMatrix & E_E_ik,
472 DenseMatrix & dE_E_ik,
473 DenseTensor & E_Q1_ijk,
474 DenseTensor & dE_Q1_ijk,
475 DenseTensor & E_Q2_ijk,
476 DenseTensor & dE_Q2_ijk,
477 DenseTensor & E_T_ijk,
478 DenseTensor & dE_T_ijk,
479 DenseMatrix & phi_Q2_ij,
480 DenseTensor & dphi_Q2_ij,
481 Vector & phi_E_k,
482 DenseMatrix & dphi_E_k,
483 DenseMatrix & dW) const;
484
485public:
486 ND_FuentesPyramidElement(const int p,
487 const int cb_type = BasisType::GaussLobatto,
488 const int ob_type = BasisType::GaussLegendre);
489 virtual void CalcVShape(const IntegrationPoint &ip,
490 DenseMatrix &shape) const;
492 DenseMatrix &shape) const
493 { CalcVShape_ND(Trans, shape); }
494 virtual void CalcCurlShape(const IntegrationPoint &ip,
495 DenseMatrix &curl_shape) const;
497 DenseMatrix &I) const
498 { LocalInterpolation_ND(*this, tk, dof2tk, Trans, I); }
500 DenseMatrix &R) const
501 { LocalRestriction_ND(tk, dof2tk, Trans, R); }
502 virtual void GetTransferMatrix(const FiniteElement &fe,
504 DenseMatrix &I) const
505 { LocalInterpolation_ND(CheckVectorFE(fe), tk, dof2tk, Trans, I); }
506
508
509 virtual void Project(VectorCoefficient &vc,
510 ElementTransformation &Trans, Vector &dofs) const
511 { Project_ND(tk, dof2tk, vc, Trans, dofs); }
514 { ProjectMatrixCoefficient_ND(tk, dof2tk, mc, T, dofs); }
515 virtual void Project(const FiniteElement &fe, ElementTransformation &Trans,
516 DenseMatrix &I) const
517 { Project_ND(tk, dof2tk, fe, Trans, I); }
518
519 virtual void ProjectGrad(const FiniteElement &fe,
521 DenseMatrix &grad) const
522 { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
523
524 virtual void ProjectCurl(const FiniteElement &fe,
526 DenseMatrix &curl) const
527 { ProjectCurl_ND(tk, dof2tk, fe, Trans, curl); }
528
529 void CalcRawVShape(const IntegrationPoint &ip,
530 DenseMatrix &shape) const;
531
532 void CalcRawCurlShape(const IntegrationPoint &ip,
533 DenseMatrix &dshape) const;
534
535 real_t GetZetaMax() const { return zmax; }
536};
537
538
539/// A 0D Nedelec finite element for the boundary of a 1D domain
540/** ND_R1D_PointElement provides a representation of the trace of a three
541 component Nedelec basis restricted to 1D.
542*/
544{
545 static const real_t tk[9];
546
547public:
548 /** @brief Construct the ND_R1D_PointElement */
550
552
553 void CalcVShape(const IntegrationPoint &ip,
554 DenseMatrix &shape) const override;
555
557 DenseMatrix &shape) const override;
558};
559
560/// Arbitrary order, three component, Nedelec elements in 1D on a segment
561/** ND_R1D_SegmentElement provides a representation of a three component Nedelec
562 basis where the vector components vary along only one dimension.
563*/
565{
566 static const real_t tk[9];
567#ifndef MFEM_THREAD_SAFE
568 mutable Vector shape_cx, shape_ox;
569 mutable Vector dshape_cx;
570#endif
571 Array<int> dof_map, dof2tk;
572
573 Poly_1D::Basis &cbasis1d, &obasis1d;
574
575public:
576 /** @brief Construct the ND_R1D_SegmentElement of order @a p and closed and
577 open BasisType @a cb_type and @a ob_type */
578 ND_R1D_SegmentElement(const int p,
579 const int cb_type = BasisType::GaussLobatto,
580 const int ob_type = BasisType::GaussLegendre);
581
584
585 void CalcVShape(const IntegrationPoint &ip,
586 DenseMatrix &shape) const override;
587
589 DenseMatrix &shape) const override;
590
591 void CalcCurlShape(const IntegrationPoint &ip,
592 DenseMatrix &curl_shape) const override;
593
595 DenseMatrix &curl_shape) const override;
596
598 DenseMatrix &I) const override
599 { LocalInterpolation_ND(*this, tk, dof2tk, Trans, I); }
600
602 DenseMatrix &R) const override
603 { LocalRestriction_ND(tk, dof2tk, Trans, R); }
604
607 DenseMatrix &I) const override
608 { LocalInterpolation_ND(CheckVectorFE(fe), tk, dof2tk, Trans, I); }
609
611
612 void Project(VectorCoefficient &vc,
613 ElementTransformation &Trans, Vector &dofs) const override;
614
616 Vector &dofs) const override
617 { Project_ND(tk, dof2tk, vc, Trans, dofs); }
618
621 Vector &dofs) const override
622 { ProjectMatrixCoefficient_ND(tk, dof2tk, mc, T, dofs); }
623
624 void Project(const FiniteElement &fe,
626 DenseMatrix &I) const override;
627
630 DenseMatrix &grad) const override
631 { ProjectGrad_ND(tk, dof2tk, fe, Trans, grad); }
632
635 DenseMatrix &curl) const override
636 { ProjectCurl_ND(tk, dof2tk, fe, Trans, curl); }
637};
638
639
640/** ND_R2D_SegmentElement provides a representation of a 3D Nedelec
641 basis where the vector field is assumed constant in the third dimension.
642*/
644{
645 static const real_t tk[4];
646#ifndef MFEM_THREAD_SAFE
647 mutable Vector shape_cx, shape_ox;
648 mutable Vector dshape_cx;
649#endif
650 Array<int> dof_map, dof2tk;
651
652 Poly_1D::Basis &cbasis1d, &obasis1d;
653
654private:
655 void LocalInterpolation(const VectorFiniteElement &cfe,
657 DenseMatrix &I) const;
658
659public:
660 /** @brief Construct the ND_R2D_SegmentElement of order @a p and closed and
661 open BasisType @a cb_type and @a ob_type */
662 ND_R2D_SegmentElement(const int p,
663 const int cb_type = BasisType::GaussLobatto,
664 const int ob_type = BasisType::GaussLegendre);
665
666 void CalcVShape(const IntegrationPoint &ip,
667 DenseMatrix &shape) const override;
668
670 DenseMatrix &shape) const override;
671
672 void CalcCurlShape(const IntegrationPoint &ip,
673 DenseMatrix &curl_shape) const override;
674
676 DenseMatrix &I) const override
677 { LocalInterpolation(*this, Trans, I); }
678
680 DenseMatrix &R) const override
681 { MFEM_ABORT("method is not overloaded"); }
682
685 DenseMatrix &I) const override
686 { LocalInterpolation(CheckVectorFE(fe), Trans, I); }
687
689
690 void Project(VectorCoefficient &vc,
691 ElementTransformation &Trans, Vector &dofs) const override;
692};
693
695{
696protected:
697 const real_t *tk;
699
700 ND_R2D_FiniteElement(int p, Geometry::Type G, int Do, const real_t *tk_fe);
701
702private:
703 void LocalInterpolation(const VectorFiniteElement &cfe,
705 DenseMatrix &I) const;
706
707public:
710
712 DenseMatrix &shape) const override;
713
715 DenseMatrix &curl_shape) const override;
716
718 DenseMatrix &I) const override
719 { LocalInterpolation(*this, Trans, I); }
720
722 DenseMatrix &R) const override;
723
726 DenseMatrix &I) const override
727 { LocalInterpolation(CheckVectorFE(fe), Trans, I); }
728
730
731 void Project(VectorCoefficient &vc,
732 ElementTransformation &Trans, Vector &dofs) const override;
733
734 void Project(const FiniteElement &fe, ElementTransformation &Trans,
735 DenseMatrix &I) const override;
736
737 void ProjectGrad(const FiniteElement &fe,
739 DenseMatrix &grad) const override;
740};
741
742/// Arbitrary order Nedelec 3D elements in 2D on a triangle
744{
745private:
746 static const real_t tk_t[15];
747
748#ifndef MFEM_THREAD_SAFE
749 mutable DenseMatrix nd_shape;
750 mutable Vector h1_shape;
751 mutable DenseMatrix nd_dshape;
752 mutable DenseMatrix h1_dshape;
753#endif
754
755 ND_TriangleElement ND_FE;
756 H1_TriangleElement H1_FE;
757
758public:
759 /// Construct the ND_R2D_TriangleElement of order @a p
760 ND_R2D_TriangleElement(const int p,
761 const int cb_type = BasisType::GaussLobatto);
762
765
766 void CalcVShape(const IntegrationPoint &ip,
767 DenseMatrix &shape) const override;
768 void CalcCurlShape(const IntegrationPoint &ip,
769 DenseMatrix &curl_shape) const override;
770};
771
772
773/// Arbitrary order Nedelec 3D elements in 2D on a square
775{
776 static const real_t tk_q[15];
777
778#ifndef MFEM_THREAD_SAFE
779 mutable Vector shape_cx, shape_ox, shape_cy, shape_oy;
780 mutable Vector dshape_cx, dshape_cy;
781#endif
782
783 Poly_1D::Basis &cbasis1d, &obasis1d;
784
785public:
786 /** @brief Construct the ND_R2D_QuadrilateralElement of order @a p and
787 closed and open BasisType @a cb_type and @a ob_type */
789 const int cb_type = BasisType::GaussLobatto,
790 const int ob_type = BasisType::GaussLegendre);
791
794
795 void CalcVShape(const IntegrationPoint &ip,
796 DenseMatrix &shape) const override;
797 void CalcCurlShape(const IntegrationPoint &ip,
798 DenseMatrix &curl_shape) const override;
799};
800
801
802} // namespace mfem
803
804#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
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:71
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
Base class for Matrix Coefficients that optionally depend on time and space.
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:519
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:515
void CalcRawVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Definition fe_nd.cpp:1840
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:491
void CalcRawCurlShape(const IntegrationPoint &ip, DenseMatrix &dshape) const
Definition fe_nd.cpp:1862
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:509
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:499
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:496
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:524
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:512
ND_FuentesPyramidElement(const int p, const int cb_type=BasisType::GaussLobatto, const int ob_type=BasisType::GaussLegendre)
Definition fe_nd.cpp:1591
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:1786
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:502
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:1811
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:373
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:544
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:2543
ND_R1D_PointElement(int p)
Construct the ND_R1D_PointElement.
Definition fe_nd.cpp:2532
Arbitrary order, three component, Nedelec elements in 1D on a segment.
Definition fe_nd.hpp:565
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:2625
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:2561
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:633
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:2718
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:628
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:597
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:605
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:615
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:2678
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:2729
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:619
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:601
ND_R2D_FiniteElement(int p, Geometry::Type G, int Do, const real_t *tk_fe)
Definition fe_nd.cpp:3023
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:717
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:724
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:3058
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:3167
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:3041
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:3279
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:3121
Arbitrary order Nedelec 3D elements in 2D on a square.
Definition fe_nd.hpp:775
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:3631
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:3444
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:3571
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:2998
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:2838
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:2887
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:679
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:2930
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:683
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:675
Arbitrary order Nedelec 3D elements in 2D on a triangle.
Definition fe_nd.hpp:744
ND_R2D_TriangleElement(const int p, const int cb_type=BasisType::GaussLobatto)
Construct the ND_R2D_TriangleElement of order p.
Definition fe_nd.cpp:3303
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:3411
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:3382
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:337
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 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:310
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:329
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:1285
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:321
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.hpp:306
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:315
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:318
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:326
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:333
DoF transformation implementation for the Nedelec basis on tetrahedra.
Definition doftrans.hpp:350
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:361
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:402
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:383
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:1512
const StatelessDofTransformation * GetDofTransformation() const override
Return a DoF transformation object for this particular type of basis.
Definition fe_nd.hpp:388
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:377
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:397
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:412
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:407
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:393
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:1546
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:370
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:380
ND_WedgeElement(const int p, const int cb_type=BasisType::GaussLobatto, const int ob_type=BasisType::GaussLegendre)
Definition fe_nd.cpp:1296
Class for evaluating 1D nodal, positive (Bernstein), or integrated (Gerritsma) bases.
Definition fe_base.hpp:1003
void Eval(const real_t x, Vector &u) const
Evaluate the basis functions at point x in [0,1].
Definition fe_base.cpp:1777
bool IsIntegratedType() const
Returns true if the basis is "integrated", false otherwise.
Definition fe_base.hpp:1047
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 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:1306
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:1335
void LocalRestriction_ND(const real_t *tk, const Array< int > &d2t, ElementTransformation &Trans, DenseMatrix &R) const
Definition fe_base.cpp:1671
void ProjectGrad_ND(const real_t *tk, const Array< int > &d2t, const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &grad) const
Definition fe_base.cpp:1434
void CalcVShape_ND(ElementTransformation &Trans, DenseMatrix &shape) const
Definition fe_base.cpp:1071
void LocalInterpolation_ND(const VectorFiniteElement &cfe, const real_t *tk, const Array< int > &d2t, ElementTransformation &Trans, DenseMatrix &I) const
Definition fe_base.cpp:1589
static const VectorFiniteElement & CheckVectorFE(const FiniteElement &fe)
Definition fe_base.hpp:973
void ProjectCurl_ND(const real_t *tk, const Array< int > &d2t, const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &curl) const
Definition fe_base.cpp:1249
Vector data type.
Definition vector.hpp:82
float real_t
Definition config.hpp:43
real_t p(const Vector &x, real_t t)