Intrepid2
Intrepid2_SerendipityBasisFamily.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Intrepid2 Package
4 //
5 // Copyright 2007 NTESS and the Intrepid2 contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
15 #ifndef Intrepid2_SerendipityBasisFamily_h
16 #define Intrepid2_SerendipityBasisFamily_h
17 
18 #include "Intrepid2_Basis.hpp"
19 
22 #include "Intrepid2_DerivedBasis_HDIV_QUAD.hpp"
24 
29 
30 namespace Intrepid2 {
34  template<class FullBasis, int numPolyOrderArgs>
36  :
37  public SerendipityBasis<typename FullBasis::BasisBase>
38  {
39  public:
40  using BasisBase = typename FullBasis::BasisBase;
41  using BasisPtr = Teuchos::RCP<BasisBase>;
42  using DeviceType = typename BasisBase::DeviceType;
43  using ExecutionSpace = typename BasisBase::ExecutionSpace;
44  using OutputValueType = typename BasisBase::OutputValueType;
45  using PointValueType = typename BasisBase::PointValueType;
46 
47  using OrdinalTypeArray1D = typename BasisBase::OrdinalTypeArray1D;
48  using OrdinalTypeArray1DHost = typename BasisBase::OrdinalTypeArray1DHost;
49  using OrdinalTypeArray2DHost = typename BasisBase::OrdinalTypeArray2DHost;
50  using OutputViewType = typename BasisBase::OutputViewType;
51  using PointViewType = typename BasisBase::PointViewType;
52 
54  SerendipityBasisWrapper(int polyOrder, const EPointType pointType=POINTTYPE_DEFAULT)
55  :
56  SerendipityBasis<typename FullBasis::BasisBase>(Teuchos::rcp(new FullBasis(polyOrder)) )
57  {}
58 
60  template<bool M=(numPolyOrderArgs==2)>
61  SerendipityBasisWrapper(int polyOrder_x, int polyOrder_y, const EPointType pointType=POINTTYPE_DEFAULT, typename std::enable_if<M>::type* = 0)
62  :
63  SerendipityBasis<typename FullBasis::BasisBase>(Teuchos::rcp(new FullBasis(polyOrder_x, polyOrder_y)) )
64  {}
65 
67  template<bool M=(numPolyOrderArgs==3)>
68  SerendipityBasisWrapper(int polyOrder_x, int polyOrder_y, int polyOrder_z, const EPointType pointType=POINTTYPE_DEFAULT, typename std::enable_if<M>::type* = 0)
69  :
70  SerendipityBasis<typename FullBasis::BasisBase>(Teuchos::rcp(new FullBasis(polyOrder_x, polyOrder_y, polyOrder_z)) )
71  {}
72  };
73 
77  template<class LineBasisHGRAD, class LineBasisHVOL, class TriangleBasisFamily, class TetrahedronBasisFamily >
79  {
80  public:
81  using ExecutionSpace = typename LineBasisHGRAD::ExecutionSpace;
82  using OutputValueType = typename LineBasisHGRAD::OutputValueType;
83  using PointValueType = typename LineBasisHGRAD::PointValueType;
84 
85  using Basis = typename LineBasisHGRAD::BasisBase;
86  using BasisPtr = Teuchos::RCP<Basis>;
87  using DeviceType = typename Basis::DeviceType;
88 
89  // line bases
90  using HGRAD_LINE = LineBasisHGRAD;
91  using HVOL_LINE = LineBasisHVOL;
92 
93  // quadrilateral bases
98 
99  // hexahedron bases
104 
105  // triangle bases
106  using HGRAD_TRI = typename TriangleBasisFamily::HGRAD;
107  using HCURL_TRI = typename TriangleBasisFamily::HCURL;
108  using HDIV_TRI = typename TriangleBasisFamily::HDIV;
109  using HVOL_TRI = typename TriangleBasisFamily::HVOL;
110 
111  // tetrahedron bases
112  using HGRAD_TET = typename TetrahedronBasisFamily::HGRAD;
113  using HCURL_TET = typename TetrahedronBasisFamily::HCURL;
114  using HDIV_TET = typename TetrahedronBasisFamily::HDIV;
115  using HVOL_TET = typename TetrahedronBasisFamily::HVOL;
116  };
117 
121  template<typename DeviceType,
122  typename OutputScalar = double,
123  typename PointScalar = double>
128  >;
129 
136  template<typename DeviceType,
137  typename OutputScalar = double,
138  typename PointScalar = double>
143  >;
144 }
145 
146 #endif /* Intrepid2_HierarchicalBasisFamily_h */
SerendipityBasisWrapper(int polyOrder_x, int polyOrder_y, int polyOrder_z, const EPointType pointType=POINTTYPE_DEFAULT, typename std::enable_if< M >::type *=0)
three-argument constructor; enabled if numPolyOrderArgs is 3.
Serendipity Basis, defined as the sub-basis of a provided basis, consisting of basis elements for whi...
Serendipity basis family constructed using the DG hierarchical basis family.
SerendipityBasisWrapper(int polyOrder, const EPointType pointType=POINTTYPE_DEFAULT)
single-argument constructor, for isotropic bases.
Serendipity basis family constructed in terms of arbitrary bases on the line, triangle, and tetrahedron. (These must be hierarchical bases.)
Implementation of H(div) basis on the hexahedron that is templated on H(vol) and H(grad) on the line...
Implementation of H(curl) basis on the quadrilateral that is templated on H(vol) and H(grad) on the l...
Device DeviceType
(Kokkos) Device type on which Basis is templated. Does not necessarily return true for Kokkos::is_dev...
Helper class that allows SerendipityBasis construction with poly order arguments that are passed to t...
Implementation of H(curl) basis on the hexahedron that is templated on H(vol) and H(grad) on the line...
Implementation of H(grad) basis on the quadrilateral that is templated on H(grad) on the line...
Implementation of H(vol) basis on the hexahedron that is templated on H(vol) on the line...
Basis defining Legendre basis on the line, a polynomial subspace of L^2 (a.k.a. H(vol)) on the line...
SerendipityBasisWrapper(int polyOrder_x, int polyOrder_y, const EPointType pointType=POINTTYPE_DEFAULT, typename std::enable_if< M >::type *=0)
two-argument constructor; enabled if numPolyOrderArgs is 2.
Implementation of H(grad) basis on the hexahedron that is templated on H(grad) on the line...
Implementation of H(vol) basis on the quadrilateral that is templated on H(vol) on the line...
Header file for the abstract base class Intrepid2::Basis.