CompactSpatialTensor.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-2020 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::CompactSpatialTensor
26 
27 Description
28  Templated 3D compact spatial tensor derived from MatrixSpace used to
29  represent transformations of spatial vectors and the angular and linear
30  inertia of rigid bodies.
31 
32  Reference:
33  \verbatim
34  Featherstone, R. (2008).
35  Rigid body dynamics algorithms.
36  Springer.
37  \endverbatim
38 
39 SourceFiles
40  CompactSpatialTensorI.H
41 
42 See also
43  Foam::MatrixSpace
44  Foam::SpatialTensor
45 
46 \*---------------------------------------------------------------------------*/
47 
48 #ifndef CompactSpatialTensor_H
49 #define CompactSpatialTensor_H
50 
51 #include "SpatialTensor.H"
52 
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 
55 namespace Foam
56 {
57 
58 /*---------------------------------------------------------------------------*\
59  Class CompactSpatialTensor Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 template<class Cmpt>
64 :
65  public MatrixSpace<CompactSpatialTensor<Cmpt>, Cmpt, 6, 3>
66 {
67 
68 public:
69 
70  // Constructors
71 
72  //- Construct null
73  inline CompactSpatialTensor();
74 
75  inline CompactSpatialTensor(const Foam::zero);
76 
77  //- Construct given MatrixSpace of the same rank
79  (
80  const typename CompactSpatialTensor::msType&
81  );
82 
83  //- Construct given 18 components
85  (
86  const Cmpt& t00, const Cmpt& t01, const Cmpt& t02,
87  const Cmpt& t10, const Cmpt& t11, const Cmpt& t12,
88  const Cmpt& t20, const Cmpt& t21, const Cmpt& t22,
89  const Cmpt& t30, const Cmpt& t31, const Cmpt& t32,
90  const Cmpt& t40, const Cmpt& t41, const Cmpt& t42,
91  const Cmpt& t50, const Cmpt& t51, const Cmpt& t52
92  );
93 
94  //- Construct from Istream
96 };
97 
98 
99 template<class Cmpt>
100 class typeOfInnerProduct<Cmpt, CompactSpatialTensor<Cmpt>, Tensor<Cmpt>>
101 {
102 public:
105 };
106 
107 
108 template<class Cmpt>
109 class typeOfInnerProduct<Cmpt, CompactSpatialTensor<Cmpt>, Vector<Cmpt>>
110 {
111 public:
113  typedef SpatialVector<Cmpt> type;
114 };
115 
116 
117 template<class Cmpt>
118 class typeOfInnerProduct<Cmpt, SpatialTensor<Cmpt>, CompactSpatialTensor<Cmpt>>
119 {
120 public:
123 };
124 
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 // Include inline implementations
133 #include "CompactSpatialTensorT.H"
134 #include "CompactSpatialTensorI.H"
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 #endif
139 
140 // ************************************************************************* //
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
CompactSpatialTensor()
Construct null.
MatrixSpace< CompactSpatialTensor< Cmpt >, Cmpt, Mrows, Ncols > msType
MatrixSpace type.
Definition: MatrixSpace.H:63
Templated matrix space.
Definition: MatrixSpace.H:55
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
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
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:215
Namespace for OpenFOAM.