hexFunctions.hh

Go to the documentation of this file.
1 
6 #ifndef hexFunctions_hh
7 #define hexFunctions_hh
8 
10 #include "basics/typedefs.hh"
11 #include "basics/Zm.hh"
12 
13 namespace concepts {
14 
15  // forward declaration
16  class Hexahedron;
17 
18 }
19 
20 namespace hp3D {
21 
22  // ********************************************************** HexFunctions **
23 
27  class HexFunctions {
28  public:
36  static void edgeOrientation(const uint i,
37  uint& pIndex, uint& qIndex, uint& rIndex);
38 
49  static void faceOrientation(const concepts::Hexahedron& cntr, const uint i,
50  uint& pIndex, uint& qIndex, uint& rIndex);
51 
60  const uint i,
61  bool& flip0, bool& flip1);
62 
66  static void vertexIndex(const uint i, uint ll[3]);
67 
73  static void edgeIndex(const uint i, const uint qIndex, const uint rIndex,
74  uint ll[3]);
75 
80  static void faceIndex(const uint i, const uint rIndex, uint ll[3]);
81 
86  static uint index(const uint ll[3], const ushort p[3]) {
87  // copy'n paste from TColumnTensor::operator[]
88  return ll[0]+ll[1]*(1+p[0])+ll[2]*(1+p[0])*(1+p[1]);
89  }
102 
109  static const concepts::ushort* setDegreeHex2Quad(const ushort* p, uint k, concepts::Z4 tau);
110  };
111 
112 
113 
114 } // namespace hp3D
115 
116 #endif // hexFunctions_hh
static void vertexIndex(const uint i, uint ll[3])
Computes the tensor product index ll for a vertex with index i.
static void faceShapefctOrientation(const concepts::Hexahedron &cntr, const uint i, bool &flip0, bool &flip1)
Determines wether a shape function direction has to flip the sign for the odd degree polynomials.
static void edgeIndex(const uint i, const uint qIndex, const uint rIndex, uint ll[3])
Computes the tensor product index ll for an edge with index i and precomputed indices qIndex and rInd...
static uint index(const uint ll[3], const ushort p[3])
Computes the linear index from the tensor product index ll using the polynomial degrees p.
Definition: hexFunctions.hh:86
A hexahedron in the topology.
Definition: topology3D.hh:134
static concepts::Real2d coordTrans(const concepts::Real x, const concepts::Real y, uint k, concepts::Z2 r, concepts::Z4 t)
Returns the x,y coordinate in the right order with corrected orientation such that physical coordinat...
Auxiliary functions for hexahedra.
Definition: hexFunctions.hh:27
static concepts::Real2d coordTransInv(const concepts::Real x, const concepts::Real y, uint k, concepts::Z2 r, concepts::Z4 t)
static void faceOrientation(const concepts::Hexahedron &cntr, const uint i, uint &pIndex, uint &qIndex, uint &rIndex)
Helps distributing the polynomial degree to the faces.
static const concepts::ushort * setDegreeHex2Quad(const ushort *p, uint k, concepts::Z4 tau)
This method sets the appropriate polynomial degree for a facequad from a hexahderon depending on its ...
unsigned short ushort
Abbreviation for unsigned short.
Definition: typedefs.hh:48
static void edgeOrientation(const uint i, uint &pIndex, uint &qIndex, uint &rIndex)
Helps distributing the polynomial degree to the edges.
Binary group (algebraic): only the values 0 and 1 are represented.
Definition: Zm.hh:16
3D hp-FEM for H1-conforming elements.
Definition: meshDX.hh:23
Algebraic group with four elements: 0, 1, 2 and 3.
Definition: Zm.hh:68
static void faceIndex(const uint i, const uint rIndex, uint ll[3])
Computes the tensor product index ll for a face with index i and precomputed index rIndex (use faceOr...
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich