Intrepid2
Intrepid2_Orientation.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_ORIENTATION_HPP__
16 #define __INTREPID2_ORIENTATION_HPP__
17 
18 #include "Intrepid2_ConfigDefs.hpp"
19 #include "Intrepid2_Types.hpp"
20 #include "Intrepid2_Utils.hpp"
21 
22 #include "Shards_CellTopology.hpp"
23 
24 namespace Intrepid2 {
25 
32  class Orientation {
33  private:
34  template<typename cellVertViewType>
35  static void getCellVertexMap(typename cellVertViewType::non_const_value_type *subCellVerts,
36  ordinal_type &numVerts,
37  const shards::CellTopology cellTopo,
38  const cellVertViewType cellVerts,
39  const ordinal_type subCellDim,
40  const ordinal_type subCellOrd);
41 
42  // orientation is always computed on the right-handed coordinates
43  template<typename subCellVertType>
44  static ordinal_type getOrientation(const subCellVertType subCellVerts[],
45  const ordinal_type numVerts);
46 
47 
48  public:
49 
60  template<typename cellVertViewType>
61  static Orientation getOrientation(const shards::CellTopology cellTopo,
62  const cellVertViewType cellVerts,
63  bool isSide = false);
64 
72  static ordinal_type getEdgeOrdinalOfFace(const ordinal_type subsubcellOrd,
73  const ordinal_type subcellOrd,
74  const shards::CellTopology cellTopo);
75 
76 
77  /*
78  Function Removed. Use instead Impl::OrientationTools::getRefSubcellTangents
79  template<typename refTanViewType>
80  static void getReferenceEdgeTangent(const refTanViewType &tanE,
81  const ordinal_type subcellOrd,
82  const shards::CellTopology cellTopo,
83  const ordinal_type ort,
84  const bool is_normalize = true);
85  */
86 
87  /*
88  Function Removed. Use instead Impl::OrientationTools::getRefSubcellTangents
89  template<typename refTanViewType>
90  static void getReferenceFaceTangents(const refTanViewType &tanU,
91  const refTanViewType &tanV,
92  const ordinal_type subcellOrd,
93  const shards::CellTopology cellTopo,
94  const ordinal_type ort,
95  const bool is_normalize = true);
96  */
97 
98  /*
99  Function Removed. Use instead Impl::OrientationTools::getRefSideTangentsAndNormal
100  template<typename refNormalViewType>
101  static void getReferenceFaceNormal(const refNormalViewType &normalV,
102  const ordinal_type subcellOrd,
103  const shards::CellTopology cellTopo,
104  const ordinal_type ort,
105  const bool is_normalize = true);
106  */
107 
108 
109  private:
110  ordinal_type _edgeOrt, _faceOrt;
111 
112  public:
115  KOKKOS_INLINE_FUNCTION
116  Orientation();
117 
120  KOKKOS_DEFAULTED_FUNCTION
121  Orientation(const Orientation &b) = default;
122 
125  KOKKOS_INLINE_FUNCTION
126  bool isAlignedToReference() const;
127 
132  KOKKOS_INLINE_FUNCTION
133  void setEdgeOrientation(const ordinal_type numEdge, const ordinal_type edgeOrt[]);
134 
139  KOKKOS_INLINE_FUNCTION
140  void getEdgeOrientation(ordinal_type *edgeOrt, const ordinal_type numEdge) const;
141 
146  KOKKOS_INLINE_FUNCTION
147  void setFaceOrientation(const ordinal_type numFace, const ordinal_type faceOrt[]);
148 
153  KOKKOS_INLINE_FUNCTION
154  void getFaceOrientation(ordinal_type *faceOrt, const ordinal_type numFace) const;
155 
158  inline std::string to_string() const;
159  };
160 }
161 
162 inline std::ostream& operator<<(std::ostream& os, const ::Intrepid2::Orientation& orientation)
163 {
164  os << orientation.to_string();
165  return os;
166 }
167 
168 // include templated function definitions
170 
171 #endif
Definition file for the Intrepid2::Orientation class.
KOKKOS_INLINE_FUNCTION void getFaceOrientation(ordinal_type *faceOrt, const ordinal_type numFace) const
Header function for Intrepid2::Util class and other utility functions.
KOKKOS_INLINE_FUNCTION void setEdgeOrientation(const ordinal_type numEdge, const ordinal_type edgeOrt[])
Orientation encoding and decoding.
KOKKOS_INLINE_FUNCTION bool isAlignedToReference() const
Contains definitions of custom data types in Intrepid2.
KOKKOS_INLINE_FUNCTION void setFaceOrientation(const ordinal_type numFace, const ordinal_type faceOrt[])
static ordinal_type getEdgeOrdinalOfFace(const ordinal_type subsubcellOrd, const ordinal_type subcellOrd, const shards::CellTopology cellTopo)
KOKKOS_INLINE_FUNCTION void getEdgeOrientation(ordinal_type *edgeOrt, const ordinal_type numEdge) const
KOKKOS_INLINE_FUNCTION Orientation()