1 /*!
2  * \file   include/TFEL/Config/Internals/JacobianType.hxx
3  * \brief  This file declares the  class
4  * \author Thomas Helfer
5  * \date   25 Sep 2006
6  * \copyright Copyright (C) 2006-2018 CEA/DEN, EDF R&D. All rights
7  * reserved.
8  * This project is publicly released under either the GNU GPL Licence
9  * or the CECILL-A licence. A copy of thoses licences are delivered
10  * with the sources of TFEL. CEA or EDF may also distribute this
11  * project under specific licensing conditions.
12  */
13 
14 #ifndef LIB_TFEL_JACOBIANTYPE_HXX
15 #define LIB_TFEL_JACOBIANTYPE_HXX
16 
17 #include"TFEL/Math/tmatrix.hxx"
18 #include"TFEL/Math/Forward/qt.hxx"
19 
20 namespace tfel{
21 
22   namespace config {
23 
24     namespace internals{
25 
26       template<unsigned short N,typename T,bool use_qt>
27       struct JacobianType
28       {
29 	typedef tfel::math::tmatrix<N,N,tfel::math::qt<tfel::math::NoUnit,T> > type;
30       };
31 
32       template<unsigned short N,typename T>
33       struct JacobianType<N,T,false>
34       {
35 	typedef tfel::math::tmatrix<N,N,T> type;
36       };
37 
38       template<typename T,bool use_qt>
39       struct JacobianType<1u,T,use_qt>
40       {
41 	typedef tfel::math::qt<tfel::math::NoUnit,T> type;
42       };
43 
44       template<typename T>
45       struct JacobianType<1u,T,false>
46       {
47 	typedef T type;
48       };
49 
50     } // end of namespace internals
51 
52   } // end of namespace config
53 
54 } // end of namespace tfel
55 
56 #endif /* LIB_TFEL_JACOBIANTYPE_HXX */
57 
58