Go to the documentation of this file.
38 VSinvUt_(
A.m(),
A.
n()),
53 for (
label i = 0; i < Um; i++)
79 for (
label j = l-1; j < Um; j++)
105 if (i+1 <= Un && i != Um)
120 scalar
f =
U_[i][l-1];
130 for (
label j = l-1; j < Un; j++)
140 U_[j][
k] +=
s*rv1[
k];
153 for (
label i = Um-1; i >= 0; i--)
159 for (
label j = l; j < Um; j++)
161 V_[j][i] = (
U_[i][j]/
U_[i][l])/
g;
164 for (
label j=l; j < Um; j++)
179 for (
label j = l; j < Um;j++)
181 V_[i][j] =
V_[j][i] = 0.0;
190 for (
label i =
min(Um, Un) - 1; i >= 0; i--)
195 for (
label j = l; j < Um; j++)
204 for (
label j = l; j < Um; j++)
212 scalar
f = (
s/
U_[i][i])*
g;
220 for (
label j = i; j < Un; j++)
227 for (
label j = i; j < Un; j++)
238 for (
label its = 0; its < 35; its++)
243 for (l =
k; l >= 0; l--)
246 if (
mag(rv1[l]) + anorm == anorm)
251 if (
mag(
S_[nm]) + anorm == anorm)
break;
258 for (
label i = l; i <
k+1; i++)
263 if (
mag(
f) + anorm == anorm)
break;
272 for (
label j = 0; j < Un; j++)
274 scalar
y =
U_[j][nm];
276 U_[j][nm] =
y*
c + z*
s;
277 U_[j][i] = z*
c -
y*
s;
290 for (
label j = 0; j < Um; j++)
V_[j][
k] = -
V_[j][
k];
297 <<
"no convergence in 35 SVD iterations"
306 scalar
f = ((
y - z)*(
y + z) + (
g -
h)*(
g +
h))/(2.0*
h*
y);
312 for (
label j = l; j <= nm; j++)
328 for (
label jj = 0; jj < Um; jj++)
332 V_[jj][j] =
x*
c + z*
s;
333 V_[jj][i] = z*
c -
x*
s;
347 for (
label jj=0; jj < Un; jj++)
351 U_[jj][j] =
y*
c + z*
s;
352 U_[jj][i] = z*
c -
y*
s;
Scalar sqrtSumSqr(const Scalar a, const Scalar b)
label m() const
Return the number of columns.
label findMax(const ListType &, const label start=0)
Find index of max element (and larger than given element).
label nZeros_
The number of zero singular values.
SVD(const SVD &)
Disallow default bitwise copy construct.
#define forAll(list, i)
Loop across all elements in list.
scalarRectangularMatrix VSinvUt_
The matrix product V S^(-1) U^T.
const dimensionedVector & g
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
label n() const
Return the number of rows.
const T sign(const T &a, const T &b)
DiagonalMatrix< scalar > S_
The singular values.
simpleMatrix< scalar > A(Nc)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const dimensionedScalar h
Planck constant.
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Form T() const
Return the transpose of the matrix.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
scalarRectangularMatrix V_
Square matrix V.
scalarRectangularMatrix U_
Rectangular matrix with the same dimensions as the input.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensionedScalar sqrt(const dimensionedScalar &ds)
label k
Boltzmann constant.
const dimensionedScalar c
Speed of light in a vacuum.
Various functions to operate on Lists.
void multiply(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, scalar > &f2)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
#define WarningInFunction
Report a warning using Foam::Warning.