symmTensor.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-2012 OpenFOAM Foundation
9  Copyright (C) 2019-2022 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 Typedef
28  Foam::symmTensor
29 
30 Description
31  SymmTensor of scalars, i.e. SymmTensor<scalar>.
32 
33  Analytical functions for the computation of real eigenvalues and
34  real eigenvectors from a given symmTensor.
35 
36 See also
37  Test-SymmTensor.C
38 
39 SourceFiles
40  symmTensor.C
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef symmTensor_H
45 #define symmTensor_H
46 
47 #include "SymmTensor.H"
48 #include "vector.H"
49 #include "sphericalTensor.H"
50 #include "tensor.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 
60 
61 typedef Tensor<scalar> tensor;
62 
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 
65 //- Return real ascending-order eigenvalues of a given symmTensor
66 // \param T symmTensor
67 //
68 // \return vector real eigenvalues
70 
71 
72 //- Return a real eigenvector corresponding to
73 //- a given real eigenvalue of a given symmTensor
74 // \param T symmTensor
75 // \param eVal real eigenvalue
76 // \param standardBasis1 symmTensor orthogonal component 1
77 // \param standardBasis2 symmTensor orthogonal component 2
78 //
79 // \return vector real eigenvector
81 (
82  const symmTensor& T,
83  const scalar eVal,
84  const vector& standardBasis1,
85  const vector& standardBasis2
86 );
87 
88 
89 //- Return real eigenvectors corresponding to
90 //- given real eigenvalues of a given symmTensor
91 // \param T symmTensor
92 // \param eVals real eigenvalues
93 //
94 // \return tensor real eigenvectors, each row is an eigenvector
96 (
97  const symmTensor& T,
98  const vector& eVals
99 );
100 
101 
102 //- Return real eigenvectors of a given symmTensor by computing
103 //- the real eigenvalues of the tensor in the background
104 // \param T symmTensor
105 //
106 // \return tensor real eigenvectors, each row is an eigenvector
108 
109 
110 //- Return inverse of a given symmTensor, and fall back
111 //- to pseudo-inverse if the symmTensor is singular
112 // \param st symmTensor
113 //
114 // \return symmTensor inverse of symmTensor
115 symmTensor pinv(const symmTensor& st);
116 
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 } // End namespace Foam
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 #endif
125 
126 // ************************************************************************* //
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.
Definition: symmTensor.C:146
Tensor< scalar > tensor
Definition: symmTensor.H:57
dimensionedTensor eigenVectors(const dimensionedSymmTensor &dt)
SymmTensor< scalar > symmTensor
SymmTensor of scalars, i.e. SymmTensor<scalar>.
Definition: symmTensor.H:55
symmTensor pinv(const symmTensor &st)
Return inverse of a given symmTensor, and fall back to pseudo-inverse if the symmTensor is singular...
Definition: symmTensor.C:334
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensionedVector eigenValues(const dimensionedSymmTensor &dt)
Tensor of scalars, i.e. Tensor<scalar>.
Namespace for OpenFOAM.