LifeV
OperationSmallAddition.hpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory UNiversity
7 
8  This file is part of the LifeV library
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation; either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public
21  License along with this library; if not, see <http://www.gnu.org/licenses/>
22 
23 
24 *******************************************************************************
25 */
26 //@HEADER
27 
28 /*!
29  * @file
30  @brief This file contains information about the addition operation between *Small classes.
31 
32  @date 07/2011
33  @author Samuel Quinodoz <samuel.quinodoz@epfl.ch>
34  */
35 
36 #ifndef OPERATION_SMALL_ADDITION_HPP
37 #define OPERATION_SMALL_ADDITION_HPP
38 
39 #include <lifev/core/LifeV.hpp>
40 
41 #include <lifev/core/array/VectorSmall.hpp>
42 
43 
44 namespace LifeV
45 {
46 //! class OperationSmallAddition Class containing information about the addition operation between the *Small classes.
47 
48 /*!
49  @author Samuel Quinodoz <samuel.quinodoz@epfl.ch>
50 
51  This class only contains information that can be usefull in a templated framework (such as the
52  one for assembling the algebraic systems via expressions).
53 
54  It cannot be instanciated, neither the generic definition nor the specializations (private constructors
55  and destructor only).
56 
57  The only information stored in this class is the type of the result. For example, as the addition
58  of a LifeV::Real with a LifeV::Real is a LifeV::Real as well, the specialization
59  LifeV::OperationSmallAddition<LifeV::Real,LifeV::Real> contains the typedef result_Type that aliases
60  the LifeV::Real type.
61 
62 */
63 template <typename LeftOperand, typename RightOperand>
65 {
66 private:
67  //! @name Constructors and destructors
68  //@{
69 
70  //! No default constructor
72 
73  //! No destructor
75 
76  //@}
77 };
78 
79 //! \cond
80 
81 template <>
83 {
84 public:
85 
86  //! @name Public Types
87  //@{
88 
89  typedef Real result_Type;
90 
91  //@}
92 
93 private:
94  //! @name Constructors and destructors
95  //@{
96 
97  //! No default constructor
98  OperationSmallAddition();
99 
100  //! No destructor
101  ~OperationSmallAddition();
102 
103  //@}
104 };
105 
106 
107 template <UInt Size>
108 class OperationSmallAddition< VectorSmall<Size> , VectorSmall<Size> >
109 {
110 public:
111 
112  //! @name Public Types
113  //@{
114 
115  typedef VectorSmall<Size> result_Type;
116 
117  //@}
118 
119 private:
120  //! @name Constructors and destructors
121  //@{
122 
123  //! No default constructor
124  OperationSmallAddition();
125 
126  //! No destructor
127  ~OperationSmallAddition();
128 
129  //@}
130 };
131 
132 // specialization for matrix + matrix
133 template <UInt Dim1, UInt Dim2>
134 class OperationSmallAddition< MatrixSmall<Dim1, Dim2> , MatrixSmall<Dim1, Dim2> >
135 {
136 public:
137 
138  //! @name Public Types
139  //@{
140 
141  typedef MatrixSmall<Dim1, Dim2> result_Type;
142 
143  //@}
144 
145 private:
146  //! @name Constructors and destructors
147  //@{
148 
149  //! No default constructor
150  OperationSmallAddition();
151 
152  //! No destructor
153  ~OperationSmallAddition();
154 
155  //@}
156 };
157 
158 //! \endcond
159 
160 } // namespace LifeV
161 
162 
163 #endif
void updateInverseJacobian(const UInt &iQuadPt)
OperationSmallAddition()
No default constructor.
double Real
Generic real data.
Definition: LifeV.hpp:175
~OperationSmallAddition()
No destructor.
class OperationSmallAddition Class containing information about the addition operation between the *S...
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191