136#ifndef Foam_QRMatrix_H
137#define Foam_QRMatrix_H
151template<
class MatrixType>
156 typedef typename MatrixType::cmptType
cmptType;
157 typedef SquareMatrix<cmptType>
SMatrix;
158 typedef RectangularMatrix<cmptType>
RMatrix;
211 label calcShapeFactor(
const MatrixType&
A)
const;
214 void decompose(MatrixType& AT);
217 void decompose(MatrixType& AT,
const bool pivot);
220 void calcQ(
const MatrixType& AT);
231 template<
template<
typename>
class ListContainer>
232 void solvex(ListContainer<cmptType>&
x)
const;
236 template<
template<
typename>
class ListContainer>
240 const ListContainer<cmptType>& source
372template<
class MatrixType>
static const Foam::dimensionedScalar A("", Foam::dimPressure, 611.21)
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
QRMatrix computes QR decomposition of a given scalar/complex matrix A into the following:
tmp< Field< cmptType > > solve(const IndirectListBase< cmptType, Addr > &source) const
MatrixType & Q() noexcept
Return reference to Q.
SMatrix inv() const
Return the inverse of (Q*R), solving x = (Q*R).inv()*source.
QRMatrix()=delete
Construct null.
pivoting
Options for the column pivoting.
@ FALSE
switch off column pivoting
@ TRUE
switch on column pivoting
SMatrix P() const
Create and return the permutation matrix.
outputs
Options for the output types.
@ BOTH_QR
compute both Q and R
modes
Options for the decomposition mode.
@ ECONOMY
compute economy-size decomposition
@ FULL
compute full-size decomposition
SquareMatrix< cmptType > SMatrix
RectangularMatrix< cmptType > RMatrix
MatrixType::cmptType cmptType
const MatrixType & Q() const noexcept
Return const reference to Q.
MatrixType & R() noexcept
Return reference to R.
const labelList & p() const noexcept
Return const reference to p.
const MatrixType & R() const noexcept
Return const reference to R.
A templated (M x N) rectangular matrix of objects of <Type>, containing M*N elements,...
A templated (N x N) square matrix of objects of <Type>, containing N*N elements, derived from Matrix.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A class for managing temporary objects.
List< label > labelList
A List of labels.
mode_t mode(const fileName &name, const bool followLink=true)
Return the file mode, normally following symbolic links.
static Ostream & output(Ostream &os, const IntRange< T > &range)
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)