Loading...
Searching...
No Matches
tensor2D.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) 2011-2017 OpenFOAM Foundation
9 Copyright (C) 2019-2020 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
27Typedef
28 Foam::tensor2D
29
30Description
31 Tensor2D of scalars, i.e. Tensor2D<scalar>.
32
33 Analytical functions for the computation of complex eigenvalues and
34 complex eigenvectors from a given tensor2D.
35
36 Reference:
37 \verbatim
38 2-by-2 eigenvalue algorithm (tags:F; B):
39 Ford, W. (2014).
40 Numerical linear algebra with applications: Using MATLAB.
41 London: Elsevier/Academic Press.
42 DOI:10.1016/C2011-0-07533-6
43
44 Blinn, J. (1996).
45 Consider the lowly 2 x 2 matrix.
46 IEEE Computer Graphics and Applications, 16(2), 82-88.
47 DOI:10.1109/38.486688
48
49 2-by-2 eigenvector algorithm (tag:K):
50 Knill, O. (2004).
51 Mathematics Math21b Fall 2004.
52 bit.ly/2kjPVlX (Retrieved:06-09-19)
53
54 Kahan summation algorithm for 2-by-2 matrix determinants (tag:JLM):
55 Jeannerod, C.-P., Louvet, N., & Muller, J.-M., (2013).
56 Further analysis of Kahan's algorithm for the accurate computation
57 of 2x2 determinants.
58 Math. Comp. 82 (2013), 2245-2264.
59 DOI:10.1090/S0025-5718-2013-02679-8
60 \endverbatim
61
62See also
63 Test-Tensor2D.C
64
65SourceFiles
66 floatTensors2D.cxx
67 tensor2D.cxx
68
69\*---------------------------------------------------------------------------*/
70
71#ifndef Foam_tensor2D_H
72#define Foam_tensor2D_H
73
74#include "Tensor2D.H"
75#include "complex.H"
76
77// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
78
79namespace Foam
80{
81
82// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
83
85
86// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
87
88//- Return complex eigenvalues of a given tensor2D
89// \param T tensor2D
90//
91// \return Vector2D<complex> eigenvalues
93
94
95//- Return a complex eigenvector corresponding to
96//- a given complex eigenvalue of a given tensor2D
97// \param T tensor2D
98// \param eVal complex eigenvalue
99// \param standardBasis tensor2D orthogonal component, e.g. vector2D(1, 0)
100//
101// \return Vector2D<complex> eigenvector
103(
104 const tensor2D& T,
105 const complex& eVal,
106 const Vector2D<complex>& standardBasis
107);
108
109
110//- Return complex eigenvectors corresponding to
111//- given complex eigenvalues of a given tensor2D
112// \param T tensor2D
113// \param eVals eigenvalues
114//
115// \return Tensor2D<complex> eigenvectors, each row is an eigenvector
117(
118 const tensor2D& T,
119 const Vector2D<complex>& eVals
120);
122
123//- Return complex eigenvectors of a given tensor2D by computing
124//- the complex eigenvalues of the tensor2D in the background
125// \param T tensor2D
126//
127// \return Tensor2D<complex> eigenvectors, each row is an eigenvector
129
130
131// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132
133} // End namespace Foam
134
135// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137#include "sphericalTensor2D.H"
138
139// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140
141#endif
142
143// ************************************************************************* //
A templated (2 x 2) tensor of objects of <T> derived from VectorSpace.
Definition Tensor2D.H:55
Templated 2D Vector derived from VectorSpace adding construction from 2 components,...
Definition Vector2D.H:54
A complex number, similar to the C++ complex type.
Definition complex.H:71
Namespace for OpenFOAM.
dimensionedTensor eigenVectors(const dimensionedSymmTensor &dt)
dimensionedVector eigenValues(const dimensionedSymmTensor &dt)
Tensor2D< scalar > tensor2D
Tensor2D of scalars, i.e. Tensor2D<scalar>.
vector eigenVector(const symmTensor &T, const scalar eVal, const vector &standardBasis1, const vector &standardBasis2)
Return a real eigenvector corresponding to a given real eigenvalue of a given symmTensor.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)