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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::CompactSpatialTensorT
29
30Description
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
41SourceFiles
42 CompactSpatialTensorTI.H
43
44See also
45 Foam::MatrixSpace
46 Foam::CompactSpatialTensor
47
48\*---------------------------------------------------------------------------*/
49
50#ifndef CompactSpatialTensorT_H
51#define CompactSpatialTensorT_H
52
54
55// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56
57namespace Foam
58{
59
60/*---------------------------------------------------------------------------*\
61 Class CompactSpatialTensor Declaration
62\*---------------------------------------------------------------------------*/
63
64template<class Cmpt>
66:
67 public MatrixSpace<CompactSpatialTensorT<Cmpt>, Cmpt, 3, 6>
68{
69
70public:
71
72 // Constructors
73
74 //- Construct null
75 inline CompactSpatialTensorT();
76
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
98};
99
100
101// * * * * * * * * * * * * * * * * * Traits * * * * * * * * * * * * * * * * //
102
103//- Data are contiguous if component type is contiguous
104template<class Cmpt>
105struct is_contiguous<CompactSpatialTensorT<Cmpt>> : is_contiguous<Cmpt> {};
106
107//- Data are contiguous label if component type is label
108template<class Cmpt>
110:
112{};
113
114//- Data are contiguous scalar if component type is scalar
115template<class Cmpt>
117:
119{};
120
121
122template<class Cmpt>
123class typeOfTranspose<Cmpt, CompactSpatialTensor<Cmpt>>
124{
125public:
128};
129
130
131template<class Cmpt>
132class typeOfTranspose<Cmpt, CompactSpatialTensorT<Cmpt>>
133{
134public:
137};
138
139
140template<class Cmpt>
142<
143 Cmpt,
146>
147{
148public:
151};
152
153
154template<class Cmpt>
156<
157 Cmpt,
160>
161{
162public:
164 typedef Tensor<Cmpt> type;
165};
166
167
168template<class Cmpt>
170<
171 Cmpt,
173 SpatialVector<Cmpt>
174>
175{
176public:
178 typedef Vector<Cmpt> type;
179};
180
181
182// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183
184} // End namespace Foam
185
186// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187
188// Include inline implementations
190
191// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192
193#endif
194
195// ************************************************************************* //
Templated 3D transposed compact spatial tensor derived from MatrixSpace used to represent transformat...
Templated 3D compact spatial tensor derived from MatrixSpace used to represent transformations of spa...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
Templated matrix space.
Definition: MatrixSpace.H:61
Templated 3D spatial tensor derived from MatrixSpace used to represent transformations of spatial vec...
Definition: SpatialTensor.H:70
Templated 3D spatial vector derived from VectorSpace used to represent the anglular and linear compon...
Definition: SpatialVector.H:68
A templated (3 x 3) tensor of objects of <T> derived from MatrixSpace.
Definition: Tensor.H:64
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
Definition: Vector.H:65
Abstract template class to provide the transpose form of a form.
Definition: products.H:63
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition: zero.H:63
Namespace for OpenFOAM.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598
A template class to specify if a data type is composed solely of Foam::label elements.
Definition: contiguous.H:86
A template class to specify if a data type is composed solely of Foam::scalar elements.
Definition: contiguous.H:94
A template class to specify that a data type can be considered as being contiguous in memory.
Definition: contiguous.H:78