1%%%%%%%%%%%%%%%%%%%
2% XLiFE++ is an extended library of finite elements written in C++
3%     Copyright (C) 2014  Lunéville, Eric; Kielbasiewicz, Nicolas; Lafranche, Yvon; Nguyen, Manh-Ha; Chambeyron, Colin
4%
5%     This program is free software: you can redistribute it and/or modify
6%     it under the terms of the GNU General Public License as published by
7%     the Free Software Foundation, either version 3 of the License, or
8%     (at your option) any later version.
9%     This program is distributed in the hope that it will be useful,
10%     but WITHOUT ANY WARRANTY; without even the implied warranty of
11%     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12%     GNU General Public License for more details.
13%     You should have received a copy of the GNU General Public License
14%     along with this program.  If not, see <http://www.gnu.org/licenses/>.
15%%%%%%%%%%%%%%%%%%%
16
17\section{The {\classtitle RefDof} class}
18
19The {\class RefDof} class is a class representing a generalized degree of freedom in a reference
20element.
21
22It is defined by:
23
24\begin{itemize}
25\item A support that can be a point, a side, a side of side or the whole element. When it is a point, we also have its coordinates.
26\item A dimension, that means the number of components of shape functions of the DoF.
27\item Projections data (type and direction) when the DoF is a projection DoF. The projection
28type is 0 for a general projection, 1 for a  $u\dot n$ DoF, 2 for a $u\times n$ DoF.
29\item Derivative data (order and direction) when the DoF is a derivative DoF. The order is
300 when the DoF is defined by an 'integral' over its support, or $n$ for a Hermite DoF derivative
31of order $n>0$ or a moment DoF of order $n>0$.
32\item A shareable property: A DoF is shareable when it is shared between adjacent elements according
33to space conformity. Such a DoF can be shared or not according to interpolation. For example,
34every DoF of a Lagrange H1-confirming element on a side is shared, while DoF in discontinuous
35interpolation are not.
36\end{itemize}
37
38\begin{lstlisting}
39class RefDof
40{
41 private:
42 bool sharable_;              //D.o.F is shared according to space conformity
43 DofLocalization where_;      //hierarchic localization of dof
44 number_t supportNum_;        //support localization
45 number_t index_;             //rank of the dof in its localization
46 dimen_t supportDim_;         //dimension of the D.o.F geometric support
47 number_t nodeNum_;           //node number when a point dof
48 dimen_t dim_;                //number of components of shape functions of D.o.F
49 std::vector<real_t> coords_; //coordinates of D.o.F support ifn supportDim_=0
50 number_t order_;             //order of a derivative D.o.F or a moment D.o.F
51 std::vector<real_t> derivativeVector_; //direction vector(s) of a derivative
52 ProjectionType projectionType_;        //type of projection
53 std::vector<real_t> projectionVector_; //direction vector(s) of a projection
54 string_t name_;                        //D.o.F-type name for documentation
55\end{lstlisting}
56\vspace{.2cm}
57This class proposes mainly a full constructor and accessors to member data.\\
58
59In order to sort dofs in an efficient way, the following class is offered:
60\begin{lstlisting}[deletekeywords={[3] where}]
61class DofKey
62{
63 public:
64 DofLocalization where;
65 number_t v1, v2;           //used for vertex, edge, element dofs
66 std::vector<number_t> vs;  //used for face dofs
67 number_t locIndex;         //local dof index
68 }
69\end{lstlisting}
70\vspace{.2cm}
71assiciated to the comparison operator:
72\begin{lstlisting}
73bool operator<(const DofKey& k1, const DofKey& k2);
74\end{lstlisting}
75\vspace{.2cm}
76
77
78\displayInfos{library=finiteElements, header=RefDof.hpp, implementation=RefDof.cpp, test={test\_segment.cpp,
79test\_triangle.cpp, test\_quadrangle.cpp, test\_tetrahedron.cpp, test\_hexahedron.cpp, test\_prism.cpp},
80header dep={config.h, utils.h}}
81
82