LifeV
OperationSmallProduct.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 product operation between *Small classes.
31 
32  @date 07/2011
33  @author Samuel Quinodoz <samuel.quinodoz@epfl.ch>
34  */
35 
36 #ifndef OPERATION_SMALL_PRODUCT_HPP
37 #define OPERATION_SMALL_PRODUCT_HPP
38 
39 #include <lifev/core/LifeV.hpp>
40 
41 #include <lifev/core/array/VectorSmall.hpp>
42 
43 // LifeV namespace.
44 namespace LifeV
45 {
46 //! class OperationSmallProduct Class containing information about the product operation between *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, see LifeV::OperationSmallAddition.
58 */
59 
60 template <typename LeftOperand, typename RightOperand>
62 {
63 private:
64  //! @name Constructors and destructors
65  //@{
66 
67  //! No default constructor
69 
70  //! No destructor
72 
73  //@}
74 };
75 
76 //! \cond
77 
78 template <>
80 {
81 public:
82 
83  //! @name Public Types
84  //@{
85 
86  typedef Real result_Type;
87 
88  //@}
89 
90 private:
91  //! @name Constructors and destructors
92  //@{
93 
94  //! No default constructor
95  OperationSmallProduct();
96 
97  //! No destructor
98  ~OperationSmallProduct();
99 
100  //@}
101 };
102 
103 
104 template <UInt Size>
105 class OperationSmallProduct< VectorSmall<Size> , Real >
106 {
107 public:
108 
109  //! @name Public Types
110  //@{
111 
112  typedef VectorSmall<Size> result_Type;
113 
114  //@}
115 
116 private:
117  //! @name Constructors and destructors
118  //@{
119 
120  //! No default constructor
121  OperationSmallProduct();
122 
123  //! No destructor
124  ~OperationSmallProduct();
125 
126  //@}
127 };
128 
129 
130 template <UInt Size>
131 class OperationSmallProduct< Real , VectorSmall<Size> >
132 {
133 public:
134 
135  //! @name Public Types
136  //@{
137 
138  typedef VectorSmall<Size> result_Type;
139 
140  //@}
141 
142 private:
143  //! @name Constructors and destructors
144  //@{
145 
146  //! No default constructor
147  OperationSmallProduct();
148 
149  //! No destructor
150  ~OperationSmallProduct();
151 
152  //@}
153 };
154 
155 template <UInt Dim1, UInt Dim2>
156 class OperationSmallProduct< MatrixSmall<Dim1, Dim2> , Real >
157 {
158 public:
159 
160  //! @name Public Types
161  //@{
162 
163  typedef MatrixSmall<Dim1, Dim2> result_Type;
164 
165  //@}
166 
167 private:
168  //! @name Constructors and destructors
169  //@{
170 
171  //! No default constructor
172  OperationSmallProduct();
173 
174  //! No destructor
175  ~OperationSmallProduct();
176 
177  //@}
178 };
179 
180 
181 template <UInt Dim1, UInt Dim2>
182 class OperationSmallProduct< Real , MatrixSmall<Dim1, Dim2> >
183 {
184 public:
185 
186  //! @name Public Types
187  //@{
188 
189  typedef MatrixSmall<Dim1, Dim2> result_Type;
190 
191  //@}
192 
193 private:
194  //! @name Constructors and destructors
195  //@{
196 
197  //! No default constructor
198  OperationSmallProduct();
199 
200  //! No destructor
201  ~OperationSmallProduct();
202 
203  //@}
204 };
205 
206 
207 // specialization for matrix * vector
208 template <UInt Dim1, UInt Dim2>
209 class OperationSmallProduct< MatrixSmall<Dim1, Dim2> , VectorSmall<Dim2> >
210 {
211 public:
212 
213  //! @name Public Types
214  //@{
215 
216  typedef VectorSmall<Dim1> result_Type;
217 
218  //@}
219 
220 private:
221  //! @name Constructors and destructors
222  //@{
223 
224  //! No default constructor
225  OperationSmallProduct();
226 
227  //! No destructor
228  ~OperationSmallProduct();
229 
230  //@}
231 };
232 
233 // specialization for matrix * vector
234 template <UInt Dim1, UInt Dim2>
235 class OperationSmallProduct< VectorSmall<Dim2>, MatrixSmall<Dim1, Dim2> >
236 {
237 public:
238 
239  //! @name Public Types
240  //@{
241 
242  typedef VectorSmall<Dim1> result_Type;
243 
244  //@}
245 
246 private:
247  //! @name Constructors and destructors
248  //@{
249 
250  //! No default constructor
251  OperationSmallProduct();
252 
253  //! No destructor
254  ~OperationSmallProduct();
255 
256  //@}
257 };
258 
259 // specialization for vector * vector
260 template <UInt Size>
261 class OperationSmallProduct< VectorSmall<Size> , VectorSmall<Size> >
262 {
263 public:
264 
265  //! @name Public Types
266  //@{
267 
268  typedef VectorSmall<Size> result_Type;
269 
270  //@}
271 
272 private:
273  //! @name Constructors and destructors
274  //@{
275 
276  //! No default constructor
277  OperationSmallProduct();
278 
279  //! No destructor
280  ~OperationSmallProduct();
281 
282  //@}
283 };
284 
285 
286 // specialization for matrix * matrix (squared result!!)
287 template <UInt Dim1, UInt Dim2>
288 class OperationSmallProduct< MatrixSmall<Dim1, Dim2>, MatrixSmall<Dim2, Dim1> >
289 {
290 public:
291 
292  //! @name Public Types
293  //@{
294 
295  typedef MatrixSmall<Dim1, Dim1> result_Type;
296 
297  //@}
298 
299 private:
300  //! @name Constructors and destructors
301  //@{
302 
303  //! No default constructor
304  OperationSmallProduct();
305 
306  //! No destructor
307  ~OperationSmallProduct();
308 
309  //@}
310 };
311 
312 //! \endcond
313 
314 } // namespace LifeV
315 
316 
317 #endif
void updateInverseJacobian(const UInt &iQuadPt)
~OperationSmallProduct()
No destructor.
double Real
Generic real data.
Definition: LifeV.hpp:175
OperationSmallProduct()
No default constructor.
class OperationSmallProduct Class containing information about the product operation between *Small c...
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191