products.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 InNamespace
25  Foam
26 
27 Description
28  Traits classes for inner and outer products of primitives.
29 
30 \*---------------------------------------------------------------------------*/
31 
32 #ifndef products_H
33 #define products_H
34 
35 #include "pTraits.H"
36 
37 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
38 
39 namespace Foam
40 {
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 //- Abstract template class to provide the form resulting from
45 // the inner-product of two forms
46 template<class Cmpt, class Form1, class Form2>
48 {};
49 
50 //- Abstract template class to provide the form resulting from
51 // the outer-product of two forms
52 template<class Cmpt, class Form1, class Form2>
54 {};
55 
56 //- Abstract template class to provide the transpose form of a form
57 template<class Cmpt, class Form>
59 {};
60 
61 
62 template<class Cmpt, direction rank>
64 {};
65 
66 
67 template<class Cmpt, direction rank>
69 {};
70 
71 
72 template<class arg1, class arg2>
73 class typeOfSum
74 {
75 public:
76 
77  typedef arg1 type;
78 };
79 
80 
81 template<class arg1, class arg2>
83 {
84 public:
85 
86  typedef typename typeOfRank
87  <
88  typename pTraits<arg1>::cmptType,
91 };
92 
93 
94 template<class arg1, class arg2>
96 {
97 public:
98 
99  typedef typename typeOfRank
100  <
101  typename pTraits<arg2>::cmptType,
104 };
105 
106 template<class arg1, class arg2>
108 {
109 public:
110 
111  typedef typename typeOfRank
112  <
113  typename pTraits<arg1>::cmptType,
116 };
117 
118 template<class arg1, class arg2>
120 {
121 public:
122 
123  typedef typename pTraits<arg1>::cmptType type;
124 };
125 
126 
127 template<class arg1, direction arg2>
129 {
130 public:
131 
132  typedef typename symmTypeOfRank
133  <
134  typename pTraits<arg1>::cmptType,
137 };
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #endif
147 
148 // ************************************************************************* //
typeOfRank< typename pTraits< arg2 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) - 1 >::type type
Definition: products.H:103
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) - 2 >::type type
Definition: products.H:115
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
Definition: products.H:90
Traits class for primitives.
Definition: pTraits.H:53
symmTypeOfRank< typename pTraits< arg1 >::cmptType, arg2 *direction(pTraits< arg1 >::rank) >::type type
Definition: products.H:136
pTraits< arg1 >::cmptType type
Definition: products.H:123
Abstract template class to provide the form resulting from.
Definition: products.H:48
Abstract template class to provide the form resulting from.
Definition: products.H:54
Abstract template class to provide the transpose form of a form.
Definition: products.H:59
Namespace for OpenFOAM.
uint8_t direction
Definition: direction.H:45