CompactSpatialTensorT.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2016 OpenFOAM Foundation
9  Copyright (C) 2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::CompactSpatialTensorT
29 
30 Description
31  Templated 3D transposed compact spatial tensor derived from MatrixSpace
32  used to represent transformations of spatial vectors of rigid bodies.
33 
34  Reference:
35  \verbatim
36  Featherstone, R. (2008).
37  Rigid body dynamics algorithms.
38  Springer.
39  \endverbatim
40 
41 SourceFiles
42  CompactSpatialTensorTI.H
43 
44 See also
45  Foam::MatrixSpace
46  Foam::CompactSpatialTensor
47 
48 \*---------------------------------------------------------------------------*/
49 
50 #ifndef Foam_CompactSpatialTensorT_H
51 #define Foam_CompactSpatialTensorT_H
52 
53 #include "CompactSpatialTensor.H"
54 
55 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 
57 namespace Foam
58 {
59 
60 /*---------------------------------------------------------------------------*\
61  Class CompactSpatialTensor Declaration
62 \*---------------------------------------------------------------------------*/
63 
64 template<class Cmpt>
66 :
67  public MatrixSpace<CompactSpatialTensorT<Cmpt>, Cmpt, 3, 6>
68 {
69 
70 public:
71 
72  // Constructors
73 
74  //- Default construct
75  CompactSpatialTensorT() = default;
76 
77  inline CompactSpatialTensorT(const Foam::zero);
78 
79  //- Construct given MatrixSpace of the same rank
81  (
82  const typename CompactSpatialTensorT::msType&
83  );
84 
85  //- Construct given 18 components
87  (
88  const Cmpt& t00, const Cmpt& t01, const Cmpt& t02,
89  const Cmpt& t10, const Cmpt& t11, const Cmpt& t12,
90  const Cmpt& t20, const Cmpt& t21, const Cmpt& t22,
91  const Cmpt& t30, const Cmpt& t31, const Cmpt& t32,
92  const Cmpt& t40, const Cmpt& t41, const Cmpt& t42,
93  const Cmpt& t50, const Cmpt& t51, const Cmpt& t52
94  );
95 
96  //- Construct from Istream
97  inline explicit CompactSpatialTensorT(Istream&);
98 };
99 
100 
101 // * * * * * * * * * * * * * * * * * Traits * * * * * * * * * * * * * * * * //
102 
103 //- Data are contiguous if component type is contiguous
104 template<class Cmpt>
105 struct is_contiguous<CompactSpatialTensorT<Cmpt>> : is_contiguous<Cmpt> {};
106 
107 //- Data are contiguous label if component type is label
108 template<class Cmpt>
109 struct is_contiguous_label<CompactSpatialTensorT<Cmpt>>
110 :
111  is_contiguous_label<Cmpt>
112 {};
113 
114 //- Data are contiguous scalar if component type is scalar
115 template<class Cmpt>
117 :
119 {};
120 
121 
122 template<class Cmpt>
123 class typeOfTranspose<Cmpt, CompactSpatialTensor<Cmpt>>
124 {
125 public:
126 
128 };
129 
130 
131 template<class Cmpt>
133 {
134 public:
135 
137 };
138 
139 
140 template<class Cmpt>
142 <
143  Cmpt,
144  CompactSpatialTensor<Cmpt>,
146 >
147 {
148 public:
149 
151 };
152 
153 
154 template<class Cmpt>
155 class typeOfInnerProduct
156 <
157  Cmpt,
158  CompactSpatialTensorT<Cmpt>,
160 >
161 {
162 public:
163 
165 };
166 
167 
168 template<class Cmpt>
169 class typeOfInnerProduct
170 <
171  Cmpt,
172  CompactSpatialTensorT<Cmpt>,
174 >
175 {
176 public:
177 
179 };
180 
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 } // End namespace Foam
185 
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 // Include inline implementations
189 #include "CompactSpatialTensorTI.H"
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 #endif
194 
195 // ************************************************************************* //
Templated 3D compact spatial tensor derived from MatrixSpace used to represent transformations of spa...
Templated 3D spatial tensor derived from MatrixSpace used to represent transformations of spatial vec...
Definition: SpatialTensor.H:63
Abstract template class to provide the form resulting from the inner-product of two forms...
Definition: products.H:47
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
Templated matrix space.
Definition: MatrixSpace.H:54
CompactSpatialTensorT()=default
Default construct.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: POSIX.C:799
Templated 3D transposed compact spatial tensor derived from MatrixSpace used to represent transformat...
Abstract template class to provide the transpose form of a form.
Definition: products.H:62
Templated 3D Vector derived from VectorSpace adding construction from 3 components, element access using x(), y() and z() member functions and the inner-product (dot-product) and cross-product operators.
Definition: Vector.H:58
Templated 3D spatial vector derived from VectorSpace used to represent the anglular and linear compon...
Definition: SpatialVector.H:61
A template class to specify if a data type is composed solely of Foam::scalar elements.
Definition: contiguous.H:80
A template class to specify that a data type can be considered as being contiguous in memory...
Definition: contiguous.H:70
A template class to specify if a data type is composed solely of Foam::label elements.
Definition: contiguous.H:75
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition: zero.H:57
A templated (3 x 3) tensor of objects of <T> derived from MatrixSpace.
Definition: complexI.H:266
Namespace for OpenFOAM.