CompactSpatialTensorT.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) 2016-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 Class
25  Foam::CompactSpatialTensorT
26 
27 Description
28  Templated 3D transposed compact spatial tensor derived from MatrixSpace
29  used to represent transformations of spatial vectors of rigid bodies.
30 
31  Reference:
32  \verbatim
33  Featherstone, R. (2008).
34  Rigid body dynamics algorithms.
35  Springer.
36  \endverbatim
37 
38 SourceFiles
39  CompactSpatialTensorTI.H
40 
41 See also
42  Foam::MatrixSpace
43  Foam::CompactSpatialTensor
44 
45 \*---------------------------------------------------------------------------*/
46 
47 #ifndef CompactSpatialTensorT_H
48 #define CompactSpatialTensorT_H
49 
50 #include "CompactSpatialTensor.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 
57 /*---------------------------------------------------------------------------*\
58  Class CompactSpatialTensor Declaration
59 \*---------------------------------------------------------------------------*/
60 
61 template<class Cmpt>
63 :
64  public MatrixSpace<CompactSpatialTensorT<Cmpt>, Cmpt, 3, 6>
65 {
66 
67 public:
68 
69  // Constructors
70 
71  //- Construct null
72  inline CompactSpatialTensorT();
73 
74  inline CompactSpatialTensorT(const Foam::zero);
75 
76  //- Construct given MatrixSpace of the same rank
78  (
79  const typename CompactSpatialTensorT::msType&
80  );
81 
82  //- Construct given 18 components
84  (
85  const Cmpt& t00, const Cmpt& t01, const Cmpt& t02,
86  const Cmpt& t10, const Cmpt& t11, const Cmpt& t12,
87  const Cmpt& t20, const Cmpt& t21, const Cmpt& t22,
88  const Cmpt& t30, const Cmpt& t31, const Cmpt& t32,
89  const Cmpt& t40, const Cmpt& t41, const Cmpt& t42,
90  const Cmpt& t50, const Cmpt& t51, const Cmpt& t52
91  );
92 
93  //- Construct from Istream
95 };
96 
97 
98 template<class Cmpt>
99 class typeOfTranspose<Cmpt, CompactSpatialTensor<Cmpt>>
100 {
101 public:
104 };
105 
106 
107 template<class Cmpt>
108 class typeOfTranspose<Cmpt, CompactSpatialTensorT<Cmpt>>
109 {
110 public:
113 };
114 
115 
116 template<class Cmpt>
117 class typeOfInnerProduct
118 <
119  Cmpt,
120  CompactSpatialTensor<Cmpt>,
122 >
123 {
124 public:
126  typedef SpatialTensor<Cmpt> type;
127 };
128 
129 
130 template<class Cmpt>
131 class typeOfInnerProduct
132 <
133  Cmpt,
134  CompactSpatialTensorT<Cmpt>,
136 >
137 {
138 public:
140  typedef Tensor<Cmpt> type;
141 };
142 
143 
144 template<class Cmpt>
145 class typeOfInnerProduct
146 <
147  Cmpt,
148  CompactSpatialTensorT<Cmpt>,
149  SpatialVector<Cmpt>
150 >
151 {
152 public:
154  typedef Vector<Cmpt> type;
155 };
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace Foam
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 // Include inline implementations
165 #include "CompactSpatialTensorTI.H"
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #endif
170 
171 // ************************************************************************* //
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:64
Abstract template class to provide the form resulting from.
Definition: products.H:47
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
MatrixSpace< CompactSpatialTensorT< Cmpt >, Cmpt, Mrows, Ncols > msType
MatrixSpace type.
Definition: MatrixSpace.H:63
Templated matrix space.
Definition: MatrixSpace.H:55
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:58
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:57
Templated 3D spatial vector derived from VectorSpace used to represent the anglular and linear compon...
Definition: SpatialVector.H:62
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:481
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
Definition: zero.H:49
Templated 3D tensor derived from MatrixSpace adding construction from 9 components, element access using xx(), xy() etc. member functions and the inner-product (dot-product) and outer-product of two Vectors (tensor-product) operators.
Definition: complexI.H:222
Namespace for OpenFOAM.